<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The IT Geek Chronicles</title>
	<atom:link href="http://itgeekchronicles.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://itgeekchronicles.co.uk</link>
	<description>The ramblings of an IT Geek</description>
	<lastBuildDate>Wed, 15 May 2013 06:20:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='itgeekchronicles.co.uk' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/8f5b47351a9dcc144b16508577ee135e?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>The IT Geek Chronicles</title>
		<link>http://itgeekchronicles.co.uk</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://itgeekchronicles.co.uk/osd.xml" title="The IT Geek Chronicles" />
	<atom:link rel='hub' href='http://itgeekchronicles.co.uk/?pushpress=hub'/>
		<item>
		<title>Honeypot: Kippo Pi</title>
		<link>http://itgeekchronicles.co.uk/2013/05/14/honeypot-kippo-pi/</link>
		<comments>http://itgeekchronicles.co.uk/2013/05/14/honeypot-kippo-pi/#comments</comments>
		<pubDate>Tue, 14 May 2013 07:16:41 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[Honeypot]]></category>
		<category><![CDATA[Malware]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=225</guid>
		<description><![CDATA[I&#8217;m sure you are all aware of the awesome RaspberryPI machines and no doubt you&#8217;ve thought of a number of fun things to run on these little machines whether it&#8217;s a media server, home automation system, web server or a penetration testing drop box. Up until last week I had resisted the urge to buy [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=225&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m sure you are all aware of the awesome RaspberryPI machines and no doubt you&#8217;ve thought of a number of fun things to run on these little machines whether it&#8217;s a media server, home automation system, web server or a penetration testing drop box. Up until last week I had resisted the urge to buy one just for the sheer fact I couldn&#8217;t think of anything &#8220;interesting&#8221; to do with one, I mean there are only so many installs of Backtrack/Kali you can have (I even have Backtrack on my phone).</p>
<p>With my focus at the moment on network forensics and malware I decided to get a RaspberryPI and see how it works as a HoneyPot. The first one I&#8217;ve installed is Kippo and this post is about how to get Kippo running on the RaspberryPI.</p>
<p>Kippo is a low interactive SSH honeypot that allows you to capture SSH based attacks and see what those evil hackers are up to. I&#8217;m not going to bore you with a long explaination of Kippo because well it&#8217;s early and I&#8217;ve not had much coffee, instead you can click <a href="https://code.google.com/p/kippo/" target="_blank">HERE</a> and go have a read yourself.</p>
<p>The following instructions aren&#8217;t the product of my own mind, rather they have been taken from <strong>Leon van der Eijk</strong> (or <strong>@lvdeijk</strong> for short) awesome BSides London Kippo Workshop crib sheet.</p>
<p>So to start with you need the following (or close to):</p>
<p>1. RaspberryPI (kinda obvious but..I have the model B)<br />
2. SD Card (I bought a 32GB SanDisk SDHC card, because I want to install other stuff on it)<br />
3. Physical network connection for your RaspberryPI (to download stuff)<br />
4. A home router/firewall that you can do port forwarding on.<br />
5. Coffee (or beverage of your choice)</p>
<p>So first off we need to install some of the dependencies to get Kippo running. SSH onto your RaspberryPI and as the pi user run the following command:</p>
<p><code>sudo apt-get install subversion python-twisted python-mysqldb mysql-server apache2</code></p>
<p>The mysql-server and apache2 packages are so we can log Kippo to MySQL and run the kippo-graph website (nice pretty pictures). If you don&#8217;t want that functionality just don&#8217;t install them (but I would if I were you).</p>
<p><strong>NOTE:</strong> Remember the MySQL password you enter during the install as you will need that later.</p>
<p>So now we need to get a copy of Kippo, we are going to use SVN for this:</p>
<p><code>svn checkout <a href="http://kippo.googlecode.com/svn/trunk/" rel="nofollow">http://kippo.googlecode.com/svn/trunk/</a> kippo-read-only</code></p>
<p>Now your choice for installation is your own, by default this command will download Kippo into <strong>/home/pi/kippo-read-only</strong>.</p>
<p>Now if you installed MySQL as I suggested we need to do some database magic. Basically we are going to create a new database called Kippo and then assign a user and password for Kippo to use. So here we go:</p>
<p>First log into MySQL:</p>
<p><code>mysql -h localhost -u root -p</code></p>
<p>You should be prompted to enter your password (now you did remember it didn&#8217;t you).</p>
<p>Once logged in you need to create your database:</p>
<p><code>create database kippo;</code></p>
<p>And then assign the necessary rights:</p>
<p><code>GRANT ALL ON kippo.* TO 'kippo'@'localhost' IDENTIFIED BY 'Kippo-DB-pass';</code></p>
<p><strong>NOTE:</strong> The password for the kippo user within the kippo database is &#8216;Kippo-DB-pass&#8217; you can change it if you want.</p>
<p>You can now exit from MySQL using:</p>
<p><code>exit (tricky I know)</code></p>
<p>OK still with me? Right now we need to populate the database &#8216;kippo&#8217;, browse to this folder location:</p>
<p><strong>/kippo-read-only/doc/sql</strong></p>
<p>Within this folder you should find a file called <strong>mysql.sql</strong> now we need to load that into the database:</p>
<p><code>mysql -u kippo -p<br />
use kippo;<br />
source mysql.sql;</code></p>
<p>If that worked without errors you should now have a populated database, you can check by typing this within the MySQL prompt:</p>
<p><code>show tables;</code></p>
<p>If that returns some tables, one should be called TTY (I think, like I said it&#8217;s early) then we are all good and you can type:</p>
<p><code>exit</code></p>
<p>To exit out. We now need to create a <strong>kippo.cfg</strong> file, don&#8217;t panic it&#8217;s easy. From the root of the <strong>/kippo-read-only</strong> folder type this:</p>
<p><code>cp kippo.cfg.dst kippo.cfg</code></p>
<p>Now we need to edit the kippo.cfg file with the database details. Using your favourite command line editor (nano is installed so I used that). Navigate the file and find the <strong>[database_mysql]</strong> section (should all be commented out), un-comment all the fields (including the [database_mysql] one) and modify the values so it looks something like this:</p>
<p><code>[database_mysql]<br />
host = localhost<br />
database = kippo<br />
username = kippo<br />
password = Kippo-DB-pass</code></p>
<p>So we are nearly there. Now kippo uses port <strong>2222</strong> to run its honeypot on, in order to send evil hackers to that port you need to use your home router (which hopefully can do port forwarding) to send all traffic for port 22 to 2222. I&#8217;m not going to explain how to do this because everyone&#8217;s router is different. So go ahead and configure that port forwarding ready for when we start kippo.</p>
<p>If by chance you have put your honeypot directly on the internet you need to the following additional steps:</p>
<p><code>sudo apt-get install iptables<br />
sudo iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222<br />
sudo iptables-save &gt; /etc/iptables.rules</code></p>
<p>Port forwarding all sorted? Good now we need to change the default port for your ssh server to something a little &#8220;higher&#8221;. Use this command to change the listening port for the sshd to <strong>65534</strong>:</p>
<p><code>sudo sed -i 's:Port 22:Port 65534:g' /etc/ssh/sshd_config</code></p>
<p>And then restart your ssh service (you will get kicked off):</p>
<p><code>sudo /etc/init.d/ssh restart</code></p>
<p>Back with me? Cool right so essentially you now have a working a Kippo honeypot (hopefully). You can actually at this point start it up. Again it&#8217;s a simple process from your <strong>/kippo-read-only</strong> folder run the following command:</p>
<p><code>sudo ./start.sh</code></p>
<p>You can check it&#8217;s loaded properly by looking in the <strong>/kippo-read-only/log/kippo.log</strong> file which should show it starting up properly and you can then run this command to check:</p>
<p><code>sudo netstat -antp | grep 2222</code></p>
<p>Which should return an entry saying port 2222 is listening a python process is running.</p>
<p><strong>NOTE:</strong> The kippo.log file will also contain all the connection information and any commands that are run. The root password for the Kippo honeypot is &#8216;<strong>123456</strong>&#8216; you can change this by editing the <strong>/kippo-read-only/data/userdb.txt</strong> file and restarting kippo.</p>
<p>Now we are going to finish this off by installing the kippo-graph application that gives you lots of pretty pictures.</p>
<p>So lets install the extra bits we need:</p>
<p><code>sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi php5-mysql php5-gd<br />
sudo /etc/init.d/apache2 restart</code></p>
<p>That should have hopefully installed all the necessary php components you need to run kippo-graph, now let&#8217;s get kippo-graph:</p>
<p><code>wget <a href="http://bruteforce.gr/wp-content/uploads/kippo-graph-0.7.4.tar" rel="nofollow">http://bruteforce.gr/wp-content/uploads/kippo-graph-0.7.4.tar</a><br />
sudo mv kippo-graph-0.7.4.tar /var/www<br />
cd /var/www<br />
sudo tar xvf kippo-graph-0.7.4.tar --no-same-permissions<br />
cd kippo-graph<br />
sudo chmod 777 generated-graphs</code></p>
<p>Before you open the website you need to edit the /var/www/config.php file with your database properties from earlier, I can&#8217;t remember where exactly but its not a big file. Once you&#8217;ve done that you are ready to browse to:</p>
<p><code><a href="http://&lt;raspberrypi_ipaddress&gt;/kippo-graph/index.php" rel="nofollow">http://&lt;raspberrypi_ipaddress&gt;/kippo-graph/index.php</a></code></p>
<p>That should be it, once you have some data you can populate the graphs and &#8220;see&#8221; what the evil hackers are up to.</p>
<p>So I&#8217;m hoping that this has all worked and you now have a small discrete, energy-efficient honeypot running on your home network. Mine has been running since last night and I&#8217;ve had 4 connections to port 22 but no login attempts so far (thought evil hackers didn&#8217;t sleep).</p>
<p>Give me a shout if something doesn&#8217;t work and I will try my best to help you out.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=225&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/05/14/honeypot-kippo-pi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>Code: PDF hunter</title>
		<link>http://itgeekchronicles.co.uk/2013/05/12/code-pdf-hunter/</link>
		<comments>http://itgeekchronicles.co.uk/2013/05/12/code-pdf-hunter/#comments</comments>
		<pubDate>Sun, 12 May 2013 10:49:30 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scapy]]></category>
		<category><![CDATA[packets]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=221</guid>
		<description><![CDATA[So of late I&#8217;ve been playing around a lot with Scapy and pcap files, mostly for my sniffMyPackets project but also because it teaches me more about network forensics and python. The other area I&#8217;m starting to learn about is Malware Analysis and I&#8217;ve been spending some time looking at the Honeynet Project challenges. One [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=221&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So of late I&#8217;ve been playing around a lot with Scapy and pcap files, mostly for my <strong><a href="https://github.com/catalyst256/sniffMyPackets" target="_blank">sniffMyPackets</a></strong> project but also because it teaches me more about network forensics and python. The other area I&#8217;m starting to learn about is Malware Analysis and I&#8217;ve been spending some time looking at the <a href="http://www.honeynet.org" target="_blank">Honeynet Project</a> challenges.</p>
<p>One of the <a href="http://www.honeynet.org/challenges/2010_6_malicious_pdf">challenges</a> to is to find the malicious content within a PDF file that is provided to you in a pcap file. Normally I would just reach for <a href="http://www.netresec.com/?page=NetworkMiner" target="_blank">Network Miner</a> and rebuild the file(s) that way but I wanted to see if I could write some code myself.</p>
<p>The goal of my code was simple, parse through a pcap file, identify a PDF and then rebuild the file so that if a tool such as <strong>exiftool</strong> or <strong>file</strong> was used that it would correctly be identified as a PDF and that you could open the PDF and view the content (if you wanted to).</p>
<p>I follow a certain process when I&#8217;m carving up pcap files, it&#8217;s not rocket science really just common sense. First off find the packets you are interested in, I tend to use a mix of Wireshark and Scapy for this and then look for something you can use to filter down to the packets you want before getting into the nitty gritty of carving them up.</p>
<p>For this piece of code I need to find some way of identifying a PDF file in a pcap file and as most PDF files will appear in a pcap file as part of an HTTP conversation, I parse each packet and if the packet has a <strong>Raw</strong> layer (a raw layer in Scapy is essentially the payload of a packet) then I look for this <strong>&#8216;Content-Type: application/pdf&#8217;</strong>. If this is matched then I store the <strong>TCP ACK</strong> number as a variable for use later.</p>
<p>Now once I have the <strong>ACK</strong> number I then need to find all the packets that relate to this in order to get the whole file. Now it turns out the ACK is the same for all the packets that the PDF download is in (something I didn&#8217;t realise until I started this) so it&#8217;s a simple case of using the following code to find all the packets I&#8217;m after:</p>
<p><code>for p in pkts:<br />
if p.haslayer(TCP) and p.haslayer(Raw) and (p.getlayer(TCP).ack == int(ack) or p.getlayer(TCP).seq == int(ack)):<br />
raw = p.getlayer(Raw).load<br />
cfile.append(raw)<br />
</code></p>
<p>If either the <strong>TCP ACK</strong> or <strong>SEQ</strong> match our stored <strong>ACK</strong> variable we get the <strong>Raw</strong> layer and store it into a python list. This means that we now have (hopefully) all the packets that make up the PDF stored nicely away and because it&#8217;s a TCP conversation they should all be in the right order.</p>
<p>Now that we have all the packets we write those out to a temporary file, it&#8217;s a temporary file because if you were to open it in a text editor you would see all the HTTP headers at the top and the bottom, which means if you ran <strong>file</strong> against it, then you would get back a file type of &#8220;data&#8221; and not &#8220;PDF&#8221; (which is what we are after).</p>
<p>So we then have to do some python magic (well I think it&#8217;s magic), to slice the rubbish out. Now this is the part that took me the longest to figure out. If you have ever looked at a PDF file in a text editor (I wouldn&#8217;t blame you if you haven&#8217;t), you would notice that they start with <strong>&#8220;%PDF-&#8221;</strong> and end with <strong>&#8220;%%EOF&#8221;</strong> so finding the start of a PDF file is easy, the problem is that a PDF file can have multiple %%EOF towards the end of the file and I kept cutting at the wrong point.</p>
<p>To fix this I came up with a bit of a long-winded way of carving the temporary file up (see the code below):</p>
<p><code># Open the temp file, cut the HTTP headers out and then save it again as a PDF<br />
total_lines = ''<br />
firstcut = ''<br />
secondcut = ''<br />
final_cut = ''</code></p>
<p><code>f = open(tmpfile, 'r').readlines()</code></p>
<p><code>total_lines = len(f)</code></p>
<p><code>for x, line in enumerate(f):<br />
if start in line:<br />
firstcut = int(x)</code></p>
<p><code>for y, line in enumerate(f):<br />
if end in line:<br />
secondcut = int(y) + 1</code></p>
<p><code>f = f[firstcut:]</code></p>
<p><code>if int(total_lines) - int(secondcut) != 0:<br />
final_cut = int(total_lines) - int(secondcut)<br />
f = f[:-final_cut]<br />
outfile2.writelines(f)<br />
outfile2.close()<br />
else:<br />
outfile2.writelines(f)<br />
outfile2.close()<br />
</code><br />
If you read Python awesome, if you don&#8217;t here&#8217;s what happens.</p>
<p>First off I open the temporary file and count the number of lines, I look for the variable I declared at the start of the code as <strong>start</strong> (which is this: <em>start = str(&#8216;%PDF-&#8217;)</em>), if that&#8217;s matched it stores the line number as the variable <strong>firstcut</strong></p>
<p>I then need to find the last cut, I look for the variable <strong>end</strong> (which is this: <em>end = str(&#8216;%%EOF&#8217;)</em>) now remember I said a PDF can have multiple EOF statements, well I get round that because Python overrides the variable <strong>secondcut</strong> each time it&#8217;s matched so the last line with EOF is always the one used. I also add a +1 to the line number because for the next chunk of code if I didn&#8217;t I would actually cut the final %%EOF file the file (I know this because I did it, before realising what was happening).</p>
<p>So we now do a simple little <strong>IF</strong> statement to make sure that there is something at the end of the file to cut (sometimes there isn&#8217;t on the pcap files I&#8217;ve used/made) and if there is we slice the bad HTTP headers out before saving the file. If there isn&#8217;t anything to cut then we just save the file.</p>
<p>Hopefully that makes sense to non-python people (I can but hope).</p>
<p>I&#8217;ve tested this on a number of different pcap files that have PDF downloads in them and it works, I can open and view the PDF and if I run file or exitfool against it then it appears as a normal PDF. I&#8217;m sure there are some cases when it won&#8217;t work 100% but if you find something that doesn&#8217;t let me know so I can try to fix it.</p>
<p>The code can be found here: <a href="https://github.com/catalyst256/PDFHunter" rel="nofollow">https://github.com/catalyst256/PDFHunter</a> (in my ever-growing GitHub repo). Oh and I&#8217;ve added this function into my sniffMyPackets transform pack.</p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=221&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/05/12/code-pdf-hunter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>sniffMyPackets: New feature video</title>
		<link>http://itgeekchronicles.co.uk/2013/05/12/sniffmypackets-new-feature-video/</link>
		<comments>http://itgeekchronicles.co.uk/2013/05/12/sniffmypackets-new-feature-video/#comments</comments>
		<pubDate>Sun, 12 May 2013 09:33:32 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[sniffMyPackets]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=219</guid>
		<description><![CDATA[Well it&#8217;s not really &#8220;new&#8221; but I haven&#8217;t blogged about it (something I&#8217;m getting worse at) so I thought I would. Just so I know where to find it if I ever need to.. So this video covers some of the new features I&#8217;ve added into sniffMyPackets since it&#8217;s release. The video is a few [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=219&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Well it&#8217;s not really &#8220;new&#8221; but I haven&#8217;t blogged about it (something I&#8217;m getting worse at) so I thought I would. Just so I know where to find it if I ever need to..</p>
<p>So this video covers some of the new features I&#8217;ve added into sniffMyPackets since it&#8217;s release. The video is a few weeks old so actually I&#8217;ve added more since then but..</p>
<p>Anyway enjoy:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='595' height='365' src='http://www.youtube.com/embed/gVxmshYHjHg?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Let me know if you have any comments/suggestions etc.</p>
<p>Adam</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/219/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/219/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=219&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/05/12/sniffmypackets-new-feature-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>sniffMyPackets: Finding Tor</title>
		<link>http://itgeekchronicles.co.uk/2013/04/08/sniffmypackets-finding-tor/</link>
		<comments>http://itgeekchronicles.co.uk/2013/04/08/sniffmypackets-finding-tor/#comments</comments>
		<pubDate>Mon, 08 Apr 2013 12:32:46 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[sniffMyPackets]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=211</guid>
		<description><![CDATA[I don&#8217;t normally do short random posts but I figure once in a while won&#8217;t hurt. So I&#8217;ve been busy working on new transforms for my Maltego pcap analysis package and things are moving along nicely. Part of my process is making notes on things I think would be cool to see and then working [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=211&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I don&#8217;t normally do short random posts but I figure once in a while won&#8217;t hurt.</p>
<p>So I&#8217;ve been busy working on new transforms for my Maltego pcap analysis package and things are moving along nicely. Part of my process is making notes on things I think would be cool to see and then working my way through the list.</p>
<p>Over the weekend I added &#8220;Tor Traffic&#8221; to my list, I know most of the traffic is encrypted so wasn&#8217;t sure if I could get an end result from it but figure it was worth a look.</p>
<p>Anyway I &#8216;ve thrown together some Scapy/Python code (soon to be a transform if it&#8217;s right) that I think will highlight Tor traffic in a pcap file. Now this is just a work in progress so let me know if I&#8217;ve miles off the mark (so to speak).</p>
<p>I created a pcap file by stopping the Tor service on my copy of Backtrack and then starting it again while capturing some packets. I&#8217;ve also tested it on another pcap file from the internet with some Tor bot traffic and the results are similar.</p>
<p>Looking through the pcap file I noticed some &#8220;strange&#8221; entries during the SSL handshake that lead me to my PoC code (no I didn&#8217;t Google first to see if it already existed).</p>
<p>During the SSL handshake the &#8220;<strong>Client Hello</strong>&#8221; packet includes a <strong>Server Name</strong> record which in a &#8220;normal&#8221; handshake might be similar to <a href="http://www.google.com" rel="nofollow">http://www.google.com</a> however with a Tor SSL handshake its something like &#8220;<strong><a href="http://www.wth7pbtqsw6.com" rel="nofollow">http://www.wth7pbtqsw6.com</a></strong>&#8220;, which if you ping doesn&#8217;t actually exist.</p>
<p>The other thing to note is that the SSL server name doesn&#8217;t have a corresponding DNS query, in fact for all the packets in the pcap file there are no DNS queries/responses which is another way to narrow down possible Tor traffic.</p>
<p>The sniffMyPackets transform can be found <a href="https://github.com/catalyst256/sniffMyPackets/blob/master/src/sniffMyPackets/transforms/findtor.py">HERE</a>:</p>
<p>So basically my python code reads a pcap file and looks for any TCP packet with a payload, that has <a href="http://www.xxxxxx" rel="nofollow">http://www.xxxxxx</a> in it. It then pulls out the key information (src ip, dst ip, sport, dport and www. value). and just displays it as neat little lines.</p>
<p>The code is below:</p>
<p><code>#!/usr/bin/env python</p>
<p>import logging, sys<br />
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)<br />
from scapy.all import *</p>
<p>pcap = sys.argv[1]</p>
<p>pkts = rdpcap(pcap)</p>
<p>for x in pkts:<br />
  if x.haslayer(TCP) and x.haslayer(Raw):<br />
	if 'www.' in x.getlayer(Raw).load:<br />
	  for s in re.finditer('www.\w*.\w*', str(x)):<br />
		dnsrec = s.group()<br />
		srcip = x.getlayer(IP).src<br />
		dstip = x.getlayer(IP).dst<br />
		sport = x.getlayer(TCP).sport<br />
		dport = x.getlayer(TCP).dport<br />
		ipaddr = srcip, dstip, sport, dport, dnsrec<br />
	  print ipaddr</code></p>
<p>If I run this against my pcap file I get these results:</p>
<p><code>root@bt:~# ./lookfortor.py /root/pcaps/tor-startup.pcap<br />
src: 192.168.1.66 dst: 89.160.29.195 sport: 40651 dport: 9001 dnsrec: <a href="http://www.qqsuvxwbs.com" rel="nofollow">http://www.qqsuvxwbs.com</a><br />
src: 89.160.29.195 dst: 192.168.1.66 sport: 9001 dport: 40651 dnsrec: <a href="http://www.vlkkj3kgxh56ibujher.net0" rel="nofollow">http://www.vlkkj3kgxh56ibujher.net0</a><br />
src: 192.168.1.66 dst: 86.59.119.83 sport: 48459 dport: 443 dnsrec: <a href="http://www.buukx57zhxo2ujugeevlveb.com" rel="nofollow">http://www.buukx57zhxo2ujugeevlveb.com</a><br />
src: 86.59.119.83 dst: 192.168.1.66 sport: 443 dport: 48459 dnsrec: <a href="http://www.yhlkhxjmzg3.net0" rel="nofollow">http://www.yhlkhxjmzg3.net0</a><br />
src: 192.168.1.66 dst: 38.229.70.42 sport: 44829 dport: 443 dnsrec: <a href="http://www.wth7pbtqsw6.com" rel="nofollow">http://www.wth7pbtqsw6.com</a><br />
src: 38.229.70.42 dst: 192.168.1.66 sport: 443 dport: 44829 dnsrec: <a href="http://www.uvk2wwbbvwpqpkux.net0" rel="nofollow">http://www.uvk2wwbbvwpqpkux.net0</a><br />
root@bt:~# </code></p>
<p>What you will notice is that the reply packet has a different dnsrec which always has a 0 (zero) on the end..</p>
<p>I&#8217;ve tested this on a few pcap files and the results look consistent. Let me know what you think.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=211&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/04/08/sniffmypackets-finding-tor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>sniffMyPackets (Beta) &#8211; Released!!</title>
		<link>http://itgeekchronicles.co.uk/2013/04/02/sniffmypackets-beta-released/</link>
		<comments>http://itgeekchronicles.co.uk/2013/04/02/sniffmypackets-beta-released/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 19:13:04 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[sniffMyPackets]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=209</guid>
		<description><![CDATA[Hello readers, so I just want to say something before I get into the &#8220;meat&#8221; of this post&#8230;. (bear with me) I don&#8217;t work in InfoSec, I don&#8217;t have a full-time job where I poke holes in systems, or look at IDS logs and pcap files all day long (would be nice but..) but what [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=209&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hello readers, so I just want to say something before I get into the &#8220;meat&#8221; of this post&#8230;. (bear with me)</p>
<p>I don&#8217;t work in InfoSec, I don&#8217;t have a full-time job where I poke holes in systems, or look at IDS logs and pcap files all day long (would be nice but..) but what I do have is a passion for InfoSec and a desire to give back to the community. I&#8217;ve never met 98% of the people who read this blog, but over the last 15 months a lot of you have inspired me to push myself harder and further than I thought possible so this is my way to pay some of that back..</p>
<p>I give you <strong>sniffMyPackets</strong>, Maltego transforms (based on the Canari Framework) for analysing pcap files..</p>
<p>I decided to write these transforms after the Cyber Security Challenge published a cipher challenge that centered around a pcap file, that and my interest in packets meant this seems liked a good way to mix the two (no I haven&#8217;t cracked the cipher challenge).</p>
<p>Now this is a <strong>BETA</strong> now &#8220;beta&#8221; means different things to different people so this is my definition:</p>
<p>1. I&#8217;m not a developer/coder, I&#8217;ve been writing stuff in Python for less than a year. The transforms in this package work and while not perfect they are functioning. I&#8217;ve tested them against as many different pcaps as I feel is necessary to make sure they work properly.</p>
<p>2. This is a BETA, so things like error handling are missing from some transforms, I will get around to it but I&#8217;m learning as I go so bear with me.</p>
<p>3. This is by no means a finished product, I will continue to add transforms as I go and if you want anything specific let me know and I will add it (or you can add it yourself), but please send me a pcap file if you can.</p>
<p>4. If (more likely when) you find a problem log it as an issue on the github.com site, the same if you think of something that will improve the package.</p>
<p>5. I don&#8217;t have a full license of Maltego so I&#8217;ve only tested with the community edition within Backtrack (unless someone wants to donate a license..).</p>
<p>6. I&#8217;ve only tested this on Backtrack, for 2 reasons.. 1) I don&#8217;t own a Mac Book, 2) Windows doesn&#8217;t play nicely with Scapy and lets face it, it&#8217;s not the best platform for pcap analysis.</p>
<p>I think that&#8217;s about it in terms of &#8220;BETA&#8221;. I&#8217;ve written a lot of transforms using Scapy (yes yes I love Scapy) but as people often say, &#8220;Use the best tool for the job&#8221; so some of them use tshark which has been cool because I&#8217;ve learnt a lot more about both tools. Writing python code with Scapy isn&#8217;t hard (even for me), but making them &#8220;appear&#8221; nicely in Maltego has been challenging at times and I&#8217;m not 100% happy with the way the entities link, but like I said it&#8217;s a BETA&#8230; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve created a wiki that lists the entities and transforms available and I will update them as I go, you can find the wiki here: <a href="https://github.com/catalyst256/sniffMyPackets/wiki" rel="nofollow">https://github.com/catalyst256/sniffMyPackets/wiki</a></p>
<p>If you want to have a play with the transforms you can go here: <a href="https://github.com/catalyst256/sniffMyPackets" rel="nofollow">https://github.com/catalyst256/sniffMyPackets</a></p>
<p>I also did a short video about the transforms (some of which have changed now) but you can find it here:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='595' height='365' src='http://www.youtube.com/embed/GHKuHPfZW5g?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>So have a play, let me know what you think (good or bad) and I will let you know about updates (new transforms etc etc) when I write them. I may even create a new twitter account so I don&#8217;t annoy people with updates all the time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=209&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/04/02/sniffmypackets-beta-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>Cyber Security Challenge &#8211; The Masterclass</title>
		<link>http://itgeekchronicles.co.uk/2013/03/11/cyber-security-challenge-the-masterclass/</link>
		<comments>http://itgeekchronicles.co.uk/2013/03/11/cyber-security-challenge-the-masterclass/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 09:49:02 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[Security Challenges]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=206</guid>
		<description><![CDATA[On Friday the 8th of March, the city of Bristol woke up to what they assumed would be a normal Friday in the vibrant city. What they didn&#8217;t know was that throughout the day 40 cyber security (made up of students, IT professionals, and even an English teacher from Scotland) hopefuls would be arriving from [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=206&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>On Friday the 8th of March, the city of Bristol woke up to what they assumed would be a normal Friday in the vibrant city. What they didn&#8217;t know was that throughout the day 40 cyber security (made up of students, IT professionals, and even an English teacher from Scotland) hopefuls would be arriving from around the UK to take part in the <strong>Cyber Security Challenge Masterclass</strong> (the final) hosted at the HP labs in Bristol.</p>
<p>Now before I go any further a special mention needs to go the <strong>Cyber Security Challenge</strong> team that organised the weekend and made sure we all got to where we were suppose to be. A massive amount of time and effort went into the event (which was awesome) and I mean imagine trying to organise us lot (the phrase &#8220;herding cats&#8221; comes to mind).</p>
<p>The Masterclass was to take place on Saturday and was a full on day of Cyber Security goodness, the challenges were put together by <strong>HP</strong> &amp; <strong>Cassidian CyberSecurity UK</strong> and you know it&#8217;s not going to be easy. Both challenges were team based so each of us had been assigned to a team for the day making 8 teams ready to battle it out (so that&#8217;s 5 to a team just in-case you were wondering).</p>
<p>There were 3 main prizes to be won for the event:</p>
<p><strong>1. Cyber Security Challenge Winner<br />
2. Cyber Security Challenge Runner-up<br />
3. Cyber Security Challenge Winning Team</strong></p>
<p>Early on Saturday morning the contestants were photographed so that the assessors could spot the trouble makers easily (and the fact a lot of contestants were called Steve) and then we all hopped onto a bus for the journey to HP labs. On arrival we signed in, surrendered our mobile phones (no Google&#8230;) and started the much needed intake of coffee (well in my case anyway).</p>
<p>Now I&#8217;m not going to give you a minute by minute account of the day, just the important parts.</p>
<p>We all took a seat in the main auditorium and received our briefing for the day, in the morning 4 teams would take part in the technical challenge put together by Cassidian, and the other 4 teams would take part in a policy challenge created by HP. Then in the afternoon we would swap, sounds straight forward doesn&#8217;t it..</p>
<p>Now I would like to mention at this point when we were sitting in the auditorium, standing behind us were a rather large amount of assessors, these were the men and woman that would be judging us as a team and as individuals to determine who the winners would be. They came from a range of different companies and government bodies and all gave up their weekends to help out (thank you) on the day and to give us grief during the presentations (in a nice way of course).</p>
<p>My team named &#8220;<strong>Caterham</strong>&#8221; (they were all car names) had the technical challenge first, which was a realistic APT (advanced persistent threat) scenario based around a company that sold management systems to Formula 1 teams and they believed they had been compromised. It was our job to determine if they had, to what extent and give a presentation on our findings.</p>
<p>If you want to read a bit more about both challenges, you can find it here: <a href="http://www.computerweekly.com/news/2240179290/Aspirant-UK-cyber-security-champions-prepare-for-battle-in-Bristol" rel="nofollow">http://www.computerweekly.com/news/2240179290/Aspirant-UK-cyber-security-champions-prepare-for-battle-in-Bristol</a></p>
<p>Now I suck at Malware/Forensics (but not for much longer, it&#8217;s next on my list) so I wasn&#8217;t looking forward to it, luckily as a team we worked well together and the skills I was lacking in that area, were complimented by others in my team and I was able to contribute in other areas (no I didn&#8217;t fetch tea and coffee for everyone). Needless to say 1 hour 45 minutes to search for a threat on a medium size network isn&#8217;t long and we managed to find the stolen data with about 20 seconds left (cutting it close to say the least).</p>
<p>Now the environment we used wasn&#8217;t just a bunch of VM&#8217;s, the techs at Cassidian spent a lot of time and effort building a self contained environment that they actually infected themselves over a period of time to give us a realistic APT to investigate and this was alongside they normal day job (big thank you guys).</p>
<p>After some lunch we moved onto the Policy Challenge created by HP, which was more around determining risk based on a given network layout and with a budget of 1.5 million to &#8220;solve&#8221; the issues we believed existed. Again we had 2 hours to prepare a presentation and then 9 minutes to present to some more assessors who asked us questions, one of which was James Lyne who if you ever met before will know him asking you technical questions isn&#8217;t going to be fun (although I still stand my statement that buying zero day attack protection, won&#8217;t protect you from zero day attacks because after all they are called zero day for a reason).</p>
<p>That was the end of the day, we all assembled again for the final briefing in the auditorium were the technical lead for Cassidian gave us a run down on how to find the APT (to much groaning and forehead slapping by the contestants). We all then received a certificate to show our attendance and then HP provided a goodie bag on our way out and we hopped back on the bus.</p>
<p>At this point the assessors all got together and plotted our fate, sorry I mean worked out who the winners were, which believe me couldn&#8217;t have been easy or fun (unless you like that sort of thing).</p>
<p>Now Saturday evening was an informal dinner, the previous years winner gave a brief talk about what to expect if we won, and then the group of 40 contestants with enough hardware and skills to take over a small countries IT infrastructure were let loose for the evening. Fear not the hotel wireless network wasn&#8217;t abused (I don&#8217;t think) but I believe that they attempted a Denial of Service attack on the hotel bar that went on to 06:30 am.</p>
<p>On Sunday the Masterclass lunch and prize ceremony was planned. We all had team feedback sessions booked and I think it&#8217;s really important to mention that the Cyber Security Challenge team really do want honest feedback and they take that feedback and use it to help shape the next events on what we tell them is good/bad.</p>
<p>After the feedback session we had a couple of hours to kill before lunch, then at 12 noon we all assembled nervously waiting to find out who the winners would be. A lot of the sponsors were there so it was a good opportunity for people to mingle and network. At 1 pm lunch was called and we all took at seats ready for some food and prizes.</p>
<p>Now they make you wait till the last 15 minutes of the lunch to find out the winners so there were a few nervous faces during the 2 hours. The first winners to be announced was the overall Team Winner, and the name that got called was &#8220;<strong>Caterham</strong>&#8220;.. oh wait that&#8217;s my team.. needless to say the team were <strong>very</strong> surprised and pleased and we all got some cool prizes (including a SANS course&#8230;).</p>
<p>The Cyber Security Challenge Runner-up was <strong>Steve Jarvis</strong> (a member on our team) and the overall Cyber Security Challenge Winner was <strong>Stephen Miller</strong>.</p>
<p>Now one of the things that makes the Cyber Security Challenge truly awesome is that all of the contestants won prizes, the price pool donated by sponsors was around <strong>£90K</strong> and is all designed to enable people to progress a career in Cyber Security so no one goes away empty handed.</p>
<p>The highlights for me were:</p>
<p>I had awesome fun and learnt some new stuff<br />
Met some cool people and put some names to faces (by the way English teachers can be evil..)<br />
Won some prizes (which is really just an added bonus)</p>
<p>A special shout out needs to go to <strong>Dan Summers</strong> (@Dantiumpro), if it wasn&#8217;t for him I would have never heard about the Cyber Security Challenges and wouldn&#8217;t have made it to the Masterclass and also a big thank you for bigging me up to a certain gentleman on my table (I was going to say pimping me out but..).</p>
<p>The next round of challenges are available soon, so if you want to be at a <strong>Masterclass</strong> next year, and are looking for a way into Cyber Security then go to <a href="https://cybersecuritychallenge.org.uk" rel="nofollow">https://cybersecuritychallenge.org.uk</a> and sign up <strong>TODAY</strong>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=206&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/03/11/cyber-security-challenge-the-masterclass/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>Canari &#8211; Breaking free of the cage</title>
		<link>http://itgeekchronicles.co.uk/2013/02/15/canari-breaking-free-of-the-cage/</link>
		<comments>http://itgeekchronicles.co.uk/2013/02/15/canari-breaking-free-of-the-cage/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 07:39:31 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[OSint]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=204</guid>
		<description><![CDATA[Like the title?? I figured as I haven&#8217;t posted for a while I ought to go for something a bit more catchy. So this post has two parts, the first is a bit &#8220;fluffy&#8221; the second is a bit more interesting. First an important piece of information (it does relate to this post). There is [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=204&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Like the title?? I figured as I haven&#8217;t posted for a while I ought to go for something a bit more catchy. So this post has two parts, the first is a bit &#8220;fluffy&#8221; the second is a bit more interesting.</p>
<p>First an important piece of information (it does relate to this post). There is a saying I like to use:</p>
<blockquote><p>&#8220;Nothing is impossible, you are only limited by your imagination&#8221;</p></blockquote>
<p>Now remember that for later and carry on reading&#8230;</p>
<p>So I&#8217;ve been a bit quiet so far this year in terms of posts, there is no real reason for this (other than being busy) but I never intended to use this blog as a means for posting &#8220;junk&#8221; and I know you guys are all busy so don&#8217;t want to waste your time.</p>
<p>Last year as you may remember was all about the OSCP and I found myself wondering what to do next, then like a shovel in the face it hit me. I&#8217;ve struggled to work out what area of InfoSec I want to &#8220;specialise&#8221; in, there are loads of awesome coders, pen testers, exploit hunters and malware analysts already providing advice and code for people and I don&#8217;t want to replicate work for the sake of trying to make myself look good.</p>
<p>The other important factor for me is that I have to be &#8220;interested&#8221; in what I&#8217;m learning otherwise I get bored and side tracked by other things (look at the monkey over there&#8230;). Open Source Intelligence, is something that I enjoy and really does interest me, hunting for information that is hidden online just waiting to be found, tie that in with a &#8220;hacker&#8221; mindset from doing my OSCP and to me that&#8217;s a receipe for epic fun (and mischief).</p>
<p>EoF.. (End of Fluffy)</p>
<p>Now where do you start?? So I am going to assume you&#8217;ve all used Maltego, if you haven&#8217;t hang your head in shame and go look <a href="http://www.paterva.com/web6/products/maltego.php" target="_blank">HERE</a> (). Back? Good, so I&#8217;ve played around with Maltego before (just the community edition) and it&#8217;s cool.. but for me it could be cooler so I started looking at how to write your own transforms and entities and then I found Sploitego (never heard of it.. seriously..)</p>
<p>So if you&#8217;ve not seen Sploitego before, I suggest the following:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='595' height='365' src='http://www.youtube.com/embed/3ANPe1Ooqnc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Sploitego is written using the Canari Framework (<a href="http://www.canariproject.com/" rel="nofollow">http://www.canariproject.com/</a>) which was created by Nadeem Douba (really nice bloke) and the real reason for this post. Canari is python based (which I&#8217;m trying to learn) and is essentially awesome. It lets anyone create local Maltego transforms, and takes all the hassle of learning XML (well at least understanding it) away and just lets you focus on the code.</p>
<p>Yesterday I finished my finished Canari framework package. It&#8217;s a re-work of the Netscaler Cookie Decrypter I wrote last year, now available in Maltego. It&#8217;s not perfect (neither is my coding ability) but it works and I will add some more functionality to it soon. I even now have a github.com account which you can find <a href="https://github.com/catalyst256" target="_blank">HERE</a>&nbsp;.</p>
<p>So what does all this mean?? Remember the saying from early??</p>
<blockquote><p>&#8220;Nothing is impossible, you are only limited by your imagination&#8221;</p></blockquote>
<p>Combine that with Canari, Maltego and my own personal &#8220;out of box&#8221; imagination and rest assured there will be a lot more transform packages appearing soon. My goal is to enhance Maltego with OSINT tools, Wifi tools, basically anything I can think that would help build a profile of someone or something within Maltego. There are no limits, no information is irrelevant as long as there is context to it..</p>
<p>Go try Canari (or Sploitego) for yourself, drop by the forums on the site and say &#8220;Hi&#8221;.</p>
<p>Me I&#8217;m off to buy a copy of Maltego and start my new adventure.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=204&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/02/15/canari-breaking-free-of-the-cage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>OSint &#8211; The journey beings</title>
		<link>http://itgeekchronicles.co.uk/2013/01/11/osint-the-journey-beings/</link>
		<comments>http://itgeekchronicles.co.uk/2013/01/11/osint-the-journey-beings/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 13:14:48 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[OSint]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=201</guid>
		<description><![CDATA[Happy New Year everyone (right got that out of the way), so this week I was presented with an opportunity to do a piece of OSint work. Now this is the first time I&#8217;ve done any &#8220;real&#8221; work of this nature, in the past I&#8217;ve only really used any OSint skills when it came to [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=201&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Happy New Year everyone (right got that out of the way), so this week I was presented with an opportunity to do a piece of OSint work. Now this is the first time I&#8217;ve done any &#8220;real&#8221; work of this nature, in the past I&#8217;ve only really used any OSint skills when it came to job interviews. Before attending an interview I do a little checking about the company, the people interviewing me and search for any clues about the companies infrastructure that I can drop into the conversation during an interview. I&#8217;ve found it works quite well especially if I lack a detailed understanding of what a company does, I mean after all I work in Infrastructure so detailed product knowledge isn&#8217;t a key requirement for the majority of my roles.</p>
<p>So for this tasking I was not looking at infrastructure but at a person (not in a creepy stalker way either), I was provided with the following information:</p>
<ul>
<li>Full Name</li>
<li>City</li>
<li>State</li>
</ul>
<p>I was also given a list of objectives of what information was required and the &#8220;rules&#8221; of the game. There was only one rule, all the information had to be obtained from &#8220;free&#8221; sources, as in no paying for information on the numerous websites that offer detailed reports on people. Now I assumed tracking people would be a lot more difficult that hunting down infrastructure, I live in the UK and the few times I&#8217;ve looked the amount of personal information available online isn&#8217;t great unless you want to pay for it, however my target was in the USA so it was virgin territory for me.</p>
<p>So for the first 30 minutes or so it seemed like I needed more information about my target, but then it slowly started coming together. I&#8217;m not going to bore you with the details but in the end I think I spent a couple of hours looking around and ended up with a 6 page written report to submit. Some of the information I retrieved was as follows:</p>
<ul>
<li>Targets home address, property details and telephone number</li>
<li>Targets current employer, LinkedIn profile, and a list of his connections (not obtained from his LinkedIn profile)</li>
<li>Targets work email address (well 2 addresses actually)</li>
<li>Targets age</li>
<li>Targets high school</li>
</ul>
<p>Then it got a bit more interesting/fun, using the initial information supplied to me, as well as his age and where he went to High School I was able to map he details to a list of possible relatives. From this I was able to locate his immediate family (including some of their current address details), Facebook profiles, photos, and various other bits of info.</p>
<p>So this is the actual point of this post, OSint is originally a military term which according to Wikipedia is defined as:</p>
<blockquote><p>OSINT is defined by both the U.S. Director of National Intelligence and the U.S. Department of Defense (DoD), as &#8220;produced from publicly available information that is collected, exploited, and disseminated in a timely manner to an appropriate audience for the purpose of addressing a specific intelligence requirement.&#8221;</p></blockquote>
<p>Outside of the military the only people I know of that engage in this type of activity is hackers/security professionals and private investigators (I&#8217;m sure there is more than that) and the purpose is different for each one.</p>
<p>However the thing that interested me the most was the amount of &#8220;private&#8221; data that is available online for free. In a world of terrorism, organised crime, online attacks and fraud can we really be this casual about letting this sort of information be so free and easy to collect?</p>
<p>Lets expand on my OSint tasking, if I wanted to go further with my investigation what else could I have done?</p>
<p>So I know my targets home address and work address, using this information I could plot the mostly likely method and possibly route that the target would take to work. If it&#8217;s a 2 hour drive to work, then maybe a train? Which is quicker, cheaper what are the current petrol prices in the area?</p>
<p>Does Google Street View give me an idea of the car he might be driving?</p>
<p>Does his house have wireless? Well wigle.net could help with that and then I could park outside his house and try and compromise his wireless network.</p>
<p>If he does have wireless can I obtain any information from places such as shodanhq.com? Is his wireless route vulnerable to attack? How much could a individual do from a computer half way around the world?</p>
<p>If I was intent on gathering as much information as possible then the paid reports available would provide much more information and to anyone willing to pay the $30 it might cost.</p>
<p>OSint is something that I&#8217;m going to be spending a lot more time on this year, in a weird (non creepy) way I enjoy the possibilities to see what you can find, which is only limited by your imagination and your patience. Watching the threads of information joining together to form a web of information is intriguing and scary at the same time.</p>
<p>So stay tuned for more..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=201&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2013/01/11/osint-the-journey-beings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>Crazy idea for 2012</title>
		<link>http://itgeekchronicles.co.uk/2012/12/10/crazy-idea-for-2012/</link>
		<comments>http://itgeekchronicles.co.uk/2012/12/10/crazy-idea-for-2012/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 13:53:55 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[packets]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=194</guid>
		<description><![CDATA[Coming soon&#8230; So since I finished my OSCP course I been spending my time attempting to learn how to code in Python and working on my network forensic skills (which suck currently). To this end I&#8217;ve been reading the book &#8220;Violent Python&#8221; which is actually ideal for me, the examples are both practical and the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=194&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Coming soon&#8230;</p>
<p>So since I finished my OSCP course I been spending my time attempting to learn how to code in Python and working on my network forensic skills (which suck currently).</p>
<p>To this end I&#8217;ve been reading the book &#8220;Violent Python&#8221; which is actually ideal for me, the examples are both practical and the code works (always a bonus but not always a sure thing). Currently I&#8217;m working through the chapter on Network Traffic Analysis which involves lots of work to do with packet captures and Scapy (my two favourite things).</p>
<p>The one issue I&#8217;ve come across is the lack of websites where you can download pcap files that contain malware, attacks etc. etc. I know you can download some pcap files from the web or make them yourself, but I&#8217;m lazy and would rather have one place to go.</p>
<p>So to that end I&#8217;ve created a cunning plan&#8230; I&#8217;ve decided to build a pcap repository, available for all on the internet. It will be free to use and will eventually allow people to upload pcap files themselves (my web skills suck so might take a while). I have no idea if this idea will work or not but its my way of giving something back to the community.</p>
<p>I&#8217;m currently searching for a hosting provider that will allow me plenty of bandwidth and storage space (just in case this idea takes off). All being well I will have a new domain all sorted before Christmas and then the real work will begin.</p>
<p>Long term some of the features that will be available will be:</p>
<p>Ability to upload pcap files<br />
Ability to download pcap files (wouldn&#8217;t be much good otherwise)<br />
Search facility<br />
Maybe even the ability to view contents of pcap files on-line</p>
<p>This being a community project I would help that people out there will help, whether it be suggestions, beta testing, donation of pcap files or some web development work (you don&#8217;t have to if you don&#8217;t want to though).</p>
<p>Well that&#8217;s my crazy idea for the year sorted, let me know what you think and I will post updates as I go.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=194&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2012/12/10/crazy-idea-for-2012/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>
	</item>
		<item>
		<title>Popping my Netwars cherry</title>
		<link>http://itgeekchronicles.co.uk/2012/12/02/popping-my-netwars-cherry/</link>
		<comments>http://itgeekchronicles.co.uk/2012/12/02/popping-my-netwars-cherry/#comments</comments>
		<pubDate>Sun, 02 Dec 2012 18:46:54 +0000</pubDate>
		<dc:creator>IT Geek Chronicles Editor in Chief</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Security Challenges]]></category>

		<guid isPermaLink="false">http://itgeekchronicles.co.uk/?p=191</guid>
		<description><![CDATA[So you may remember from earlier blog posts (before all the OSCP stuff) that I had started taking part in the Cyber Security Challenge UK contests. These are security related challenges that are aimed at providing cyber learning opportunities and possibly career opportunities to people with a passion for all things InfoSec related that aren&#8217;t [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=191&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>So you may remember from earlier blog posts (before all the OSCP stuff) that I had started taking part in the <a href="https://cybersecuritychallenge.org.uk/">Cyber Security Challenge UK</a> contests. These are security related challenges that are aimed at providing cyber learning opportunities and possibly career opportunities to people with a passion for all things InfoSec related that aren&#8217;t currently working in the field.</p>
<p>I&#8217;ve signed up for a few of these but only submitted a couple due to the others falling right in the middle of OSCP time (which was more fun..). Now my aim for taking part was never to win, its just that I like doing these sorts of challenges and in the UK there is a distinct lack of CTF type things for a wannabe like me to take part in (more on that in later posts).</p>
<p>For both the challenges I submitted I scored OK, not 1st but not last either and like I said it was fun and I got to learn a few new things. Needless to say I was a bit surprised when I got an email inviting me to a special SANS Netwars event organised by Cyber Security Challenge UK, but as it had the word &#8220;Netwars&#8221; in it who am I to turn it down..</p>
<p>I arrived at the event this morning, with 29 other contestants, all various ages and background all of us with one thing in common, we all have a passion for InfoSec. The <strong>8</strong> highest scorers of the day would get a place on a &#8220;Masterclass&#8221; event in March 2013.</p>
<p>For those that don&#8217;t know what SANS Netwars is all about I suggest Google (we&#8217;ve talked about this before). Netwars events are &#8220;open book&#8221; which mean you can take whatever tools you want (Backtrack, Backbox etc. etc.) and the aim is simple, score points.</p>
<p>The actual Netwars was scheduled to run for 2 hours and you have to progress through 5 levels, the first 2 levels are achieved by using a bootable ISO image provided by SANS, level 1 is done as a normal user, level 2 is done with root priveleges. Both level 1 and 2 are more about forensics, things like &#8220;look at this pcap file and sha1 hash the IP address that made a DNS request to&#8230;&#8221; or &#8220;crack the password for root by using this backup file of the /etc folder&#8221;.</p>
<p>Now I like forensics but I suck at it, although I managed to get enough points for each level I did struggle with somethings, but I was surprised with some of the answers I managed to work out and a lot of that I think was due to doing the OSCP course. Level 3 is where (for me) the fun should start, attacking machines in a DMZ environment and finding the necessary &#8220;flags&#8221;, unfortunately by the time I got to level 3 I had about 20 minutes left so didn&#8217;t manage to score any points.</p>
<p>Just for information, level 4 is pivoting from the DMZ network to the &#8220;intranet&#8221; (again something I would have enjoyed and am well practiced at) and level 5 was &#8220;King of the castle&#8221; where you get to defend against other hackers.</p>
<p>The good and the bad:</p>
<p><strong>Good</strong><br />
1. It was fun, by now you should guess that I love this kind of thing and would rather be doing offensive than defensive security.<br />
2. SANS organised and ran the event incredibly well, the instructor/guide <strong>James Lyne</strong> was funny, helpful and helped make the event great, although playing Gangham style was a bit of a distraction (and it&#8217;s stuck in my head still).<br />
3. See point 1</p>
<p><strong>Bad</strong><br />
1. It wasn&#8217;t long enough, yes I know it was free and I should be grateful but, like I said I love this kind of thing so it would have been nice to see how far I could have got with a few more hours.</p>
<p>On top of this I got to meet a few people, spread the word about B-Sides London, drink nice coffee and I think I managed to avoid the TV cameras for most of the day, although there are some photo&#8217;s of me somewhere&#8230;</p>
<p>Now SANS very nicely have said they will email everyone their scorecards from the event which once I have I will post, but in the mean time here&#8217;s a screenshot at the scoreboard at the end of the day&#8230;</p>
<p><a href="http://itgeekchronicles.co.uk/2012/12/02/popping-my-netwars-cherry/cropped-netwars-scoreboard/" rel="attachment wp-att-190"><img class="alignnone size-medium wp-image-190" alt="cropped-netwars-scoreboard" src="http://theitgeekchronicles.files.wordpress.com/2012/12/cropped-netwars-scoreboard.png?w=300&#038;h=169" height="169" width="300" /></a></p>
<p>So I&#8217;m through to the Masterclass in March, I have no idea what that means or involves but once I do I will let you know. Between now and then I have some areas I need to focus on to improve my skills but as we all know its a never ending process really.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/theitgeekchronicles.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/theitgeekchronicles.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=itgeekchronicles.co.uk&#038;blog=26322257&#038;post=191&#038;subd=theitgeekchronicles&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://itgeekchronicles.co.uk/2012/12/02/popping-my-netwars-cherry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/57bca9ce491645fafcb243a4b169923d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">itgeekchronicles</media:title>
		</media:content>

		<media:content url="http://theitgeekchronicles.files.wordpress.com/2012/12/cropped-netwars-scoreboard.png?w=300" medium="image">
			<media:title type="html">cropped-netwars-scoreboard</media:title>
		</media:content>
	</item>
	</channel>
</rss>
