<?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" >

<channel>
	<title>ZOG Heavy Industries &#187; Tech</title>
	<atom:link href="http://www.zog.net/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zog.net</link>
	<description>A Subsidiary of ЗОГ Закрытое акционерное общество</description>
	<lastBuildDate>Tue, 31 Jan 2012 13:06:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Great Explanation of Vector Graphics</title>
		<link>http://www.zog.net/tech/a-great-explanation-of-vector-graphics/</link>
		<comments>http://www.zog.net/tech/a-great-explanation-of-vector-graphics/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 10:29:45 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=2867</guid>
		<description><![CDATA[Provided by a kind reddit reader.  Helped me understand it.  Archived for future use. Vector graphics is another way for a computer to store and explain an image. A photograph from a digital camera is stored and &#8220;explained&#8221; by the computer as a grid of pixels of different values (colour) attached to them, this is <a href='http://www.zog.net/tech/a-great-explanation-of-vector-graphics/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Provided by a kind <a href="https://pay.reddit.com/r/Design/comments/f2vss/got_a_tabletwhere_to_start/c1cwdy9" target="_blank">reddit reader</a>.  Helped me understand it.  Archived for future use.<span id="more-2867"></span></p>
<div>
<div>
<p style="padding-left: 30px;"><em>Vector graphics is another  way for a computer to store and explain an image. A photograph from a  digital camera is stored and &#8220;explained&#8221; by the computer as a grid of  pixels of different values (colour) attached to them, this is a raster.  This raster can then be compressed using different methods like JPEG GIF  or PNG witch looks an the image and for example it sees that there are  500 fully white pixels in a row. And rearranges it so that the computer  in stead of saying: &#8220;White pixel, white pixel, white pixel&#8221; 500 times,  says &#8220;500 white pixels&#8221; which saves space.</em></p>
<p style="padding-left: 30px;"><em>A vector image on the other hand is made up out of mathematical  curves in a coordinate system that have more&#8230; Well mathematical  properties applied to them. Say that you have 3 points on a canvas.  These 3 points makes up a triangle. This triangle is now a shape in your  workspace. This shape can now have a list of properties, it can have a  colour applied to it, it can have an opacity, it can have a blurred edge  with the amount of blur proportional to the size of the triangle&#8230;</em></p>
<p style="padding-left: 30px;"><em>Then we can add more complex shapes to the workspace by adding more  points to them. we can even make the lines that go between the points  bend in smooth curves by adding tangent handles (more information  basically) to each point. Choosing colours and other properties for each  shape and step by step building up an image.</em></p>
<p style="padding-left: 30px;"><em>The great reward that sets this apart from raster images is that  these mathematically built up images don&#8217;t &#8220;care&#8221; about resolution. If  we want to make out image 2 times bigger then the computer just says  &#8220;Sure ill just multiply the relevant values by 2&#8243; and it will all be  nice and crisp no matter how big you want to go.</em></p>
<p style="padding-left: 30px;"><em>Now if you tell a computer to make an image bigger&#8230; Say you have an  image that&#8217;s 1000&#215;1000 pixels with different colours, your gandmother  and her cats or something&#8230; If you tell the computer &#8220;Make this 2 times  bigger&#8221; the computer is going to have to add 4 000 000 pixels to the  image, pixels which it really has no idea about how they are &#8220;supposed  to be&#8221;&#8230; Now applications are smart enough to look at the surrounding  pixels and determine &#8220;fictional&#8221; values for the new pixels. But no  information is actually added to the image and thus the images  resolution stays the same. This is why images appear blurry when blown  up.</em></p>
<p style="padding-left: 30px;"><em>The weakness for vector images is though that it becomes very  difficult, nigh impossible to represent complex images like photos this  way. Therefore its suitable for graphics, logos and such but not pretty  sunsets.</em></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/tech/a-great-explanation-of-vector-graphics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://i.imgur.com/km5UL.jpg' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>Download All of Wikipedia!</title>
		<link>http://www.zog.net/tech/download-all-of-wikipedia/</link>
		<comments>http://www.zog.net/tech/download-all-of-wikipedia/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 16:32:41 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=2774</guid>
		<description><![CDATA[In the ever-ongoing fight against stupid censorship, Wikimedia data dumps (SSL link) &#8212; includes descriptions of dumps and instructions for use Link page to downloads (static Wikipedia pages and Wikimedia database backups) Actual dumps This is exactly the kind of thing that Bittorrent was designed to download and distribute Aand as always, Our friends at <a href='http://www.zog.net/tech/download-all-of-wikipedia/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In the ever-ongoing fight against stupid censorship,</p>
<p><span id="more-2774"></span></p>
<p><a href="https://secure.wikimedia.org/wikipedia/meta/wiki/Data_dumps" target="_blank">Wikimedia data dumps</a> (SSL link) &#8212; includes descriptions of dumps and instructions for use</p>
<p><a href="http://download.wikimedia.org/" target="_blank">Link page to downloads</a> (static Wikipedia pages and Wikimedia database backups)</p>
<p><a href="http://download.wikimedia.org/enwiki/20100130/" target="_blank">Actual dumps</a></p>
<p>This is exactly the kind of thing that <a href="http://www.bittorrent.com/" target="_blank">Bittorrent</a> was designed to download and distribute</p>
<p>Aand as always,</p>
<p>Our friends at the <a href="http://www.eff.org" target="_blank">Electronic Frontier Foundation</a> &#8212; show them some love</p>
<p><a href="http://www.ai.org" target="_blank">Amnesty International</a> and the <a href="http://www.aclu.org" target="_blank">American Civil Liberties Union</a> &#8212; often misguided, often really really nice to have around</p>
<p>The <a href="https://www.torproject.org/" target="_blank">TOR Project</a> &#8212; a fantastic means to securely and (mostly) anonymously browse the web.  Please don&#8217;t abuse it, please share bandwidth generously.  Have a look at Vidalia, their plug-and-play privacy proxy</p>
<p>Information is good, information wants to be free.  Go for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/tech/download-all-of-wikipedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://i.imgur.com/km5UL.jpg' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>Hackintosh: Mac On A Budget</title>
		<link>http://www.zog.net/tech/hackintosh-mac-on-a-budget/</link>
		<comments>http://www.zog.net/tech/hackintosh-mac-on-a-budget/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 14:05:52 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=2137</guid>
		<description><![CDATA[I recently set up a Dell Mini10v as a Hackintosh, running MacOS X 10.6.4 Snow Leopard.  The whole project cost me about 350 euros and resulted in a superportable, well-working, stable mini-Mac. It takes a bit of time to get this right, but it&#8217;s definitely doable if you prepare, do your research, and follow instructions. <a href='http://www.zog.net/tech/hackintosh-mac-on-a-budget/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I recently set up a <a href="http://en.wikipedia.org/wiki/Dell_Inspiron_Mini_Series#Dell_Inspiron_Mini_10v_.281011.29" target="_blank">Dell Mini10v</a> as a <a href="http://en.wikipedia.org/wiki/OSx86" target="_blank">Hackintosh</a>, running <a href="http://www.apple.com/macosx/" target="_blank">MacOS X 10.6.4 Snow Leopard</a>.  The whole project cost me about 350 euros and resulted in a superportable, well-working, stable mini-Mac.</p>
<p><span id="more-2137"></span></p>
<p>It takes a bit of time to get this right, but it&#8217;s definitely doable if you prepare, do your research, and follow instructions.  As always, if anything goes wrong, don&#8217;t blame me.</p>
<p>The first step is to find an Intel-based laptop that is compatible with OS X.  <a href="http://www.mymacnetbook.com/" target="_blank">MyMacNetbook.com</a> has a great, recently updated <a href="http://www.mymacnetbook.com/compatibility-chart/" target="_blank">compatibility chart</a>, (in addition to a lot of other great guides and links) but there are other resources out there.</p>
<p>I bought my like-new Dell notebook on EBay UK, for about 250 pounds including shipping.  The exact model was a Dell Inspiron 1011 Mini 10V N270 1.6Ghz 160GB, with 1GB of memory.</p>
<p>The first step was to upgrade the memory to 2GB.  This was not trivial, but there are plenty of guides out there.  <a href="http://www.jrin.net/2009_07_23/how-to-upgrade-dell-mini-10v-memory" target="_blank">Here is one</a>, <a href="http://www.mydellmini.com/forum/dell-mini-10-guides/9205-mac-users-view-hackintoshing-mini-10v.html" target="_blank">here is another</a>, both with plenty of pictures.  A 2GB DIMM cost me about US $40 on Amazon.</p>
<p>I replaced the standard 3-cell battery with a <a href="http://accessories.dell.com/sna/products/power/productdetail.aspx?c=us&amp;l=en&amp;s=dhs&amp;cs=19&amp;sku=312-0908" target="_blank">new 6-cell one from Dell</a>.  Not cheap at US $135 (much more if you buy in Europe, but then again, who would?), but very much worth it.</p>
<p>The forums at <a href="http://www.mydellmini.com" target="_blank">MyDellMini.com</a> are the next step.  If you have a different model laptop, best check the MyMacNetbook.com site above.</p>
<p>At the time I wrote this, Dell bios version A06 worked with the newest NetBookInstaller.</p>
<p>First, install Snow Leopard 10.6.2 <a href="http://osx.mechdrew.com/guides/macusb_dellmini10v.shtml" target="_blank">as described in this guide</a>.  Here is another good-looking guide to getting 10.6.2 onto your laptop &#8212; you can use any external USB drive with enough space (8GB or larger) to prepare as a boot device from the original 10.6.2 boot DVD/image.  The above guide has instructions on how to do that.</p>
<p>Then, upgrade to 10.6.4.  The specific <a href="http://www.mydellmini.com/forum/general-mac-os-x-discussion/21481-official-mac-os-x-10-6-4-update-thread.html" target="_blank">10.6.4 thread for the Mini 10v is here</a>.  Go through the ENTIRE thread and make sure you have the LATEST version of <a href="http://code.google.com/p/netbook-installer/" target="_blank">NBI (NetBookInstaller)</a> by <a href="http://www.meklort.com/" target="_blank">Meklort</a>.</p>
<p>Enjoy.  The latest trackpad drivers are included in NBI.  Meklor&#8217;s blog has updated lid sleep kernel extensions, that I have not yet played with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/tech/hackintosh-mac-on-a-budget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://i.imgur.com/km5UL.jpg' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>Why You Shouldn&#8217;t Send Facebook Private Messages</title>
		<link>http://www.zog.net/tech/why-you-shouldnt-send-facebook-private-messages/</link>
		<comments>http://www.zog.net/tech/why-you-shouldnt-send-facebook-private-messages/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 12:54:07 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=1943</guid>
		<description><![CDATA[Facebook wants to replace the Internet. Fine.  Just don&#8217;t use it to send private messages.  Private messages are insecure and impractical.  Use email instead. Facebook now sends you notifications when you receive private messages.   Notifications from Facebook come from an email address formatted like &#8220;notification+&#60;something&#62;@facebookmail.com&#8221;.  SMTP Reply-to is &#8220;noreply &#60;noreply@facebookmail.com&#62;&#8221;.  In order to reply, you <a href='http://www.zog.net/tech/why-you-shouldnt-send-facebook-private-messages/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Facebook wants to replace the Internet.</p>
<p><span id="more-1943"></span></p>
<p>Fine.  Just don&#8217;t use it to send private messages.  Private messages are insecure and impractical.  Use email instead.</p>
<p>Facebook now sends you notifications when you receive private messages.   Notifications from Facebook come from an email address formatted like <em>&#8220;notification+&lt;something&gt;@facebookmail.com&#8221;</em>.  SMTP Reply-to is <em>&#8220;noreply &lt;noreply@facebookmail.com&gt;&#8221;</em>.  In order to reply, you must log into Facebook.  Unlike notifications of status updates or wall messages, you cannot reply via email.</p>
<p>Here is a list of reasons why you should not send private messages via Facebook&#8217;s messaging system, and should use email instead.</p>
<ul>
<li>Facebook does not force website encryption.  I check my emails via Google s<a href="http://mail.google.com/support/bin/answer.py?hl=en&amp;answer=78799" target="_blank">ecure imap</a> or <a href="http://mail.google.com/support/bin/answer.py?hl=en&amp;answer=8155" target="_blank">SSL</a>.  Facebook allows you to use a <a href="https://www.facebook.com/" target="_blank">secure login page</a>.   However, while this will show you an SSL-secured landing page when you log in, any links from there (e.g. other people&#8217;s walls) are unencrypted.  Furthermore, the &#8220;reply to this message&#8221; link in the message notification from Facebook is always unencrypted.  Unless you use a tool like <a href="https://www.eff.org/https-everywhere" target="_blank">HTTPS Everywhere</a> or a browser that supports universal SSL enforcement via configuration settings, you are at risk of revealing login information.  Please read my <a href="http://www.chakraborty.ch/exploits/firesheep-and-credentials-sniffing" target="_blank">post about Firesheep</a> to see how easy it is to steal a Facebook account over an insecure (e.g. public wireless) connection.</li>
<li>Facebook does not allow the use of cryptography when sending emails.  This does not concern (although it should) the majority of people, but tools like <a href="http://www.pgp.com/" target="_blank">PGP</a> or <a href="http://www.gnupg.org/" target="_blank">GPG</a> allow me to easily encrypt my mails, even while they are stored on a server like Google&#8217;s.  I use a <a href="http://www.gpgmail.org/" target="_blank">GPG plugin for my Mac mail client</a>, which permits me to easily and quickly encrypt/decrypt emails.</li>
<li>Facebook is a marketing organization.  It already knows a lot about you, via your photos, posts, tags, games, comments, profile information, likes, dislikes, group memberships, where you connect from, what external links you click on, apps, and any number of other tools.  The company has changed its privacy policies and data handling procedures (thankfully, for the better in their last iteration) numerous times, often without consulting its subscribers.  They provide a free service and have to pay for it somehow</li>
<li>Even if you do not believe that Facebook is &#8220;bad&#8221; (it&#8217;s just a company), in the wrong hands, that information is potentially damaging and sensitive (e.g. if someone breaks into a Facebook account &#8212; see the above link to the Firesheep article to learn how easy this is to do.)  It is easier to secure an email account than a Facebook account.</li>
<li>Email allows you to properly thread and follow conversations.  It also includes previous mails in a back-and-forth conversation.  Facebook messages do not, unless you log into Facebook.  They are a pain in the ass to track in an email client.  Which leads to the next problem, that</li>
<li>Facebook messages are not accessible offline.  Email is.  If I want to go through an email conversation while I&#8217;m on a plane, I can list all the messages in that one thread, sorted by topic.  If I only have an email conversation in the form of Facebook notifications, I have to manually search through them and will probably miss a bunch of information.</li>
<li>On a related note, you cannot easily sort Facebook messages by sender.  People who like to tag emails by who sent them in one convenient place, forget it.</li>
<li>It is not possible to auto-reply to Facebook messages (e.g. if I&#8217;m on holidays).</li>
<li>Facebook messages do not allow rich text or attachments.   If you use rich text, forget it &#8212; no images, formatting, etc.</li>
<li>Many workplaces frown on Facebook use, while tolerating access to personal email sites, or maybe they just don&#8217;t notice, as your Hotmail interface isn&#8217;t as likely to have a bunch of friends&#8217; wall photos (LOL GEORGE WITH INFLATABLE SHEEP).</li>
<li>Facebook <a href="http://www.facebook.com/topic.php?uid=5484086268&amp;topic=13871" target="_blank">includes the IP address of the sender</a> in every message notification.</li>
<li>Facebook messages received via email are cluttered.   Especially on mobile devices, Facebook message notifications suck.  Compare the following two for a one-line email:</li>
</ul>
<p style="text-align: center;">This</p>
<p><a href="http://www.zog.net/wp-content/uploads/2010/11/facebook.png"><img class="aligncenter size-full wp-image-1944" title="facebook" src="http://www.zog.net/wp-content/uploads/2010/11/facebook.png" alt="" width="712" height="519" /></a></p>
<p style="text-align: center;">versus this</p>
<p style="text-align: center;"><a href="http://www.zog.net/wp-content/uploads/2010/11/email.png"><img class="aligncenter size-full wp-image-1946" title="email" src="http://www.zog.net/wp-content/uploads/2010/11/email.png" alt="" width="736" height="130" /></a></p>
<p style="text-align: left;">It floors me that intelligent, busy people who wouldn&#8217;t think twice about lashing out at someone for wasting their time, would tolerate this kind of crap.</p>
<p style="text-align: left;">I do not &#8220;trust&#8221; Google, where I host two email domains, nor do I in any way claim that they are &#8220;better&#8221; in this regard than Facebook.  I understand that, all claims to &#8220;do no evil&#8221; aside, they also provide a free service, but I accept the premise of giving up a certain amount of privacy in return for a service, and my personal experience leads me to believe that they&#8217;re pretty decent overall.   I find their <a href="http://www.google.com/intl/en/privacypolicy.html" target="_blank">terms of service</a> adequate for my email needs.   I also do not send photos of myself being a drunken idiot via Gmail, nor do I frequently comment on links labeled with the equivalent of &#8220;lol sheep porn&#8221; (or whatever my friends decide to post on Facebook that day).</p>
<p>Furthermore, Google is by far not the only email provider &#8212; you can host your own email service, with a provider that offers far stricter terms of service and data privacy.</p>
<p>Email is not 100% secure, even if the link between you and your email server is encrypted.  First, content can be included in a mail that exploits vulnerabilities in your browser, email client, or operating system.  Some such exploits do not even require you to click on them.  However, many of these can be prevented, or at least mitigated, with a reasonable virus scanner, frequent software security updates, and a bit of personal awareness.</p>
<p>Second, email between providers (i.e. from your server to the recipient&#8217;s server) often traverses insecure links.  These can be shared &#8220;big pipes&#8221;, used by any number of data services.  Unless you use strong encryption (see PGP/GPG above), a malicious systems administrator, determined intruder, government agency, or Internet service provider, could sniff and intercept your mails.  That is, if they really wanted to (they probably don&#8217;t).  Even strong encryption is no guarantee against the most resourceful attacker, but a vast vast vast majority of the time, it makes it more trouble than it is worth.  But even if it is not encrypted, it is unlikely that an attacker who is not highly resourceful and determined will be able to access your mail traffic this way.</p>
<p>I know that all your friends &#8220;are on Facebook&#8221;.  It&#8217;s a neat toy for sharing events, photos, and snarky comments.  But please, for the love of god, do not use it as an email replacement.  It&#8217;s not, and you should know better.</p>
<p><em>Please check the above for yourself.  To the best of my knowledge, everything in this posting was true as of the posting date.  Facebook has since made changes, something it continually does, sometimes for the better, but usually for the words. YMMV. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/tech/why-you-shouldnt-send-facebook-private-messages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<enclosure url='http://www.zog.net/wp-content/uploads/2010/11/facebook.png' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>Fixing Multiple Google Earth / Maps Broken Placemaps</title>
		<link>http://www.zog.net/tech/fixing-multiple-google-earth-maps-broken-placemaps/</link>
		<comments>http://www.zog.net/tech/fixing-multiple-google-earth-maps-broken-placemaps/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 08:06:45 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=1800</guid>
		<description><![CDATA[Note:  this is a really _really_ minor thing that just annoyed the hell out of me, so I&#8217;m writing down how to fix it. Google Maps and Earth use an XML-like format called &#8216;KML&#8216; for storing placemarks and map info (or &#8216;KMZ&#8217;, which is just zipped kml &#8212; useful for larger amounts of info, like <a href='http://www.zog.net/tech/fixing-multiple-google-earth-maps-broken-placemaps/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Note:  this is a really _really_ minor thing that just annoyed the hell out of me, so I&#8217;m writing down how to fix it.</p>
<p><span id="more-1800"></span></p>
<p>Google Maps and Earth use an XML-like format called &#8216;<a href="http://code.google.com/apis/kml/documentation/kml_tut.html" target="_blank">KML</a>&#8216; for storing placemarks and map info (or &#8216;KMZ&#8217;, which is just zipped kml &#8212; useful for larger amounts of info, like map overlays and the likes.</p>
<p>Unfortunately, it appears that Google Earth is a lot more tolerant of slight errors in KML files than the Google Maps API, which is used by applications like the excellent <a href="http://wordpress.org/extend/plugins/geo-mashup/" target="_blank">WordPress Geo Mashup</a> plugin I use on this site.</p>
<p>I have a basic collection of placemarks to show where I&#8217;ve traveled and lived, it&#8217;s sort of a map diary of mine.  Google Earth is a convenient way of dealing with it, since unlike Google Maps, it allows you to put placemarks in folders/subfolders.  The downside is that you can&#8217;t have access to this information online, which is not an issue for me since I usually carry a laptop around anyway.</p>
<p>I use yellow and red pushpins,</p>
<p><a href="http://www.zog.net/wp-content/uploads/2010/08/red-pushpin.png"><img class="size-full wp-image-1801 alignleft" title="red-pushpin" src="http://www.zog.net/wp-content/uploads/2010/08/red-pushpin.png" alt="" width="32" height="32" /></a><br />
<a href="http://www.zog.net/wp-content/uploads/2010/08/ylw-pushpin.png"><img class="size-full wp-image-1802 alignleft" title="ylw-pushpin" src="http://www.zog.net/wp-content/uploads/2010/08/ylw-pushpin.png" alt="" width="32" height="32" /></a></p>
<p>which worked fine in Google Earth, but found that when I exported my placemarks KML file to Google Maps (either on maps.google.com or here), most-but-not-all were replaced by blue markers.</p>
<p><a href="http://www.zog.net/wp-content/uploads/2010/08/placemark.jpg"><img class="size-full wp-image-1803 alignleft" title="placemark" src="http://www.zog.net/wp-content/uploads/2010/08/placemark.jpg" alt="" width="33" height="32" /></a></p>
<p>I finally figured out that Google Earth tends to sort of randomly assign placemark styles (defined via the &lt;styleUrl&gt; tag early in the KML file) to places &#8212; so even if you&#8217;ve manually set all your placemarks to use the same yellow pushpin, you may find your placemarks using 300 different placemark styles.  For some reason, a lot of them were horribly munged, referring to URLs rather than styles defined earlier in the file.  Google Maps got confused.  I have no idea why this happened, but it&#8217;s obnoxious.</p>
<p>To fix it, I also realized that you can recursively set placemark styles for all placemarks at once &#8212; create a placemark folder in Google Earth, put all your placemarks and placemark subfolders in it, then set the placemark style for the folder and everything in it to the placemark you want.</p>
<p>Then, go through your placemarks and individually fix the ones you want to be different.</p>
<p>Even though the KML file will still have many styles for placemarks, you&#8217;ll notice that Google Earth speeds up a bit, and Google Maps now understands all your icons.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/tech/fixing-multiple-google-earth-maps-broken-placemaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://www.zog.net/wp-content/uploads/2010/08/red-pushpin.png' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>A Practical Guide For Defeating NMAP OS Fingerprinting</title>
		<link>http://www.zog.net/Docs/nmap.html</link>
		<comments>http://www.zog.net/Docs/nmap.html#comments</comments>
		<pubDate>Tue, 22 Jun 2010 14:28:29 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=1689</guid>
		<description><![CDATA[This was on my old site before I moved. Maybe someone will find it interesting.  The original site seems to be offline, so I  thought it best to make sure it stayed available just in case. -John David Barroso Berrueta http://voodoo.somoslopeor.com &#60;tomac@somoslopeor.com&#62; Copyright © 2003 David Barroso Berrueta. Palencia (Spain) Permission is granted to copy, <a href='http://www.zog.net/Docs/nmap.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div>
<p><span id="more-1689"></span></p>
<p><em>This was on my old site before I moved. Maybe someone will find it interesting.  The original site seems to be offline, so I  thought it best to make sure it stayed available just in case.</em></p>
<p><em>-John</em></p>
<p>David Barroso Berrueta</p>
<p><a href="http://voodoo.somoslopeor.com/" target="_top">http://voodoo.somoslopeor.com</a></p>
<p>&lt;<a href="mailto:tomac@somoslopeor.com">tomac@somoslopeor.com</a>&gt;</p>
<p>Copyright © 2003 David Barroso Berrueta. Palencia (Spain)</p>
<p>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled &#8220;GNU Free Documentation License&#8221;.</p>
<p>Remote OS Fingerprinting is becoming more and more important, not only for security pen-testers,but for the black-hat. Just because Nmap is getting popularity as the tool for guessing which OS is running in a remote system, some security tools have been developed to fake Nmap in its OS Fingerprinting purpose. This paper describes different solutions to defeat Nmap and behave like another chosen operating system, as well as a demonstration on how can be accomplished.</p>
<hr size="2" />Table of Contents</p>
<p>1. <a href="http://www.zog.net/Docs/nmap.html#INTRODUCTION">Introduction</a></p>
<p>2. <a href="http://www.zog.net/Docs/nmap.html#REASONS">Reasons to hide your OS to the entire world</a></p>
<p>3. <a href="http://www.zog.net/Docs/nmap.html#NMAPTOOL">Nmap</a></p>
<p>4. <a href="http://www.zog.net/Docs/nmap.html#LSOLUTIONS">Linux solutions</a></p>
<p>4.1. <a href="http://www.zog.net/Docs/nmap.html#IPPERSONALITY">IP Personality</a></p>
<p>4.2. <a href="http://www.zog.net/Docs/nmap.html#STEALTH">Stealth patch</a></p>
<p>4.3. <a href="http://www.zog.net/Docs/nmap.html#FF">Fingerprint Fucker</a></p>
<p>4.4. <a href="http://www.zog.net/Docs/nmap.html#IPLOG">IPlog</a></p>
<p>5. <a href="http://www.zog.net/Docs/nmap.html#BSD">*BSD solutions</a></p>
<p>5.1. <a href="http://www.zog.net/Docs/nmap.html#BLACKHOLE">Blackhole</a></p>
<p>5.2. <a href="http://www.zog.net/Docs/nmap.html#FF2">Fingerprint Fucker</a></p>
<p>5.3. <a href="http://www.zog.net/Docs/nmap.html#OPENBSD">OpenBSD packet filter</a></p>
<p>5.4. <a href="http://www.zog.net/Docs/nmap.html#FREEBSD">FreeBSD TCP_DROP_SYNFIN</a></p>
<p>6. <a href="http://www.zog.net/Docs/nmap.html#GENERAL">General solutions</a></p>
<p>7. <a href="http://www.zog.net/Docs/nmap.html#PLAY">More things to play with</a></p>
<p>8. <a href="http://www.zog.net/Docs/nmap.html#CONCLUSION">Conclusion</a></p>
<p><a href="http://www.zog.net/Docs/nmap.html#AEN200">References</a></p>
<p>A. <a href="http://www.zog.net/Docs/nmap.html#GFDL">GNU Free Documentation License</a></p>
<p>A.1. <a href="http://www.zog.net/Docs/nmap.html#GFDL-0">PREAMBLE</a></p>
<p>A.2. <a href="http://www.zog.net/Docs/nmap.html#GFDL-1">APPLICABILITY AND DEFINITIONS</a></p>
<p>A.3. <a href="http://www.zog.net/Docs/nmap.html#GFDL-2">VERBATIM COPYING</a></p>
<p>A.4. <a href="http://www.zog.net/Docs/nmap.html#GFDL-3">COPYING IN QUANTITY</a></p>
<p>A.5. <a href="http://www.zog.net/Docs/nmap.html#GFDL-4">MODIFICATIONS</a></p>
<p>A.6. <a href="http://www.zog.net/Docs/nmap.html#GFDL-5">COMBINING DOCUMENTS</a></p>
<p>A.7. <a href="http://www.zog.net/Docs/nmap.html#GFDL-6">COLLECTIONS OF DOCUMENTS</a></p>
<p>A.8. <a href="http://www.zog.net/Docs/nmap.html#GFDL-7">AGGREGATION WITH INDEPENDENT WORKS</a></p>
<p>A.9. <a href="http://www.zog.net/Docs/nmap.html#GFDL-8">TRANSLATION</a></p>
<p>A.10. <a href="http://www.zog.net/Docs/nmap.html#GFDL-9">TERMINATION</a></p>
<p>A.11. <a href="http://www.zog.net/Docs/nmap.html#GFDL-10">FUTURE REVISIONS OF THIS LICENSE</a></p>
<p>A.12. <a href="http://www.zog.net/Docs/nmap.html#GFDL-ADDENDUM">ADDENDUM: How to use this License for your documents</a></p>
<p><a name="INTRODUCTION">1. Introduction</a></p>
<p>The purpose of this paper is to try to enumerate and briefly describe all applications and technics deployed for defeating Nmap OS Fingerprint, but in any case, security by obscurity is not good approach; it can be a good security measure but please take into account that is more important to have a tight security environment (patches, firewalls, ids, &#8230;) than hiding your OS.</p>
<p>Learning which Operating System is running in a remote system can be very valuable for both the pen-tester and the black-hat. Suppose that they find an open port in their (approved or not) penetration; knowing the OS makes easier to find and execute an exploit against that service, because often an exploit is OS version specific, and an exploit for Sendmail running on HP-UX won&#8217;t work for Sendmail running on AIX, or being more accurate, an AIX 4.3.3 exploit could not work in a system running 4.3.3 with the latest maintenance code applied. Fyodor (Nmap&#8217;s author) has written a detailed <a href="http://www.insecure.org/nmap/nmap-fingerprinting-article.html" target="_top">article</a> about remote OS Fingerprint, describing some different methods to successfully detect the remote OS, from the basic ones, to the more powerful ones.</p>
<p>In the beginning, guessing the remote OS was done grabbing the banner that a specific service was serving. For example, a typical telnet or FTP banner was always shown to the entire world, telling which OS was running, or if the banner has been changed or removed, some service commands could be executed to know the OS (remember the SYST in the FTP). Other basic ways to know the OS could be searching for HINFO entries in the DNS server, or trying to get information using snmp (lot of devices have enabled by default snmp access using the &#8216;public&#8217; community string). Even searching for the target company jobs posting in the Internet, dumpster diving looking for OS manuals, or social engineering are valid methods for trying to know the remote OS.</p>
<p>Then, some more advanced network solutions were deployed, taking advantage of each OS vendor TCP/IP stack implementation. The idea is to send some crafted packets to the remote OS and wait for its answer. Those packets are &#8220;nasty&#8221; packets, crafted with uncommon TCP options or with &#8216;impossible&#8217; options. Each OS has its own TCP/IP stack implementation, there isn&#8217;t a common stack implementation for every OS and this issue allows to create a classification of different OS and versions according to their answers. Playing around with those tricky packets is how remote OS Fingerprinting tools work; some of them using the TCP/IP protocol, and others using the ICMP protocol.</p>
<p>There is a paper about &#8216;<a href="http://www.usenix.org/publications/library/proceedings/sec2000/smart.html" target="_top">Defeating TCP/IP Stack Fingerprinting</a>&#8216; that describes in high level the design and implementation of a TCP/IP Stack fingerprint scrubber. That paper outlines why and how you can defeat TCP/IP OS Fingerprinting, so I am not going to talk too much about that; therefore I will focus on the solutions available out there.</p>
<p><a name="REASONS"><br />
<hr size="2" />2. Reasons to hide your OS to the entire world</a></p>
<p>Perhaps you are wondering why do you want to spend your precious time changing your Linux kernel to hide your real OS version against Nmap &#8216;bad purposes&#8217; users. Maybe the following reasons can convince you:</p>
<ul>
<li>Revealing your OS makes things easier to find and successfully run an exploit against any of your devices.</li>
<li>Having and unpatched or antique OS version is not very convenient for your company prestige. Imagine that your company is a bank and some users notice that you are running an unpatched box. They won&#8217;t trust you any longer! In addition, these kind of &#8216;bad&#8217; news are always sent to the public opinion.</li>
<li>Knowing your OS can also become more dangerous, because people can guess which applications are you running in that OS (data inference). For example if your system is a MS Windows, and you are running a database, it&#8217;s highly likely that you are running MS-SQL.</li>
<li>It could be convenient for other software companies, to offer you a new OS environment (because they know which you are running).</li>
<li>And finally, privacy; nobody needs to know the systems you&#8217;ve got running.</li>
</ul>
<p><a name="NMAPTOOL"><br />
<hr size="2" />3. Nmap</a></p>
<p><a href="http://www.insecure.org/" target="_top">Nmap</a> is one of such tools. It sends seven TCP/IP crafted packets (called tests) and waits for the answer. Results are checked against a database of known results (OS signatures database). This database is a text file that contains the result answered (signature) by each OS known. Thus, if the answer matches any of the entries in the database, we can guess that the remote OS is the same that the one in the database. Some Nmap packets are sent to an open port and the others to a closed port; depending on that results, the remote OS is guessed. A sample entry could be:</p>
<p>/* OS Comment. Yes, we want to be a Sega Dreamcast console */</p>
<p>Fingerprint Sega Dreamcast</p>
<p>/* ISN predictibilty; TD: time dependant */</p>
<p>TSeq(Class=TD%gcd=&lt;780%SI=&lt;14)</p>
<p>/* Test 1 result: SYN packet with some options to an open port. We got</p>
<p>a SYN+ACK, acknowledgment seq +1, window size 0x1d4c, don&#8217;t fragment</p>
<p>bit not activated, and only the MSS returned */</p>
<p>T1(DF=N%W=1D4C%ACK=S++%Flags=AS%Ops=M)</p>
<p>/* Test 2 result: Null packet with options to an open port. We got a</p>
<p>ACK+RST, acknowledgment seq, window size 0&#215;0, don&#8217;t fragment bit not</p>
<p>activated */</p>
<p>T2(Resp=Y%DF=N%W=0%ACK=S%Flags=AR%Ops=)</p>
<p>/* Test 3 result: SYN, FIN, URG, PSH with options to an open</p>
<p>port. We got a SYN+ACK, acknowledgment seq +1, window size 0x1d4c,</p>
<p>don&#8217;t fragment bit not activated, and only the MSS returned */</p>
<p>T3(Resp=Y%DF=N%W=1D4C%ACK=S++%Flags=AS%Ops=M)</p>
<p>/* Test 4 result: ACK packet to an open port. We got a RST,</p>
<p>acknowledgment seq, window size 0&#215;0, don&#8217;t fragment bit not activated */</p>
<p>T4(DF=N%W=0%ACK=S%Flags=R%Ops=)</p>
<p>/* Test 5 result: SYN with options to a closed port. We got a</p>
<p>ACK+RST, acknowledgment seq, window size 0&#215;0, don&#8217;t fragment bit not</p>
<p>activated */</p>
<p>T5(DF=N%W=0%ACK=S%Flags=AR%Ops=)</p>
<p>/* Test 6 result: ACK with options to a closed port. We got a RST,</p>
<p>acknowledgment seq, window size 0&#215;0, don&#8217;t fragment bit not activated */</p>
<p>T6(DF=N%W=0%ACK=S%Flags=R%Ops=)</p>
<p>/* Test 7 result: FIN, PSH, URG with options to a closed port. We</p>
<p>got a ACK+RST, acknowledgment seq+1, window size 0&#215;0, don&#8217;t fragment</p>
<p>bit not activated */</p>
<p>T7(DF=N%W=0%ACK=S++%Flags=AR%Ops=)</p>
<p>/* Port unreachable message result. No response */</p>
<p>PU(Resp=N)</p>
<p>Then, if we want to defeat Nmap and tell the attacker that we are running a different operating system, we only need to fake the responses to the Nmap tests. The solution that is going to describe is only valid for defeating Nmap and not other remote OS Fingerprinting tools. In the <a href="http://www.zog.net/Docs/nmap.html#CONCLUSION">Conclusion</a> section, other tools will be mentioned, as well as some recommendations for the pen-tester and/or the attacker.</p>
<p><a name="LSOLUTIONS"><br />
<hr size="2" />4. Linux solutions</a></p>
<p>Methods to defeat Nmap OS Fingerprinting in Linux are written as kernel modules, or at least, as patches to the Linux kernel. The reason is that if the aim is to change Linux TCP/IP stack behavior, and if we want to achieve it, we need to do it in the kernel layer.</p>
<p>Three kernel module solutions are going to be described, all of them independent from the Linux kernel tree; you have to download them and patch your kernel to add the feature. The first one requires netfilter enabled in your kernel (what I think it&#8217;s a must if you want to start to have a secure system), but the other two don&#8217;t.</p>
<p><a name="IPPERSONALITY"><br />
<hr size="2" />4.1. IP Personality</a></p>
<p>The first and probably, best option is <a href="http://ippersonality.sourceforge.net/" target="_top">IP Personality</a>. It&#8217;s netfilter module (then, only available for 2.4 Linux kernels) that allows us to change the IP stack behavior and &#8216;personality&#8217;, having multiple network personalities depending on parameters that you can specify as an iptables rule. Actually, we can change the following options:</p>
<ul>
<li>TCP Initial Sequence Number (ISN)</li>
<li>TCP initial window size</li>
<li>TCP options (their types, values and order in the packet)</li>
<li>IP ID numbers</li>
<li>answers to some pathological TCP packets</li>
<li>answers to some UDP packets</li>
</ul>
<p>An IP Personality overall summary is that we can change the way we answer to some packets, and we can specify which packets we want to answer in such way (it could be depending on the source ip address, the destination port, or, and that&#8217;s we are going to use, those crafted packets coming from Nmap)</p>
<p>Installation is fairly straight forward and well explained in the INSTALL file provided by the package; for our test purposes, our test box is a stable Debian box running a 2.4.19 kernel. By default, IP Personality netfilter module is not available in latest kernel, so we need to patch our kernel sources. Patch for adding IP Personality feature to our netfilter core is available in the IP Personality site. We also need to patch the iptables command so that it can recognize our new feature available. Once the kernel is patched and compiled, we need to reboot our box just because the patch also modifies other netfilter files (the connection tracking).</p>
<p>Next step is include our iptables rules related to IP Personality in our working kernel. Before doing it, we run Nmap to check our current OS:</p>
<p># nmap (V. 3.10ALPHA4) scan initiated Wed Feb 19 20:26:52 2003 as: nmap -sS -O -oN nmap1.log 192.168.0.19</p>
<p>Interesting ports on 192.168.0.19:</p>
<p>(The 1597 ports scanned but not shown below are in state: closed)</p>
<p>Port State Service</p>
<p>22/tcp open ssh</p>
<p>25/tcp open smtp</p>
<p>80/tcp open http</p>
<p>143/tcp open imap2</p>
<p>Remote operating system guess: Linux Kernel 2.4.0 &#8211; 2.5.20</p>
<p>Uptime 106.832 days (since Tue Nov 5 00:29:33 2002)</p>
<p># Nmap run completed at Wed Feb 19 20:26:58 2003 &#8212; 1 IP address (1 host up) scanned in 7.957 seconds</p>
<p>Now, we can reboot to run our new patched kernel and add the iptables rules needed to fake Nmap OS guess:</p>
<p>voodoo:~/ippersonality-20020819-2.4.19/samples#/usr/local/sbin/iptables -t mangle -A PREROUTING -s 192.168.0.50 -d192.168.0.19 -j PERS &#8211;tweak dst &#8211;local &#8211;conf dreamcast.confi</p>
<p>voodoo:~/ippersonality-20020819-2.4.19/samples#/usr/local/sbin/iptables -t mangle -A OUTPUT -s 192.168.0.19 -d192.168.0.50 -j PERS &#8211;tweak src &#8211;local &#8211;conf dreamcast.conf</p>
<p>What we are doing with those filter rules is:</p>
<ul>
<li>The first one means that all packets coming from 192.168.0.50 (me) against 192.168.0.19 (server) have to be mangled and rewritten simulating a Dreamcast behavior. The PREROUTING chain is the one that can do that.</li>
<li>The second one means that all packets coming from 192.168.0.19 (server) against 192.168.0.50 (me) have to be mangled and rewritten simulating a Dreamcast behavior. As is a packet going out the server, the OUTPUT chain is the responsible for that.</li>
</ul>
<p>Checking our set-up:</p>
<p>voodoo:~/ippersonality-20020819-2.4.19/samples#/usr/local/sbin/iptables -L -t mangle</p>
<p>Chain PREROUTING (policy ACCEPT)</p>
<p>target prot opt source destination</p>
<p>PERS all 192.168.0.50 192.168.0.19 tweak:dst local id:Dreamcast</p>
<p>Chain INPUT (policy ACCEPT)</p>
<p>target prot opt source destination</p>
<p>Chain FORWARD (policy ACCEPT)</p>
<p>target prot opt source destination</p>
<p>Chain OUTPUT (policy ACCEPT)</p>
<p>target prot opt source destination</p>
<p>PERS all 192.168.0.19 192.168.0.50 tweak:src local id:Dreamcast</p>
<p>Chain POSTROUTING (policy ACCEPT)</p>
<p>target prot opt source destination</p>
<p>It&#8217;s time to see if Nmap can report that we are still running a Linux kernel 2.4.0-2.5.20 or perhaps we can find out that our OS has changed:</p>
<p># nmap (V. 3.10ALPHA4) scan initiated Wed Feb 19 21:49:18 2003 as: nmap -sS -O -oN nmap2.log 192.168.0.19</p>
<p>Interesting ports on 192.168.0.19:</p>
<p>(The 1597 ports scanned but not shown below are in state: closed)</p>
<p>Port State Service</p>
<p>22/tcp open ssh</p>
<p>25/tcp open smtp</p>
<p>80/tcp open http</p>
<p>143/tcp open imap2</p>
<p>Remote operating system guess: Sega Dreamcast</p>
<p># Nmap run completed at Wed Feb 19 21:49:23 2003 &#8212; 1 IP address (1 host up) scanned in 5.886 seconds</p>
<p>As you can see, we&#8217;ve fooled Nmap with our response. It&#8217;s easy to choose the OS we want to &#8216;run&#8217; in the Nmap OS fingerprint and tell IP Personality to behave like that chosen OS. Let&#8217;s take a look to the dreamcast.conf file that we&#8217;ve specified when adding our iptables rules:</p>
<p>/* Our new OS identification */</p>
<p>id &#8220;Dreamcast&#8221;;</p>
<p>/* only incoming packets will be mangled and TCP window sizes will not be changed*/</p>
<p>tcp {</p>
<p>incoming yes;</p>
<p>outgoing no;</p>
<p>max-window 32768;</p>
<p>}</p>
<p>/* We need to emulate the Dreamcast ISN time dependant generator; this can be done with the fixed-inc generator and a small increment */</p>
<p>tcp_isn {</p>
<p>type fixed-inc 2;</p>
<p>initial-value random;</p>
<p>}</p>
<p>tcp_options {</p>
<p>keep-unknown yes;</p>
<p>keep-unused no;</p>
<p>isolated-packets yes;</p>
<p>code { copy(mss); }</p>
<p>}</p>
<p>/* now we have to follow nmap Dreamcast signature and answer like a Dreamcast */</p>
<p>tcp_decoy {</p>
<p>code {</p>
<p>if (option(mss)) { /* nmap has mss on all of its pkts */</p>
<p>set(df, 0);</p>
<p>if (listen) {</p>
<p>if (flags(syn&amp;ece)) { /* nmap test 1 */</p>
<p>set(win, 0x1D4C);</p>
<p>set(ack, this + 1);</p>
<p>set(flags, ack|syn);</p>
<p>insert(mss, this+1);</p>
<p>reply;</p>
<p>}</p>
<p>if (flags(null)) { /* nmap test 2 */</p>
<p>set(win, 0);</p>
<p>set(ack, this);</p>
<p>set(flags, ack|rst);</p>
<p>reply;</p>
<p>}</p>
<p>if (flags(syn&amp;fin&amp;urg&amp;push)) { /* nmap test 3 */</p>
<p>set(win, 0x1D4C);</p>
<p>set(ack, this + 1);</p>
<p>set(flags, ack|syn);</p>
<p>insert(mss, this+1);</p>
<p>reply;</p>
<p>}</p>
<p>if (ack(0) &amp;&amp; flags(ack) &amp;&amp; !flags(syn|push|urg|rst)) { /* nmap test 4 */</p>
<p>set(win, 0);</p>
<p>set(ack, this);</p>
<p>set(flags, rst);</p>
<p>reply;</p>
<p>}</p>
<p>} else {</p>
<p>set(win, 0);</p>
<p>if (flags(syn) &amp;&amp; !flags(ack)) { /* nmap test 5 */</p>
<p>set(ack, this);</p>
<p>set(flags, ack|rst);</p>
<p>reply;</p>
<p>}</p>
<p>if (ack(0) &amp;&amp; flags(ack) &amp;&amp; !flags(syn|push|urg|rst)) { /* nmap test 6 */</p>
<p>set(ack, this);</p>
<p>set(flags, rst);</p>
<p>reply;</p>
<p>}</p>
<p>if (flags(fin&amp;push&amp;urg)) { /* nmap test 7 */</p>
<p>set(ack, this + 1);</p>
<p>set(flags, ack|rst);</p>
<p>reply;</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>/* No ICMP response for connections to closed UDP ports */</p>
<p>udp_unreach {</p>
<p>reply no;</p>
<p>df no;</p>
<p>max-len 56;</p>
<p>tos 0;</p>
<p>mangle-original {</p>
<p>ip-len 32;</p>
<p>ip-id same;</p>
<p>ip-csum zero;</p>
<p>udp-len 308;</p>
<p>udp-csum same;</p>
<p>udp-data same;</p>
<p>}</p>
<p>}</p>
<p>IP Personality is even more powerful. You can set up a Linux firewall/router that will change the answer of the hosts behind it. All your hosts protected by that Linux router can appear to be Sega Dreamcast consoles to any attacker!</p>
<p>There is also a great Nmap patch in the same site, named <a href="http://ippersonality.sourceforge.net/download.html" target="_top">osdet</a>, that allows us to OS Fingerprint an ip address (using Nmap engine), but with the fancy add-on that we can see the packets that are sent and their answer in tcpdump output format. Sometimes it&#8217;s very helpful and easier to understand the OS Fingerprint technique watching the packets flowing on our screen (all Nmap tests and its answers).</p>
<p><a name="STEALTH"><br />
<hr size="2" />4.2. Stealth patch</a></p>
<p>The solution that we are going to describe is the stealth patch, available from <a href="http://www.innu.org/~sean/" target="_top">Security Technologies</a>. It&#8217;s available as a kernel modules for Linux kernels 2.2.x (and in a near future for 2.4.x) ,and as a kernel patch (without module support for Linux kernel 2.4.x). We&#8217;re going to test the patch for the 2.4.19 kernel. When patched, two new options appear in our config file:</p>
<ul>
<li>IP: TCP Stack Options: option that we have to choose if want to use the stealth patch. If you select this option, it&#8217;s enable by default when you boot your system. To disable them, you need to execute:</li>
</ul>
<ul>
<li>echo 0 &gt; /proc/sys/net/ipv4/tcp_ignore_ack</li>
<li>echo 0 &gt; /proc/sys/net/ipv4/tcp_ignore_bogus</li>
<li>echo 0 &gt; /proc/sys/net/ipv4/tcp_ignore_synfin</li>
</ul>
<ul>
<li>Log all dropped packets: logs all packets with bad options.</li>
</ul>
<p>This patch simply discards the TCP/IP packets received with the following matches:</p>
<ol>
<li>Packets with both SYN and FIN activated (tcp_ignore_synfin) (QueSO probe).</li>
<li>Bogus Packets: if the TCP header has the res1 bit active (one of the reserved bits, then it&#8217;s a bogus packet) or it does not have any of the following activated: ACK, SYN, RST, FIN (Nmap test 2).</li>
<li>Packets with FIN, PUSH and URG activated (Nmap test 7).</li>
</ol>
<p>This is a simpler solution than the one described earlier. We cannot behave like any other Operating System, we just silently drop all &#8216;strange&#8217; packets that are supposed to be destinated to guess our OS, and hope that it will be enough to fool our attacker, or at least, make the things harder. These kernel modifications are easy to understand, and it would be relatively easy to add our own homemade &#8216;bad packets&#8217; detection.</p>
<p><a name="FF"><br />
<hr size="2" />4.3. Fingerprint Fucker</a></p>
<p>Fingerprint Fucker is a kernel module available for Linux kernel 2.2.x which also can hide your OS and behave like another. It&#8217;s a kernel module which accepts parameters from the command line to configure the answer. By default, it simulates a VAX. There is also another file, called fing_parses.c, which parses a Nmap signature file and loads the Fingerprint Fucker module with the right parameters (when executing fing_parses, you have to specify which OS you want to emulate). It also waits for receiving a Nmap bogus packet, and then answers as you have configured. As far I&#8217;ve seen, only some Nmap tests are treated (T1, T2 and T7).</p>
<table style="width: 100%;" border="0" cellpadding="0">
<tbody>
<tr>
<td width="25" valign="top"></td>
<td valign="top">The code is not very stable. I loaded the module and in a few moments my Linux box got frozen.</td>
</tr>
</tbody>
</table>
<p><a name="IPLOG"><br />
<hr size="2" />4.4. IPlog</a></p>
<p><a href="http://ojnk.sourceforge.net/stuff/iplog.readme" target="_top">IPlog</a> is a TCP/IP logger that also detects some scans (XMAS, FIN, SYN, &#8230;). For our purposes, it has an option (-z) that allows to fool Nmap queries, and, although we can&#8217;t behave as other OS, we can completely fool Nmap when guessing remotely our OS.</p>
<p>Now it&#8217;s time to run IPlog to check the results:</p>
<p>voodoo:~#iplog -o -L -z -i eth0</p>
<p>The options are the following: -o (don&#8217;t fork and stay in foreground), -L (results to stdout), -z (fool Nmap), -i eth0 (listen to eth0).If I run a Nmap against the box, iplog starts to write a lot of information to stdout, about all connections made, and even which type of scanning is being performed; I&#8217;ve included only the relevant information about Nmap OS Fingerprinting in the iplog&#8217;s output:</p>
<p>Feb 20 13:20:54 TCP: SYN scan detected [ports 10082,1430,770,815,440,86,848,797,560,5998,...] from 192.168.0.50 [port 49047]</p>
<p>Feb 20 13:20:56 TCP: Bogus TCP flags set by 192.168.0.50:49054 (dest port 22)</p>
<p>Feb 20 13:20:56 UDP: dgram to port 1 from 192.168.0.50:49047 (300 data bytes)</p>
<p>Feb 20 13:20:56 ICMP: 192.168.0.50: port is unreachable to (udp: dest port 1, source port 49047)</p>
<p>Feb 20 13:20:58 UDP: dgram to port 1 from 192.168.0.50:49047 (300 data bytes)</p>
<p>Feb 20 13:20:58 ICMP: 192.168.0.50: port is unreachable to (udp: dest port 1, source port 49047)</p>
<p>Feb 20 13:21:01 UDP: dgram to port 1 from 192.168.0.50:49047 (300 data bytes)</p>
<p>Feb 20 13:21:01 ICMP: 192.168.0.50: port is unreachable to (udp: dest port 1, source port 49047)</p>
<p>Feb 20 13:21:04 TCP: Xmas scan detected [ports 1,9,49055,49056,49054] from 192.168.0.50 [ports 49060,49056,49054,9]</p>
<p>Feb 20 13:21:05 UDP: dgram to port 1 from 192.168.0.50:49047 (300 data bytes)</p>
<p>Feb 20 13:21:05 ICMP: 192.168.0.50: port is unreachable to (udp: dest port 1, source port 49047)</p>
<p>Feb 20 13:21:12 TCP: null scan detected [ports 9,49056,49060,49054] from 192.168.0.50 [ports 49055,9,1,49056,49054,...]</p>
<p>Feb 20 13:21:13 TCP: FIN scan detected [ports 49060,49054,9,1] from 192.168.0.50 [ports 1,9,49055,49056,49054,...]</p>
<p>Feb 20 13:21:56 TCP: SYN scan mode expired for 192.168.0.50 &#8211; received a total of 1647 packets (33440 bytes).</p>
<p>Feb 20 13:21:56 TCP: Xmas scan mode expired for 192.168.0.50 &#8211; received a total of 33812 packets (676300 bytes).</p>
<p>Feb 20 13:22:03 TCP: null scan mode expired for 192.168.0.50 &#8211; received a total of 16462 packets (329300 bytes).</p>
<p>Feb 20 13:22:04 TCP: FIN scan mode expired for 192.168.0.50 &#8211; received a total of 16343 packets (326860 bytes)</p>
<p>Iplog does recognize the bogus TCP flags, null packet, &#8230; every Nmap OS Fingerprint attempt. That&#8217;s why it can act accordingly and send a fake answer to fool Nmap. Nmap output is the following:</p>
<p># nmap (V. 3.10ALPHA4) scan initiated Thu Feb 20 13:20:54 2003 as: nmap -vv -sS -O -oN nmap3.log 192.168.0.19</p>
<p>Insufficient responses for TCP sequencing (1), OS detection may be less accurate</p>
<p>Insufficient responses for TCP sequencing (1), OS detection may be less accurate</p>
<p>Insufficient responses for TCP sequencing (1), OS detection may be less accurate</p>
<p>Interesting ports on voodoo (127.0.0.1):</p>
<p>(The 1599 ports scanned but not shown below are in state: closed)</p>
<p>Port State Service</p>
<p>22/tcp open ssh</p>
<p>25/tcp open smtp</p>
<p>80/tcp open http</p>
<p>143/tcp open imap2</p>
<p>No exact OS matches for host (If you know what OS is running on it, see http://www.insecure.org/cgi-bin/nmap-submit.cgi).</p>
<p>TCP/IP fingerprint:</p>
<p>SInfo(V=3.10ALPHA4%P=i586-pc-linux-gnu%D=2/20%Time=3E54C833%O=9%C=1)</p>
<p>T1(Resp=Y%DF=Y%W=7FFF%ACK=S++%Flags=AS%Ops=MNNTNW)</p>
<p>T2(Resp=Y%DF=N%W=0%ACK=O%Flags=BA%Ops=)</p>
<p>T2(Resp=Y%DF=Y%W=100%ACK=O%Flags=BARF%Ops=)</p>
<p>T2(Resp=Y%DF=Y%W=100%ACK=O%Flags=BPF%Ops=)</p>
<p>T3(Resp=Y%DF=N%W=0%ACK=O%Flags=BA%Ops=)</p>
<p>T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)</p>
<p>T5(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)</p>
<p>T6(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)</p>
<p>T7(Resp=Y%DF=N%W=0%ACK=O%Flags=BA%Ops=)</p>
<p>T7(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)</p>
<p>PU(Resp=Y%DF=N%TOS=C0%IPLEN=164%RIPTL=148%RID=E%RIPCK=E%UCK=E%ULEN=134%DAT=E)</p>
<p># Nmap run completed at Thu Feb 20 13:21:07 2003 &#8212; 1 IP address (1 host up) scanned in 13.633 seconds</p>
<p>As you can see, iplog answers to all the packets with specific options; we can have a look to iplog source code:</p>
<p>file iplog_tcp.c, line 99:</p>
<p>if (opt_enabled(FOOL_NMAP) &amp;&amp;</p>
<p>((tcp_flags &amp; TH_BOG) || (tcp_flags == TH_PUSH) || (tcp_flags == 0) ||</p>
<p>((tcp_flags &amp; (TH_SYN | TH_FIN | TH_RST)) &amp;&amp; (tcp_flags &amp; TH_URG)) ||</p>
<p>((tcp_flags &amp; TH_SYN) &amp;&amp; (tcp_flags &amp; (TH_FIN | TH_RST)))))</p>
<p>That &#8216;if&#8217; statement means that if we have executed iplog with the &#8216;-z&#8217; switch (fool Nmap), and the TCP header options are:</p>
<ul>
<li>bogus (use of the reserved bits), or</li>
<li>only PUSH , or</li>
<li>NULL (no options), or</li>
<li>SYN+URG, FIN+URG, RST+URG, or</li>
<li>SYN+FIN, SYN+RST</li>
</ul>
<p>then it will create a new packet for answering with the options we want (some options depend on the machine time, for example DF, that&#8217;s why sometimes is 1 and other 0, or the window size which is defined as current_time &amp; 1).</p>
<p>Of course we could change the file iplog_tcp.c so that iplog always behave as a Sega Dreamcast for those nasty packets, but we do not have the flexilibity to have multiple personalities or specify that we want to behave as a Dreamcast only for a specific traffic or ip address. It&#8217;s a good idea to answer in this way to abnormal packets, but it&#8217;s better to have the control and be more granular.</p>
<p><a name="BSD"><br />
<hr size="2" />5. *BSD solutions</a></p>
<p><a name="BLACKHOLE">5.1. Blackhole</a></p>
<p>Blackhole is a special option present in the *BSD kernel to control system behavior when someone is connecting to closed TCP or UDP ports. There are two options that we can change:</p>
<p>sysctl -w net.inet.tcp.blackhole=[0 | 1 | 2]</p>
<p>sysctl -w net.inet.udp.blackhole=[0 | 1]</p>
<p>The TCP blackhole behaves as following: if the value is 0, whenever a packet connects a TCP closed port, it returns a RST. If the value is 1, if a SYN packet connects a TCP closed port, it&#8217;s dropped; and if the value is 2, if any packet tries to connect to a TCP closed port, it&#8217;s dropped.</p>
<p>The UDP blackhole is similar; if the value is 0, any connection to an UDP closed port, returns an ICMP port unreachable; if the value is 1, it does not return the ICMP port unreachable.</p>
<p>If we enable these settings in paranoid mode, tests 5, 6, 7 and the unreachable port test won&#8217;t work when running Nmap to remotely guess the OS, so we&#8217;ll not be able to know the OS.</p>
<p><a name="FF2"><br />
<hr size="2" />5.2. Fingerprint Fucker</a></p>
<p>There is also another <a href="http://packetstormsecurity.org/UNIX/misc/bsdfpf.tar.gz" target="_top">Fingerprint fucker</a> for the FreeBSD systems, written by Darren Reed, that simply rewrites the TCP/IP stack and sends packets with other settings (different window size, ttl, &#8230;) trying to hide its real OS.</p>
<p><a name="OPENBSD"><br />
<hr size="2" />5.3. OpenBSD packet filter</a></p>
<p>The OpenBSD packet filter can also be configured to try to defeat remote OS Fingerprint. There are some options in the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&amp;sektion=5&amp;arch=i386&amp;apr" target="_top">pf.conf configuration file</a><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&amp;sektion=5&amp;arch=i386&amp;apr" target="_top"> (Traffic Normalization)</a> where you can change some IP fields (DF bit, TTL, MSS, ID), as you can see in pf.conf&#8217;s man page:</p>
<p>no-df</p>
<p>Clears the don&#8217;t-fragment bit from a matching ip packet.</p>
<p>min-ttl _number_</p>
<p>Enforces a minimum ttl for matching ip packets.</p>
<p>max-mss _number_</p>
<p>Enforces a maximum mss for matching tcp packets.</p>
<p>random-id</p>
<p>Replaces the IP identification field with random values to compen-</p>
<p>sate for predictable values generated by many hosts. This option</p>
<p>only applies to outgoing packets that are not fragmented after the</p>
<p>optional fragment reassembly.</p>
<p><a name="FREEBSD"><br />
<hr size="2" />5.4. FreeBSD TCP_DROP_SYNFIN</a></p>
<p>FreeBSD kernel has got a <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/dialup-firewall/kernel.html" target="_top">special option</a>, TCP_DROP_SYNFIN, which actually drops all packets with the SYN and FIN flags activated (Nmap test #3 sends a SYN+FIN+PSH+URG TCP packet); this special option could be also a valid method for defeating Nmap when performing its tests (be sure to activate it at startup in /etc/rc.conf).</p>
<p><name="GENERAL"><br />
<hr size="2" />6. General solutions</a></p>
<p>We saw when talking about IP Personality, that we could set up a linux router protecting our internal network, and that router could fool Nmap and other OS Fingerprinting tools when trying to remotely guess our internal network hosts&#8217; OS. If we haven&#8217;t got a linux box, but we&#8217;ve got a Checkpoint FW-1, then we can do something similar because of the fw-1 INSPECT language. Using this language, it&#8217;s easy to create your own &#8216;packet inspector&#8217; for the packets that are going through your fw-1. There is a <a href="http://www.phoneboy.com/fom-serve/cache/82.html" target="_top">reference</a> in the FW-1 mailing list describing a fw-1 service to manage those bogus packets:</p>
<p><a name="PLAY"><br />
<hr size="2" />7. More things to play with</a></p>
<p>Next solution won&#8217;t allow us to hide or change our OS, but we&#8217;ll be able to create as many virtual devices as we want with every valid Operating System you can imagine. This idea is being applied to the honeypots field, just because you can create a entire C class virtual network with lots of different OS flying around; the black-hat can be easily attracted by all those boxes running so many vulnerable services&#8230;It could be an attacker&#8217;s heaven.</p>
<p>Honeypots in general, and this approach in particular, can be highly recommended not only for learning the black-hat tools and tactics, but for also divert attackers to your honeynet and not your production boxes. It can also make attackers think that you have an entire farm of a specific OS (the virtual one) and hide your real OS.</p>
<p>The package I&#8217;m going to briefly describe is <a href="http://www.citi.umich.edu/u/provos/honeyd/" target="_top">honeyd</a>, from Niels Provos. One of its greatest feature is that we can give each virtual device a specific OS personality. That personality is also fed by a standard nmap fingerprinting file, allowing us to become the OS we want. I&#8217;m not going to deeply describe this great tool, I&#8217;m only going to run the sample config file to demonstrate what it can do.</p>
<p>After installing it, there is a file which name is config.localhost with a lot of virtual devices configured in. For instance, if we get the device 10.0.0.1 definition:</p>
<p>route entry 10.0.0.1</p>
<p>route 10.0.0.1 link 10.0.0.0/24</p>
<p>[snip]</p>
<p>create routerone</p>
<p>set routerone personality &#8220;Cisco 7206 running IOS 11.1(24)&#8221;</p>
<p>set routerone default tcp action reset</p>
<p>add routerone tcp port 23 &#8220;router-telnet.pl&#8221;</p>
<p>[snip]</p>
<p>bind 10.0.0.1 routerone</p>
<p>[snip]</p>
<p>The high level explanation is that we have a device which ip address is 10.0.0.1, which will act as a Cisco 7206 running IOS 11.1(24), will reset all TCP connections except for connections to TCP port 23, because then the script router-telnet.pl (an emulation of the telnet daemon) will be executed. Well, let&#8217;s run Nmap to check the OS running in the virtual device we&#8217;ve just created:</p>
<p># nmap (V. 3.10ALPHA4) scan initiated Thu Feb 20 16:17:44 2003 as: nmap -v -sS -oN nmap4.log -O 10.0.0.1</p>
<p>Warning: OS detection will be MUCH less reliable because we did not find at least 1 open and 1 closed TCP port</p>
<p>Interesting ports on 10.0.0.1:</p>
<p>(The 1604 ports scanned but not shown below are in state: filtered)</p>
<p>Port State Service</p>
<p>23/tcp open telnet</p>
<p>Remote OS guesses: Cisco 7206 running IOS 11.1(24), Cisco 7206 (IOS 11.1(17)</p>
<p>TCP Sequence Prediction: positive increments</p>
<p>Difficulty=26314 (Worthy challenge)</p>
<p>IPID Sequence Generation: Incremental</p>
<p># Nmap run completed at Thu Feb 20 16:20:42 2003 &#8212; 1 IP address (1 host up) scanned in 178.847 seconds</p>
<p>Again, when receiving Nmap bogus packets, honeyd answers with the device&#8217;s personality we&#8217;ve chosen.</p>
<p><a name="CONCLUSION"><br />
<hr size="2" />8. Conclusion</a></p>
<p>As stated in the <a href="http://ippersonality.sourceforge.net/doc/ippersonality-en-2.html" target="_top">IP Personality Limitations</a>, changing your TCP/IP stack behavior when receiving Nmap bogus packets can create some troubles:</p>
<ul>
<li>some characteristics of OS are related to the host architecture (for instance page sizes on various CPU) which could lead to performance issues;</li>
<li>some of these changes are more &#8220;political&#8221; choices of the IP stack (initial sequence numbers, window sizes, TCP options available&#8230;). Tweaking those allow to fool a scanner but might break regular connectivity by changing network parameters. It could also make the system weaker if the emulated IP stack is not as strong as the initial one</li>
</ul>
<p>In my opinion, it&#8217;s pretty clear that we can&#8217;t rely on only one security tool to remotely guess the Operating System. This paper has shown that it&#8217;s very easy to fool Nmap (and other similar tools) when trying to profile a remote device, and that all those attempts can be properly logged by the remote administrator. To successfully remotely fingerprint an OS, all possible methods have to be gathered, starting with the simpler ones (banner grabbing, seeking for job posts, social engineering, &#8230;) to the more complex ones (network fingerprinting). Every open service in a remote device has to be properly analyzed (banner, responses, behavior against attacks, DoS, known errors) and documented. It could be even possible (although not ethical) to run some tools that are known to crash specific OS versions (nuke, land, teardrop, &#8230;) to clarify our guess.</p>
<p>Although all these solutions can be modified to detect and fool any other TCP/IP fingerprint tool (just knowing which packets are sent), it is highly recommended to use various tools when doing a remote OS Fingerprint. Nmap is perhaps the most widely used, but there is another tool that also works great: <a href="http://www.sys-security.com/html/projects/X.html" target="_top">Xprobe</a>. Xprobe also has got a signatures database (not updated very often), and the final guess it&#8217;s a probabilistic guess (fuzzy matching) depending on various answers. One of xprobe&#8217;s biggest problem is that it&#8217;s rarely updated and it includes very few signatures. Nmap detects the remote OS if its tests&#8217; result is exactly equal to that OS signature in the database, but you can run Nmap with the switch ( &#8211;osscan_guess or &#8211;fuzzy, and then it performs a more aggressive OS guess trying to find the best match available in its signatures database. There is a <a href="http://www.sys-security.com/archive/papers/Xprobe2.pdf" target="_top">paper</a> about Xprobe specification and usage where explains why its idea and implementation seems to be so good and so valid. I think it should be executed as a partner with Nmap, in case you can send both TCP and ICMP packets against the target host. Xprobe could be an effective tool in poorly secured networks, just because it sends ICMP timestamps and ICMP netmask requests, which can become suspicious for a network administrator. It does not sent bogus packets (uncommon TCP packets, since the reserved bits are rarely used) to detect the remote OS, it simply sends &#8216;normal&#8217; traffic (ICMP) to the target host, making harder (if not impossible) to detect such packets (and therefore, act accordingly). This approach was first used in <a href="http://sing.sourceforge.net/" target="_top">sing</a> (Send Internet Nasty Garbage), which can be executed with the -O switch for doing OS Fingerprint (with the ICMP type you choose). It should be difficult to any IDS or network implementation to detect that those ICMP packets have other function, just because there are a huge number of those ICMP packets daily in our networks. On the other hand, ICMP now is getting blocked by default from almost every network environment, making impossible to do an ICMP OS remote fingerprint, but usually you can find some TCP services in those network environments and shoot your Nmap packets.</p>
<p>Just for being accurate, there is also another OS Fingerprint tool, named <a href="http://www.stearns.org/p0f/" target="_top">p0f</a>; p0f listens to your network looking for the first SYN in a TCP connection and grabs that packet options. If it matches with its signature database, then we can guess the OS; again, changing any of the options that p0f is looking for, will completely fool it. If, for instance, using IP Personality, we change every packet&#8217;s window size, we can fake our responses and fool p0f.</p>
<p>Administrators should also carefully configure all their devices for not showing anything that can be used for identified them (banners, issue, common services open by default, &#8230;) and run one of these tools that can log the OS Fingerprint attempts, because it&#8217;s very likely that, those ip addresses wanting to know your OS, will be attacking your network in a short period of time. Besides, setting up a linux router using IP Personality and fooling everyone outside your network that you&#8217;re using a different OS (with any of the options shown in this paper), could be a good security measure.</p>
<p><a name="AEN200"><br />
<hr size="2" />References</a></p>
<p>Matthew Smart, Robert Malan, and Farnan Jahanian, Defeating TCP/IP Stack Fingerprinting, Usenix Security Symposium 2000, URL:<a href="http://www.usenix.org/publications/library/proceedings/sec2000/smart.html" target="_top">http://www.usenix.org/publications/library/proceedings/sec2000/smart.html</a> .</p>
<p>Fyodor, Remote OS Detection via TCP/IP Stack Fingerprinting, June 11, 2002, URL: <a href="http://www.insecure.org/nmap/nmap-fingerprinting-article.html" target="_top">http://www.insecure.org/nmap/nmap-fingerprinting-article.html</a> .</p>
<p>Gael Roualland and Jean-Marc Saffroy, IP Personality, URL: <a href="http://ippersonality.sourceforge.net/" target="_top">http://ippersonality.sourceforge.net/</a> .</p>
<p>Sean Trifero and Derek Callaway, Stealth, URL: <a href="http://www.innu.org/~sean/" target="_top">http://www.innu.org/%7Esean/</a> .</p>
<p>Ryan McCabe, IPlog, URL: <a href="http://ojnk.sourceforge.net/stuff/iplog.readme" target="_top">http://ojnk.sourceforge.net/stuff/iplog.readme</a> .</p>
<p>Fusys and |CyRaX|, Fingerprint Fucker, URL: <a href="http://www.s0ftpj.org/tools/fingfuck.tgz" target="_top">http://www.s0ftpj.org/tools/fingfuck.tgz</a> .</p>
<p>FreeBSD, Blackhole, URL: <a href="http://www.gsp.com/cgi-bin/man.cgi?section=4&amp;topic=blackhole" target="_top">http://www.gsp.com/cgi-bin/man.cgi?section=4&amp;topic=blackhole</a> .</p>
<p>Darren Reed, Fingerprint Fucker, URL: <a href="http://packetstormsecurity.org/UNIX/misc/bsdfpf.tar.gz" target="_top">http://packetstormsecurity.org/UNIX/misc/bsdfpf.tar.gz</a> .</p>
<p>OpenBSD, pf.conf manual, URL: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&amp;sektion=5&amp;arch=i386&amp;apr" target="_top">http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf&amp;sektion=5&amp;arch=i386&amp;apr</a> .</p>
<p>FreeBSD, Kernel Options, URL: <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/articles/dialup-firewall/kernel.html" target="_top">http://www.freebsd.org/doc/en_US.ISO8859-1/articles/dialup-firewall/kernel.html</a> .</p>
<p>Alfredo Andr�s Omella, Trying to stop the security tool queSO, URL: <a href="http://www.phoneboy.com/fom-serve/cache/82.html" target="_top">http://www.phoneboy.com/fom-serve/cache/82.html</a> , October, 6th, 1998.</p>
<p>Niels Provos, Honeyd &#8211; Network Rhapsody for You&#8221;, URL: <a href="http://www.citi.umich.edu/u/provos/honeyd/" target="_top">http://www.citi.umich.edu/u/provos/honeyd/</a> .</p>
<p>Gael Roualland and Jean-Marc Saffroy, IP Personality Limitations, URL: <a href="http://ippersonality.sourceforge.net/doc/ippersonality-en-2.html" target="_top">http://ippersonality.sourceforge.net/doc/ippersonality-en-2.html</a> .</p>
<p>Fyodor Yarochkin and Ofir Arkin, Xprobe, URL: <a href="http://www.sys-security.com/html/projects/X.html" target="_top">http://www.sys-security.com/html/projects/X.html</a> .</p>
<p>Fyodor Yarochkin and Ofir Arkin, Xprobe2 &#8211; A&#8217;Fuzzy&#8217; Approach to Remote Active Operating System Fingerprinting, URL: <a href="http://www.sys-security.com/archive/papers/Xprobe2.pdf" target="_top">http://www.sys-security.com/archive/papers/Xprobe2.pdf</a>.</p>
<p>Alfredo Andr�s Omella, Sing, URL: <a href="http:/sing.sourceforge.net/" target="_top">http://sing.sourceforge.net</a> , October, 6th, 1998.</p>
<p>Michael Zalewski and William Stearns, p0f, URL: <a href="http://www.stearns.org/p0f/" target="_top">http://www.stearns.org/p0f/</a> .</p>
<p><a name="GFDL"><br />
<hr size="2" />A. GNU Free Documentation License</a></p>
<p>Version 1.2, November 2002</p>
<p>Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.</p>
<p><a name="GFDL-0"><br />
<hr size="2" />A.1. PREAMBLE</a></p>
<p>The purpose of this License is to make a manual, textbook, or other functional and useful document &#8220;free&#8221; in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.</p>
<p>This License is a kind of &#8220;copyleft&#8221;, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.</p>
<p>We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.</p>
<p><a name="GFDL-1"><br />
<hr size="2" />A.2. APPLICABILITY AND DEFINITIONS</a></p>
<p>This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The &#8220;Document&#8221;, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as &#8220;you&#8221;. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.</p>
<p>A &#8220;Modified Version&#8221; of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.</p>
<p>A &#8220;Secondary Section&#8221; is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document&#8217;s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.</p>
<p>The &#8220;Invariant Sections&#8221; are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.</p>
<p>The &#8220;Cover Texts&#8221; are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.</p>
<p>A &#8220;Transparent&#8221; copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not &#8220;Transparent&#8221; is called &#8220;Opaque&#8221;.</p>
<p>Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.</p>
<p>The &#8220;Title Page&#8221; means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, &#8220;Title Page&#8221; means the text near the most prominent appearance of the work&#8217;s title, preceding the beginning of the body of the text.</p>
<p>A section &#8220;Entitled XYZ&#8221; means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as &#8220;Acknowledgements&#8221;, &#8220;Dedications&#8221;, &#8220;Endorsements&#8221;, or &#8220;History&#8221;.) To &#8220;Preserve the Title&#8221; of such a section when you modify the Document means that it remains a section &#8220;Entitled XYZ&#8221; according to this definition.</p>
<p>The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.</p>
<p><a name="GFDL-2"><br />
<hr size="2" />A.3. VERBATIM COPYING</a></p>
<p>You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.</p>
<p>You may also lend copies, under the same conditions stated above, and you may publicly display copies.</p>
<p><a name="GFDL-3"><br />
<hr size="2" />A.4. COPYING IN QUANTITY</a></p>
<p>If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document&#8217;s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.</p>
<p>If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.</p>
<p>If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.</p>
<p>It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.</p>
<p><a name="GFDL-4"><br />
<hr size="2" />A.5. MODIFICATIONS</a></p>
<p>You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:</p>
<ol>
<li>Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.</li>
<li>List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.</li>
<li>State on the Title page the name of the publisher of the Modified Version, as the publisher.</li>
<li>Preserve all the copyright notices of the Document.</li>
<li>Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.</li>
<li>Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the<a href="http://www.zog.net/Docs/nmap.html#GFDL-ADDENDUM">Addendum</a> below.</li>
<li>Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document&#8217;s license notice.</li>
<li>Include an unaltered copy of this License.</li>
<li>Preserve the section Entitled &#8220;History&#8221;, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled &#8220;History&#8221; in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.</li>
<li>Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the &#8220;History&#8221; section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.</li>
<li>For any section Entitled &#8220;Acknowledgements&#8221; or &#8220;Dedications&#8221;, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.</li>
<li>Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.</li>
</ol>
<p>M. Delete any section Entitled &#8220;Endorsements&#8221;. Such a section may not be included in the Modified Version.</p>
<ol>
<li>Do not retitle any existing section to be Entitled &#8220;Endorsements&#8221; or to conflict in title with any Invariant Section.</li>
<li>Preserve any Warranty Disclaimers.</li>
</ol>
<p>If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version&#8217;s license notice. These titles must be distinct from any other section titles.</p>
<p>You may add a section Entitled &#8220;Endorsements&#8221;, provided it contains nothing but endorsements of your Modified Version by various parties&#8211;for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.</p>
<p>You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.</p>
<p>The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.</p>
<p><a name="GFDL-5"><br />
<hr size="2" />A.6. COMBINING DOCUMENTS</a></p>
<p>You may combine the Document with other documents released under this License, under the terms defined in <a href="http://www.zog.net/Docs/nmap.html#GFDL-4">section 4</a> above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.</p>
<p>The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.</p>
<p>In the combination, you must combine any sections Entitled &#8220;History&#8221; in the various original documents, forming one section Entitled &#8220;History&#8221;; likewise combine any sections Entitled &#8220;Acknowledgements&#8221;, and any sections Entitled &#8220;Dedications&#8221;. You must delete all sections Entitled &#8220;Endorsements&#8221;.</p>
<p><a  name="FDL-6"><br />
<hr size="2" />A.7. COLLECTIONS OF DOCUMENTS</a></p>
<p>You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.</p>
<p>You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.</p>
<p><a name="GFDL-7"><br />
<hr size="2" />A.8. AGGREGATION WITH INDEPENDENT WORKS</a></p>
<p>A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an &#8220;aggregate&#8221; if the copyright resulting from the compilation is not used to limit the legal rights of the compilation&#8217;s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.</p>
<p>If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document&#8217;s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.</p>
<p><a name="GFDL-8"><br />
<hr size="2" />A.9. TRANSLATION</a></p>
<p>Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.</p>
<p>If a section in the Document is Entitled &#8220;Acknowledgements&#8221;, &#8220;Dedications&#8221;, or &#8220;History&#8221;, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.</p>
<p><a name="GFDL-9"><br />
<hr size="2" />A.10. TERMINATION</a></p>
<p>You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.</p>
<p><a name="GFDL-10"><br />
<hr size="2" />A.11. FUTURE REVISIONS OF THIS LICENSE</a></p>
<p>The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.</p>
<p>Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License &#8220;or any later version&#8221; applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.</p>
<p><a name="FDL-ADDENDUM"><br />
<hr size="2" />A.12. ADDENDUM: How to use this License for your documents</a></p>
<p>To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:</p>
<p>Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled &#8220;GNU Free Documentation License&#8221;.</p>
<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the &#8220;with&#8230;Texts.&#8221; line with this:</p>
<p>with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.</p>
<p>If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.</p>
<p>If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/Docs/nmap.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://i.imgur.com/km5UL.jpg' length='2854' type='image/jpeg' />	</item>
		<item>
		<title>HELP, I CAN&#8217;T REACH MY SERVER!</title>
		<link>http://www.zog.net/Docs/serverdown.html</link>
		<comments>http://www.zog.net/Docs/serverdown.html#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:46:22 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.zog.net/?p=1684</guid>
		<description><![CDATA[A Quick &#38; Dirty Guide to Connection Troubleshooting for Beginners This is not intended to be a technically intricate document to allow a systems administrator to understand why an application or server is not working correctly. Rather, it is meant as a step-by-step guide for a relative technical novice to narrow down possible causes for an unreachable server, before <a href='http://www.zog.net/Docs/serverdown.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size: medium;">A Quick &amp; Dirty Guide to Connection Troubleshooting for Beginners</span></strong></p>
<p><span id="more-1684"></span></p>
<p>This is not intended to be a technically intricate document to allow a systems administrator to understand why an application or server is not working correctly.  Rather, it is meant as a step-by-step guide for a relative technical novice to narrow down possible causes for an unreachable server, before having to call a helpdesk.</p>
<p>Some of this stuff is pretty basic, so just skip around until you find something you can use.  A lot of it is highly out of date, as I wrote it in 2001.</p>
<p>N.b. all output is from entering these commands on a laptop running FreeBSD (Unix);  syntax may vary depending on your operating system.</p>
<p><strong>I.	Protocols &amp; Ports</strong></p>
<p>Out of academic interest, it might be useful for you to take a look at the OSI (Open Systems Interconnect) model.  This is a theoretical, schematic model for looking at network connections- rather than being a written-in-stone classification for different levels of network traffic, it&#8217;s meant to allow you to think about parts of network connections a bit more abstractly, and to help you figure out what does what.</p>
<p>Here the main concepts you should consider:</p>
<p>A.	Internet Protocol (IP)</p>
<p>Most of the Internet, and most local area networks (LANs) function based on the IP protocol, also referred to as IP version 4 (IPv4.)  IP addresses are unique on the internet, and usually look like this:</p>
<p><em> 205.171.14.93</em></p>
<p>Each of these four &#8216;octals&#8217; is an 8-bit number, and cannot be higher than 255.  IP addresses are parts of &#8216;subnets&#8217;, or &#8216;ranges&#8217;, which are assigned by organizations such as IANA and RIPE.  In order to be properly visible, all IP addresses you want a single machine to reach on the internet must be unique.  Likewise, it is a bad idea to simply grab an IP on your local network and assume it will work&#8211;you may run into an &#8216;IP conflict&#8217; which will make your network administrator, and possibly another user, very unhappy.</p>
<p>B.	Transmission Control Protocol (TCP)</p>
<p>TCP is the backbone of internet traffic.  Simply put, it is a means to transport &#8217;packets&#8217; between applications in a way that assures delivery.  Every TCP packet<br />
has a unique identifier (&#8220;sequence number&#8221;) which is incremented with each packet in a given connection.  TCP connections look as follows:</p>
<p><em> Client &#8211;&gt; Server	&#8220;SYN&#8221; (Synchronize)<br />
Client &lt;&#8211; Server	&#8220;SYN/ACK&#8221; (Synchronize Acknowledged)<br />
Client &lt;&#8211; Server	&#8220;ACK&#8221; (Acknowledge)<br />
Client &lt;-&gt; Server	&#8220;ACK&#8221; (at this point the connection is &#8220;established&#8221;<br />
Client &#8211;&gt; Server	&#8220;FIN&#8221; (Finish)<br />
Client &lt;&#8211; Server	&#8220;FIN/ACK&#8221; (Finish Acknowledged)<br />
Client &lt;&#8211; Server	&#8220;RST&#8221; (Reset&#8211;the connection is now dead.)</em></p>
<p>Depending on the type of connection, not all of these are necessary&#8211;for example, the server may just &#8220;RST&#8221; the connection without prompting, effectively cutting it off.</p>
<p>C.	Unreliable Datagram Protocol (UDP)</p>
<p>UDP is a lot faster than TCP, as it does not do any error checking.  Concordantly, it is used for applications where you don&#8217;t care so much if the occasional chunk does not arrive.  Internet video streaming is a typical application of UDP.</p>
<p>D.	Internet Control Message Protocol (ICMP)</p>
<p>ICMP is a way for traffic on the internet to decide where to go, whether hosts are reachable, etc.  It advises hosts that a next hop may not be available for traffic.</p>
<p>E.	Stacks</p>
<p>An IP stack is an area of virtual memory allotted in a machine to dealing with network connections.  All incoming and outgoing network connections are dealt with in this stack.</p>
<p>F.	Ports</p>
<p>A &#8220;port&#8221; is a virtual address configured on a server to listen to connections.  It is analogous to a mailbox in a highrise apartment building.  Each application has a unique port, although many individual connections of the same type can be handled by a single port.  Ports 1-512 by convention are &#8220;privileged&#8221;, meaning they are supposed to only be handled by applications approved by a server administrator.</p>
<p>Ports 512-1024 are &#8220;privileged&#8221;, which implies that they are not to be used by applications run by a mere mortal user.  However, whether this convention is adhered to or not is up to a server&#8217;s administrator.</p>
<p>For a list of commonplace ports, look at</p>
<p><a href="http://www.iana.org/assignments/port-numbers" target="_blank"> http://www.iana.org/assignments/port-numbers</a></p>
<p><strong>II.	What&#8217;s happening?</strong></p>
<p>You may be seeing that a server &#8220;just isn&#8217;t reachable&#8221;.  This be due to a number of reasons&#8211;there&#8217;s no way to predict all of them, but this might give you a few hints as to what the cause could be.</p>
<p>Let&#8217;s do some preliminary testing.</p>
<p>A.	Machine Settings (Very Basic)</p>
<p>First, check to see that you are on the net.  Can you reach anything?  Do any of your networked applications work?  Are Windows network drives accessible? Can you access any web pages at all?  If not, check the following:</p>
<ul>
<li>Is the cable plugged in?  If you have a link light on your network card, is it lit?</li>
<li>Do you have a default route?  Is your interface configured?</li>
</ul>
<p>Under Windows, run the command</p>
<p><em> ipconfig</em></p>
<p>in a DOS Window.  If you see an entry for &#8216;Default Gateway&#8217;, you&#8217;re set.</p>
<p>Under Unix, run</p>
<p><em> ifconfig -a</em></p>
<p>and</p>
<p><em> netstat -rn|grep default</em></p>
<p>Ifconfig (InterFace Config) allows you to see the configuration of all your active network interfaces.  Netstat is a general network utility command;  If netstat -an shows you a default gateway, you should be okay.</p>
<ul>
<li>Are your general settings correct?  Compare your station with others on your local network.  If you have a network administrator handy, check your settings against what he gave you.  Can you ping them?  Can they ping you?  Can you ping your default gateway?  See below for details on Ping.</li>
</ul>
<p>B.	ICMP/Ping</p>
<p>First, let&#8217;s find out whether a host responds to basic pings.  &#8220;Ping&#8221; (Packet InterNet Groper) is a common implementation of the ICMP protocol, and used to probe hosts.  On Unix servers, it is usually found in <em>/usr/sbin</em> or <em>/usr/bin</em>, and on Windows machines it sits in <em>c:\windows\system32\</em> or <em>c:\winnt\system32</em>.</p>
<p>The Syntax of this command is</p>
<p><em> ping &lt;hostname&gt; </em>(or IP address)</p>
<p>Successful pings generally mean that a server&#8217;s address is reachable, and look like this:</p>
<p><em> bolo:[15:23]~&gt; ping www.berkeley.edu<br />
PING arachne.berkeley.edu (169.229.131.109): 56 data bytes<br />
64 bytes from 169.229.131.109: icmp_seq=0 ttl=237 time=180.286 ms<br />
64 bytes from 169.229.131.109: icmp_seq=1 ttl=237 time=173.291 ms<br />
^C<br />
&#8212; arachne.berkeley.edu ping statistics &#8212;<br />
3 packets transmitted, 2 packets received, 33% packet loss<br />
round-trip min/avg/max/stddev = 173.291/176.788/180.286/3.497 ms</em></p>
<p>Under Solaris, &#8216;<em>ping -s</em> &#8216; will return this same result.  &#8216;<em>Ping</em>&#8216; by itself just will return &#8216; is alive.&#8217;</p>
<p>If your client station does not know how to get to a net (it does not have a &#8216;route&#8217;), or does not have a default gateway, you will see something like</p>
<p><em> bolo:[15:25]~&gt; ping www.cnn.comPING cnn.com (207.25.71.5): 56 data bytes<br />
ping: sendto: No route to host<br />
ping: sendto: No route to host<br />
ping: sendto: No route to host<br />
^C<br />
&#8212; cnn.com ping statistics &#8212;<br />
13 packets transmitted, 0 packets received, 100% packet loss</em></p>
<p>When you try to reach a remote address, you may pass many network devices (&#8220;routers&#8221;) on the way.  If you are trying to reach an address that they don&#8217;t know how to get to, you could see</p>
<p><em> bolo:[15:28]~&gt; ping 10.0.0.1<br />
PING 10.0.0.1 (10.0.0.1): 56 data bytes<br />
36 bytes from Serial10-1-0.GW3.ZUR4.ALTER.NET (146.188.39.89): Destination Host Unreachable<br />
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst<br />
4  5  00 5400 ae7e   0 0000  3c  01 0384 192.168.1.254  10.0.0.1 </em></p>
<p>Lastly, if your output looks as follows, it is possible that there is a firewall or similar security device in the way, which is not permitting ICMP traffic.  This does not mean that the host is down, just that it cannot be pinged.</p>
<p><em> bolo:[15:32]~&gt; ping 165.222.187.100<br />
PING 165.222.187.100 (165.222.187.100): 56 data bytes<br />
^C<br />
&#8212; 165.222.187.100 ping statistics &#8212;<br />
32 packets transmitted, 0 packets received, 100% packet loss</em></p>
<p>C.	Traceroute</p>
<p>Traceroute is a program which allows you to find out which hops your traffic passes on the way to a target server.  It is usually found in the same location as ping, both under Unix and Windows.  Traceroute&#8217;s main function is to allow you a look at whether the path a transmission takes from client to server looks sane.  A successful traceroute means that the host is up and running, and that there is a proper route to it.  Traceroute output looks like this:</p>
<p><em> soda:[6:38]~&gt; traceroute www.berkeley.edu<br />
traceroute to arachne.berkeley.edu (169.229.131.109), 64 hops max, 40 byte packets<br />
1  gig6-1v247.snr1.CS.Berkeley.EDU (128.32.247.1)  0.744 ms  0.655 ms  0.610 ms<br />
2  vlan241.inr-201-eva.Berkeley.EDU (128.32.255.161)  0.858 ms  0.761 ms  0.818 ms<br />
3  vlan209.inr-203-eva.Berkeley.EDU (128.32.255.2)  0.861 ms  0.986 ms  0.774 ms<br />
4  arachne.Berkeley.EDU (169.229.131.109)  0.781 ms  0.717 ms  0.732 ms</em></p>
<p>It can also look as follows.  This does not mean that the server is necessarily down or unreachable, but could imply that there is a firewall/security device in the middle:</p>
<p><em> soda:[6:39]~&gt; traceroute www.google.com<br />
traceroute to www.google.com (216.239.33.101), 64 hops max, 40 byte packets<br />
1  gig6-1v247.snr1.CS.Berkeley.EDU (128.32.247.1)  0.777 ms  0.663 ms  0.612 ms<br />
2  vlan241.inr-201-eva.Berkeley.EDU (128.32.255.161)  0.870 ms  0.736 ms  0.785 ms<br />
3  gigE2-0.inr-000-eva.Berkeley.EDU (128.32.0.193)  0.599 ms  0.537 ms  0.515 ms<br />
4  pos3-0.c2-berk-gsr.Berkeley.EDU (128.32.0.90)  0.692 ms  0.579 ms  0.559 ms<br />
5  SUNV&#8211;BERK.POS.calren2.net (198.32.249.14)  1.810 ms  1.852 ms  1.992 ms<br />
6  STAN&#8211;SUNV.POS.calren2.net (198.32.249.74)  2.230 ms  2.167 ms  2.236 ms<br />
7  PAIX-7206&#8211;STAN-3.ATM.calren2.net (198.32.249.186)  3.346 ms  2.836 ms  2.906 ms<br />
8  paix.exodus.net (198.32.176.15)  3.071 ms  3.164 ms  3.503 ms<br />
9  ibr02-g1-0.paix01.exodus.net (206.79.9.242)  3.875 ms  2.931 ms  2.848 ms<br />
10  bbr01-p6-0.sntc03.exodus.net (209.185.9.241)  3.404 ms  3.320 ms  3.366 ms<br />
11  dcr04-g4-0.sntc03.exodus.net (216.33.153.68)  5.334 ms  3.382 ms  9.461 ms<br />
12  csr01-ve242.sntc03.exodus.net (216.33.153.181)  4.482 ms  3.876 ms  4.251 ms<br />
13  google-exodus.exodus.net (64.68.64.210)  4.574 ms  3.610 ms  4.610 ms<br />
14  exbi1-gige-1-3.net.google.com (216.239.47.2)  5.256 ms  5.382 ms  5.315 ms<br />
15  * * *<br />
16  * * *<br />
17  * *^C</em></p>
<p>Lastly, you may see the next block of output&#8211;this implies that there is a firewall in the middle which allows traces to the final destination, but not to itself (thus nobody can identify it as a hop in the middle):</p>
<p>s<em>oda:[6:43]~&gt; traceroute altavista.digital.com<br />
traceroute to altavista.digital.com (209.73.180.1), 64 hops max, 40 byte packets<br />
1  gig6-1v247.snr1.CS.Berkeley.EDU (128.32.247.1)  0.837 ms  0.668 ms  0.685 ms<br />
2  vlan241.inr-201-eva.Berkeley.EDU (128.32.255.161)  1.465 ms  0.785 ms  0.754 ms<br />
3  fast4-1-0.inr-new-666-doecev.Berkeley.EDU (128.32.0.73)  1.779 ms  2.628 ms  2.364 ms<br />
4  qsv-juniper&#8211;ucb-gw.calren2.net (128.32.0.70)  3.717 ms  3.283 ms  3.259 ms<br />
5  svl-edge-09.inet.qwest.net (65.113.32.209)  3.247 ms  2.917 ms  3.361 ms<br />
6  svl-core-01.inet.qwest.net (205.171.14.93)  3.315 ms  3.632 ms  2.802 ms<br />
7  sjo-core-01.inet.qwest.net (205.171.5.99)  3.831 ms  2.907 ms  3.094 ms<br />
8  sfo-core-02.inet.qwest.net (205.171.5.123)  4.591 ms  4.839 ms  5.857 ms<br />
9  jfk-core-01.inet.qwest.net (205.171.5.113)  66.522 ms  67.079 ms  67.408 ms<br />
10  jfk-core-03.inet.qwest.net (205.171.230.6)  66.856 ms  66.065 ms  67.102 ms<br />
11  jfk-edge-04.inet.qwest.net (205.171.30.114)  66.596 ms  66.322 ms  66.156 ms<br />
12  63.148.0.22 (63.148.0.22)  74.506 ms  74.240 ms  73.975 ms<br />
13  * * *<br />
14  altavista.com (209.73.180.1)  74.845 ms  73.763 ms  74.196 ms</em></p>
<p>Traceroute and ping are two different applications.  Furthermore, traceroute on Windows and NT are not the same type of traffic.  Windows traceroute uses &#8220;ICMP ECHO REQUEST&#8221; to see whether routes to a host are alive.  Unix and Cisco traceroute is generally based on UDP.  Some firewalls allow one, but not the other;  if you suspect a firewall between your client and the target server, try traceroute from both types of platforms.</p>
<p>D.	Telnet</p>
<p>Telnet is a very basic login application designed to emulate a mainframe terminal.  However, telnet has the ability to connect to any TCP ports to show you whether a service is even listening or not.  On Inix, telnet is normally located in <em>/usr/bin/</em>, in Windows it should be in <em>C:\{Windows,Win98,WINNT}\System32</em>.</p>
<p>On Unix, you can telnet to a given port for an application using the syntax</p>
<p><em> telnet hostname portnumber</em></p>
<p>Based on the documentation in section I.F., to see if my webserver on www.switch.ch is listening on the default http port, I would try the following:</p>
<p><em> bolo:[17:07]~&gt; telnet www.switch.ch 80<br />
Trying 130.59.10.30&#8230;<br />
Connected to etna.switch.ch.<br />
Escape character is &#8216;^]&#8217;.</em></p>
<p>This means that I have a connection established to the server.  In effect, what I have just done is &#8220;faked&#8221; the same sort of connection that a web browser (Netscape, Opera, Internet Explorer) makes to a webserver.  Under Windows NT/9x telnet, the equivalent of this is when the server address is displayed in the telnet window&#8217;s title bar.  Don&#8217;t forget to change the port number from the default &#8216;telnet&#8217; (port 23) before connecting.   Windows 2000 telnet works like Unix telnet.</p>
<p>If my service uses TCP and I get this prompt, and I am still having connection difficulties, I can rule out that there is a firewall or routing problem;  the issue is most likely with the server&#8217;s configuration or my client application.</p>
<p>Another possible response to a telnet attempt, this time to the SMTP (Simple Mail Transport Protocol, the most-used Internet email standard) port on an address not configured to receive SMTP mail, may yield this:</p>
<p><em> bolo:[17:15]~&gt; telnet cfpa11.berkeley.edu 25<br />
Trying 128.32.124.189&#8230;<br />
telnet: connect to address 128.32.124.189: Connection refused<br />
telnet: Unable to connect to remote host</em></p>
<p>This means that the target has sent me a &#8220;RST&#8221;, or &#8220;RESET&#8221; TCP packet in response to my attempt to &#8220;SYN&#8221;.  It&#8217;s effectively telling me, no, I&#8217;m not paying attention to this port.  The server is not configured correctly, or the program on the server which is supposed to be listening on the port isn&#8217;t even running.</p>
<p>Telnet can also yield this:</p>
<p><em> bolo:[17:15]~&gt; telnet www.google.com 12345<br />
Trying 216.239.37.101&#8230;<br />
telnet: connect to address 216.239.37.101: Operation timed out<br />
telnet: Unable to connect to remote host</em></p>
<p>This usually indicates the presence of a firewall or other similar security filter in front of or on the server which explicitly disallows connections to port 12345.  Under Windows NT/9x telnet, you will see &#8216;Telnet (none)&#8217; in the title bar, and the cursor will be an hourglass.</p>
<p><strong>III.	What&#8217;s Happening on the Server?</strong></p>
<p>Now, let&#8217;s see if you can log into your server.  If you are able to telnet/ssh/rlogin to your Unix server, or have console/remote desktop access to a Windows NT server on which your network server</p>
<p>A. 	What&#8217;s listening to what?</p>
<p>On your unix server, you can have a look at some locally defined ports in the file <em>/etc/services</em>.  Furthermore, the file <em>/etc/inetd.conf</em> specifies which of these services your inetd, which is the program run by Unix at startup to listen to network connections, has an actual program (server) associated with it.  This means that when Inetd &#8220;sees&#8221; a connection arriving on a given port, it starts a service to deal with it.</p>
<p>However, this is not the only way to run servers.  Different types of Unix (Linux, Solaris, AIX, etc.) have various methods for starting servers via scripts at boot. The easiest way to look at this is (on the server!) to run the commands</p>
<p><em> netstat -an</em></p>
<p>or</p>
<p><em> lsof -i</em> (if installed)</p>
<p>To see which services are (supposedly) listening on which ports.  If you don&#8217;t understand these commands, see whether there is a manual page by running the command</p>
<p><em> man netstat</em> (or lsof)</p>
<p>This should explain the syntax to you in the usual clear, concise Unix manual page language.  In short, for netstat -an, you may see these keywords:</p>
<p><em> CLOSED, LISTEN, SYN_SENT, SYN_RECEIVED, ESTABLISHED, CLOSE_WAIT, FIN_WAIT_1,<br />
CLOSING, LAST_ACK, FIN_WAIT_2, TIME_WAIT</em></p>
<p>Consult the netstat man page for the meaning of these.  However, if you see your port listed with one of these comments, it means something&#8217;s happening with it.  Windows NT also has a netstat command, which should be located in your System32 directory.</p>
<p>Lsof (LiSt Open Files) with the -i argument should tell you which actual application is using which port.  Have a look at its output, and see if it looks reasonable.</p>
<p>Under Windows, there isn&#8217;t much I can tell you except to look at your Task Manager (taskmgr.exe), and your services (under &#8216;Administrative Tools&#8217;), and to not run servers on Windows <img src='http://www.zog.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>B.	Sniffing</p>
<p>Lastly, if you have administrator rights on your server, you can run a sniffer for traffic reaching the server.  Under Solaris, &#8216;snoop&#8217; is an example, while BSD-based systems may have &#8216;tcpdump&#8217; installed.  Windows systems generally require an additional piece of software to be installed.  RTFM is left to the user.  The point behind this is to see whether traffic from your client address actually reaches the server.  Generally, sniffers let you sort traffic by destination port or source IP address, allowing you to see whether traffic from the client even reaches your server system.</p>
<p>Please please be aware of the legal/administrative consequences of sniffing network traffic on a system&#8211;you may see things people don&#8217;t want you to see, such as passwords or confidential data.  This is why most sniffer software is restricted to use by people with administrator rights.</p>
<p><strong>IV.	Common Services</strong></p>
<p>A server can be down for a number of reasons.  Let&#8217;s take a few common applications and what could cause them to not respond.</p>
<p>A.	Hyper Text Transfer Protocol (HTTP), Web Pages</p>
<p>Some common errors found on webservers are listed at</p>
<p><a href="http://offline.home.cern.ch/offline/web/http_error_codes.html" target="_blank"> http://offline.home.cern.ch/offline/web/http_error_codes.html</a></p>
<p>CERN came up with the World Wide Web, so they should know.  By the way, the above is an example of a &#8220;Uniform Resource Locator&#8221;, or &#8220;URL&#8221;, which is nothing more than a means of specifying a protocol/application (in this case, HTTP, but can be FTP, Gopher, telnet, etc etc) an address, and a path (the stuff after the first single &#8220;/&#8221;).</p>
<p>These mean that, while the webserver you are trying to access is listening, there is some problem either with your client (browser) or the web server.</p>
<p>B.	Web Applications</p>
<p>If you are behind a firewall, or a proxy server, you may have troubles with certain applications (java applets for example) which your browser attempts to download. Specifically, this can be caused by an application attempting to access a server which your firewall does not allow, even though the application was actually installed via regular HTTP.</p>
<p>Certain multimedia applications, such as RealPlayer and other streaming media clients require various other ports to be opened&#8211;this means that your browser understands that a certain kind of file a webserver is giving it should be opened with a specific application, and the application then handles its own traffic.</p>
<p>C.	File Transfer Protocol (FTP)</p>
<p>FTP can either be via anonymous FTP (what you usually see when you have a URL in<br />
your browser window starting with &#8216;<em>ftp://</em>&#8216;) or interactively, either via command-line<br />
ftp from Unix or Windows, or a graphical client such as &#8216;CuteFTP&#8217; or &#8216;WS_FTP&#8217;.</p>
<p>There are two types of FTP, active and passive.</p>
<p>Active FTP opens a connection from your client to the server, which is used for passing &#8217;administrative&#8217; information&#8211;this includes your login and password.  However, the FTP server then opens a connection back to you for the actual file transfer, regardless of what direction the file actually flows in (whether you &#8216;PUT&#8217; or &#8216;GET&#8217; the file from the server.) Certain firewalls can have trouble with this.</p>
<p>Passive FTP is an answer to this;  it only opens the first connection from client to server, and all data also flows over this &#8216;channel&#8217;.  However, both the client and server must understand passive mode.</p>
<p><strong>V.	My Server is Slow!</strong></p>
<p>As so often happens, servers slow down.  There are a few things you can do, without server access.</p>
<p>A.	Ping the server</p>
<p>If the &#8216;Round-trip&#8217; times you see in your ping are above a few hundred milliseconds, there is possibly a problem with the network between your client and server.  This can be due to any number of factors;  Use traceroute to see where the bottleneck is.</p>
<p>B.	Check client load</p>
<p>Self-Explanatory.  However, everything else shouuld be slow as well.</p>
<p>C.	Check server load</p>
<p>On the server, if it&#8217;s an NT server you can run taskmgr to see what the server load is.</p>
<p>On Unix, there are a number of commands you can look at;  these include (insofar as they are installed)</p>
<p><em> top<br />
uptime<br />
vmstat<br />
ps<br />
dmesg</em></p>
<p>You can also look at syslog and messages (in /<em>var/log/</em> or <em>/var/adm/</em>) for some further information.</p>
<p>I can&#8217;t tell you what proper output of these will look like, but they will give you information on what could be wrong with a given application</p>
<p>D.	Check network load</p>
<p>Are you connected to a switch or a hub?  Ethernet, the underlying protocol for many IP connections, is essentially a &#8216;shared medium&#8217;.  This means, that if two machines on a local physical segment simultaneously try to transmit data, you have what is called a &#8216;collision&#8217;.  The more collisions you get, the slower things are.  A hub creates a larlge physical segment, leading to the possibility of collisions, while a switch is designed to separate so-called &#8217;collision domains&#8217;.</p>
<p>Make sure that your network card speed is correct.  Some network cards try to &#8216;autonegotiate&#8217; their speed with whatever switch/hub port they are connected to;  sometimes this breaks. Make sure with the network administrator that both your station and the network device are trying to communicate at the same speed.</p>
<p>While you&#8217;re at it, have them check network traffic load on that port, as well.  Most network devices allow &#8216;polling&#8217; of their load, via a protocol called SNMP (Simple Network Management Protocol).  It could simply be a case of putting too much data on a slow line, such as downloading enormous files over a modem link.</p>
<p>E.	Check the cable, network hardware</p>
<p>Ethernet/Cat5/UTP cabling can be sensitive to various factors, such as errors introduced by radiation from nearby fluorescent lighting, untwisting of the wires (UTP = &#8220;unshielded twisted pair&#8221;), etc.</p>
<p>Your network staff can also usually check logfiles on a router/switch/hub for errors, or run a debug command on the device.  Network hardware does occasionally break, as do network interface cards (NIC) on servers and clients.</p>
<p><strong>VI.	Compendium</strong></p>
<p>If you can&#8217;t figure out what&#8217;s wrong at this point, you&#8217;ll probably need help (helpdesk, USETNET newsgroup, etc.)  Remember that the more information you supply from system debug commands, the easier it&#8217;ll be to help you find out where your problem lies.</p>
<p><em>(c) 2001 John Morgan Salomon</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zog.net/Docs/serverdown.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url='http://i.imgur.com/km5UL.jpg' length='2854' type='image/jpeg' />	</item>
	</channel>
</rss>

