<?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>Kyle Anderson &#187; scripting</title>
	<atom:link href="http://xkyle.com/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://xkyle.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Jul 2010 04:54:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Verizon FiOS Wireless Security Analysis</title>
		<link>http://xkyle.com/2009/02/07/verizon-fios-wireless-security-analysis/</link>
		<comments>http://xkyle.com/2009/02/07/verizon-fios-wireless-security-analysis/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 18:29:04 +0000</pubDate>
		<dc:creator>Kyle Anderson</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[aircrack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[nclug]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[wep]]></category>

		<guid isPermaLink="false">http://xkyle.com/?p=243</guid>
		<description><![CDATA[Take a look at some wireless keys that I&#8217;ve collected from some Verizon FiOS installs around Tampa: 00-18-01-EA-3D-99,E3X12,6,WEP,1801349FCA 00-18-01-F0-6D-C4,NAMX2,1,WEP,18014B311F 00-18-01-F0-95-78,MWXV2,11,WEP,180149FF66 00-18-01-FD-4F-0E,R0LC7,1,WEP,1801BC5C6B 00-18-01-FE-15-46,JE2K7,1,WEP,1801C1B02B 00-18-01-FF-DF-DD,HH150,1,WEP,1F900396C5 00-1F-90-E0-B1-F8,3RA18,6,WEP,1801CDF4AF 00-1F-90-E0-B5-AC,OQ838,6,WEP,1801CF5700 00-1F-90-E2-7E-61,7WY20,6,WEP,1F90021D27 00-1F-90-E3-1E-90,C7WA0,6,WEP,1F9007C188 00-1F-90-E3-2E-07,DJP80,6,WEP,1F90063349 00-1F-90-E6-A7-D5,BJ2Z0,11,WEP,1F9018F797 00-1F-90-E6-D4-E3,RSHZ0,4,WEP,1F901944DB What you are looking at here is MAC, SSID, Channel, Encryption, Key. Notice that they are all WEP, 64bit, with 5 Alpha numeric SSID&#8217;s. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkyle.com/wp-content/uploads/verizon_fios_250.jpg"><img class="alignnone size-medium wp-image-244" title="verizon_fios_250" src="http://xkyle.com/wp-content/uploads/verizon_fios_250.jpg" alt="" width="250" height="72" /></a></p>
<p>Take a look at some wireless keys that I&#8217;ve collected from some Verizon FiOS installs around Tampa:</p>
<blockquote><p>00-18-01-EA-3D-99,E3X12,6,WEP,1801349FCA<br />
00-18-01-F0-6D-C4,NAMX2,1,WEP,18014B311F<br />
00-18-01-F0-95-78,MWXV2,11,WEP,180149FF66<br />
00-18-01-FD-4F-0E,R0LC7,1,WEP,1801BC5C6B<br />
00-18-01-FE-15-46,JE2K7,1,WEP,1801C1B02B<br />
00-18-01-FF-DF-DD,HH150,1,WEP,1F900396C5<br />
00-1F-90-E0-B1-F8,3RA18,6,WEP,1801CDF4AF<br />
00-1F-90-E0-B5-AC,OQ838,6,WEP,1801CF5700<br />
00-1F-90-E2-7E-61,7WY20,6,WEP,1F90021D27<br />
00-1F-90-E3-1E-90,C7WA0,6,WEP,1F9007C188<br />
00-1F-90-E3-2E-07,DJP80,6,WEP,1F90063349<br />
00-1F-90-E6-A7-D5,BJ2Z0,11,WEP,1F9018F797<br />
00-1F-90-E6-D4-E3,RSHZ0,4,WEP,1F901944DB</p></blockquote>
<p>What you are looking at here is MAC, SSID, Channel, Encryption, Key.</p>
<p>Notice that they are all WEP, 64bit, with 5 Alpha numeric SSID&#8217;s.</p>
<p>I want to emphasize that these are the defaults, and only geeks, nerds and the like change the defaults. <img src='http://xkyle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here is a typical type of router (actiontec) that does this:</p>
<p><a href="http://xkyle.com/wp-content/uploads/mi424wr.gif"><img class="alignnone size-medium wp-image-245" title="mi424wr" src="http://xkyle.com/wp-content/uploads/mi424wr-300x216.gif" alt="" width="300" height="216" /></a></p>
<p>Take a real close look at two of the examples:</p>
<blockquote><p>00-18-01-FE-15-46,JE2K7,1,WEP,1801C1B02B<br />
00-1F-90-E2-7E-61,7WY20,6,WEP,1F90021D27</p></blockquote>
<p>Notice the relationship the MAC and the key have. Let me split up the bytes for you:</p>
<blockquote><p>00:18:01:FE:15:46   -  18:01:C1:B0:2B</p></blockquote>
<p>Verizon, or Actiontec, or someone is setting the first byte of the 40bit key to the second byte of the MAC of the unit. And then they are setting the second byte of the key to the third byte of the MAC!</p>
<p>You can look on the list, and this is mostly the case, there is some overlap on the OIDs. (sometimess it is 1801, sometimes 1f90) Why is this useful? Well if you know it is a FiOS install, you have already decreased your &#8220;64bit&#8221; key to a real &#8220;40bit&#8221; key, and you already know 16 bits of it, so you only have to crack 24 bits. This is insane. This is like guessing 3 letters.</p>
<p>The way to use this is with the <a href="http://www.aircrack-ng.org">Aircrack-ng</a> program. Capture some packets, and use the -d option to tell it what the key starts with.</p>
<blockquote><p>aircrack-ng -d 1801 stupid-fios.cap</p></blockquote>
<p>You will get the key in No time! Silly Verizon, you didn&#8217;t think we would notice you weren&#8217;t using constructed (not random) keys?</p>
<p>Have FiOS yourself? Want to share your MAC and default key in the comments? <img src='http://xkyle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://xkyle.com/2009/02/07/verizon-fios-wireless-security-analysis/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Custom Arp Alerts II!</title>
		<link>http://xkyle.com/2008/08/21/custom-arp-alerts-ii/</link>
		<comments>http://xkyle.com/2008/08/21/custom-arp-alerts-ii/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 11:59:57 +0000</pubDate>
		<dc:creator>Kyle Anderson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[sago]]></category>
		<category><![CDATA[nclug]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://xkyle.com/?p=112</guid>
		<description><![CDATA[So I&#8217;ve found a better way to do what I did in the previous post. Instead of running a separate script to parse the arp alert logs, I have arp alert itself send the alerts! The key is this line in the arpalert.conf action on detect = &#8220;/etc/scripts/arp-alert&#8221; Its so simple, it just runs that [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">So I&#8217;ve found a better way to do what I did in the previous post. Instead of running a separate script to parse the arp alert logs, I have arp alert itself send the alerts! The key is this line in the arpalert.conf</p>
<blockquote style="text-align: center;">
<p style="text-align: left;">action on detect = &#8220;/etc/scripts/arp-alert&#8221;</p>
</blockquote>
<p style="text-align: left;">Its so simple, it just runs that script sending the information about the alert as certain arguments. With this I have more control over the formatting of arpalert messages:</p>
<p style="text-align: center;"><a href="http://xkyle.com/wp-content/uploads/screenshot2.png"><img class="size-full wp-image-114 aligncenter" title="screenshot2" src="http://xkyle.com/wp-content/uploads/screenshot2.png" alt="" width="422" height="145" /></a></p>
<p style="text-align: left;">In order to do this, I had to write that script, and make it executable of course. Also I had to change the running user of arpalert to root, because the &#8220;arpalert&#8221; user didn&#8217;t have permission to notify my user &#8220;kyle&#8221;. This is a much more clean solution, allowing me to make different types of alerts look different, having different timeouts and such. If you want my /etc/scripts/arp-alert you can download what I have so far <a href="http://xkyle.com/other/arp-alert">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://xkyle.com/2008/08/21/custom-arp-alerts-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Arp-Alerts</title>
		<link>http://xkyle.com/2008/08/20/custom-arp-alerts/</link>
		<comments>http://xkyle.com/2008/08/20/custom-arp-alerts/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 23:17:05 +0000</pubDate>
		<dc:creator>Kyle Anderson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[sago]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://xkyle.com/?p=101</guid>
		<description><![CDATA[So I was looking around, and I wanted some sort of tool to allow me to be more aware about what was happening in the lower &#8220;bowels&#8221; of the network that I&#8217;m on with my laptop. So what is it that I want&#8230; What I really want is some sort of mac-address based buddy list. [...]]]></description>
			<content:encoded><![CDATA[<p>So I was looking around, and I wanted some sort of tool to allow me to be more aware about what was happening in the lower &#8220;bowels&#8221; of the network that I&#8217;m on with my laptop. So what is it that I want&#8230;</p>
<p>What I really want is some sort of mac-address based buddy list. One that would show my a list of the mac addresses talking on my network, and allow me to alias them. That would be cool.</p>
<p>I couldn&#8217;t find such program, but I found something kinda close, its called arpalert. If you are using ubuntu you can simply run &#8220;apt-get install arpalert&#8221; (I love ubuntu!)</p>
<blockquote><p>kyle@kyle-laptop:~$ apt-cache search arpalert<br />
arpalert &#8211; Monitor ARP changes in ethernet networks</p></blockquote>
<p>You should edit the config file to your liking, but the main thing is the log file in /var/log/arpalert.log. I have it logging every interesting arp thing, because I find them interesting! You need to read up on it if you want to fully understand arpalert: <a href="http://www.arpalert.org/">http://www.arpalert.org/</a></p>
<p>So that is the first part. The second part is the piece that notifies you of something suspicious. Who wants to tail a log file all the time? For this I use something called &#8220;notify-send&#8221;. Try running it. If you don&#8217;t have it and you are running Ubuntu it will tell you that its part of the &#8221;</p>
<p>So I was looking around, and I wanted some sort of tool to allow me to be more aware about what was happening in the lower &#8220;bowels&#8221; of the network that I&#8217;m on with my laptop. So what is it that I want&#8230;</p>
<p>What I really want is some sort of mac-address based buddy list. One that would show my a list of the mac addresses talking on my network, and allow me to alias them. That would be cool.</p>
<p>I couldn&#8217;t find such program, but I found something kinda close, its called arpalert. If you are using ubuntu you can simply run &#8220;apt-get install arpalert&#8221; (I love ubuntu!)</p>
<blockquote><p>kyle@kyle-laptop:~$ apt-cache search arpalert<br />
arpalert &#8211; Monitor ARP changes in ethernet networks</p></blockquote>
<p>You should edit the config file to your liking, but the main thing is the log file in /var/log/arpalert.log. I have it logging every interesting arp thing, because I find them interesting! You need to read up on it if you want to fully understand arpalert: <a href="http://www.arpalert.org/">http://www.arpalert.org/</a></p>
<p style="text-align: center;"><a href="http://xkyle.com/wp-content/uploads/tailarps.png"><img title="tailarps" src="http://xkyle.com/wp-content/uploads/tailarps.png" alt="" /></a></p>
<p>So that is the first part. The second part is the piece that notifies you of something suspicious. Who wants to tail a log file all the time? For this I use something called &#8220;notify-send&#8221;. Try running it. If you don&#8217;t have it and you are running Ubuntu it will tell you that its part of the &#8220;libnotify-bin&#8221; package. So you will need to run:</p>
<blockquote><p>$ sudo apt-get install libnotify-bin</p></blockquote>
<p>Try it! run &#8220;notify test&#8221;. A popup should show up! Simple! Now, we need a small program to put the pieces together and glue it. I want my popup when odd things happen. Here is the glue I wrote, modify at will:</p>
<blockquote><p>tail -n 0  -F /var/log/arpalert.log | awk -W interactive &#8216;{print $8, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12}&#8217; |<br />
while read heading message<br />
do  notify-send -t 3000 &#8212; &#8220;Arp Alert&#8221; &#8220;${heading} ${message}&#8221;<br />
done</p></blockquote>
<p>I don&#8217;t think I&#8217;m done with it yet. (I want to make it give different time outs for different types of messages, and I want it to change the heading to something dynamic instead of the Arp Alert, but yea) So put that in a .sh and run it! Nothing may pop up! Try putting something new on the network and seeing if something shows up in the log. Its pretty easy to troubleshoot and modify to your liking.</p>
<p style="text-align: center;"><a href="http://xkyle.com/wp-content/uploads/screenshot1.png"><img title="arpalert-screenshot" src="http://xkyle.com/wp-content/uploads/screenshot1.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://xkyle.com/2008/08/20/custom-arp-alerts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DNS Cache Poisoning</title>
		<link>http://xkyle.com/2008/07/31/dns-cache-poisoning/</link>
		<comments>http://xkyle.com/2008/07/31/dns-cache-poisoning/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 12:00:10 +0000</pubDate>
		<dc:creator>Kyle Anderson</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[sago]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://xkyle.com/?p=96</guid>
		<description><![CDATA[Recently a DNS expert found a flaw in the way that DNS servers talk to other DNS servers to get records that allows interested parties (hackers) to insert their own records. If you need a primer: the Wikipedia link. Well&#8230; a DNS flaw is no fun without a tool to use it. So this guy [...]]]></description>
			<content:encoded><![CDATA[<p>Recently a DNS expert found a flaw in the way that DNS servers talk to other DNS servers to get records that allows interested parties (hackers) to insert their own records. If you need a primer: the <a href="http://en.wikipedia.org/wiki/DNS_cache_poisoning">Wikipedia link</a>.</p>
<p>Well&#8230; a DNS flaw is no fun without a tool to use it. So this guy &#8220;HD Moore&#8221; wrote a program (script) that takes advantage of this and makes it relatively easy for someone to use something called <a href="http://www.metasploit.com/framework/">Metasploit</a> to tinker with it. Cool!</p>
<p>Turns out that it works, and people are fixing their DNS servers so that this can&#8217;t happen. (I fixed mine as soon as the fix was out.) But not everyone can fix their own, often they are at the mercy of their ISP&#8217;s. (Have you ever called up your ISP&#8217;s help desk and told them they need to upgrade their DNS servers to protect them against cache poisoning? Heheheh.. right)</p>
<p>So one day, Mr. Moore goes to google.com on his computer at work, and guess what, its not the real google.com&#8230;</p>
<p><a href="http://www.networkworld.com/news/2008/073008-dns-attack-writer-a-victim.html">The news article</a></p>
<p>Well played sir. Well played.</p>
]]></content:encoded>
			<wfw:commentRss>http://xkyle.com/2008/07/31/dns-cache-poisoning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching using disk

Served from: xkyle.com @ 2010-07-31 23:42:19 -->