<?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> &#187; network security</title>
	<atom:link href="http://travisaltman.com/category/network-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://travisaltman.com</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 02:25:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Honeypot / honeyd tutorial part 3, static IP&#8217;s</title>
		<link>http://travisaltman.com/honeypot-honeyd-tutorial-part-3-static-ips/</link>
		<comments>http://travisaltman.com/honeypot-honeyd-tutorial-part-3-static-ips/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 20:25:29 +0000</pubDate>
		<dc:creator>travis</dc:creator>
				<category><![CDATA[honeypot]]></category>
		<category><![CDATA[network security]]></category>

		<guid isPermaLink="false">http://travisaltman.com/?p=386</guid>
		<description><![CDATA[In the past two tutorials I&#8217;ve used DHCP to obtain IP&#8217;s for our honeypots running honeyd. Using dhcp is fine when testing honeyd and getting familiar with how honeyd works but a static IP may be more suitable for your environment. In my case I initially fooled around with honeyd via dhcp but when I [...]]]></description>
			<content:encoded><![CDATA[<p>In the past two tutorials I&#8217;ve used DHCP to obtain IP&#8217;s for our honeypots running honeyd. Using dhcp is fine when testing honeyd and getting familiar with how honeyd works but a static IP may be more suitable for your environment. In my case I initially fooled around with honeyd via dhcp but when I wanted to implement in a more production environment I realized that static IP&#8217;s are more stable and less maintenance. In order to ping our honeypot the router / switch has to know what IP and MAC address our honeypot has so it can update it&#8217;s information, going through dhcp does this automatically. I&#8217;ll touch on how to add the static IP configuration later but first let&#8217;s go over our layout. I&#8217;ll be using the same simple layout as in the first tutorial as seen below.</p>
<p><a href="http://travisaltman.com/wp-content/Selection_171.png"><img class="aligncenter size-full wp-image-358" title="Selection_171" src="http://travisaltman.com/wp-content/Selection_171.png" alt="" width="557" height="431" /></a></p>
<p>There may need to be some clarification in that diagram. Backtrack is what is actually running honeyd, the address of 192.168.99.135 (labeled Honeyd) which is the honeypot honeyd created can be configured to emulate any operating system. Now for the honeyd config file.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">create default<br />
set default default tcp action block<br />
set default default udp action block<br />
set default default icmp action block<br />
<br />
create windows<br />
set windows personality &quot;Microsoft Windows XP Professional SP1&quot;<br />
set windows default tcp action reset<br />
add windows tcp port 135 open<br />
add windows tcp port 139 open<br />
add windows tcp port 445 open<br />
<br />
set windows ethernet &quot;00:00:24:ab:8c:12&quot;<br />
<br />
bind 192.168.99.135 windows</div></div>
<p>So the only real difference between dhcp and a static IP is the last line of the config. If you go back to the first tutorial you&#8217;ll notice the last line is the only difference as well. As a side I&#8217;ve used some configs that do not have the MAC address defined in their config but when I did not include the &#8220;set windows ethernet&#8221; line honeyd would complain and not start. So after you&#8217;ve set your config simply start honeyd.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">honeyd  -d  -f  honeyd.conf</div></div>
<p>After running honeyd you should get similar output to below.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Honeyd V1.5c Copyright (c) 2002-2007 Niels Provos<br />
honeyd[27305]: started with -d -f honeyd.conf<br />
Warning: Impossible SI range in Class fingerprint &quot;IBM OS/400 V4R2M0&quot;<br />
Warning: Impossible SI range in Class fingerprint &quot;Microsoft Windows NT 4.0 SP3&quot;<br />
honeyd[27305]: listening promiscuously on eth0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip )) and not ether src 00:00:24:ca:6b:08<br />
honeyd[27305]: Demoting process privileges to uid 65534, gid 65534</div></div>
<p>The difference in output between static and dynamic is that you&#8217;ll see the IP address your honeypot gets when using DHCP. With static IP configuration you&#8217;re not going to get that in your output because you already know the IP you&#8217;re using. So the output via DHCP will the lines below included.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">honeyd[1870]: [eth0] trying DHCP<br />
honeyd[1870]: Demoting process privileges to uid 65534, gid 65534<br />
honeyd[1870]: [eth0] got DHCP offer: 192.168.99.135</div></div>
<p>So now you&#8217;ve take care of properly setting up honeyd to use a static IP address but now you&#8217;ll have to configure the network to use your static IP. In my enterprise production environment I&#8217;ve configured this via the DHCP server. I went into the DHCP server and made a static reservation. I also had to configure the switch I plugged my computer into and tell what VLAN that port needed to be assigned to. If you&#8217;re trying to get this set up in your work production environment you may have to work with your network team that manages DHCP / DNS / routers &amp; switches. Networks may be managed differently so check with your local team on how you would get a static IP. Now if you&#8217;re doing this on a home network for testing then you probably have a wireless router such as Linksys. Inside all of these home wireless routers you can configure static IP&#8217;s. Each wireless router will have different steps for configuring static IP&#8217;s so refer to your manufacturers documentation on how to do that.</p>
<p>Next in this tutorial is what to run your honeypot / honeyd on? Laptop, desktop, server? These questions will be tackled in future articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisaltman.com/honeypot-honeyd-tutorial-part-3-static-ips/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Honeypot / honeyd tutorial part 2, multiple honeypots</title>
		<link>http://travisaltman.com/honeypot-honeyd-tutorial-part-2-multiple-honeypots/</link>
		<comments>http://travisaltman.com/honeypot-honeyd-tutorial-part-2-multiple-honeypots/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 17:43:06 +0000</pubDate>
		<dc:creator>travis</dc:creator>
				<category><![CDATA[honeypot]]></category>
		<category><![CDATA[network security]]></category>

		<guid isPermaLink="false">http://travisaltman.com/?p=371</guid>
		<description><![CDATA[Part one of this series was to mainly get honeyd up and running. Hopefully you also took away from part one that the configuration file, honeyd.conf, is the key to making things work smoothly and properly. Now that you&#8217;ve got honeyd up and running let&#8217;s tweak honeyd.conf so that we have multiple honeypots running on [...]]]></description>
			<content:encoded><![CDATA[<p>Part one of this series was to mainly get honeyd up and running. Hopefully you also took away from part one that the configuration file, honeyd.conf, is the key to making things work smoothly and properly. Now that you&#8217;ve got honeyd up and running let&#8217;s tweak honeyd.conf so that we have multiple honeypots running on one installation of honeyd. One honeypot is great but having three or four is even better. Part two is dedicated to showing you how to properly setup multiple honeypots in honeyd. In part one we only emulated a Windows device via the line below in honeyd.conf</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set windows personality &quot;Microsoft Windows XP Professional SP1&quot;<br />
set windows default tcp action reset</div></div>
<p>The personality tries to emulate what device you are trying to pretend to be. There are plenty of other personalities we could choose from so when setting up multiple honeypots you may want to emulate other devices besides a standard Windows device. Maybe you&#8217;d like to emulate a Solaris box, PBX system, or if you are going to emulate a Windows device make it real juicy to an attacker by making it a Windows 98 device. You&#8217;ve got plenty of options when choosing a personality for your honeypot. Honeyd takes advantage of nmap and the way it fingerprints devices. The list of personalities is located in the nmap.prints file, you should be able to find this file by using the following command</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">locate nmap.prints</div></div>
<p>You can view this file using less, for me I issued the following command.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">less /usr/share/honeyd/nmap.prints</div></div>
<p>Nmap has a version of this file as well named &#8220;nmap-os-db&#8221;. The nmap.prints and the nmap-os-db may or may not match up depending on your versions of nmap and honeyd. My nmap-os-db is in the following location.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/usr/share/nmap/nmap-os-db</div></div>
<p>Within nmap.prints anything that follows the word &#8220;Fingerprint&#8221; is available as a personality. As an example below the string &#8220;Avaya G3 PBX version 8.3&#8243; can be used as a personality in honeyd.conf</p>
<p><a href="http://travisaltman.com/wp-content/Selection_187.png"><img class="aligncenter size-full wp-image-372" title="Selection_187" src="http://travisaltman.com/wp-content/Selection_187.png" alt="" width="483" height="163" /></a></p>
<p>In my example I will emulate this Avaya PBX device and I will also emulate a Soalris device. So a diagram of my setup looks like the following.</p>
<p><a href="http://travisaltman.com/wp-content/Selection_189.png"><img class="aligncenter size-full wp-image-380" title="Selection_189" src="http://travisaltman.com/wp-content/Selection_189.png" alt="" width="594" height="392" /></a></p>
<p>So now that I&#8217;ve decided to also emulate a Solaris and Avaya device I&#8217;ll need to add both of these do honeyd.conf. Basically all you&#8217;ll need to do is copy and paste from the Windows device you&#8217;ve already setup in honeyd.conf then make some minor modifications such as the personality. My honeyd.conf for all three of these honeypots is below.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">create default<br />
set default default tcp action block<br />
set default default udp action block<br />
set default default icmp action block<br />
<br />
create windows<br />
set windows personality &quot;Microsoft Windows XP Professional SP1&quot;<br />
set windows default tcp action reset<br />
add windows tcp port 135 open<br />
add windows tcp port 139 open<br />
add windows tcp port 445 open<br />
<br />
create avaya<br />
set avaya personality &quot;Avaya G3 PBX version 8.3&quot;<br />
set avaya default tcp action reset<br />
add avaya tcp port 4445 open<br />
add avaya tcp port 5038 open<br />
<br />
create solaris<br />
set solaris personality &quot;Avaya G3 PBX version 8.3&quot;<br />
set solaris default tcp action reset<br />
add solaris tcp port 22 open<br />
add solaris tcp port 2049 open<br />
<br />
set windows ethernet &quot;00:00:24:ab:8c:12&quot;<br />
set avaya ethernet &quot;00:00:24:ab:8c:13&quot;<br />
set solaris ethernet &quot;00:00:24:ab:8c:14&quot;<br />
dhcp windows on eth1<br />
dhcp avaya on eth1<br />
dhcp solaris on eth1</div></div>
<p>After you&#8217;ve added this information to honeyd.conf go ahead and run honeyd with the options discussed in part one, you should see the following.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root@bt:~# honeyd -d -f honeyd.conf<br />
Honeyd V1.5c Copyright (c) 2002-2007 Niels Provos<br />
honeyd[2697]: started with -d -f honeyd.conf<br />
Warning: Impossible SI range in Class fingerprint &quot;IBM OS/400 V4R2M0&quot;<br />
Warning: Impossible SI range in Class fingerprint &quot;Microsoft Windows NT 4.0 SP3&quot;<br />
honeyd[2697]: listening promiscuously on eth1: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip )) and not ether src 00:0c:29:88:e6:db<br />
honeyd[2697]: [eth1] trying DHCP<br />
honeyd[2697]: [eth1] trying DHCP<br />
honeyd[2697]: [eth1] trying DHCP<br />
honeyd[2697]: Demoting process privileges to uid 65534, gid 65534<br />
honeyd[2697]: [eth1] got DHCP offer: 192.168.99.159<br />
honeyd[2697]: Updating ARP binding: 00:00:24:c5:59:29 -&amp;gt; 192.168.99.159<br />
honeyd[2697]: [eth1] got DHCP offer: 192.168.99.160<br />
honeyd[2697]: Updating ARP binding: 00:00:24:02:ac:73 -&amp;gt; 192.168.99.160<br />
honeyd[2697]: [eth1] got DHCP offer: 192.168.99.161<br />
honeyd[2697]: Updating ARP binding: 00:00:24:68:0c:45 -&amp;gt; 192.168.99.161<br />
honeyd[2697]: arp reply 192.168.99.159 is-at 00:00:24:c5:59:29<br />
honeyd[2697]: arp reply 192.168.99.160 is-at 00:00:24:02:ac:73<br />
honeyd[2697]: arp reply 192.168.99.161 is-at 00:00:24:68:0c:45<br />
honeyd[2697]: Sending ICMP Echo Reply: 192.168.99.159 -&amp;gt; 192.168.99.254<br />
honeyd[2697]: arp_send: who-has 192.168.99.254 tell 192.168.99.159<br />
honeyd[2697]: Sending ICMP Echo Reply: 192.168.99.160 -&amp;gt; 192.168.99.254<br />
honeyd[2697]: Sending ICMP Echo Reply: 192.168.99.161 -&amp;gt; 192.168.99.254<br />
honeyd[2697]: arp_recv_cb: 192.168.99.254 at 00:50:56:ec:10:84</div></div>
<p>If everything has gone smooth up to this point you&#8217;ve gotten output similar to above. So currently we&#8217;ve got three honeypots running on one installation of honeyd. Now the proof is in the pudding by port scanning these devices and see if the ports are open and what OS nmap claims it to be. DHCP gave our Avaya device an IP address of 192.168.99.160, let&#8217;s port scan for the two open ports and a port we know to be closed and see what results we get.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">travis@tht:~/documents$ nmap -p 4445,5038,5555 192.168.99.160<br />
<br />
Starting Nmap 5.00 ( http://nmap.org ) at 2011-06-15 01:25 EDT<br />
Interesting ports on 192.168.99.160:<br />
PORT     STATE  SERVICE<br />
4445/tcp open   unknown<br />
5038/tcp open   unknown<br />
5555/tcp closed freeciv<br />
<br />
Nmap done: 1 IP address (1 host up) scanned in 1.18 seconds</div></div>
<p>Looks like everything is on the up and up with our Avaya device. Port 5555 is closed because we did not define it in honeyd.conf. I&#8217;ll spare you with the nmap scan of the Solaris device but everything was operating as normal for it as well. So the ports are open but how well is this personality thing working? Nmap can try and determine the OS of a device through a number of TCP exchanges. Honeyd tries to use the nmap fingerprint database to send the appropriate TCP responses to a nmap scan so that the personality you&#8217;ve assigned to your template will respond as it should. This doesn&#8217;t always work properly. New versions of nmap are constantly coming out which means the nmap fingerprint database is changing as well. So nmap may respond properly or it may not, this will just depend on the version of nmap you or an attacker is scanning with. It will also depend on the nmap.prints that honeyd uses as well. You can perform an OS detection in nmap by providing it the -O option, let&#8217;s try scanning our Solaris device and see what it returns.</p>
<p><a href="http://travisaltman.com/wp-content/Selection_188.png"><img class="aligncenter size-full wp-image-376" title="Selection_188" src="http://travisaltman.com/wp-content/Selection_188.png" alt="" width="442" height="307" /></a></p>
<p>Seeing how this might happen you don&#8217;t want to totally rely on the personality in honeyd. The best idea is to open up ports that are common to a particular device. For instance most Linux and Solaris devices have port 22 open while routers and switches will probably have port 161 open (SNMP). The configuration is totally up to you but trying to make your honeypot as sweet as possible is the main goal.</p>
<p>So adding multiple honeypots to your honeyd install is fairly straightforward but there are some things to consider when setting it up. Other topics such as email alerts are coming but for now make sure you can get multiple honeypots running via honyed.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisaltman.com/honeypot-honeyd-tutorial-part-2-multiple-honeypots/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Honeypot / honeyd tutorial part 1, getting started</title>
		<link>http://travisaltman.com/honeypot-honeyd-tutorial-part-1-getting-started/</link>
		<comments>http://travisaltman.com/honeypot-honeyd-tutorial-part-1-getting-started/#comments</comments>
		<pubDate>Fri, 06 May 2011 17:27:06 +0000</pubDate>
		<dc:creator>travis</dc:creator>
				<category><![CDATA[honeypot]]></category>
		<category><![CDATA[network security]]></category>

		<guid isPermaLink="false">http://travisaltman.com/?p=353</guid>
		<description><![CDATA[If you&#8217;ve somehow found my obscure site then you probably already know a little bit about honeypots and their functionality, if not here is a good breakdown. There are many different types of honeypots and these different types are explained very well in the book Virtual Honeypots which I highly recommend you read if you [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve somehow found my obscure site then you probably already know a little bit about honeypots and their functionality, if not <a href="http://www.honeypots.net/">here is a good breakdown</a>. There are many different types of honeypots and these different types are explained very well in the book <a href="http://www.amazon.com/Virtual-Honeypots-Tracking-Intrusion-Detection/dp/0321336321" target="_blank">Virtual Honeypots</a> which I highly recommend you read if you are serious about deploying a honeypot. This series of articles will focus on honeypots using an application called <a href="http://www.honeyd.org/" target="_blank">honeyd</a>. There are a number of honeypot solutions out there but I personally feel like honeyd is a great fit because it can be relatively simple or you can start tweaking it to get a more full featured product. You may think of honeypots as internet facing and it&#8217;s true that they can be configured that way but during this series of tutorials I will only be using honeyd on an internal network. Internet facing honeypots are mainly used to research and find new malware, internal honeypots are mainly used as alerting systems that would alert you when other devices / users are connecting to your honeypots. You can also use honeyd when investigating malware which I&#8217;ll discuss in a later tutorial.</p>
<p>For this tutorial I will be using one Windows machine and one Linux machine, <a href="http://www.backtrack-linux.org/" target="_blank">Backtrack </a>distribution to be exact. Backtrack will be the machine that is running honeyd. Honeyd is available for Windows but I highly recommend that you use honeyd on Linux. If you&#8217;re half way interested in information security then I suggest that you get to know Linux as there are a lot of information security tools such as honeyd that use Linux. Sorry for the Linux rant, below is basic diagram of my setup.</p>
<p><a href="http://travisaltman.com/wp-content/Selection_171.png"><img class="aligncenter size-full wp-image-358" title="Selection_171" src="http://travisaltman.com/wp-content/Selection_171.png" alt="" width="557" height="431" /></a></p>
<p>The idea here is that we&#8217;ll install and configure honeyd on Backtrack then simply test that we have connectivity with our Windows machine. To see if you have honeyd installed on Backtrack (or any Linux system) simply type &#8220;honey + TAB&#8221;, if &#8220;d&#8221; is shown right after honey then you know you have honeyd installed as it is an available command if you don&#8217;t have honeyd installed on Backtrack run the following command</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo apt-get install honeyd</div></div>
<p>This will also work for any Debian based Linux system. To install on other distributions such as Gentoo, Fedora, Slackware, etc I would check their documentation on how to install packages. After honeyd is installed the next thing we&#8217;ll need to do is create a configuration file. A honeyd configuration file is the heart of your honeypot. The configuration file tells honeyd what operating system to emulate, what ports to open, what services should be ran, etc. This config file can be tweaked to emulate all sorts setups but for right now let&#8217;s look at a simple setup and get that up and running. Below is my config file.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">create default<br />
set default default tcp action block<br />
set default default udp action block<br />
set default default icmp action block<br />
<br />
create windows<br />
set windows personality &quot;Microsoft Windows XP Professional SP1&quot;<br />
set windows default tcp action reset<br />
add windows tcp port 135 open<br />
add windows tcp port 139 open<br />
add windows tcp port 445 open<br />
<br />
set windows ethernet &quot;00:00:24:ab:8c:12&quot;<br />
dhcp windows on eth0</div></div>
<p>Within Backtrack you can use Kate or nano text editors to create this file. In Backtrack Kate is under the Utilities menu. The &#8220;create default&#8221; section simply tells honeyd to drop traffic unless it is defined later in the configuration file. I find this section is needed when you let your honeypot acquire an IP address via dhcp. Also it&#8217;s probably a good idea to implement this section so that you only answer to network connections that you define later in the config file. Anytime you see &#8220;create&#8221; within the config file you are creating a template for a honeypot, so you can create as many honeypots as you&#8217;d like within the honed.conf config. In the windows template we are defining a number of things. First we are setting the personality, meaning when another device on the network connects to this honeypot it will appear to be a Windows XP Pro SP1 device. This is emulated via network stack fingerprints. In the windows template I&#8217;m also opening up three ports (135, 139, and 445). These are common ports that are open on a windows system. The &#8220;action reset&#8221; statement will drop traffic if it is not aimed at the open ports defined in this config. The &#8220;set windows ethernet&#8221; sets a MAC address for our honeypot.  This will be needed if you run your honeypot via dhcp. You can simply make up any MAC address you&#8217;d like, I usually keep it close to the physical MAC address that I&#8217;m running the honeypot off of. Finally the dhcp statement tells the windows template to acquire an IP address from dhcp. Now that we have our honeyd.conf file properly setup it&#8217;s time to launch honeyd, below is the command I use when initially getting honeyd up and running.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">honeyd  -d  -f  honeyd.conf</div></div>
<p>Here we use the -d so that it doesn&#8217;t run in the background (or doesn&#8217;t run as a daemon in Linux terms). This allow for more verbose output so that we can troubleshoot as needed. Running in this mode will also show the IP that was given to our honeypot via dhcp. Below is the type of output you should see after running the honeyd command.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Honeyd V1.5c Copyright (c) 2002-2007 Niels Provos<br />
honeyd[1870]: started with -d -f honeyd.conf<br />
Warning: Impossible SI range in Class fingerprint &quot;IBM OS/400 V4R2M0&quot;<br />
Warning: Impossible SI range in Class fingerprint &quot;Microsoft Windows NT 4.0 SP3&quot;<br />
honeyd[1870]: listening promiscuously on eth0: (arp or ip proto 47 or (udp and src ...<br />
honeyd[1870]: [eth0] trying DHCP<br />
honeyd[1870]: Demoting process privileges to uid 65534, gid 65534<br />
honeyd[1870]: [eth0] got DHCP offer: 192.168.99.135<br />
honeyd[1870]: Updating ARP binding: 00:00:24:c8:e3:34 -&amp;gt; 192.168.99.135</div></div>
<p>In this verbose output we see that dhcp gave our honeypot the address of 192.168.99.135. From our windows machine let&#8217;s ping that IP address and make sure that we have connectivity. You should see output on the terminal similar to below.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">honeyd[1870]: arp reply 192.168.99.135 is-at 00:00:24:c8:e3:34<br />
honeyd[1870]: Sending ICMP Echo Reply: 192.168.99.135 -&amp;gt; 192.168.99.128<br />
honeyd[1870]: arp_send: who-has 192.168.99.128 tell 192.168.99.135<br />
honeyd[1870]: arp_recv_cb: 192.168.99.128 at 00:0c:29:7e:60:d0<br />
honeyd[1870]: Sending ICMP Echo Reply: 192.168.99.135 -&amp;gt; 192.168.99.128<br />
honeyd[1870]: Sending ICMP Echo Reply: 192.168.99.135 -&amp;gt; 192.168.99.128<br />
honeyd[1870]: Sending ICMP Echo Reply: 192.168.99.135 -&amp;gt; 192.168.99.128</div></div>
<p>So congrats you&#8217;ve successfully deployed honeyd. We can now ping our honeypot but we need to make sure the ports we&#8217;ve configured to be open are open. Let&#8217;s us the cadillac of port scanners <a href="http://nmap.org/" target="_blank">nmap</a> to detect open ports on our honeypot. You can scan for all 65,535 ports on our honeypot but to keep the verbose output of honeyd low let&#8217;s just scan for a handful of ports. Below is the nmap command I used.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nmap -p 135,139,445,1337 192.168.99.135</div></div>
<p>The output of this command should look similar to below.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Starting Nmap 5.00 ( http://nmap.org ) at 2011-05-06 13:13 EDT<br />
Interesting ports on someone (172.20.73.77):<br />
PORT     STATE  SERVICE<br />
135/tcp  open   msrpc<br />
139/tcp  open   netbios-ssn<br />
445/tcp  open   microsoft-ds<br />
1337/tcp closed waste<br />
MAC Address: 00:00:24:26:C4:ED (Connect AS)<br />
<br />
Nmap done: 1 IP address (1 host up) scanned in 0.37 seconds</div></div>
<p>So honeyd appears to be working correctly. If you&#8217;ve reached this point then you are on your way to doing even more with honeypots and honeyd. The main purpose of this article was to get you up and running. In the next series of articles we&#8217;ll configure more honeypots, set static IP&#8217;s, get alerts on devices port scanning our honeypots, investigate malware, etc. If you have any questions, catch errors, or have any feedback please comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://travisaltman.com/honeypot-honeyd-tutorial-part-1-getting-started/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>ARP spoofing 101: Trust your LAN?</title>
		<link>http://travisaltman.com/arp-spoofing-101-do-you-trust-your-lan/</link>
		<comments>http://travisaltman.com/arp-spoofing-101-do-you-trust-your-lan/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 14:32:59 +0000</pubDate>
		<dc:creator>travis</dc:creator>
				<category><![CDATA[network security]]></category>
		<category><![CDATA[privacy]]></category>

		<guid isPermaLink="false">http://travisaltman.com/?p=10</guid>
		<description><![CDATA[At home you&#8217;re fully aware of the hosts/people that are on your network, or at least you should be. Friends and family are usually trustworthy people and you don&#8217;t have to worry about them carrying out malicious activity, but what if you aren&#8217;t sharing the LAN (Local Area Network) with people you can trust? This [...]]]></description>
			<content:encoded><![CDATA[<p>At home you&#8217;re fully aware of the hosts/people that are on your network, or at least you should be. Friends and family are usually trustworthy people and you don&#8217;t have to worry about them carrying out malicious activity, but what if you aren&#8217;t sharing the LAN (Local Area Network) with people you can trust? This article will explain why untrusted LAN&#8217;s can be dangerous and what users/admins can do to protect themselves.</p>
<p><span id="more-10"></span></p>
<p>If a malicious user is on the same network as you there are numerous types of attacks they could carry out to compromise your computer and identity. One common attack they might use is called ARP (Address Resolution Protocol) spoofing. Before we get into the details of ARP spoofing it&#8217;s helpful to understand how this protocol came about.</p>
<p>The early developers of Ethernet or LAN technology designed the system based upon trust, meaning they never thought anyone using this technology would use it in a malicious way. About thirty years ago, the early stages of Ethernet development, it was hard to imagine a large scale LAN. Hardware was very expensive in those days and only large organizations could afford such technology, even then these large organizations only had a small number of computers that could communicate with one another. So it was hard to imagine that they would ever communicate with someone they didn&#8217;t trust. Problem is that Ethernet exists on Layer 2 using a flat addressing scheme (e.g. MAC address). This type of addressing doesn&#8217;t scale well for the internet, which uses a hierarchical addressing scheme (e.g. IP). The solution to this problem was ARP.</p>
<p>ARP is used for mapping IP addresses to MAC addresses. A basic diagram for ARP can be seen in figure 1 below.</p>
<p><a title="ARP protocol diagram" href="http://travisaltman.com/wp-content/arpspofingdiagram.JPG"><img src="http://travisaltman.com/wp-content/arpspofingdiagram.JPG" alt="ARP protocol diagram" /></a></p>
<p>Figure 1: ARP protocol diagram</p>
<p>So A wants to communicate with B:</p>
<ol>
<li>A checks its local ARP table for B&#8217;s info</li>
<li>A doesn&#8217;t have B&#8217;s info so its sends a request</li>
<li>Router closet to B adds A&#8217;s info to ARP table</li>
<li>Router sends B&#8217;s info to A so it can update its ARP table</li>
<li>ARP info updated, A &amp; B can now communicate</li>
</ol>
<p>This ARP thing seems to work out nicely, so what&#8217;s the problem? In an untrusted environment how does A know that B is who he says he is? Turns out that the ARP protocol has a slew of vulnerabilities.</p>
<p>Vulnerabilities of ARP:</p>
<ul>
<li>No authentication! (you cannot be assured who you are talking to)</li>
<li>ARP tables can be manipulated by anyone on the LAN</li>
<li>Allows malicious users to pretend to be someone else (the SPOOF)</li>
<li>Perfect protocol for launching Man in the Middle Attacks (MITM)</li>
</ul>
<p>Once a malicious user is on your LAN they can easily manipulate ARP tables, spoof who you are trying to communicate with, and launch a MITM attack. A MITM attack allows the attacker to sniff all your traffic and pick up sensitive information (e.g. username, passwords). A diagram of a MITM attack can be seen in figure 2.</p>
<p><a title="Man in the middle diagram" href="http://travisaltman.com/wp-content/maninthemiddle.JPG"><img src="http://travisaltman.com/wp-content/maninthemiddle.JPG" alt="Man in the middle diagram" /></a></p>
<p>Figure 2: Man in the middle diagram</p>
<p>Anytime you are on an untrusted LAN (e.g. Hotel, Public WiFi, University, any large organization) there is the possibility that someone could be listening in on your communications via ARP spoofing. There are plenty of tools available that would allow even the most novice attacker to gain your personal information. So if you are going to communicate on an untrusted LAN here are some tips to stay secure.</p>
<ul>
<li>Use encryption (e.g. SSL, SSH, or VPN)</li>
<li>If unencrypted, don&#8217;t communicate private information</li>
<li>Only visit trusted websites (easier said than done)</li>
</ul>
<p>For system administrators there are two countermeasures against ARP spoofing.</p>
<ol>
<li>Static ARP tables (difficult to maintain)</li>
<li>Arpwatch (will notify if someone is ARP spoofing)</li>
</ol>
<p>The point of this article is to educate others about how protocols behind the scenes work and how insecure they can be. If you can&#8217;t trust everyone on your current LAN, then use encryption and stay away from communicating sensitive information. Now you know, and knowing is half the battle.  As always feel free to leave comments if you find any errors within this article.</p>
<p>References:</p>
<p>http://www.grc.com/nat/arp.htm, http://en.wikipedia.org/wiki/ARP_spoofing</p>
]]></content:encoded>
			<wfw:commentRss>http://travisaltman.com/arp-spoofing-101-do-you-trust-your-lan/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

