<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>PaulDotCom</title>
        <link>http://pauldotcom.com/</link>
        <description></description>
        <language>en</language>
        <copyright>Copyright 2010</copyright>
        <lastBuildDate>Wed, 17 Mar 2010 15:00:00 -0500</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>PDC Smackdown!  Ron &quot;Scanman&quot; Gula vs. Rich &quot;The General&quot; Bejtlich</title>
            <description><![CDATA[<p>Please join us tomorrow night at 7:30 PM for <a href="http://www.pauldotcom.com/wiki/index.php/Episode191"> DebateMania CXCI</a>: "Controls vs. Threat-based Approaches to Information Security Monitoring".</p>

<p>We'll have Richard "Bonecrusher" Bejtlich, Director of Incident Response at GE, and Ron "Tenacious" Gula, CEO of Tenable Network Security, debate the pros and cons of having a strong IT controls program vs. one focused on responding to threats.  Ron will fearlessly defend the practice of a controls program while Rich will bring bone crushing rebuttals for a threat-centric monitoring program.</p>

<div style="text-align:center;"><img src="http://pauldotcom.com//wedgie_small.png" alt="wedgie_small.png" border="0" width="320" height="356" /></div>
<div style="text-align:center;"><strong>NOTE: Picture is not an actual representation of past debates.</strong></div>
<br>
The live stream should be active around 19:30 EDT (7:30 PM), Thursday, March 18th.  Please keep in mind that the recording time is as slippery as a lubed up Andre The Giant.

<p>Please join the IRC channel during the stream - we can take live comments and discussion from the channel!  Find us on IRC at irc.freenode.net #pauldotcom.</p>

<p>When active, the live stream(s) can be found at:</p>

<p><a href="http://pauldotcom.com/livestream-chat.html">PaulDotCom Live!</a> - You can watch, listen, and chat during each episode! You can access the streaming videos at any time by visiting <a href="http://pauldotcom.com/live/">http://pauldotcom.com/live/</a></p>

<p><a href="http://radio.pauldotcom.com:8000">PaulDotCom Icecast Radio (Audio Only)</a></p>

<p>Break out your adult beverage of choice and join us, enjoy the show live, and thanks for listening!</p>

<p>- Paul, Larry, Carlos, Darren, John & Mick</p>]]></description>
            <link>http://pauldotcom.com/2010/03/pdc-smackdown-ron-scanman-gula.html</link>
            <guid>http://pauldotcom.com/2010/03/pdc-smackdown-ron-scanman-gula.html</guid>
            
            
            <pubDate>Wed, 17 Mar 2010 15:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>PaulDotCom Security Weekly - Episode 190 - March 12, 2010</title>
            <description><![CDATA[<p>Live from CCDC!</p>

<p><a href="http://pauldotcom.com/wiki/index.php/Episode190">Episode 190 Show Notes</a></p>

<div style="text-align:center;"><img src="http://pauldotcom.com//CCDCBadgeLightup.png" alt="CCDCBadgeLightup.png" border="0" width="300" height="400" /></div>

<div style="text-align:center;"><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-Episode190.mp3">Direct Audio Download</a></div>

<p>Hosts: <a href="http://www.pauldotcom.com">Larry "HaxorTheMatrix" Pesce</a>, <a href="http://pauldotcom.com">Paul "PaulDotCom" Asadoorian</a>, <a href="http://www.pauldotcom.com">John Strand</a>, <a href="http://www.pauldotcom.com">Mick Douglas</a>, <a href="http://pauldotcom.com">Carlos "Dark0perator" Perez</a></p>

<p>Audio Feeds: <a href="http://pauldotcom.com/podcast/psw.xml"><img src="http://pauldotcom.com/images/xml.png"></a>  <a href="http://www.odeo.com/channel/38062/view"><img src="http://pauldotcom.com/images/badge-channel-black.gif"></a><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=91472687"> <img src="http://pauldotcom.com/images/itunes.gif"></a></p>]]></description>
            <link>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-66.html</link>
            <guid>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-66.html</guid>
            
            
            <pubDate>Tue, 16 Mar 2010 21:06:52 -0500</pubDate>
        </item>
        
        <item>
            <title>Nessus Scanning through a Metasploit Meterpreter Session</title>
            <description><![CDATA[<p>By Mark Baggett</p>

<p><u><strong>Scenario:</strong></u>  You are doing a penetration test.   The client's internet face is locked down pretty well.  No services are exposed externally and only HTTP/HTTPS are allowed OUT of the corporate firewall.   You email in a carefully crafted email with the meterpreter attacked.   An accommodating users is more than happy to click your attachment giving you meterpreter access to their machine.   Now what?  How about using Nessus to scan all the services on their internal network?   Here is a tutorial on how to do it.</p>

<p><u><strong>The Players</strong></u><br />
Attacker 172.16.186.132<br />
Victim  172.16.186.126</p>

<p><strong><u>Step 1</u></strong> - After you have meterpreter access install OpenSSH on the victim's computer.   Joff Thyer, packet guru, crazy aussie and all around smart guy did a great job of outlining the install process on his blog.   I pretty much just followed his instructions<a href="http://packetheader.blogspot.com/2009/01/installing-openssh-on-windows-via.html"> here</a>.</p>

<p><u><strong>Step 2 -</strong></u> After you've installed OpenSSH and setup your account use Meterpreters PORTFWD command to forward a port from the attacker's machine to the SSH listener on the victim's machine.   For example:</p>

<p>meterpreter> portfwd add -L 172.16.186.132 -l 8000 -r 172.16.186.128 -p 22</p>

<p>This command sets up a listener on port 8000 of the attacker's IP (172.16.186.132) and forwards packets to port 22 on the victim's machine (172.16.186.128).</p>

<p><br />
<u><strong>Step 3 -</strong></u> SSH into the portfwd port you just created and setup a dynamic port forwarder on your machine.  For example:</p>

<p># ssh -D 127.0.0.1:9000 -p 8000 username@172.16.186.132</p>

<p>This command sets up a SOCKS4 proxy on port 9000 which is forwarded through the SSH session on the victim.</p>

<p><u><strong>Step 4 -</strong></u> Use PROXYCHAINS to forward your nessusd traffic through the SOCKS4 listener on port 9000.     This is as simple as changing the TCP port on the last line of /etc/proxychains.conf from its default of 9050 to port 9000 and launching nessusd through proxychains as follows:</p>

<p># proxychains /usr/sbin/nessusd -D</p>

<p><u><strong>Step 5 - </strong></u>Start the nessus client and do you scan.</p>

<p>If you're not familiar with proxychains be sure to <a href="http://pauldotcom.com/2010/03/ssh-gymnastics-with-proxychain.html">check out the post from last week.</a></p>

<p>Here is a video demo:</p>

<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10203481&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10203481&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><p><a href="http://vimeo.com/10203481">Nessus Scan through a Meterpreter Session</a> from <a href="http://vimeo.com/pauldotcom">PaulDotCom</a> on <a href="http://vimeo.com">Vimeo</a>.</p></p>

<p>Mark Baggett is teaching SANS 504 in Raleigh NC June 21st! <a href="http://www.sans.org/raleigh-2010-cs/description.php?tid=243">Click here for more information.</a></p>]]></description>
            <link>http://pauldotcom.com/2010/03/nessus-scanning-through-a-meta.html</link>
            <guid>http://pauldotcom.com/2010/03/nessus-scanning-through-a-meta.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Videos</category>
            
            
            <pubDate>Tue, 16 Mar 2010 06:44:32 -0500</pubDate>
        </item>
        
        <item>
            <title>Episode 190 - live from CCDC tonight!</title>
            <description><![CDATA[<p>Please join us for a special live recording tonight at 7:30 EST from the <a href="http://www.midatlanticccdc.org/CCDC/about/ccdc-2010/"> Collegiate Cyber Defense Competition</a> in Maryland for <a href="http://www.pauldotcom.com/wiki/index.php/Episode190"> Episode 190 </a> of PaulDotCom Security Weekly.</p>

<div style="text-align:center;"><img src="http://pauldotcom.com//2010_CCDC_small.gif" alt="2010_CCDC_small.gif" border="0" width="350" height="116" /></div>

<p><br></p>

<p>Please join the IRC channel during the stream - we can take live comments and discussion from the channel!  Find us on IRC at irc.freenode.net #pauldotcom.</p>

<p>When active, the live stream(s) can be found at:</p>

<p><a href="http://pauldotcom.com/livestream-chat.html">PaulDotCom Livestream</a> - All new with Video and Chat! You can access the streaming videos at any time by visiting <a href="http://pauldotcom.com/live/">http://pauldotcom.com/live/</a></p>

<p><a href="http://radio.pauldotcom.com:8000">PaulDotCom Icecast Radio</a></p>

<p>Break out your adult beverage of choice and join us, enjoy the show live, and thanks for listening!</p>

<p>- Larry, Mick, Carlos, John, Darren & Paul</p>]]></description>
            <link>http://pauldotcom.com/2010/03/episode-190---live-at-ccdc-ton.html</link>
            <guid>http://pauldotcom.com/2010/03/episode-190---live-at-ccdc-ton.html</guid>
            
            
            <pubDate>Thu, 11 Mar 2010 09:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>PaulDotCom Security Weekly - Episode 189 - March 5, 2010</title>
            <description><![CDATA[<p><a href="http://pauldotcom.com/wiki/index.php/Episode189">Episode 189 Show Notes</a></p>

<div style="text-align:center;"><img src="http://pauldotcom.com//SecurityCamerasFail.jpg" alt="SecurityCamerasFail.jpg" border="0" width="600" height="500" /></div>

<p>Top ten tips to socially engineer management into implementing security the right way, plus all sorts of interesting stories including the "porn detection stick"!</p>

<div style="text-align:center;"><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode189.mp3">Direct Audio Download</a></div>

<p>Hosts: <a href="http://www.pauldotcom.com">Larry "HaxorTheMatrix" Pesce</a>, <a href="http://pauldotcom.com">Paul "PaulDotCom" Asadoorian</a>, <a href="http://www.pauldotcom.com">John Strand</a>, <a href="http://www.pauldotcom.com">Mick Douglas</a>, <a href="http://pauldotcom.com">Carlos "Dark0perator" Perez</a></p>

<p>Audio Feeds: <a href="http://pauldotcom.com/podcast/psw.xml"><img src="http://pauldotcom.com/images/xml.png"></a>  <a href="http://www.odeo.com/channel/38062/view"><img src="http://pauldotcom.com/images/badge-channel-black.gif"></a><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=91472687"> <img src="http://pauldotcom.com/images/itunes.gif"></a></p>]]></description>
            <link>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-64.html</link>
            <guid>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-64.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security Weekly</category>
            
            
            <pubDate>Tue, 09 Mar 2010 13:34:50 -0500</pubDate>
        </item>
        
        <item>
            <title>Episode 189 date &amp; time change!</title>
            <description><![CDATA[<p>Please note: Instead of our regular Thursday debacle, PaulDotCom Security Weekly<a href="http://www.pauldotcom.com/wiki/index.php/Episode189"> Episode 189 </a> will be recorded on Friday at 21:00 EST (9:00 PM).</p>

<p>Also, there were <a href="http://twitter.com/ashimmy/statuses/9973102590"> rumors </a> we won an award somewhere for something ...</p>

<div style="text-align:center;"><img src="http://pauldotcom.com//nine_lives.jpg" alt="nine_lives.jpg" border="0" width="350" height="317" /></div>

<p><br></p>

<p>Please join the IRC channel during the stream - we can take live comments and discussion from the channel!  Find us on IRC at irc.freenode.net #pauldotcom.</p>

<p>When active, the live stream(s) can be found at:</p>

<p><a href="http://pauldotcom.com/livestream-chat.html">PaulDotCom Livestream</a> - All new with Video and Chat! You can access the streaming videos at any time by visiting <a href="http://pauldotcom.com/live/">http://pauldotcom.com/live/</a></p>

<p><a href="http://radio.pauldotcom.com:8000">PaulDotCom Icecast Radio</a></p>

<p>Break out your adult beverage of choice and join us, enjoy the show live, and thanks for listening!</p>

<p>- Paul, Larry, John, Carlos, Mick & Darren</p>]]></description>
            <link>http://pauldotcom.com/2010/03/episode-189-date-time-change.html</link>
            <guid>http://pauldotcom.com/2010/03/episode-189-date-time-change.html</guid>
            
            
            <pubDate>Thu, 04 Mar 2010 10:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>SSH gymnastics with proxychains</title>
            <description><![CDATA[<p>By Mark Baggett</p>

<p>Proxychains is a Linux dynamically loadable library that will intercept any TCP and UDP traffic from a specific process and tunnel it over HTTP, SOCKS4 or SOCKS5 proxy.    For this discussion I will be focusing on SOCKS4 proxies setup with the SSH -D parameter.  Proxychains is already installed in Backtrack4 and configured to tunnel over a SOCKS4 listener on port 9050 on the local host.    By default, proxychains uses the configuration file /etc/proxychains.conf.   But Proxychains will look for a proxychains.conf file in the current working directory and use it if one exists.    To illustrate how an attacker or penetration tester can use this powerful tool let us look at the following scenario.     The attacker is attempting to gain access to the TARGET host at 10.10.1.2 on the following network.  (Note the super 1337 Visio skills)</p>

<p><IMG SRC=http://www.pauldotcom.com/sshgymnetdiagram.JPG><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://pauldotcom.com/assets_c/2010/03/sshgymnetdiagram-444.html" onclick="window.open('http://pauldotcom.com/assets_c/2010/03/sshgymnetdiagram-444.html','popup','width=570,height=357,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View image</a></span></p>

<p>The attacker brute forced valid credentials to the public SSH service on 192.168.100.13.  Then they cracked passwords obtained from that machine and used them to find valid credentials on a second DMZ host at 192.168.100.15.   That host, has two network cards and the second network interface straddles the corporate firewall and connect to the internal network where our target 10.10.1.2 sits.    Note that for this attack to work the second host is not required to straddle the firewall, it just needs to have firewall rules in place that allow it to access the internal target.</p>

<p>The attacker starts his attack by connecting to the external SSH listener at 192.168.100.13 as follows:</p>

<p><img src = http://pauldotcom.com/sshgym1.JPG><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://pauldotcom.com/assets_c/2010/03/sshgym1-446.html" onclick="window.open('http://pauldotcom.com/assets_c/2010/03/sshgym1-446.html','popup','width=504,height=95,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View image</a></span></p>

<p>"-D 127.0.0.1:9050" causes a dynamic port forwarder to start on port 9050 of the attackers local host.   Since the default proxychains.conf file already has an entry to proxy on port 9050 (tor's default) all the attacker has to do is launch a program and proceed it with "proxychains" and all its traffic will be shoveled to the host 192.168.100.13.  If the attacker ran:</p>

<p>>proxychains wget localhost</p>

<p>They would get back the website listening on port 80 on host 192.168.100.13.  But I want to bounce off that server and gain access to 192.168.100.15.   So I could do this:</p>

<p>>proxychains ssh user@192.168.100.15 </p>

<p>That would make an SSH connection into 192.168.100.15.  On that host it would appear that the connection came from 192.168.100.13.  In this case after I make the connection to 192.168.100.15 I really want to pivot a second time to get to the internal host.  So I run the following:</p>

<p><img src = http://pauldotcom.com/sshgym2.JPG><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://pauldotcom.com/assets_c/2010/03/sshgym2-448.html" onclick="window.open('http://pauldotcom.com/assets_c/2010/03/sshgym2-448.html','popup','width=591,height=110,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View image</a></span></p>

<p>What is really awesome here is that this establishes a NEW dynamic port forwarder on the attackers localhost at port 8090.   The attacker now has the multiple dynamic port forwarders listening on his host.  The first port forwarder on 9050 takes him into 192.168.100.13 and the second on 8090 takes him to 192.168.100.15.   The attacker  can use proxychains again with a different configuration file to tunnel all the TCP and UDP packets from a program to execute on the second pivot point at 192.168.100.15.   To do this I did the following:</p>

<p>>mkdir aconf<br />
>cd aconf<br />
>cat /etc/proxychains.conf | sed "s/127.0.0.1 9050/127.0.0.1 8090/g" > ./proxychains.conf</p>

<p>or you can use your favorite editor to change the port at the bottom of the configuration file.  Then from the directory containing my new configuration file I ran this:</p>

<p><img src = http://pauldotcom.com/sshgym3.JPG><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://pauldotcom.com/assets_c/2010/03/sshgym3-450.html" onclick="window.open('http://pauldotcom.com/assets_c/2010/03/sshgym3-450.html','popup','width=540,height=100,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View image</a></span><br />
 <br />
Which started the NESSUS server daemon and allowed me to do a full vulnerability scan on the internal host.   Nessusd worked great over proxychains!   Nmap, Metasploit and others also worked well.  To launch Metasploit using proxychains you'd simply run the following:</p>

<p><img src = http://pauldotcom.com/sshgym4.JPG><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://pauldotcom.com/assets_c/2010/03/sshgym4-451.html" onclick="window.open('http://pauldotcom.com/assets_c/2010/03/sshgym4-451.html','popup','width=607,height=101,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View image</a></span></p>

<p>Here is a quick video showing how quickly you pivot through hosts and capture the target.</p>

<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9874405&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9874405&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><p><a href="http://vimeo.com/9874405">SSH Gymnastics</a> from <a href="http://vimeo.com/pauldotcom">PaulDotCom</a> on <a href="http://vimeo.com">Vimeo</a>.</p></p>

<p>PREVENTION:<br />
I hear you, "Dude... That is scary.  How do I prevent this from happening?"<br />
Well, first be sure to minimize the ports you open between hosts and don't have host that straddle your firewall.  Second, you can turn off port forwarding in your sshd configuration files.   Edit /etc/ssh/sshd_config and set "AllowTCPForwarding to NO".   While your in there make all <a href="http://www.securecentos.com/basic-security/hardening-sshd/">these changes</a>.   Remember that if an attacker has a shell they can install their own forwarders or use netcat so this is just one step in trying to preventing the host from being a relay.  It does make the attacker job much harder when you turn off the DEFAULT mode of being a relay. </p>

<p>Additional References:<br />
http://pauldotcom.com/2009/08/scanning-through-a-tor-network.html<br />
http://netwarsplayers.googlegroups.com/web/SSH+Tunneling+In+The+Context+Of+Netwars.pdf<br />
http://www.securityfocus.com/infocus/1816<br />
http://proxychains.sourceforge.net/</p>

<p>Shout out to Jim Shewmaker and ace1 over at SANS Netwars.   Ace1's excellent paper inspired me to take another look at proxychains.<br />
Note: proxychains support CHAINS of proxies (imagine that).  There is probably a more elegant way to do this using just one configuration file and a strict chain.   Do you know how?  Leave me a comment!</p>

<p>Mark Baggett is teaching SANS 504 in Raleigh NC June 21st! <a href="http://www.sans.org/raleigh-2010-cs/description.php?tid=243">Click here for more information.</a></p>]]></description>
            <link>http://pauldotcom.com/2010/03/ssh-gymnastics-with-proxychain.html</link>
            <guid>http://pauldotcom.com/2010/03/ssh-gymnastics-with-proxychain.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Videos</category>
            
            
            <pubDate>Wed, 03 Mar 2010 18:29:05 -0500</pubDate>
        </item>
        
        <item>
            <title>&quot;IPv6 Survival Guide&quot; seminar discount offer!</title>
            <description><![CDATA[<p>You learned to live with IPv4's deficiencies.  NAT doesn't scare you and your VoIP systems and VPNs can handle multiple layers of it.  So why should you care about IPv6?  The answer is: You should care because you may already be using IPv6 without knowing about it ... and knowing is half the battle!</p>

<p>On Wednesday, March 17th, please join DShield founder and SANS CSO <a href="http://johannes.homepc.org/resume.htm">Johannes Ullrich</a> in a unique seminar at a tremendous discount to PaulDotCom listeners!</p>

<p>The <a href="http://www.sans.org/vlive/details.php?nid=21504">IPv6 Survival Guide class</a> will introduce you to the very basics of IPv6 and answer questions such as:<br />
- What are those long addresses about and how are they assigned? <br />
- What is the difference between different tunnel technologies like 6-to-4, teredo, isatap and more? <br />
- Will IPv6 work with my systems? <br />
- How do I filter IPv6 and how do I detect if I already use it?</p>

<p>Johannes will also go over some of the new features offered by IPv6 like mobile IP, jumbo packets and auto configuration.</p>

<p>Date: Wednesday, March 17, 2010<br />
Time: 3:00 PM - 5:00 PM EDT<br />
Cost: $20 with discount code ($195.00 retail)<br />
Discount Code: IPV6PDC<br />
URL:  http://www.sans.org/vlive/details.php?nid=21504</p>

<p>Johannes will also be teaching <a href="http://www.sans.org/info/55793">Security 503: Intrusion Detection In-Depth</a>, a 36-hr course, on vLive! beginning April 12. </p>

<div style="text-align:left;"><img src="http://pauldotcom.com//vlive_logo_small.jpg" alt="vlive_logo_small.jpg" border="0" width="125" height="124" /></div>

<p><br />
NOTE: Use discount code 503PDC for a $250 discount on the above class!</p>

<p>- PaulDotCom Crew</p>]]></description>
            <link>http://pauldotcom.com/2010/03/ipv6-survival-guide-seminar-di.html</link>
            <guid>http://pauldotcom.com/2010/03/ipv6-survival-guide-seminar-di.html</guid>
            
            
            <pubDate>Wed, 03 Mar 2010 11:00:00 -0500</pubDate>
        </item>
        
        <item>
            <title>PaulDotCom Security Weekly - Episode 188 - February 25, 2010</title>
            <description><![CDATA[<p><html><head><br />
<style type="text/css"><br />
	ins.diff {text-decoration:none; color:green}<br />
	del.diff {color:red}<br />
	</style><br />
<style type="text/css" media="screen">@import "file://localhost/Users/paulda/Library/Application%20Support/NetNewsWire/StyleSheets/Default%20(3.1).nnwstyle/stylesheet.css";</style><br />
<title>PaulDotCom Security Weekly - Episode 188 - February 25, 2010</title><br />
</head><br />
<body id="traditionalViewBody" class="completeNewsItem"><br />
<div id="_pageContainer"><br />
<div id="_newsItemTitle"><a href="http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-64.html">PaulDotCom Security Weekly - Episode 188 - February 25, 2010</a></div><br />
<div id="_newsItemContent"><br />
<div id="_newsItemDateline"><span class="newsItemSource"><a href="http://pauldotcom.com/"><img src="file://localhost/Users/paulda/Library/Caches/NetNewsWire/Favicons.noindex/pauldotcom_com.ico" align="top" height="16" width="16" /></a> <a href="http://pauldotcom.com/">PaulDotCom's Web Site</a></span> <span class="newsItemDate" title="2010-03-01T18:34:50Z">3/1/10 1:34 PM</span> <span class="newsItemCreator">Paul Asadoorian </span> <span class="newsItemSubject">Security Weekly</span> </div><br />
<div id="_newsItemDescription"><br />
	<p>[Note: We've given up on fighting iTunes and are now releasing both parts for each episode at the same time. Make sure you check your podcast application (most listeners use iTunes) and make sure you are getting both parts of each episode!]</p><br />
<p><a href="http://pauldotcom.com/wiki/index.php/Episode188">Episode 188 Show Notes</a></p><br />
<p><strong>Part 1: "Freedom TM"</strong></p><br />
<div><img src="http://pauldotcom.com//FreedomCoverIsometric03.jpg" alt="FreedomCoverIsometric03.jpg" border="0" width="226" height="290" /></div><br />
<p>The PaulDotCom crew interviews Daniel Suarez to discuss his new book Freedom TM, security, privacy, socialogy, and more!</p><br />
<div><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode188pt1.mp3">188 Part 1 - Direct Audio Download</a></div><br />
<p><strong>Part 2: DNS sub-domain brute forcing &amp; Penetration</strong></p><br />
<div><img src="http://pauldotcom.com//nopenetration.png" alt="nopenetration.png" border="0" width="501" height="343" /></div><br />
<p>We discuss when penetration is important, how to talk to management, coolest WRT54G hack, and a technical segment on DNS sub-domain brute forcing.</p><br />
<div><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode188pt2.mp3">188 Part 2 - Direct Audio Download</a></div><br />
<p>Hosts: <a href="http://www.pauldotcom.com">Larry "HaxorTheMatrix" Pesce</a>, <a href="http://pauldotcom.com">Paul "PaulDotCom" Asadoorian</a>, <a href="http://www.pauldotcom.com">John Strand</a>, <a href="http://www.pauldotcom.com">Mick Douglas</a>, <a href="http://pauldotcom.com">Carlos "Dark0perator" Perez</a></p><br />
<p>Audio Feeds: <a href="http://pauldotcom.com/podcast/psw.xml"><img src="http://pauldotcom.com/images/xml.png" /></a> <a href="http://www.odeo.com/channel/38062/view"><img src="http://pauldotcom.com/images/badge-channel-black.gif" /></a> <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=91472687"><img src="http://pauldotcom.com/images/itunes.gif" /></a></p><br />
</div><br />
<div id="_newsItemExtraLinks"></div><br />
</div><br />
</div></body></html></p>]]></description>
            <link>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-65.html</link>
            <guid>http://pauldotcom.com/2010/03/pauldotcom-security-weekly---e-65.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security Weekly</category>
            
            
            <pubDate>Tue, 02 Mar 2010 07:35:27 -0500</pubDate>
        </item>
        
        <item>
            <title>PaulDotCom Episode 188 Featuring Daniel Suarez</title>
            <description><![CDATA[<p>Please join us and Daniel Suarez, author of runaway hit <a href="http://thedaemon.com/"> Daemon</a> to discuss his latest work Freedom(TM).  The live stream should be active around 19:30 EST (7:30 PM), Thursday, February 25th.  Please keep in mind that the recording time is an estimate.</p>

<div style="text-align:center;"><img src="http://pauldotcom.com//freedom.png" alt="freedom.png" border="0" width="314" height="476" /></div>

<p>Please join the IRC channel during the stream - we can take live comments and discussion from the channel!  Find us on IRC at irc.freenode.net #pauldotcom.</p>

<p>When active, the live stream(s) can be found at:</p>

<p><a href="http://pauldotcom.com/livestream-chat.html">PaulDotCom Live!</a> - You can watch, listen, and chat during each episode! You can access the streaming videos at any time by visiting <a href="http://pauldotcom.com/live/">http://pauldotcom.com/live/</a></p>

<p><a href="http://radio.pauldotcom.com:8000">PaulDotCom Icecast Radio (Audio Only)</a></p>

<p>Break out your adult beverage of choice and join us, enjoy the show live, and thanks for listening!</p>

<p>- Paul, Larry, Carlos, Darren, John & Mick</p>]]></description>
            <link>http://pauldotcom.com/2010/02/episode-188-recording-notice-f.html</link>
            <guid>http://pauldotcom.com/2010/02/episode-188-recording-notice-f.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security Weekly</category>
            
            
            <pubDate>Wed, 24 Feb 2010 11:13:35 -0500</pubDate>
        </item>
        
        <item>
            <title>Meterpreter script to unlock the screensaver</title>
            <description><![CDATA[<p>By Mark Baggett</p>

<p>Lets face it, security guys love their password protected screensavers.  I am no exception.  Without it, many users would likely never lock their computers.   This simple mechanism may slow down or in some cases completely prevented the attacker from accessing resources on a remote machine.   A strong password on a screensaver was one of the hurdles that you had to overcome in the Christmas 2008 Ethical Hacker challenge, "<a href="http://www.ethicalhacker.net/content/view/218/2/">Santa Claus is hacking to town</a>".   Santa really could have used this script.   </p>

<p>The Relentless-coding blog recently posted a meterpreter script that bypasses the screensaver password protection.    The script patches the lsass process running in memory where the codes check the validity of the password that was entered.   After the patch is applied the attacker can enter ANY password to unlock the screensaver.  The script works on Windows XP SP2, SP3, Windows Vista and Windows 7.  Lets take a look at the script in action:</p>

<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9692271&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9692271&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><p><a href="http://vimeo.com/9484706">Meterpreter Screensaver unlock script</a> from <a href="http://vimeo.com/pauldotcom">PaulDotCom</a> on <a href="http://vimeo.com">Vimeo</a>.</p></p>

<p><br />
The script isn't currently part of the metasploit distribution so you'll need to download it from the <a href="http://relentless-coding.blogspot.com/2010/02/windows-vista-7-targets-for-screen.html">Relentless-coding site.</a>    Save it to your "scripts/meterpreter" directory in your Metasploit installation.  In a Backtrack installation you'll find that directory under "/pentest/exploits/framework3/scripts/meterpreter".</p>

<p>Mark Baggett is teaching SANS 504 in Raleigh NC June 21st!  <a href="http://www.sans.org/raleigh-2010-cs/description.php?">Click here for more information.</a></p>]]></description>
            <link>http://pauldotcom.com/2010/02/meterpreter-script-to-unlock-t.html</link>
            <guid>http://pauldotcom.com/2010/02/meterpreter-script-to-unlock-t.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Videos</category>
            
            
            <pubDate>Tue, 23 Feb 2010 22:24:58 -0500</pubDate>
        </item>
        
        <item>
            <title>Killing the Monkey in the Middle</title>
            <description><![CDATA[<p style="margin-bottom: 0in">There are many ways for the attacker to
insert themselves in the middle of a conversation.   Just some of the
tools at the attackers disposal include:</p>
<p style="margin-bottom: 0in"></p>

<p style="margin-bottom: 0in"></p><ul><li>DNS Cache Poisoning (metasploit)</li><li>NETBIOS Names spoofing (nbtool at
skullsecurity.org)</li><li>Lie about the DNS,WINS and/or default
gateway with a rouge DHCP server  (yersinia, ettercap)</li><li>deliver a WPAD file or otherwise
reconfigure the browser proxy (metasploit)</li><li>IPv6 ISATAP spoofing</li><li>Attack routing protocols such as BGP
MITM</li><li>IP source routing attacks (netcat)</li><li>ICMP Redirect messages (ettercap)</li><li>ARP Cache Poisoning (yersinia,
ettercap, cain)</li><li>Switch Port Stealing (ettercap)</li><li>Layer2 Mac Flooding* (yersinia,
macflood, macof)</li><li>Gratuitous Spanning Tree BPDU Root
messages*  (yersinia)</li></ul>* Allows sniffing that leads to MiTM

<p style="margin-bottom: 0in">Some of these attacks work across the
internet, but most of these are limited to the LAN and rely on
Layer2.  The good news is that many of these attacks can be mitigated
with new features deployed in the latest version of Cisco's IOS 
(12.2 or better).   BPDU Guard, DHCP Snooping,  DHCP Snooping
+Dynamic Arp Inspection , DHCP Snooping + IP Source Guard,  ARP Rate
Limiting, Mac Address port security, PVLAN Protected, Isolated,
Community and Promiscuous ports and 802.1x can all be used to
effectively limit many of these attacks.     Listener Brian Almond
(Infosec Samurai) submitted this PDF on layer two security.   Give it
a gander!   Nice work Brian.</p>

<p style="margin-bottom: 0in"><a href="http://pauldotcom.com/Defense%20in%20Depth%20Protecting%20your%20Netowrk%20for%20Internal%20Attacks.pdf">Download Brian Almond's paper here</a></p><p style="margin-bottom: 0in"></p>

<p style="margin-bottom: 0in">Other resources</p>
<p style="margin-bottom: 0in"><a href="http://isc.sans.org/diary.html?storyid=7567">http://isc.sans.org/diary.html?storyid=7567</a></p>
<p style="margin-bottom: 0in"><a href="http://www.ciscopress.com/articles/article.asp?p=1181682">http://www.ciscopress.com/articles/article.asp?p=1181682</a></p>
<p style="margin-bottom: 0in"><a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/dhcp.html">http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/dhcp.html</a></p>
<p style="margin-bottom: 0in"><a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/dynarp.html">http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/dynarp.html</a></p>
<p style="margin-bottom: 0in"><a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/bcastsup.html">http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/bcastsup.html</a></p>
<p style="margin-bottom: 0in"><a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/port_sec.html">http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/19ew/configuration/guide/port_sec.html</a></p>
<p style="margin-bottom: 0in">
</p>

<p><em>Mark Baggett is teaching SANS 504 in Raleigh NC June 21st!  <a href="http://www.sans.org/raleigh-2010-cs/description.php?">Click here for more information.</a></em></p>]]></description>
            <link>http://pauldotcom.com/2010/02/killing-the-monkey-in-the-midd.html</link>
            <guid>http://pauldotcom.com/2010/02/killing-the-monkey-in-the-midd.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
            <pubDate>Tue, 23 Feb 2010 19:36:27 -0500</pubDate>
        </item>
        
        <item>
            <title>Links between forensics and pen tests</title>
            <description><![CDATA[<p>Last year on the show, Marcus J. Carey presented a tech segment about using memory analysis in penetration tests. Memory acquisition came into its own for incident responders a few years back. Even before tools like <a href="https://www.volatilesystems.com/default/volatility/">Volatility</a>, <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> or <a href="https://www.hbgary.com/products-services/">HBGary's Responder</a> were available, many incident responders, including me, used the <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?strings">strings</a> command to perform rudimentary searches and "analysis" of memory artifacts.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Linux_strings.png" src="http://pauldotcom.com/2010/02/20/Linux_strings.png" width="702" height="235" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /><strong>Figure 1: strings output of a Linux VM's memory image. The highlighted "forensics" happens to be the root password.</strong></span></p>

<p>Shortly after Carey's presentation, <a href="http://darkoperator.blogspot.com/2009/03/meterpreter-memory-dump-script.html">DarkOperator</a> posted a Meterpreter script that would dump memory and save it offline for later analysis. Passwords are a high value memory artifact for penetration testers. As someone working in app sec and incident response, Carey got me thinking about other things that forensics practitioners may find commonplace, but that may be overlooked by penetration testers. Both disciplines inform each other.</p>

<p>Let's say you're a penetration tester (or an Amortized Perennial Threat as Shawn Moyer says he is) and you're working for a client who wants you to go beyond the shell. Your client has requested that you go after important company data. Databases are an obvious target, but companies also have critical information floating around in Microsoft Office documents (e.g. business plans, bid contracts, vulnerability remediation tracking information, etc.).</p>

<p>What is the best way to locate these documents? You could manually navigate the various common directories where people store documents, read the directory listings and copy down those files that look interesting. But this is a labor intensive process and you may miss something if the user has tucked important files in odd locations.</p>

<p>If only there were a place on the file system that held information about files, a place where we could look and see all of the files that had been opened on the system and that would map back to the location of those files, even if those files were on network shares or removable media. Fortunately for us, there is such a location, in fact, there are two well known ones.</p>

<p>Windows systems have a feature that creates shortcuts for common document types, including Office files when those files are opened by a user. The idea of using these shortcuts during a pen test is not new. In fact, it was mentioned <a href="http://seclists.org/pen-test/2007/May/21">before</a> on <a href="http://www.securityfocus.com/archive/101/description">Security Focus' Pen-Test mailing list</a>, but I don't believe it's been <em>ahem, weaponized</em> until now. </p>

<p>These shortcuts or link files are created by Windows to facilitate the "Recent" document features of modern Windows operating systems. For Windows XP the default location for link files is under Documents and Settings\&lt;username&gt;\Recent with Microsoft Office files having their own location in Documents and Settings\&lt;username&gt;\Application Data\Microsoft\Office\Recent\. Vista and later versions of Windows have moved the recent link files to Users\&lt;username&gt;\AppData\Roaming\Microsoft\Windows\Recent\ and Users\&lt;username&gt;\AppData\Roaming\Microsoft\Office\Recent. There may be other locations specific to other applications as well.</p>

<p>For the two common locations, I have created a <a href="http://blog.metasploit.com/2006/10/meterpreter-scripts-and-msrt.html">Meterpreter script</a> port of <a href="http://windowsir.blogspot.com">Harlan Carvey's</a> <a href="http://books.google.com/books?id=_lgsIjvcDUQC&pg=PA52&lpg=PA52&dq=lslnk.pl&source=bl&ots=6ZjB6JLNFl&sig=Ko9SBbHqBFMLwoy2yQiv-FaOvJg&hl=en&ei=FjuDS6m1C8_ZnAeFmvDcAQ&sa=X&oi=book_result&ct=result&resnum=2&ved=0CAgQ6AEwAQ#v=onepage&q=lslnk.pl&f=false">lslnk.pl</a> that is commonly used by forensics analysts to dump the contents of Windows' .lnk files.</p>

<p><a href="http://trustedsignal.com/pentest/dumplinks.rb">dumplinks.rb</a> can be used with the Meterpreter to dump the contents of Windows' .lnk files either to the Metasploit user's local file system, or to the console. By default, dumplinks.rb, runs in a less verbose mode than Carvey's lslnk.pl, in that it only reports the time stamps for the .lnk files themselves, then prints the time stamps contained within the .lnk files that are time stamps for the target file and finally, the target file's location is printed.</p>

<p>Enough drivel, here's a couple of screen shots:<br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="dumplinks.rb-help.png" src="http://pauldotcom.com/2010/02/20/dumplinks.rb-help.png" width="601" height="429" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /><strong>Figure 2: dumplinks help screen</strong></span></p>

<p>And one of the script in action, dumping to the console:<br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="dumplinks.rb-e.png" src="http://pauldotcom.com/2010/02/20/dumplinks.rb-e.png" width="642" height="433" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /><strong>Figure 3: dumplinks sending everything to the console</strong></span></p>

<p>Of course there are other tools and techniques that cross-over from forensics to penetration testing. I will be back with another, as soon as I can find the time. For now, enjoy the dumplinks.</p>

<p><em>Dave Hull describes his working life as on the Venns between incident response, forensics and web applicaiton security. He will be teaching <a href="http://www.sans.org/boston-2010-cs/description.php?tid=4037">SANS Forensics 508: Computer Forensics Investigation and Incident Response in Boston, March 15 - 20</a></em></p>]]></description>
            <link>http://pauldotcom.com/2010/02/last-year-on-the-show.html</link>
            <guid>http://pauldotcom.com/2010/02/last-year-on-the-show.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">dumplinks lnk files</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">Forensics</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">lslnk.pl</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">pen testing</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">penetration testing</category>
            
            <pubDate>Tue, 23 Feb 2010 13:13:13 -0500</pubDate>
        </item>
        
        <item>
            <title>Running a command on every machine in your domain from the command line</title>
            <description><![CDATA[<p></p><p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 21.0px; font: 18.0px Arial; background-color: #f3f3f3">After listening to Larry's excellent technical segment on dumping the event logs from a large list of computers, I decided to try it out on my own. If you missed the technical segment, you can find the <a href="http://pauldotcom.com/wiki/index.php/Episode187#Tech_Segment:_Automating_log_history_collection_on_windows"><span style="color: #531092">notes here</span></a><span style="color: #531092">.</span><span style="font: 14.0px Trebuchet MS">&nbsp;&nbsp; &nbsp;<span class="Apple-style-span" style="font-size: 18px; ">To do my own testing I needed to start with a large list of computers. &nbsp; For my list, I want to have the names of every computer in the domain. &nbsp; So I turned to "dsquery computer " to get a list of all computers.&nbsp;</span></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt; dsquery computer&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">"CN=CONTROLER1,OU=Domain Controllers,DC=subdomain,DC=domain,DC=com"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">BLA BLA BLA... Truncated</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">"CN=WORKSTATION1,OU=ORGUNIT1,OU=OrgUnit2,OU=OrgUnit3,DC=Subdomain,DC=Domain,DC=com"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">BLA BLA BLA... Truncated again</p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><span style="font: 13.0px Trebuchet MS"><br />
</span>The length of the results changes because of the variable number of subdomains, but fortunetly for us the workstation name is always the first part of the string. &nbsp;It is always between the CN= and the first comma. We can strip out the workstation name with the "DELIMS" and "TOKENS" option of the FOR loop. &nbsp;Also, by default DSQUERY will only return the first 100 results. This can be changed using the "-LIMIT" option. Setting the LIMIT to 0 returns all result. For now lets check our output looking at only two entries.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;for /F "delims=, tokens=1" %i in ('dsquery computer -limit 2') do echo %i</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;echo "CN=WORKSTATION1</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">"CN=WORKSTATION1</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;echo "CN=WORKSTATION2</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb">"CN=WORKSTATION2</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 27.0px; font: 18.0px Arial; background-color: #f3f3f3"><span style="font: 18.0px Trebuchet MS"><br />
</span>We are almost there. I need to strip the first 4 characters of the line. For this I stole a <a href="http://blog.commandlinekungfu.com/2010/02/episode-82-hippy-barfday-spew-do-you.html"><span style="color: #0000fb">page</span></a> or <a href="http://blog.commandlinekungfu.com/2009/03/episode-12-deleting-related-files.html"><span style="color: #0000fb">two</span></a> from Ed Skoudis' play book. We can strip the first four characters with the SET command using the expression variable = %variable:~4%. But, since we are in a FOR loop we have to turn on delayed variable expansion and use ! instead of %.<br />
</p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 27.0px; font: 18.0px Arial; background-color: #f3f3f3"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;cmd.exe /v:on /c "for /F "delims=, tokens=1" %i in&nbsp;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb">('dsquery computer -limit 2') do set name=%i&nbsp; &amp; set name=!name:~4! &amp; echo !name!"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 13.0px Courier New; background-color: #fbfbfb; min-height: 15.0px"><br /></p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">Dsquery has reached the specified limit on number of results to display; use a different value for the -limit option to display more results.</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;set name="CN=WORKSTATION1&nbsp; &nbsp; &amp; set name=!name:~4! &nbsp; &amp; echo !name!</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">WORKSTATION1</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;set name="CN=WORKSTATION2&nbsp; &nbsp; &amp; set name=!name:~4! &nbsp; &amp; echo !name!</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">WORKSTATION2</p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><span style="font: 13.0px Trebuchet MS"><br />
</span>Now we have all the computer names in the domain being printed one at a&nbsp;time. I can dump all the names of the machines in the&nbsp;domain to file to feed Larry's event dumper.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #f3f3f3; min-height: 14.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3">C:\WINDOWS&gt;cmd.exe /v:on /c "for /F "delims=, tokens=1" %i&nbsp;in ('dsquery computer -limit 0') do set name=%i &amp; set name=!name:~4! &amp;&nbsp;echo !name! &gt;&gt; c:\temp\machines.txt"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #f3f3f3; min-height: 14.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3">Better yet, we could combine it with a WMIC command and other commands to do various useful tasks on our machines.<span style="font: 13.0px Trebuchet MS">&nbsp;</span>&nbsp;For example, if I want to query every machine in my&nbsp;network for an instance of a process that starts with CMD I could run the following: &nbsp;(remember that % is a wild card in wmic)</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #f3f3f3; min-height: 14.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;cmd.exe /v:on /c "for /F "delims=, tokens=1" %i in ('dsquery computer -limit 2') do set name=%i&nbsp; &amp; set name=!name:~4! &amp; wmic /node:!name! process where "name like 'cmd%'" list brief"</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">Dsquery has reached the specified limit on number of results to display; use a different value for the -limit option to display more results.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;set name="CN=WORKSTATION1&nbsp; &nbsp; &amp; set name=!name:~4! &nbsp; &amp; wmic<span style="font: 12.0px Courier"> </span>/node:!name! process where "name like 'cmd%'" list brief</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">HandleCount&nbsp; Name &nbsp; &nbsp; Priority&nbsp; ProcessId&nbsp; ThreadCount&nbsp; WorkingSetSize</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier New; background-color: #fbfbfb">33 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.exe&nbsp; 8 &nbsp; &nbsp; &nbsp; &nbsp; 2308 &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1654784</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier; background-color: #fbfbfb; min-height: 14.0px"><br /></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 12.0px Courier; background-color: #fbfbfb; min-height: 14.0px"><br /></p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">C:\WINDOWS&gt;set name="CN=WORKSTATION2&nbsp; &nbsp; &amp; set name=!name:~4! &nbsp; &amp; wmic<span style="font: 13.0px Trebuchet MS"> </span>/node:!name! process where "name like 'cmd%'" list brief</p>
<p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">HandleCount&nbsp; Name &nbsp; &nbsp; Priority&nbsp; ProcessId&nbsp; ThreadCount&nbsp; WorkingSetSize</p><p style="margin: 0.0px 0.0px 20.0px 4.0px; line-height: 19.0px; font: 12.0px Courier New; background-color: #fbfbfb">33 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmd.exe&nbsp; 8 &nbsp; &nbsp; &nbsp; &nbsp; 2368 &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1626112</p>
<p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><span style="font: 13.0px Trebuchet MS"><br />
</span>So there you go. &nbsp;Now using this basic syntax...</p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><br /></p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><span class="Apple-style-span" style="font-family: 'Courier New', helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 12px; ">cmd.exe /v:on /c "for /F "delims=, tokens=1" %i in ('dsquery computer -limit 0') do set name=%i&nbsp; &amp; set name=!name:~4! &amp; Any command here based on !name!</span></p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><br /></p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3">... you can run any command you want on every machine in your domain. &nbsp;&nbsp;</p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3"><br /></p><p style="margin: 0.0px 0.0px 0.0px 4.0px; line-height: 19.0px; font: 18.0px Arial; background-color: #f3f3f3">Join me for <a href="http://www.sans.org/raleigh-2010-cs/description.php">SANS 504 June 21-26</a></p>
<p></p>]]></description>
            <link>http://pauldotcom.com/2010/02/running-a-command-on-every-mac.html</link>
            <guid>http://pauldotcom.com/2010/02/running-a-command-on-every-mac.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
            <pubDate>Mon, 22 Feb 2010 18:33:50 -0500</pubDate>
        </item>
        
        <item>
            <title>PaulDotCom Security Weekly - Episode 187 - February 18, 2010</title>
            <description><![CDATA[<p>[Note: We've given up on fighting iTunes and are now releasing both parts for each episode at the same time. Make sure you check your podcast application (most listeners use iTunes) and make sure you are getting both parts of each episode!]</p>

<p><a href="http://pauldotcom.com/wiki/index.php/Episode187">Episode 187 Show Notes</a></p>

<p><strong>Part 1: Pwning VMware and the Smart Grid...</strong></p>

<div style="text-align:center;"><img src="http://pauldotcom.com//oktoberfest.jpg" alt="oktoberfest.jpg" border="0" width="264" height="396" /></div>

<div style="text-align:center;"><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode187pt1.mp3">187 Part 1 - Direct Audio Download</a></div>

<p><strong>Part 2: Windows command line kung fu and discussion of the stories for the week!</strong></p>

<div style="text-align:center;"><img src="http://pauldotcom.com//Swords_Chinese_Kung_Fu_Sword_with_L89003_1328.jpg" alt="Swords_Chinese_Kung_Fu_Sword_with_L89003_1328.jpg" border="0" width="300" height="300" /></div>

<div style="text-align:center;"><a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode187pt2.mp3">187 Part 2 - Direct Audio Download</a></div>

<p>Hosts: <a href="http://www.pauldotcom.com">Larry "HaxorTheMatrix" Pesce</a>, <a href="http://pauldotcom.com">Paul "PaulDotCom" Asadoorian</a>, <a href="http://www.pauldotcom.com">John Strand</a>, <a href="http://www.pauldotcom.com">Mick Douglas</a>, <a href="http://pauldotcom.com">Carlos "Dark0perator" Perez</a></p>

<p>Audio Feeds: <a href="http://pauldotcom.com/podcast/psw.xml"><img src="http://pauldotcom.com/images/xml.png"></a>  <a href="http://www.odeo.com/channel/38062/view"><img src="http://pauldotcom.com/images/badge-channel-black.gif"></a><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=91472687"> <img src="http://pauldotcom.com/images/itunes.gif"></a></p>]]></description>
            <link>http://pauldotcom.com/2010/02/pauldotcom-security-weekly---e-63.html</link>
            <guid>http://pauldotcom.com/2010/02/pauldotcom-security-weekly---e-63.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security Weekly</category>
            
            
            <pubDate>Sun, 21 Feb 2010 15:28:30 -0500</pubDate>
        </item>
        
    </channel>
</rss>
