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

<channel>
	<title>toastresearch.com</title>
	<atom:link href="http://toastresearch.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://toastresearch.com</link>
	<description>network administration, virtualization, security, etc</description>
	<lastBuildDate>Fri, 06 Apr 2012 04:36:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>quick post: emailing from the command line</title>
		<link>http://toastresearch.com/2012/03/14/quick-post-emailing-from-the-command-line/</link>
		<comments>http://toastresearch.com/2012/03/14/quick-post-emailing-from-the-command-line/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 11:23:07 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[exchange]]></category>
		<category><![CDATA[network administration]]></category>
		<category><![CDATA[email]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=690</guid>
		<description><![CDATA[twice in the last week i have needed to send a quick email from the command line. here&#8217;s how: telnet 1.2.3.4 25 HELO domain.name MAIL FROM: test@domain.name RCPT TO: recepient@domain.name DATA Subject:subject line here this is the body of your email. . QUIT note: there has to be a blank line under the subject line. <a href='http://toastresearch.com/2012/03/14/quick-post-emailing-from-the-command-line/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>twice in the last week i have needed to send a quick email from the command line. here&#8217;s how:</p>
<pre>telnet 1.2.3.4 25

HELO domain.name
MAIL FROM: test@domain.name
RCPT TO: recepient@domain.name
DATA
Subject:subject line here

this is the
body of your
email.
.
QUIT</pre>
<p><strong>note:</strong> there has to be a blank line under the subject line.</p>
<p><strong>source:</strong> http://www.yuki-onna.co.uk/email/smtp.html</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2012/03/14/quick-post-emailing-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mounting a windows share in linux from the command line</title>
		<link>http://toastresearch.com/2012/03/03/mounting-a-windows-share-in-linux-from-the-command-line/</link>
		<comments>http://toastresearch.com/2012/03/03/mounting-a-windows-share-in-linux-from-the-command-line/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 02:53:39 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=672</guid>
		<description><![CDATA[i needed to mount a windows share from my ubuntu box the other day, and while this is quick and easy from the gui, i wanted to do it from the command line (just in case). to mount a windows share from the command line (this is on ubuntu 10.04), you can running the following <a href='http://toastresearch.com/2012/03/03/mounting-a-windows-share-in-linux-from-the-command-line/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>i needed to mount a windows share from my ubuntu box the other day, and while this is quick and easy from the gui, i wanted to do it from the command line (just in case). </p>
<p>to mount a windows share from the command line (this is on ubuntu 10.04), you can running the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> cifs <span style="color: #000000; font-weight: bold;">//</span>1.2.3.4<span style="color: #000000; font-weight: bold;">/</span>c$ <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>smb_mount<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-o</span> <span style="color: #007800;">username</span>=domain<span style="color: #000000; font-weight: bold;">/</span>user,<span style="color: #007800;">iocharset</span>=utf8,<span style="color: #007800;">file_mode</span>=0777,<span style="color: #007800;">dir_mode</span>=0777</pre></div></div>

<p><a href="http://toastresearch.com/wp-content/uploads/2012/02/smb_mount_01.png"><img class="alignnone size-full wp-image-673" title="smb_mount_01" src="http://toastresearch.com/wp-content/uploads/2012/02/smb_mount_01.png" alt="" width="748" height="486" /></a></p>
<p>obviously your mount point of /media/smb_mount would have to exist.</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2012/03/03/mounting-a-windows-share-in-linux-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>extreme makeover: network edition</title>
		<link>http://toastresearch.com/2012/02/21/extreme-makeover-network-edition/</link>
		<comments>http://toastresearch.com/2012/02/21/extreme-makeover-network-edition/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 07:30:01 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[gpo's]]></category>
		<category><![CDATA[network administration]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=682</guid>
		<description><![CDATA[recently i spoke at a conference about a network upgrade i did at a previous job. the upgrade was a very difficult, but rewarding process, and has become one of my favorite topics to speak about. topics i covered included the basics/easy stuff: anti-virus content filtering password policies firewalls all the way to the not <a href='http://toastresearch.com/2012/02/21/extreme-makeover-network-edition/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>recently i spoke at a conference about a network upgrade i did at a previous job.</p>
<p>the upgrade was a very difficult, but rewarding process, and has become one of my favorite topics to speak about.</p>
<p>topics i covered included the basics/easy stuff:</p>
<ul>
<li>anti-virus</li>
<li>content filtering</li>
<li>password policies</li>
<li>firewalls</li>
</ul>
<p>all the way to the not so common or more complex:</p>
<ul>
<li>egress firewall rules</li>
<li>patching (system &amp; OS)</li>
<li>running with user rights</li>
<li>software restriction policies/GPO&#8217;s</li>
</ul>
<p>here is the prezi from the talk:</p>
<div class="prezi-player"><object id="prezi_o1lrbngcdajy" width="550" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value="prezi_id=o1lrbngcdajy&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0" /><param name="src" value="http://prezi.com/bin/preziloader.swf" /><embed id="prezi_o1lrbngcdajy" width="550" height="400" type="application/x-shockwave-flash" src="http://prezi.com/bin/preziloader.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="prezi_id=o1lrbngcdajy&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0" /></object></p>
<div class="prezi-player-links">
<p><a title="extreme makeover: network edition 01" href="http://prezi.com/o1lrbngcdajy/extreme-makeover-network-edition-01/">extreme makeover: network edition 01</a> on <a href="http://prezi.com">prezi</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2012/02/21/extreme-makeover-network-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vlan abuse</title>
		<link>http://toastresearch.com/2012/02/13/vlan-abuse/</link>
		<comments>http://toastresearch.com/2012/02/13/vlan-abuse/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:10:45 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[backtrack]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=638</guid>
		<description><![CDATA[this is a quick post about vlan hacking abuse. specifically, this post will cover how to abuse cisco switches and the DTP (dynamic trunking protocol). why is this important? typically, most environments segment out servers, workstations, management, etc, into different vlans. if they (mis)configure the switch, you could potentially jump onto the management subnet (where <a href='http://toastresearch.com/2012/02/13/vlan-abuse/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>this is a quick post about vlan <del>hacking</del> abuse.</p>
<p>specifically, this post will cover how to abuse cisco switches and the DTP (dynamic trunking protocol).</p>
<p>why is this important? typically, most environments segment out servers, workstations, management, etc, into different vlans. if they (mis)configure the switch, you could potentially jump onto the management subnet (where things are usually much less protected) from a user subnet.</p>
<p>in a nutshell, we are taking advantage of a misconfigured switch, not really doing any &#8220;hacking&#8221;.</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_01.png"><img class="alignnone size-full wp-image-657" title="vlan_abuse_01" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_01.png" alt="" width="793" height="749" /></a></p>
<p><span id="more-638"></span>here is part of the cisco config i am working off of (the switch stack i was working with was two 3750x&#8217;s):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2</span>
switchport voice vlan <span style="color: #000000;">200</span>
spanning-tree portfast
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">3</span>
switchport trunk encapsulation dot1q
switchport trunk native vlan <span style="color: #000000;">100</span>
switchport mode trunk
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span>
switchport access vlan <span style="color: #000000;">100</span>
switchport mode access
spanning-tree portfast
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span>
switchport access vlan <span style="color: #000000;">100</span>
switchport mode access
switchport voice vlan <span style="color: #000000;">200</span>
spanning-tree portfast
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">6</span>
switchport access vlan <span style="color: #000000;">100</span>
switchport trunk encapsulation dot1q
switchport trunk native vlan <span style="color: #000000;">100</span>
switchport trunk allowed vlan <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">300</span>,<span style="color: #000000;">400</span>
switchport mode trunk
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">7</span>
switchport trunk encapsulation dot1q
switchport trunk native vlan <span style="color: #000000;">100</span>
switchport trunk allowed vlan <span style="color: #000000;">100</span>
switchport mode trunk
<span style="color: #000000; font-weight: bold;">!</span>
interface GigabitEthernet1<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>
description management subnet
switchport access vlan <span style="color: #000000;">400</span>
switchport mode access</pre></div></div>

<p>looking at the above config, there are issues with the way interfaces 1, 2, 3, and possibly 6 are configured.</p>
<p>ports 1, 2, and 3 are in a auto negotiate state, which is great as an attacker. i get to call the shots. in this example, the admin got lazy on port 6 and just gave that port access to every vlan. there are situations where a port might need access to every vlan, so you can&#8217;t say this is &#8220;wrong&#8221;. likewise, port 7 accomplishes what you want (restricting access to vlan 100 only), but best practice says this should be done in access mode, not trunk.</p>
<p>to abuse DTP, i used a tool that is built in to backtrack 5 called yersinia. its a tool that has a modular architecture and is designed to be flexible enough to add other protocols along the line. by default, it gives you the ability to view/edit/attack things like CDP, VTP, STP, DTP, etc.</p>
<p>heres how the attack works:</p>
<ol>
<li>plug your backtrack box into a port, start up yersinia (in GTK mode), and wait (no need to get an IP yet). notice in the screen shot below i see some DTP traffic and the status is ACCESS/AUTO. this means we can dictate what mode the switch should be in.<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_02.png"><img class="alignnone size-large wp-image-658" title="vlan_abuse_02" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_02-1024x640.png" alt="" width="695" height="434" /></a></li>
<li>start the attack by clicking &#8220;Launch attack&#8221;, go to the DTP tab, select the &#8220;enabling trunking&#8221; radio button and hitting &#8220;OK&#8221;.<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_03.png"><img class="alignnone size-large wp-image-659" title="vlan_abuse_03" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_03-1024x640.png" alt="" width="695" height="434" /></a></li>
<li>if the attack is successful, you should see the port  status in DTP go from ACCESS/AUTO to TRUNK/AUTO.<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_04.png"><img class="alignnone size-large wp-image-662" title="vlan_abuse_04" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_04-1024x640.png" alt="" width="695" height="434" /></a></li>
<li>now, flip over to the 802.1Q tab and wait. you should see all available vlan&#8217;s show up in the vlan column, and ARP should cough up some IP&#8217;s that we can explore. in this case, you can see there is some traffic on VLAN 400 with IP&#8217;s of 10.4.1.x. thats what i will target next.<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_05.png"><img class="alignnone size-large wp-image-663" title="vlan_abuse_05" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_05-1024x640.png" alt="" width="695" height="434" /></a></li>
<li>now that we have a target, i need to get on that VLAN and give myself an IP address. to do that in backtrack, i need to load the 802.1q module, set an interface to VLAN 400, bring up the interface, and give the new interface an IP address.<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_06.png"><img class="alignnone size-full wp-image-664" title="vlan_abuse_06" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_06.png" alt="" width="701" height="580" /></a><br />
here are those commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">modprobe 8021q
vconfig add eth1 <span style="color: #000000;">400</span>
ip <span style="color: #c20cb9; font-weight: bold;">link</span> <span style="color: #000000; font-weight: bold;">set</span> eth1.400 up
<span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth1.400 10.4.1.3 netmask 255.255.255.0 up</pre></div></div>

</li>
<li> now to test<br />
<a href="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_07.png"><img class="alignnone size-full wp-image-665" title="vlan_abuse_07" src="http://toastresearch.com/wp-content/uploads/2012/02/vlan_abuse_07.png" alt="" width="697" height="395" /> </a></li>
</ol>
<p>in summary, because of a misconfigured vlan, i was able to change my port from access mode (restrictive) to trunk mode (potentially less restrictive) using DTP, enumerate other vlan&#8217;s with PVST, identify IP&#8217;s with ARP, and jump over to the management vlan with a valid IP.</p>
<p>the fix is quite simple. use access mode wherever possible, and if you are going to enable trunk mode be sure to restrict what vlan&#8217;s are visible/allowed.</p>
<p><strong>reference/note:</strong> this post is very similar to http://synjunkie.blogspot.com/2009/10/abusing-vlans-with-backtrack.html. differences i found were that:</p>
<ol>
<li>yersinia hangs in curses mode if you are running backtrack 5 in a vm. i had to use the GUI.</li>
<li> the syntax for bringing up a vlan interface in backtrack 5 was different than backtrack 4, which synjunkie was using</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2012/02/13/vlan-abuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>truncating/shrinking microsoft sql logs</title>
		<link>http://toastresearch.com/2012/02/08/truncatingshrinking-microsoft-sql-logs/</link>
		<comments>http://toastresearch.com/2012/02/08/truncatingshrinking-microsoft-sql-logs/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 03:37:18 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[sql server]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=646</guid>
		<description><![CDATA[every once in a while i run into an issue where i have some log file on a microsoft sql server that has not been properly configured and is taking up a hundred gigs. and inevitably, i end up spending the next 20 minutes to find a proper example of how to truncate the logs. <a href='http://toastresearch.com/2012/02/08/truncatingshrinking-microsoft-sql-logs/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>every once in a while i run into an issue where i have some log file on a microsoft sql server that has not been properly configured and is taking up a hundred gigs.</p>
<p>and inevitably, i end up spending the next 20 minutes to find a proper example of how to truncate the logs. so, instead of searching again, i am posting it on my site ;)</p>
<p><strong>WARNING:</strong> don&#8217;t do this unless you have backups or you really, really don&#8217;t want to roll your database back. your deleting transaction logs, so while it won&#8217;t hurt your working database, it will prevent you from rolling back to yesterday. ye be warned.</p>
<p>in this case, i am running these commands on a microsoft sql server 2005 install, but i would presume it to work on sql 2008 or 2012, although i haven&#8217;t tested it.</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2012/02/sql_truncate_01.png"><img class="alignnone size-full wp-image-650" title="sql_truncate_01" src="http://toastresearch.com/wp-content/uploads/2012/02/sql_truncate_01.png" alt="" width="712" height="461" /></a></p>
<p>here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- specify database and show database &amp;amp; log statistics</span>
<span style="color: #993333; font-weight: bold;">USE</span> dbname
<span style="color: #993333; font-weight: bold;">EXEC</span> sp_helpfile
&nbsp;
<span style="color: #808080; font-style: italic;">-- truncate the log</span>
<span style="color: #993333; font-weight: bold;">USE</span> dbname
<span style="color: #993333; font-weight: bold;">GO</span>
BACKUP LOG dbname <span style="color: #993333; font-weight: bold;">WITH</span> TRUNCATE_ONLY
<span style="color: #993333; font-weight: bold;">GO</span>
DBCC SHRINKFILE <span style="color: #66cc66;">&#40;</span>dbname_log<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GO</span>
DBCC SHRINKFILE <span style="color: #66cc66;">&#40;</span>dbname_log<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">GO</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--show statistics after truncating</span>
<span style="color: #993333; font-weight: bold;">EXEC</span> sp_helpfile</pre></div></div>

<p><strong>reference/disclaimer:</strong> this code is from http://www.sqlcleanup.com/2008/sql-2005-truncating-log-files-and-recovering-space/ and is not my work, i just can&#8217;t always find it in a pinch.</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2012/02/08/truncatingshrinking-microsoft-sql-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>netoptics: a review</title>
		<link>http://toastresearch.com/2011/10/13/netoptics-a-review/</link>
		<comments>http://toastresearch.com/2011/10/13/netoptics-a-review/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 02:32:39 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[network administration]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[netoptics]]></category>
		<category><![CDATA[network monitoring]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=610</guid>
		<description><![CDATA[recently i was asked to implement a solution to mirror a massive amount of traffic (2-8Gbps of sustained traffic) to several different locations for further analysis. after comparing gigamon, netoptics, and network critical, i opted for netoptics to fill the roll (because of time i could not do a proof of concept, so the evaluation <a href='http://toastresearch.com/2011/10/13/netoptics-a-review/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>recently i was asked to implement a solution to mirror a massive amount of traffic (2-8Gbps of sustained traffic) to several different locations for further analysis.</p>
<p>after comparing gigamon, netoptics, and network critical, i opted for netoptics to fill the roll (because of time i could not do a proof of concept, so the evaluation through reading specs, talking to a few techs, and some googling).</p>
<p>i have spent time over the last few weeks configuring the netoptics and thought it would be worth sharing my experience for someone else&#8217;s benefit.</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2011/10/netoptics_01.png"><img class="alignnone size-full wp-image-611" title="netoptics_01" src="http://toastresearch.com/wp-content/uploads/2011/10/netoptics_01.png" alt="" width="618" height="255" /></a></p>
<p><span id="more-610"></span>the things i like about the netoptics box (this is a <a href="http://www.netoptics.com/products/director/director-xstream-data-monitoring-switch">netoptics director extreme</a>):</p>
<ol>
<li>the ports: the director extreme is loaded with 24 unpopulated SFP+ ports. you can mix and match speeds, types, and roles for every port. you want several ten gig fiber ports aggregated and shipped to a single ten gig monitor interface? no problem. three gig copper connections filtered for a subnet and sent to a gig fiber connection? absolutely. the quantity and flexibility of the ports are great.</li>
<li>flexibility: there are a lot of options on how you want to carve/shape/move your traffic (by VLAN/ports/etc). its pretty good, with one glaring issue (see my issues with the rules below).</li>
<li>the roadmap: netoptics already is positioning themselves for virtual monitoring, which shows me they have a plan for the future and are thinking ahead, which i can appreciate.</li>
<li>the support group: i have talked with several techs that have been very helpful (eric in particular has been a great resource). always good to be able to get a knowledgable person on the phone quickly to help troubleshoot any issues you have with their product.</li>
</ol>
<div>i really only have two issues with the director extreme, and that is the rule set and how you manage the rules. here is what i mean:</div>
<div>
<ol>
<li>want to create a rule to monitor a whole subnet? no problem? want to create a rule to monitor a single IP? little different story. for each IP you want to monitor (assuming you want to see all traffic, both egress and ingress), you have to create *two* rules. doesn&#8217;t sound so bad until you have to do it for hundres of IP&#8217;s. in my case, i wanted to monitor hundreds of IP&#8217;s scattered throughout multiple subnets. here are the rules it takes to monitor a single IP:<br />
</br><code>filter add in_ports=1-2,12 ip_src=10.1.1.1 action=redir redir_ports=20<br />
filter add in_ports=1-2,12 ip_dst=10.1.1.1 action=redir redir_ports=20</code></br><br />
again, not so bad for a few hosts, but painful for hundreds of machines. also, did i forget to mention the cap on the amount or rules/hosts you can monitor? i have seen it prevent me from adding rules, then let me add them, so i am not exactly sure what the cap is, but i have hit it (randomly). instead of having multiple rules, i would expect netoptics to have a rule that would let me look at a hosts traffic (ingress or egress) with one rule, like so:</p>
<p><code>filter add in_ports=1-2,12 <strong>ip_host</strong>=10.1.1.1 action=redir redir_ports=20</code></li>
<li>and now, my real issue with netoptics: <strong>rule management is a nightmare. </strong>let me explain. i like the command line (all our management of the director extreme is done over SSH, which is fine), so when i found out there was no webGUI i didn&#8217;t really sweat it. unfortunately, adding and removing rules is a very tedious, painfully slow process. to remove a rule, you have to remove *one rule at a time*, and it has to be by rule number. so in my case, where i wanted to remove a block of 50 rules (for 25 host&#8217;s), that meant i had to delete rule number 1 fifty times. because of how netoptics stores the rules (it reminds me a the stack in computer memory management), when you remove rule 1, rule 2 becomes rule 1 and rule 3 becomes rule 2, etc. this is painful.<br />
</br><strong>you should be able to remove multiple rules at once</strong></br><br />
i thought i found away around this by deleting all rules, modifying my rule base in notepad++, then recreating all rules. and it would work too, if i could paste more than 50-100 rules in at a time. i tried on both my windows host with putty and my linux host to add hundreds of rules at once and never could get it to work. worse yet is that it didn&#8217;t just fail adding rule 50 every time, sometimes some rules in the hundreds would get added, other times ones in the teens would get added, i could never decipher a rhyme or reason to how or why rules were or were not added. i literally ended up hitting the paste button dozens of times to finally get all the rules in the ruleset. its quite a infuriating process when you feel like its going to be a simple change.</li>
</ol>
<div>here would be my plea/suggestion for netoptics: <strong>do a better job managing rules.</strong></div>
<div>
<ul>
<li>give me a rule where i don&#8217;t have to specify both a source and destination rule just to get all traffic from one host</li>
<li>help me keep my sanity by making adding, modifying, removing a no brainer. there is no reason in the world why getting the correct rules in place should be a challenging process. i don&#8217;t care if its with a webGUI (although most users are going to prefer this) or through the command line, but make rule management easy, it will pay dividends later, i promise.</li>
</ul>
</div>
<div><strong>parting notes:</strong></div>
<div>even with the frustration i have had with the netoptics box, when it works, it works well. its incredibly powerful and i feel like its very capable, it just seems like it is being limited by some poorly designed/implemented code. i don&#8217;t know if i would run into the same issues with gigamon or network critical so i can&#8217;t recommend them, but i can say i would hesitate to recommend netoptics in a case like mine (lots of IP&#8217;s and lots of different rules) until they get there rule management tightened up.</div>
</div>
<div>i am hoping that instead of just sounding like a bashing session, this is viewed as constructive criticism by netoptics and i can update this post in the future with how they have made changes to make things better, but we will see.</div>
<p></br></p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2011/10/13/netoptics-a-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>passwords: you can&#8217;t do it right</title>
		<link>http://toastresearch.com/2011/09/27/passwords-you-cant-do-it-right/</link>
		<comments>http://toastresearch.com/2011/09/27/passwords-you-cant-do-it-right/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 18:20:32 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=599</guid>
		<description><![CDATA[i was recently asked to do a presentation for a local conference. i like coming up with new things to research and investigate and decided to pursue passwords (and how bad they are). below is my presentation and code for the talk: title: passwords: you can&#8217;t do it right description: some say you’re doing it wrong. <a href='http://toastresearch.com/2011/09/27/passwords-you-cant-do-it-right/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>i was recently asked to do a presentation for a local conference. i like coming up with new things to research and investigate and decided to pursue passwords (and how bad they are). below is my presentation and code for the talk:</p>
<p><strong>title:</strong> passwords: you can&#8217;t do it right<br />
<strong>description:</strong> some say you’re doing it wrong. i argue you can’t do it right (but some do it better than others). see how ineffective passwords are at protecting your accounts and ways of decreasing the chance of anyone using your passwords to achieve total domination.</p>
<p>&nbsp;</p>
<div class="prezi-player">
<style type="text/css" media="screen">.prezi-player { width: 550px; } .prezi-player-links { text-align: center; }</style>
<p><object id="prezi_m3exfhl8p4nq" name="prezi_m3exfhl8p4nq" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"><param name="movie" value="http://prezi.com/bin/preziloader.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="bgcolor" value="#ffffff"/><param name="flashvars" value="prezi_id=m3exfhl8p4nq&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"/><embed id="preziEmbed_m3exfhl8p4nq" name="preziEmbed_m3exfhl8p4nq" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id=m3exfhl8p4nq&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"></embed></object>
<div class="prezi-player-links">
<p><a title="passwords: you can't do it right 0x03" href="http://prezi.com/m3exfhl8p4nq/passwords-you-cant-do-it-right-0x03/">passwords: you can&#8217;t do it right 0&#215;03</a> on <a href="http://prezi.com">prezi</a></p>
</div>
</div>
</div>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># password_stats_03.py</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;&quot;&quot;
	password stats 0.03
	usage: password_stats_03.py
	&quot;&quot;&quot;</span>
	exit<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># assign arguments to variable</span>
file_passwords_all = <span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;"># create empty vars</span>
passwords_all = <span style="color: #ff4500;">0</span>
passwords_unique = <span style="color: #ff4500;">0</span>
password_numeric = <span style="color: #ff4500;">0</span>
password_alpha_lower = <span style="color: #ff4500;">0</span>
password_alpha_upper = <span style="color: #ff4500;">0</span>
password_alpha_mixed = <span style="color: #ff4500;">0</span>
password_alpha_lower_numeric = <span style="color: #ff4500;">0</span>
password_alpha_upper_numeric = <span style="color: #ff4500;">0</span>
password_alpha_mixed_numeric = <span style="color: #ff4500;">0</span>
password_everything_else = <span style="color: #ff4500;">0</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># create empty list(s)</span>
list_password_length = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># create empty dictionary(s)</span>
dict_password_count = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># save all passwords to a list</span>
file_passwords_all = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>file_passwords_all, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>
list_passwords_all = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> file_passwords_all:
	list_passwords_all.<span style="color: black;">append</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
	passwords_all += <span style="color: #ff4500;">1</span>
	password_length = <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
	list_password_length.<span style="color: black;">append</span><span style="color: black;">&#40;</span>password_length<span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[0-9]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_numeric += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[a-z]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_lower += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[A-Z]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_upper += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[a-zA-Z]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_mixed += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[a-z0-9]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_lower_numeric += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[A-Z0-9]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_upper_numeric += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #dc143c;">re</span>.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;^[a-zA-Z0-9]+$&quot;</span>, line<span style="color: black;">&#41;</span>:
		password_alpha_mixed_numeric += <span style="color: #ff4500;">1</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		password_everything_else += <span style="color: #ff4500;">1</span>
&nbsp;
file_passwords_all.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># save unique passwords to a list</span>
list_passwords_unique = <span style="color: #008000;">set</span><span style="color: black;">&#40;</span>list_passwords_all<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># put unique passwords and the number of times seen in a dictionary</span>
<span style="color: #ff7700;font-weight:bold;">for</span> item <span style="color: #ff7700;font-weight:bold;">in</span> list_passwords_unique:
	dict_password_count<span style="color: black;">&#91;</span>item<span style="color: black;">&#93;</span> = list_passwords_all.<span style="color: black;">count</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#41;</span>
	passwords_unique += <span style="color: #ff4500;">1</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># calculate how many unique passwords there are</span>
passwords_unique_percent = <span style="color: black;">&#40;</span><span style="color: #008000;">float</span><span style="color: black;">&#40;</span>passwords_unique<span style="color: black;">&#41;</span>/<span style="color: #008000;">float</span><span style="color: black;">&#40;</span>passwords_all<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">100</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># display total and unique passwords</span>
<span style="color: #ff7700;font-weight:bold;">print</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'all passwords<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>= '</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>passwords_all<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'unique passwords<span style="color: #000099; font-weight: bold;">\t</span>= '</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>passwords_unique<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>%% %.02f&quot;</span> <span style="color: #66cc66;">%</span> passwords_unique_percent
<span style="color: #ff7700;font-weight:bold;">print</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># print out password lengths and number of times seen</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'password length(s): '</span>
<span style="color: #ff7700;font-weight:bold;">for</span> number <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">31</span><span style="color: black;">&#41;</span>:
	password_item = number + <span style="color: #ff4500;">1</span>
	password_length_total = list_password_length.<span style="color: black;">count</span><span style="color: black;">&#40;</span>password_item<span style="color: black;">&#41;</span>
	length_percentage = <span style="color: black;">&#40;</span><span style="color: #008000;">float</span><span style="color: black;">&#40;</span>password_length_total<span style="color: black;">&#41;</span>/<span style="color: #008000;">float</span><span style="color: black;">&#40;</span>passwords_all<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">100</span>
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>number<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot; char<span style="color: #000099; font-weight: bold;">\t</span> =&amp;gt;<span style="color: #000099; font-weight: bold;">\t</span> &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>password_length_total<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>%% %.02f&quot;</span> <span style="color: #66cc66;">%</span> length_percentage
&nbsp;
<span style="color: #808080; font-style: italic;"># print out complexity of the passwords and number of times seen with percentages</span>
dict_password_complexity_options = <span style="color: black;">&#123;</span>password_numeric: <span style="color: #483d8b;">'all numeric          '</span>, password_alpha_lower: <span style="color: #483d8b;">'all alpha lower'</span>, password_alpha_upper: <span style="color: #483d8b;">'all alpha upper'</span>, password_alpha_mixed: <span style="color: #483d8b;">'all alpha mixed'</span>, password_alpha_lower_numeric: <span style="color: #483d8b;">'alpha lower &amp;amp; numeric'</span>, password_alpha_upper_numeric: <span style="color: #483d8b;">'alpha upper &amp;amp; numeric'</span>, password_alpha_mixed_numeric: <span style="color: #483d8b;">'alpha mixed &amp;amp; numeric'</span>, password_everything_else: <span style="color: #483d8b;">'everything else'</span><span style="color: black;">&#125;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;password complexity: &quot;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> item, description <span style="color: #ff7700;font-weight:bold;">in</span> dict_password_complexity_options.<span style="color: black;">iteritems</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s <span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span> &quot;</span> <span style="color: #66cc66;">%</span> description + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>%% %.02f&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #008000;">float</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#41;</span>/<span style="color: #008000;">float</span><span style="color: black;">&#40;</span>passwords_all<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">100</span><span style="color: black;">&#41;</span>
<span style="color: #008000;">sum</span> = password_numeric + password_alpha_lower + password_alpha_upper + password_alpha_mixed + password_alpha_lower_numeric + password_alpha_upper_numeric + password_alpha_mixed_numeric + password_everything_else
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;sum<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span> &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">sum</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># print out the ten most common passwords with number of times seen</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;most common passwords:&quot;</span>
counter = <span style="color: #ff4500;">9</span>
<span style="color: #ff7700;font-weight:bold;">for</span> key,value <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">sorted</span><span style="color: black;">&#40;</span>dict_password_count.<span style="color: black;">iteritems</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, key=<span style="color: #ff7700;font-weight:bold;">lambda</span> item: -item<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">if</span> counter <span style="color: #66cc66;">&amp;</span>gt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">0</span>:
		<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>key<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span>lt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">6</span>:
			<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;password: &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>key<span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>count: &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>value<span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">else</span>:
			<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;password: &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>key<span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>count: &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>value<span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
            	counter-=<span style="color: #ff4500;">1</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2011/09/27/passwords-you-cant-do-it-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>learning to code (on the cheap)</title>
		<link>http://toastresearch.com/2011/09/18/learning-to-code-on-the-cheap/</link>
		<comments>http://toastresearch.com/2011/09/18/learning-to-code-on-the-cheap/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 19:40:40 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=552</guid>
		<description><![CDATA[in the time that i have been in IT (almost 6 years) i have become very proficient at hacking together code to do what i need. from vb scripts to do simple network administration to customizing some python to send over an exploit, i have found a way to make it work. what i miss <a href='http://toastresearch.com/2011/09/18/learning-to-code-on-the-cheap/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>in the time that i have been in IT (almost 6 years) i have become very proficient at hacking together code to do what i need. from vb scripts to do simple network administration to customizing some python to send over an exploit, i have found a way to make it work.</p>
<p>what i miss and don&#8217;t know is how to do is code correctly. in my search for learning how to code proper i ran across some great courses from stanford university and thought i would share.</p>
<p>i was looking for entry level classes that started at square one and these classes fit the bill perfectly. whats even better is that not only the video, but the homework assignments, handouts, and files are all available free of charge.</p>
<p>so far i have watched almost 4 of the classes and can say i have already learned some things, looking forward to the next 70+ classes ;)</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/stanford_programming_01.jpg"><img class="alignnone size-full wp-image-592" title="stanford_programming_01" src="http://toastresearch.com/wp-content/uploads/2011/09/stanford_programming_01.jpg" alt="" width="855" height="573" /></a></p>
<p>here are the classes with links:</p>

<table id="wp-table-reloaded-id-5-no-1" class="wp-table-reloaded wp-table-reloaded-id-5">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">title</th><th class="column-2">url</th><th class="column-3">language</th><th class="column-4">itunes link</th>
	</tr>
</thead>
<tbody class="row-hover">
	<tr class="row-2 even">
		<td class="column-1">cs106a - programming methodology</td><td class="column-2">http://www.stanford.edu/class/cs106a/</td><td class="column-3">java</td><td class="column-4">http://itunes.apple.com/us/itunes-u/programming-methodology/id384232896</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">cs106b - programming abstractions</td><td class="column-2">http://www.stanford.edu/class/cs106b/</td><td class="column-3">c++</td><td class="column-4">http://itunes.apple.com/us/itunes-u/programming-abstractions/id384232917</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">cs107 - programming paradigms</td><td class="column-2">http://www.stanford.edu/class/cs107/</td><td class="column-3">c++</td><td class="column-4">http://itunes.apple.com/us/itunes-u/programming-paradigms/id384233005</td>
	</tr>
</tbody>
</table>

<p><strong>note:</strong> for the record, i am not really a fan of itunes (and you can get these classes on youtube as well), but being able to download all the classes to my hard drive with a single mouse click was compelling enough for me to do it through itunes.</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2011/09/18/learning-to-code-on-the-cheap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>networkminer on backtrack 5 r1</title>
		<link>http://toastresearch.com/2011/09/11/networkminer-on-backtrack-5-r1/</link>
		<comments>http://toastresearch.com/2011/09/11/networkminer-on-backtrack-5-r1/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 19:46:55 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[backtrack]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[backtrack 5 r1]]></category>
		<category><![CDATA[network forensics]]></category>
		<category><![CDATA[network miner]]></category>
		<category><![CDATA[networkminer]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=550</guid>
		<description><![CDATA[i have recently been working through some network forensic challenges from a few locations (http://forensicscontest.com and http://ismellpackets.com/category/pcap/) and wanted to do some network carving (parsing a pcap and getting the files like .exe&#8217;s, .jpg&#8217;s, etc). to answer some of the questions i wanted to load networkminer on my backtrack 5 r1 box. fortunately there was <a href='http://toastresearch.com/2011/09/11/networkminer-on-backtrack-5-r1/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>i have recently been working through some network forensic challenges from a few locations (http://forensicscontest.com and http://ismellpackets.com/category/pcap/) and wanted to do some network carving (parsing a pcap and getting the files like .exe&#8217;s, .jpg&#8217;s, etc). to answer some of the questions i wanted to load networkminer on my backtrack 5 r1 box.</p>
<p>fortunately there was a tutorial on how to get networkminer up on linux, but it didn&#8217;t fix everything for the newest version of backtrack (specifically, the fonts were off and the menu didn&#8217;t show up correctly).</p>
<p>to get networkminer 1.0 up and running on my backtrack 5 r1 VM here is what i did (summary of commands at bottom):</p>
<ol>
<li>downloaded winetricks and installed the .NET framework, some core fonts, and the GDI+ package

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>kegel.com<span style="color: #000000; font-weight: bold;">/</span>wine<span style="color: #000000; font-weight: bold;">/</span>winetricks
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x winetricks
.<span style="color: #000000; font-weight: bold;">/</span>winetricks corefonts dotnet20 gdiplus</pre></div></div>

<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_01.png"><img class="alignnone size-full wp-image-571" title="network_miner_01" src="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_01.png" alt="" width="798" height="598" /></a></p>
<p><span id="more-550"></span></li>
<li>download networkminer 1.0

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>networkminer<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>networkminer<span style="color: #000000; font-weight: bold;">/</span>NetworkMiner-<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>NetworkMiner_1-<span style="color: #000000;">0</span>.zip<span style="color: #000000; font-weight: bold;">/</span>download</pre></div></div>

<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_03.png"><img class="alignnone size-full wp-image-573" title="network_miner_03" src="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_03.png" alt="" width="799" height="599" /></a></li>
<li>extract the zip file and run network miner (you will get an pop-up saying there are no pcap adapters available, which is expected). i am using networkminer for viewing and extracting data only, not capturing (that is what tcpdump is for ;)

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">unzip</span> download
<span style="color: #7a0874; font-weight: bold;">cd</span> NetworkMiner_1-<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">wine</span> NetworkMiner.exe</pre></div></div>

<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_04.png"><img class="alignnone size-full wp-image-574" title="network_miner_04" src="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_04.png" alt="" width="802" height="598" /></a></li>
<li>you should have a working (non-capturing) copy of networkminer 1.0 ready to go<br />
<a href="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_05.png"><img class="alignnone size-full wp-image-575" title="network_miner_05" src="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_05.png" alt="" width="798" height="599" /></a></li>
<li>for ease of use, i added a link to networkminer in the applications menu<br />
<a href="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_06.png"><img class="alignnone size-full wp-image-576" title="network_miner_06" src="http://toastresearch.com/wp-content/uploads/2011/09/network_miner_06.png" alt="" width="799" height="598" /></a></li>
</ol>
<p><strong>notes:</strong></p>
<ol>
<li>the files that networkminer carves out will be located at:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>.wine<span style="color: #000000; font-weight: bold;">/</span>drive_c<span style="color: #000000; font-weight: bold;">/</span>Program Files<span style="color: #000000; font-weight: bold;">/</span>NetworkMiner_1-<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>AssembledFiles</pre></div></div>

<p>on windows, you can just right click and open the folder, but this didn&#8217;t work on my backtrack VM.</li>
<li>here is the list of commands i ran in order

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>kegel.com<span style="color: #000000; font-weight: bold;">/</span>wine<span style="color: #000000; font-weight: bold;">/</span>winetricks
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x winetricks
.<span style="color: #000000; font-weight: bold;">/</span>winetricks corefonts dotnet20 gdiplus
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>networkminer<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>networkminer<span style="color: #000000; font-weight: bold;">/</span>NetworkMiner-<span style="color: #000000;">1.0</span><span style="color: #000000; font-weight: bold;">/</span>NetworkMiner_1-<span style="color: #000000;">0</span>.zip<span style="color: #000000; font-weight: bold;">/</span>download
<span style="color: #c20cb9; font-weight: bold;">unzip</span> download
<span style="color: #7a0874; font-weight: bold;">cd</span> NetworkMiner_1-<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">wine</span> NetworkMiner.exe
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>download</pre></div></div>

</li>
</ol>
<div><strong>references:</strong><br />
original networkminer/linux post: http://geek00l.blogspot.com/2008/12/drunken-monkey-running-network-miner.html<br />
post that told me about the gdiplus package:  http://forum.winehq.org/viewtopic.php?t=8516</div>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2011/09/11/networkminer-on-backtrack-5-r1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>weighted averages: selling your point</title>
		<link>http://toastresearch.com/2011/09/04/weighted-averages-selling-your-point/</link>
		<comments>http://toastresearch.com/2011/09/04/weighted-averages-selling-your-point/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 18:56:32 +0000</pubDate>
		<dc:creator>joshua.smith</dc:creator>
				<category><![CDATA[project management]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[weights]]></category>

		<guid isPermaLink="false">http://toastresearch.com/?p=500</guid>
		<description><![CDATA[i like to have numbers for management to base a decision on. sometimes this is easy (just hand them a dollar figure), other times it is not. i came around to weighted averages for the simple reason that i wanted to prove, with numbers, that just because an option is cheaper, that doesn&#8217;t mean its better. let <a href='http://toastresearch.com/2011/09/04/weighted-averages-selling-your-point/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>i like to have numbers for management to base a decision on. sometimes this is easy (just hand them a dollar figure), other times it is not. i came around to weighted averages for the simple reason that i wanted to prove, with numbers, that just because an option is cheaper, that doesn&#8217;t mean its better. let me explain.</p>
<p>in the process of evaluating 3 different vendors as a replacement product, say you pick out 5 criteria to base them on. for my purposes, i throw this in a spread sheet and then i grade each vendor on how i think they do for each criteria (which is subjective, of course).  for an example, see the screen shot below:</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_01.png"><img class="alignnone size-full wp-image-501" title="weighted_average_01" src="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_01.png" alt="" width="552" height="293" /></a></p>
<p>very quickly you can see that it is almost a dead heat between vendor x and y, and vendor z is out of the mix, right?</p>
<p><span id="more-500"></span>i would say this is misleading for the simple fact that criteria 1 might not (and probably won&#8217;t) be as important to you as criteria 2 or 3, etc.</p>
<p>in this example, i care a lot about criteria 2 &amp; 5 (lets say those are the core functions of what i am evaluating) and only a moderate amount about criteria&#8217;s 1,3 and 4 (suppose those are things like look, feel, etc). so, i modify the spread sheet to add a weight column, assign each criteria a weight  (which is also subjective) and i get totally different numbers. take a look:</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_02.png"><img class="alignnone size-full wp-image-502" title="weighted_average_02" src="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_02.png" alt="" width="562" height="316" /></a></p>
<p>now, instead of being a slight advantage to vendor x, you can clearly see that vendor y is a much better fix for my environment and vendor x is the worst fit, not the best.</p>
<p>how do you do it? it all revolves around two functions: sumproduct() and sum().</p>
<p>all the weights are subjective, so you provide those. now, instead of just summing criteria 1-5 and dividing by the number of criteria, you are going to use sumproduct() to multiply each criteria with its corresponding weight and then divide the sumproduct() with the sum() of all the weights.</p>
<p>it sounds complicated when you read it, but here is what it looks like (this is based off the screenshot, looking at the formula in cell c7):</p>
<p><a href="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_03.png"><img class="alignnone size-full wp-image-503" title="weighted_average_03" src="http://toastresearch.com/wp-content/uploads/2011/09/weighted_average_03.png" alt="" width="459" height="42" /></a></p>
<p>here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">=sumproduct<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$b</span><span style="color: #007800;">$2</span>:<span style="color: #007800;">$b</span><span style="color: #007800;">$6</span>;c2:c6<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sum</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$b</span><span style="color: #007800;">$2</span>:<span style="color: #007800;">$b</span><span style="color: #007800;">$6</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>that&#8217;s it. just something handy to have for professional or personal evaluation on what option is best.</p>
<p><strong>note:</strong> probably not necessary to state, but the &#8220;$&#8221; sign in the formula is an anchor of sorts, it keeps that field from changing when you do a autocomplete function (in this case the weights are always at b2-b6, so i lock them down with a &#8220;$&#8221;). just in case you didn&#8217;t know that ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://toastresearch.com/2011/09/04/weighted-averages-selling-your-point/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

