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

<channel>
	<title>Bill's Security Blog</title>
	<atom:link href="http://www.wrgross.com/blogs/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wrgross.com/blogs/security</link>
	<description>All manner of goodness respecting the secure operation of information systems.</description>
	<pubDate>Sat, 22 May 2010 13:03:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Yet Another Netcat Introduction</title>
		<link>http://www.wrgross.com/blogs/security/2010/05/22/yet-another-netcat-introduction/</link>
		<comments>http://www.wrgross.com/blogs/security/2010/05/22/yet-another-netcat-introduction/#comments</comments>
		<pubDate>Sat, 22 May 2010 13:03:20 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Linux Tricks]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Vectors]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=207</guid>
		<description><![CDATA[An introduction to netcat, and crating and using netcat relays.  Concept and some content taken from Ed Skoudis' tech segment notes on PaulDotCom Episode 195.]]></description>
			<content:encoded><![CDATA[<p>Howdy folks!</p>
<p><a href="http://pauldotcom.com/wiki/index.php/Episode195">Episode 195</a> of <a href="http://www.pauldotcom.com/">PaulDotCom Security Weekly</a> prompted me to revisit an old favorite, netcat (<a href="http://sectools.org/#netcat">many netcat versions exist</a>).  On the episode, Ed Skoudis provided an excellent technical segment on using netcat and netcat-like relays.</p>
<p>The write-up at PDC is very well done, but I thought I&#8217;d work my way through the examples, and try to illustrate with more text and some graphics.  If you are following the notes on PDC, be advised I am using the term pivot synonymously with relay&#8230;</p>
<p>The goal of this post is to reinforce my own understanding of netcat by providing an informative introduction, and help readers who may not have familiarity with netcat develop an understanding of the possibilities the tool introduces.</p>
<p><strong>Background</strong></p>
<p>The simple netcat session consists of two steps:</p>
<ol>
<li> On one host, create a netcat listener on a specified port – sometimes referred to as the server</li>
<li> On another host, create a netcat connection to the listener created in Step 1, sometimes referred to as the client</li>
</ol>
<p>Once established, a netcat session provides bi-directional communication.  Data going in one end, comes out the other.  The session does not discriminate between &#8216;client&#8217; and &#8217;server.&#8217; The only differentiator is that the listener is created first.</p>
<p>A fairly contrived networking example is provided below to illustrate netcat in use.</p>
<p>The version of netcat used in these examples is provided with BackTrack 4, and is slightly different than the version provided with some flavors of *Nix.  But the basics are the same.  If you are using Ubuntu - the -p when creating the listener is optional.  Other than that, these command should work as written.</p>
<p><strong>Example 1: Simple Netcat Session</strong></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-209" title="1_SimpleNCSession" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2010/05/1_simplencsession.png" alt="" width="450" height="451" />Image 1: Simple Netcat Session</p>
<p>In this example, Host A and Host B want to communicate.  Following the process described above, Host B creates a listener in Step 1, and Host A connects to that listener in Step 2.</p>
<p>A slightly more complicate example is provided in Example 2.</p>
<p><strong>Example 2: Partial Pivot</strong></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-210" title="2_PartialPivot" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2010/05/2_partialpivot.png" alt="" width="450" height="617" />Image 2: Partial Pivot</p>
<p>In Example 2, Hosts A and B can communicate, and B and C can communicate, but A and C cannot, directly.</p>
<p>If A wants to send data to C, we must pivot through B.  We must use B as a relay between A and C.</p>
<p>This requires two netcat sessions.  One between B and C, and another between A and B.  Naturally, then, we need to set up two listeners (servers) and two talkers (clients).</p>
<p>The first session is established between B and C.  This is done in Step 1 and the second part of Step 2.<br />
Step 1) &gt; nc -l -p 3333<br />
Step 2.2) &gt; nc 10.1.0.3 3333</p>
<p>The second session is created between A and B.  This is done in the first part of Step 2 and in Step 3:<br />
Step 2.1) &gt; nc -l -p 2222<br />
Step 3) &gt; nc 10.1.0.2 2222</p>
<p>The key to making this pivot work, is that we must connect the output of the second session (between Host A and B) to the input of the first session (between Host B and C).  This can be seen in the diagram&#8217;s Step 2.  Host B issues the command to establish the listener for the communication with Host A using a pipe to send the output to the connection is it making to Host C.<br />
&gt; nc -l -p 2222 | nc 10.1.0.3 3333<br />
This basically says, “listen for data coming in on 2222 and pipe it to port 3333 on host 10.1.0.3.</p>
<p>Perfect.  Now all data sent to stdin on Host A will be sent through the pivot at Host B and to stdout on Host C.</p>
<p>The problem, however, is that Host A cannot see the results of whatever he sends through to C.</p>
<p>The challenge is that Host A&#8217;s output to B is being piped into a netcat session with C.  Data coming back from C appears on the stdout of Host B!  Host A never gets to see what is going on.</p>
<p>To remedy this, we must pipe the stdout coming from Host C to Host B to a place A can see it.  If Host B has write access to a publicly accessible source (e.g., ftp server, wwwroot, etc) then problem solved.  Or, we can create a third netcat session back from B to A!</p>
<p><strong>Example 3: Two-way Pivot</strong></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-211" title="3_FullPivot" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2010/05/3_fullpivot.png" alt="" width="450" height="653" />Image 3: Two-way Pivot</p>
<p>This example extends the second example by simply providing one more netcat session back from stdin on B (coming from C) to Host A.</p>
<p>The stinky part is that Host A now has two terminal windows open:</p>
<ol>
<li>A session for sending the data through the pivot at B to C, and</li>
<li> A session for receiving the results coming from C back through the pivot at B.</li>
</ol>
<p>What we do gain, however, is that though Hosts A and C cannot talk directly, they can relay their communications through an intermediary set of hosts to accomplish the same task.</p>
<p>This method can be simplified.</p>
<p>As Ed pointed out in his Technical Segment, a shell redirect through a named pipe works quite well.</p>
<p><strong>Example 4: Two-Way Pivot Using Named Pipe</strong></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-212" title="4_FullPivot_NamedPipes" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2010/05/4_fullpivot_namedpipes.png" alt="" width="450" height="645" />Image 3: Two-Way Pivot Using  Named Pipe</p>
<p>In Example 3, the relay, Host B, creates a named pipe, and then funnels the netcat input/output through the named pipe.</p>
<p>Host B issues the following two items on the command line:<br />
&gt; mknod bp p<br />
&gt; nc -l -p 2222 0&lt;bp | nc 10.1.0.3 3333 1&gt;bp</p>
<p>To analyze, let me label each part of this set of commands:<br />
A) mknod bp p<br />
B) nc -l -p 2222 0&lt;bp<br />
C) nc 10.1.0.3 3333 1&gt;bp<br />
D) B | C</p>
<p>A) mknod bp p<br />
In step A, Host B creates a named pipe of type FIFO (p).  A FIFO pipe works just like a FIFO queue – First In, First Out.  This means that the first data arriving in the pipe will be the first data taken out of the pipe.  This will allow us to create a writer and a reader attached to the queue.  If you envision this as a line at a bank, the reader will be the bank teller, taking folks out of the queue, and the door to the bank acts as the writer, adding folks to the queue.</p>
<p>B) nc -l -p 2222 0&lt;bp<br />
In step B, the host creates a listener bound to port 2222, and uses input redirection to dump anything from the named pipe (bp) into the netcat session.  When a client actually connects to this netcat session, the input will be written to stdout on Host B.</p>
<p>C) nc 10.1.0.3 3333 1&gt;bp<br />
In step C, the host creates a netcat session to host 10.1.0.3, where the output (stdout) arriving from the listener at the far end will be written into the named pipe (because of 1&gt;bp).</p>
<p>What we can see now, is that the netcat listener in Step B is the reader from the FIFO queue, and the netcat session created in Step C is the writer to the queue.  Perfect.</p>
<p>D) B | C<br />
The final command D ties the two components together.  Without using the pipe operator, the stdout arriving from Host A is still written to stdout on Host B.  By using the pipe, we push stdout arriving from A into the netcat session created to Host C, just as we&#8217;ve done several times in these examples.</p>
<p>To illustrate the full data flow, then.  Once both sets of netcat sessions are established as illustrated in Example 4, data flows through the system as follows.  Data entered at Host A is sent over the netcat session to Host B where it is redirected through a pipe ( “|” ) into the netcat session Host B has created with Host C.  As data comes back from Host C, it arrives at Host B, is written into the named pipe using output redirection (1&gt;bp), where it is picked up by the netcat session Host B has with Host A because of input redirection (0&lt;bp)</p>
<p><strong>Conclusion</strong></p>
<p>Skoudis goes into several deeper examples in the PDC Episode 195 show notes, and I encourage folks to read.  It seems that your imagination, and the combination of your user access rights and a forgiving firewall rule-set are the only things limiting you!</p>
<p>The goals of this post are to:</p>
<ul>
<li> Strengthen my knowledge by educating;</li>
<li> Assist those who may not have much exposure to netcat; and</li>
<li> Help spark interest in the countless possibilities introduced!</li>
</ul>
<p>I help you found it useful.</p>
<p>Bill</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2010/05/22/yet-another-netcat-introduction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Decrypting files using OpenSSL</title>
		<link>http://www.wrgross.com/blogs/security/2009/12/09/decrypting-files-using-openssl/</link>
		<comments>http://www.wrgross.com/blogs/security/2009/12/09/decrypting-files-using-openssl/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 11:29:28 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Linux Tricks]]></category>

		<category><![CDATA[Research]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=198</guid>
		<description><![CDATA[Background
I&#8217;m playing with one of the De-ICE pen-testing CD&#8217;s, and I came across a file that was encrypted.
The problem is, I don&#8217;t know:

 The cipher used to encrypt the file
 The password used
 Whether or not the file was Base64 encoded

Discovery
By poking around the box, I was able to determine that OpenSSL was installed.  OpenSSL [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Background</strong><img class="alignright size-thumbnail wp-image-201" title="Encrypt Your Junk" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/12/encryption-150x150.jpg" alt="" width="150" height="150" /></p>
<p>I&#8217;m playing with one of the <a href="http://www.de-ice.net/">De-ICE</a> pen-testing CD&#8217;s, and I came across a file that was encrypted.</p>
<p>The problem is, I don&#8217;t know:</p>
<ul>
<li> The cipher used to encrypt the file</li>
<li> The password used</li>
<li> Whether or not the file was Base64 encoded</li>
</ul>
<p><strong>Discovery</strong></p>
<p>By poking around the box, I was able to determine that <a href="http://www.openssl.org/">OpenSSL</a> was installed.  OpenSSL will reveal the encryption commands it supports by typing:</p>
<blockquote><p># openssl -help</p></blockquote>
<p>So I know the set of algorithms that could have been used to encrypt the file.</p>
<p>I also have a candidate set of passwords that I believe were used to encrypt the file.  These were uncovered during the pen test.</p>
<p>I need to figure out if the file was Base64 encoded and the cipher used.</p>
<blockquote><p># file encrypted_file.enc<br />
encrypted_file.enc: data</p></blockquote>
<p>The file is not Base64 encoded or it would be type text.  I tested this by encrypting two files, one with Base64 and one without.  The Base64 file returned type text, the other type data.</p>
<p>To test for the algorithm used, I tried encrypting a file and decrypting with both correct and incorrect passwords.  Only clean decryptions (where the correct password was used) result in plain text (&#8221;ASCII text&#8221;) when using the &#8220;file&#8221; command.  Decrypting a file with the wrong password results in a file with file type &#8220;data,&#8221; or something else.</p>
<p>This will make scripting of a solution easy.</p>
<p>The challenge for me is that I don&#8217;t know much about shell scripting.  Fortunately, there is a sweet resource over at the <a href="http://tldp.org/">LDP</a> - the <a href="http://tldp.org/guides.html">Advanced Bash-Scripting Guide</a> by Mendel Cooper.  It was a huge help.</p>
<p>What I know now:</p>
<ul>
<li>Candidate passwords</li>
<li>Candidate encryption algorithms</li>
<li>The file was not Base64 encoded</li>
</ul>
<p>What I don&#8217;t know:</p>
<ul>
<li>The combination of password/algorithm used to encrypt the file.</li>
</ul>
<p>What I want:</p>
<ul>
<li>The decrypted file</li>
<li>The password and algorithm used to encrypt the file</li>
</ul>
<p><strong>Scripting a Solution</strong></p>
<p>Result: decrypt.sh<br />
Given a set of candidate encryption algorithms and candidate passwords, the script will:</p>
<ul>
<li>Try all combinations of password/algorithm</li>
<li>Save the decrypted results in the specified directory</li>
<li>Save decrypted files wiith a file name of the type &lt;password&gt;_&lt;algorithm&gt;.txt</li>
<li>Run the &#8220;file&#8221; command at the end, looking for any that have type ASCII text</li>
</ul>
<p>If the algorithm is successful, at least one file with type ASCII text will have be a valid decryption of the original file.</p>
<p>The file worked like a charm to decrypt the file I found.</p>
<p><strong>The Code</strong></p>
<pre>#! /bin/bash

SUPPORTED_ALGS=(aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc
aes-256-ecb base64 bf bf-cbc bf-cfb
bf-ecb bf-ofb cast cast-cbc cast5-cbc
cast5-cfb cast5-ecb cast5-ofb des des-cbc
des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb
des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb
des-ofb des3 desx rc2 rc2-40-cbc
rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb
rc4 rc4-40)
PASSWORD_LIST=(passwd password test)
OUTPUT_DIRECTORY="/root/1_100/decrypt_output/"
ENCRYPTED_FILE="/root/1_100/encrypted_file.csv.enc"

echo "Num algorithms=${#SUPPORTED_ALGS[*]}"
echo "Num passwords=${#PASSWORD_LIST[*]}"

for password in ${PASSWORD_LIST[*]}
do
    for alg in ${SUPPORTED_ALGS[*]}
    do
        OUTFILE="${OUTPUT_DIRECTORY}${password}_${alg}.txt"

        openssl enc -d -in $ENCRYPTED_FILE -pass pass:${password} -out $OUTFILE -${alg}
    done
done

echo "Candidate files:"
file ${OUTPUT_DIRECTORY}* | grep ASCII

exit</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2009/12/09/decrypting-files-using-openssl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up a pen-testing lab-in-a-box</title>
		<link>http://www.wrgross.com/blogs/security/2009/11/08/setting-up-a-pen-testing-lab-in-a-box/</link>
		<comments>http://www.wrgross.com/blogs/security/2009/11/08/setting-up-a-pen-testing-lab-in-a-box/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 18:56:32 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Research]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=188</guid>
		<description><![CDATA[So, I got my hands on a handy, used Dell Latitude 620 with 2GB ram for next-to-nothing.
I&#8217;m looking for something to do with it&#8230;
How about, set up a penetration testing platform complete with: safe, internal-only networking; hosts as attackers; hosts as targets; and do the whole thing for $0.00.  And, how about doing the [...]]]></description>
			<content:encoded><![CDATA[<p>So, I got my hands on a handy, used Dell Latitude 620 with 2GB ram for next-to-nothing.</p>
<p>I&#8217;m looking for something to do with it&#8230;</p>
<p>How about, set up a penetration testing platform complete with: safe, internal-only networking; hosts as attackers; hosts as targets; and do the whole thing for $0.00.  And, how about doing the entire thing on a single piece of hardware?  Sweet.</p>
<p><strong>Purpose</strong><br />
The purpose of this exercise is to establish a safe environment to perform penetration testing on different target hosts and applications.</p>
<p>A single computer with host-only networking will be used to avoid sending attacks across the network where other hosts may reside.</p>
<p><strong>Goals</strong></p>
<ul>
<li> Establish the lab with no additional hardware or software investment.</li>
<li> Ensure that the box does not leak attacks over the network.</li>
<li> Provide an easy-to-maintain platform where new attackers and targets can be added or modified over time.</li>
</ul>
<p><strong>Basics: Establishing the virtual environment </strong></p>
<p>The lab-in-a-box comprises a used Dell Latitude D620 with 2 GB ram, and 80GB hard disk space.  Not a bleeding edge host, but more than adequate for this endeavor.</p>
<p>Software used:</p>
<ul>
<li> Host OS – Ubuntu Linux 9.04, Jaunty Jackalope</li>
<li> Virtualization – Sun VirtualBox</li>
<li> Attacker – BackTrack 4 pre-release</li>
<li> Target – De-ICE Lab CD 1</li>
</ul>
<p><strong>Step 1. Download and install the Host OS</strong></p>
<p>Download and install Ubuntu on the host.  Get it up-and-running, patched, and configured to your tastes.</p>
<p><strong>Step 2. Download and install VirtualBox</strong></p>
<p>Virtual box can be downloaded from: <a href="http://www.virtualbox.org/" target="_blank">http://www.virtualbox.org/</a></p>
<p>I&#8217;m using Ubuntu, there are a few kernel modules you may need depending on the version of Ubuntu  you are working with.  If you are using a different OS, do a little research.  The VirtualBox site has pretty good info on installing.</p>
<p><strong>Step 3. Download the BackTrack and De-ICE ISO images</strong></p>
<p>BackTrack can be <a href="http://www.remote-exploit.org/backtrack_download.html" target="_blank">found at Remote Exploit</a>.<br />
The De-ICE images can be <a href="http://de-ice.net/hackerpedia/index.php/De-ICE.net_PenTest_Disks" target="_blank">found at De-ICE.net</a>.</p>
<p><strong>Step 4. Create the hosts in VirtualBox</strong></p>
<p>Follow the installation instructions on the BackTrack site.</p>
<p>The De-ICE image is a bootable image, so you don&#8217;t need to create a big hard disk for this.  I created a simple 1GB disk for it, and have the VM configured to mount the De-ICE ISO on boot.  Pretty simple.</p>
<p><strong>Step 5. Set up host networking</strong></p>
<p>When I set up the VM&#8217;s, they had bridged networking.  This means that each VM connects to the local network through the host computer.  It is as though they are separate hosts on the network, and each receives an IP address via DHCP if so configured.</p>
<p>The problem is that two virtual machines on the same host will still communicate with one another over the LAN – and that could mean trouble.</p>
<p>The image below shows, in the upper-left hand corner, my BT4 VM doing an Nmap scan of my De-ICE VM in the upper right-hand corner.  The window at the bottom is my host (physical box) doing a tcpdump.</p>
<div id="attachment_192" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/datatravelingacrosslan.jpg"><img class="size-thumbnail wp-image-192" title="Data Traveling Across Lan" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/datatravelingacrosslan-150x150.jpg" alt="Data Traveling Across Lan" width="150" height="150" /></a><p class="wp-caption-text">Data Traveling Across Lan</p></div>
<p>As you can see from the host tcpump, the network traffic from BT4 is traveling across the net. That&#8217;s a big problem in fat-finger space.</p>
<p>I don&#8217;t want to be in the coffee shop and inadvertently fat finger a target and end up in the joint.</p>
<p>The solution, set the virtual machines to use a local-only network.  In VirtualBox, this is called “Internal Networking.”</p>
<p>VirtualBox supports two types of local only networking.  One is called “Host Only.”  With this configuration, the host can still interface with the VMs, but the VMs cannot communicate off the host.  This is pretty good.  But I&#8217;m going for maximal safety.  That is where “Internal Only” comes in.  In this configuration, the virtual machines are assigned to a named network that is created by VirtualBox.  Hosts on that virtual network can communicate with other VMs on that network, but not with hosts outside that network.  Even your physical box (host) cannot communicate with the VMs&#8230;</p>
<p>Shut down and set both the network interfaces on the BT4 and De-ICE VMs to Internal Networking as shown in the screen shot below.</p>
<div id="attachment_193" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/virtualboxinternalnetworkingsetting.jpg"><img class="size-thumbnail wp-image-193" title="VirtualBox Internal Networking Setting" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/virtualboxinternalnetworkingsetting-150x150.jpg" alt="VirtualBox Internal Networking Setting" width="150" height="150" /></a><p class="wp-caption-text">VirtualBox Internal Networking Setting</p></div>
<p>Note the default internal network name (in the screen shot it is “intnet”) as you will need this when configuring the VirtualBox DHCP server&#8230;</p>
<p>Next, we will set up the DHCP Server for the internal network.  You may not need to do this step, but I&#8217;m following the instructions for the De-ICE CD which specifies that the DHCP server should be on 192.168.1.1 and have a lower DHCP lease range of 192.168.1.2.  I set the upper range at 2.254 to accommodate other De-ICE CDs.</p>
<p>Using a terminal on the host, run the following command (all on one line):</p>
<p><code>VBoxManage dhcpserver add --netname intnet --ip 192.168.1.1 --netmask 255.255.0.0 --lowerip 192.168.1.2 --upperip 192.168.2.254 --enable</code></p>
<p>Sweet.  All is well and good.  Boot up the two images.</p>
<p>I performed two tests to make sure there was no data leakage.</p>
<p>First, I ran a similar test as I had above – running tcpdump on the host while running Nmap from the BT4 VM targeting the De-ICE VM.</p>
<p>Second, I disabled the host&#8217;s network connection and performed the same test.</p>
<p>In both cases the two VMs could talk to one another, but no data leakage, as shown in the screen shot below.</p>
<div id="attachment_194" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/internalnetworkingenabled.jpg"><img class="size-thumbnail wp-image-194" title="Internal Networking Enabled" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/11/internalnetworkingenabled-150x150.jpg" alt="Internal Networking Enabled" width="150" height="150" /></a><p class="wp-caption-text">Internal Networking Enabled</p></div>
<p><strong>Step 6. Have fun!</strong></p>
<p>You are good-to-go.  Fire up those virtual machines and have some fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2009/11/08/setting-up-a-pen-testing-lab-in-a-box/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cyber security issues with Smart Grid go way beyond metering devices</title>
		<link>http://www.wrgross.com/blogs/security/2009/03/21/cyber-security-issues-with-smart-grid-go-way-beyond-metering-devices/</link>
		<comments>http://www.wrgross.com/blogs/security/2009/03/21/cyber-security-issues-with-smart-grid-go-way-beyond-metering-devices/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 16:24:20 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Control Systems]]></category>

		<category><![CDATA[Critical Infrastructure]]></category>

		<category><![CDATA[Smart Grid]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=185</guid>
		<description><![CDATA[IMHO, end-user &#8217;smart meter&#8217; device security is the smallest issue to be resolved with moving toward a Smart Grid.
The real issue with Smart Grid is having thousands of electric devices connected to the network that have intermittent production capacities.
Currently, from what I understand, the electrical grid is somewhat sensitive to large changes in the amount [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-186" title="Smart Grid" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2009/03/smart-grid1-150x150.jpg" alt="" width="150" height="150" />IMHO, end-user &#8217;smart meter&#8217; device security is the smallest issue to be resolved with moving toward a Smart Grid.</p>
<p>The real issue with Smart Grid is having thousands of electric devices connected to the network that have intermittent production capacities.</p>
<p>Currently, from what I understand, the electrical grid is somewhat sensitive to large changes in the amount of electricity being put onto or being pulled down from the grid.</p>
<p>As energy consumption goes up, power producers put more energy on the line.  As consumption goes down, those sources are throttled back.</p>
<p>But what do you do when you plug 1500 windmills into the grid?</p>
<p>What happens when the wind starts blowing, then suddenly stops.</p>
<p>Here&#8217;s a hypothetical.  Suppose a 1500 turbine wind farm, producing 15 MW of power and placing it on the grid.</p>
<p>If consumption = supply, we are all good.</p>
<p>But what happens if the wind, literally, stops blowing for 30 minutes.</p>
<p>Is everyone going to scramble to shut off their air conditioners and unplug their fridge?</p>
<p>With respect to Availability aspects of the CIA triad, we have a big issue here.</p>
<p>Compound that concern with the fact that electrons traveling across a grid monitoring system travel at the same speed as the electrons traveling from producers to consumers, and you get an ugly producer/cosumer problem.</p>
<p>An effective smart grid must mitigate these intermittent sources of power by ensuring that access to the grid happens in a controlled manner.</p>
<p>That involves rapid ability to disconnect an intermittent source, or to store it&#8217;s electricity for later consumption.</p>
<p>The devices that perform that function are, in my opinion, the biggest cyber risk.</p>
<p>Though it&#8217;s not necessarily security related, the other issue that needs to be addressed with the introduction of large-scale intermittent power sources on the grid, is the need to match all intermittent sources with 100% non-intermittent sources.</p>
<p>For example.  In our example above, in the case where  you have 15MW wind being put on the grid, you must have at least 15MW stand-by power producing capacity spinning and ready to dump energy onto the grid in the event that the wind dies down.</p>
<p>This issue is tough, and involves, essentially, rebuilding vast amounts of the grid to attempt to decentralize the alternate energy sources as broadly as possible.</p>
<p>So, for example, wind turbines in Maine might be providing power to consumers in Arizona during the night, but Solar Production in Arizona might be powering Air Conditioners in DC during the mid-day.  At the moment, our grid just ain&#8217;t built that way.</p>
<p>I was at a FERC Commissioner&#8217;s meeting last week, and I assure you, they weren&#8217;t talking about the issues with end-point monitors.  How you secure the devices protecting the grid as a whole was on everyone&#8217;s lips.</p>
<p>Bill Gross</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2009/03/21/cyber-security-issues-with-smart-grid-go-way-beyond-metering-devices/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows AutoPown</title>
		<link>http://www.wrgross.com/blogs/security/2009/01/23/windows-autopown/</link>
		<comments>http://www.wrgross.com/blogs/security/2009/01/23/windows-autopown/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 14:56:01 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=181</guid>
		<description><![CDATA[Why do we still use Windows?
Why is this capability even enabled by default?
Windows AutoPown.  Sweet.
&#8220;Microsoft, doing it&#8217;s part to keep security professionals and hackers gainfully employed during this time of economic hardship.&#8221;
I guess we should be thankful.
                   [...]]]></description>
			<content:encoded><![CDATA[<p>Why do we still use Windows?<a href="http://None"><img class="alignright size-thumbnail wp-image-107" title="OMG" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2008/08/omg_dummies.thumbnail.jpg" alt="" width="101" height="128" /></a></p>
<p>Why is this capability even enabled by default?</p>
<p>Windows AutoPown.  Sweet.</p>
<p>&#8220;Microsoft, doing it&#8217;s part to keep security professionals and hackers gainfully employed during this time of economic hardship.&#8221;</p>
<p>I guess we should be thankful.</p>
<pre>                    National Cyber Alert System

              Technical Cyber Security Alert TA09-020A

Microsoft Windows Does Not Disable AutoRun Properly

   Original release date: January 20, 2009
   Last revised: --
   Source: US-CERT

Systems Affected

     * Microsoft Windows

Overview

   Disabling AutoRun on Microsoft Windows systems can help prevent the
   spread of malicious code. However, Microsoft's guidelines for
   disabling AutoRun are not fully effective, which could be
   considered a vulnerability.

I. Description

   Microsoft Windows includes an AutoRun feature, which can
   automatically run code when removable devices are connected to the
   computer. AutoRun (and the closely related AutoPlay) can
   unexpectedly cause arbitrary code execution in the following
   situations:

   * A removable device is connected to a computer. This includes, but
   is not limited to, inserting a CD or DVD, connecting a USB or
   Firewire device, or mapping a network drive. This connection can
   result in code execution without any additional user interaction.</pre>
<pre>...</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2009/01/23/windows-autopown/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hackers 1, SCADA 0</title>
		<link>http://www.wrgross.com/blogs/security/2008/12/18/hackers-1-scada-0/</link>
		<comments>http://www.wrgross.com/blogs/security/2008/12/18/hackers-1-scada-0/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 15:26:38 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Control Systems]]></category>

		<category><![CDATA[Critical Infrastructure]]></category>

		<category><![CDATA[Vectors]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=179</guid>
		<description><![CDATA[Good article on the security of SCADA and control networks.
Some good background and some insights into how people might go about hacking these networks.  Social engineering almost always seems to work&#8230;
I know a lot of IT Security people don&#8217;t know a ton about SCADA or control networks, but they sure have an easy time hacking [...]]]></description>
			<content:encoded><![CDATA[<p>Good article on the security of SCADA and control networks.</p>
<p>Some good background and some insights into how people might go about hacking these networks.  Social engineering almost always seems to work&#8230;</p>
<p>I know a lot of IT Security people don&#8217;t know a ton about SCADA or control networks, but they sure have an easy time hacking them.  I see a growing convergence between Control System people and IT people - hopefully they&#8217;ll talk about security.<br />
<a href="http://www.itp.net/news/541115-cyber-watch"><br />
Cyber watch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2008/12/18/hackers-1-scada-0/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Security through simplicity - live it</title>
		<link>http://www.wrgross.com/blogs/security/2008/12/15/security-through-simplicity-live-it/</link>
		<comments>http://www.wrgross.com/blogs/security/2008/12/15/security-through-simplicity-live-it/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 15:01:03 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Research]]></category>

		<category><![CDATA[Risk]]></category>

		<category><![CDATA[Soapbox]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=176</guid>
		<description><![CDATA[Over the past semester, I have had the opportunity to assist a co-worker who was taking an &#8220;Introduction to C++&#8221; class.
I was a C++ tutor in my undergraduate program, and I helped a lot of my fellows in the Master&#8217;s Degree program I was in at JMU.  Though I&#8217;m no expert, and haven&#8217;t done [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-96" title="Complex System" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2008/08/complexsystemdesigndiagram.thumbnail.jpg" alt="" width="128" height="83" />Over the past semester, I have had the opportunity to assist a co-worker who was taking an &#8220;Introduction to C++&#8221; class.</p>
<p>I was a C++ tutor in my undergraduate program, and I helped a lot of my fellows in the Master&#8217;s Degree program I was in at JMU.  Though I&#8217;m no expert, and haven&#8217;t done any C++ since graduation, I have probably written close to 25,000 lines of C++, and was excited to get involved.</p>
<p>My coworker was taking the class in the context of an IT Management class that has a focus on security and disaster recovery.</p>
<p>After she submitted her last project, she sent me an email talking about how tough the class was for her.</p>
<p>Below was my reply.  I felt it worth capturing in a blog post&#8230;</p>
<blockquote><p>&#8230;<br />
Also, don&#8217;t worry if you didn&#8217;t leave this class as the world&#8217;s best developer.</p>
<p>I think the real take-away is that coding is hard.  It&#8217;s really, really hard.</p>
<p>It&#8217;s easy to make mistakes, very easy.</p>
<p>And it&#8217;s easy to hack something together, just enough to get the project done.  It happens ALL the time.  With the simple tools at our disposal, even novice developers can develop huge, web enabled, and EXTREMELY BUGGY software.</p>
<p>And from a security perspective, you must remember that fact ALL the time.  That is the big learning lesson!</p>
<p>Not only will the software you buy have bugs.<br />
But so will your firewalls, your anti-virus, you name it.</p>
<p>Coding is hard.  It is F&#8217;ING hard.</p>
<p>And even worse, you can take two completely secure pieces of code, and put them together.  And you know what, the result may have security bugs!!!</p>
<p>Remember your experiences in this class.   Use that experience to govern your thinking in future security related projects.</p>
<p>The experiences you have had are why my number one motto is: &#8220;Security through simplicity.&#8221;</p></blockquote>
<p>It&#8217;s my opinion that every piece of hardware or software increases risk through it&#8217;s very nature.</p>
<p>Even a security countermeasure has some implicit security risk that must be assumed.</p>
<p>On the business side, when implementing software, or installing a new piece of hardware you make a business case.  Does the hardware or software save money, or allow sufficient increase in revenue to justify the cost.</p>
<p>From the security perspective, particularly with security countermeasures, that equation is a little different.  The &#8220;cost&#8221; is measured in risk.</p>
<p>So the consideration must be: Does the amount of risk offset by the countermeasure, adjusted for the inherent risk associated with the countermeasure itself, reduce the overall risk sufficiently to justify the use of the countermeasure.</p>
<p>It&#8217;s a tough equation, given that it can be tough to calculate the risk inherent in a security countermeasure.  Why?  Because we want to think that security systems are secure.  But we know the truth.  We know how deep the rabbit hole goes.</p>
<p>For example, what&#8217;s the risk profile of a firewall?</p>
<p>Well, there&#8217;s a lot.  Among them:</p>
<ul>
<li> Potential for flaws in firewall hardware and software that could allow unacceptable traffic through.</li>
<li> Potential for human error in configuring rule sets.</li>
<li> Potential for the firewall to fail in an unsafe mode.</li>
</ul>
<p>And there are plenty of associated costs.</p>
<ul>
<li> Cost of the system.</li>
<li> Cost of maintenance.</li>
<li> Cost of developing security processes and procedures to manage the firewall.</li>
<li> Cost of developing and maintaining trained staff to manage the firewall.</li>
<li> Cost to accurately monitor the system.</li>
</ul>
<p>The logic is cyclical.  The more risk you offset, the more you assume.</p>
<p>Hence my motto:</p>
<p>Security through simplicity.</p>
<p>Bill</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2008/12/15/security-through-simplicity-live-it/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FERC seeks to apply NERC CIP&#8217;s to nuclear power reactor sites</title>
		<link>http://www.wrgross.com/blogs/security/2008/11/03/ferc-seeks-to-apply-nerc-cips-to-nuclear-power-reactor-sites/</link>
		<comments>http://www.wrgross.com/blogs/security/2008/11/03/ferc-seeks-to-apply-nerc-cips-to-nuclear-power-reactor-sites/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 11:56:34 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=174</guid>
		<description><![CDATA[So, where have I been?
For the last 4 weeks, I&#8217;ve been working like crazy on this FERC Order.
FERC Order RM06-22-000 seeks, in a nutshell, to modify the exemption for nuclear facilities that exists in each of the CIP standards.
Comments are due to FERC today.
Essentially, the NERC CIP&#8217;s exempt nuclear facilities in the US from compliance [...]]]></description>
			<content:encoded><![CDATA[<p>So, where have I been?</p>
<p>For the last 4 weeks, I&#8217;ve been working like crazy on this FERC Order.</p>
<p>FERC Order RM06-22-000 seeks, in a nutshell, to modify the exemption for nuclear facilities that exists in each of the CIP standards.</p>
<p>Comments are due to FERC today.</p>
<p>Essentially, the NERC CIP&#8217;s exempt nuclear facilities in the US from compliance because those facilities are regulated by the NRC.</p>
<p>NRC has indicated that they do not regulate all components in a plant, only those that deal with safety, security, or emergency response (SSEP).</p>
<p>FERC is concerned that there may be components that are not protected by NRC but play a role in in the reliability of the Bulk-Power System.</p>
<p>As well they should.  FERC is responsible for the reliability of the grid, and power continuity.</p>
<p>The industry has a robust cyber security program.   And I&#8217;m not saying that because I work in the industry.  I say it as a security guy who is more impressed by the program the more I learn about how plants have implemented it.</p>
<p>The industry program considers every device within the facility, irrespective of it&#8217;s role.  COP systems may get a lower risk score than some other devices, but that seems reasonable, given we are talking about a nuclear reactor.</p>
<p>But the fact is that all systems are under the program.</p>
<p>The issue FERC has is that that program is not mandated by the NRC.</p>
<p>NRC, on the other hand, is about to adopt a regulation that would &#8220;codify&#8221; the requirement for a cyber security program (proposed regulation 10 CFR 73.54).</p>
<p>NRC says the industry adopted program, &#8220;goes a long way toward meeting the requirements of the new rule.&#8221;</p>
<p>In any event.</p>
<p>You get the idea.  It&#8217;s a complicated issue.</p>
<p>In the end, what we&#8217;d like to avoid most is a situation where we have dual or duplicate regulation on a single device.  NRC regulating for X, FERC for Y.</p>
<p>That gets ugly.</p>
<p>Particularly when plant licensees are required to operate two distinct cyber security programs.  Ugh.</p>
<p>In any event, lets cross our fingers that FERC and NRC can work out an arrangement where a single regulator (NRC) can regulate all systems under a single cyber security program regulation.</p>
<p>Bill</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2008/11/03/ferc-seeks-to-apply-nerc-cips-to-nuclear-power-reactor-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More on wireless in the control system space</title>
		<link>http://www.wrgross.com/blogs/security/2008/11/03/more-on-wireless-in-the-control-system-space/</link>
		<comments>http://www.wrgross.com/blogs/security/2008/11/03/more-on-wireless-in-the-control-system-space/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 11:17:59 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Control Systems]]></category>

		<category><![CDATA[Critical Infrastructure]]></category>

		<category><![CDATA[Vectors]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=169</guid>
		<description><![CDATA[This is common theme for me.
Perhaps I should state my feelings clearly: &#8220;If you depend on wireless in a control system environment, you are friggin&#8217; crazy!&#8221;
A few weeks ago, I wrote about a SCADA tool from Conlab called U.C.ME.
This tool touts two-way SMS management of your infrastructure!  Sweet, eh?
Now, I wrote Conlab but haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-127" style="margin-left: 5px; margin-right: 5px;" title="Security Fail" src="http://www.wrgross.com/blogs/security/wp-content/uploads/2008/09/securityfail-150x150.jpg" alt="" width="150" height="150" />This is common theme for me.</p>
<p>Perhaps I should state my feelings clearly: &#8220;<strong>If you depend on wireless in a control system environment, you are friggin&#8217; crazy!</strong>&#8221;</p>
<p>A few weeks ago, I wrote about a SCADA tool from <a href="http://www.conlab.com.au/">Conlab</a> called <a href="http://www.conlab.com.au/ucme.html">U.C.ME</a>.</p>
<p>This tool touts two-way SMS management of your infrastructure!  Sweet, eh?</p>
<p>Now, I wrote Conlab but haven&#8217;t heard anything meaningful back.  Err&#8230; Well, I did.  I got a quippy email&#8230; &#8220;You said you emailed us, but you never did.&#8221;</p>
<p>Well, I have tried again, and to no avail.</p>
<p>Looking at the product&#8217;s material, they seem to be referencing a company <a href="http://www.controlsee.com/">ControlSee</a>.  I&#8217;ll contact them.  Perhaps Conlab is just a reseller?  Who knows.</p>
<p>I wrote Conlab, who I thought was the product creator, to ask them what kind of authentication they are doing, and how they are preventing simple things like replay attacks.</p>
<p>Crickets.</p>
<p>Google alerts just tossed me this:<br />
&#8220;<a href="http://www.automatedbuildings.com/news/nov08/articles/controlsee/081023123744controlsee.htm">Imagine you could speak to your SCADA system&#8230; Send a text message to your SCADA system.</a>&#8221;</p>
<p>More talk of controlling your infrastructure through remote access.</p>
<p>Zero talk of configuration and control of access.</p>
<p>Conlab, ControlSee, whoever, for the love of god and all that is holy, if you have any information on this, please send it to me.  This kind of stuff keeps me up at night.</p>
<p>Bill</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2008/11/03/more-on-wireless-in-the-control-system-space/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What needs to be put in place to protect web servers from DOS attacks?</title>
		<link>http://www.wrgross.com/blogs/security/2008/10/27/what-needs-to-be-put-in-place-to-protect-web-servers-from-dos-attacks/</link>
		<comments>http://www.wrgross.com/blogs/security/2008/10/27/what-needs-to-be-put-in-place-to-protect-web-servers-from-dos-attacks/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 14:37:08 +0000</pubDate>
		<dc:creator>Bill Gross</dc:creator>
		
		<category><![CDATA[Mitigation]]></category>

		<category><![CDATA[Vectors]]></category>

		<guid isPermaLink="false">http://www.wrgross.com/blogs/security/?p=164</guid>
		<description><![CDATA[The attack vectors and mitigation are not exhaustive, and are exemplary only.
A denial of service (DOS) attack is an attack against limited resources.  A DOS attack is an attack against the “availability” function of the typical “CIA” security triad of “Confidentiality, Integrity, and Availability”.
A DOS attack is perpetrated by applying enough pressure against a [...]]]></description>
			<content:encoded><![CDATA[<p>The attack vectors and mitigation are not exhaustive, and are exemplary only.</p>
<p>A denial of service (DOS) attack is an attack against limited resources.  A DOS attack is an attack against the “availability” function of the typical “CIA” security triad of “Confidentiality, Integrity, and Availability”.</p>
<p>A DOS attack is perpetrated by applying enough pressure against a target that the target’s resource allocation is overwhelmed.</p>
<p>In the question you posed, a DOS attacks can be perpetrated against any resource that supports the Web infrastructure.</p>
<p>A successful DOS attack against a web site tends to exhaust resources in one or more of three primary categories:</p>
<ol>
<li> Network resources (routing capacity, network bandwidth, etc)</li>
<li>Web server resources (processor power, memory power, host networking capacity)</li>
<li>Database server resources</li>
</ol>
<p>Mitigating a DOS attack involves protections at all three levels of the infrastructure.</p>
<p>One popular DOS attack is the “Distributed Denial of Service” attack.</p>
<p>Mitigation for this type of attack include:</p>
<ul>
<li>Network layer traffic filtering to attempt to block sources of the network-based DOS traffic.</li>
<li> Increased network bandwidth and capability – Can you out-power the attackers.</li>
<li>Website mirroring and caching can be employed.</li>
<li>Website collocating can also help.  If your website is hosted on multiple physical networks, taking the site down involves attacking multiple network resources.</li>
</ul>
<p>A second attack vector is against the web server’s physical resources.</p>
<p>Perhaps you can get enough traffic through the network filters to overwhelm the web server’s processing capabilities.</p>
<p>Mitigation for this type of attack include:</p>
<ul>
<li>Throttling network filtering to ensure that the web server(s) do not get more traffic than they can handle.</li>
<li>Website mirroring helps by adding additional capacity.</li>
<li>Caching can also help by reducing the amount of processing necessary to serve the site.</li>
</ul>
<p>Another type of DOS attack is a targeted attack against the applications running on the website.</p>
<p>If the website uses a database back-end, it is possible to execute a DOS attack by using SQL Injections that destroy database integrity, or prevent database access.</p>
<p>Mitigation for this type of attack include:</p>
<ul>
<li>Proper coding practices in the web applications that prevent SQL Injection attacks.</li>
<li> Proper database account security that prevents unauthorized destruction of data.</li>
<li>Database redundancy that attempts to keep the data available even if one or more data source is unavailable.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wrgross.com/blogs/security/2008/10/27/what-needs-to-be-put-in-place-to-protect-web-servers-from-dos-attacks/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
