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

<channel>
	<title>danielmiessler.com &#187; Computers</title>
	<atom:link href="http://danielmiessler.com/categories/computers/feed" rel="self" type="application/rss+xml" />
	<link>http://danielmiessler.com</link>
	<description>grep understanding</description>
	<lastBuildDate>Sat, 11 Feb 2012 21:09:03 +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>Sick Computer Throne</title>
		<link>http://danielmiessler.com/blog/sick-computer-throne</link>
		<comments>http://danielmiessler.com/blog/sick-computer-throne#comments</comments>
		<pubDate>Sun, 10 Jun 2007 04:14:57 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Porn]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/1390</guid>
		<description><![CDATA[[ Image: Computer Throne ] Related ContentWas This Necessary?Vista: An Exercise In More Of The SameWhat&#8217;s a Cooler Name: Magnus or Thor?Sick Wooden Laptop CaseThe Computer Case of Doom]]></description>
			<content:encoded><![CDATA[<p>[ Image: <a href="http://farm1.static.flickr.com/162/378716985_50b2f6f62a_b.jpg">Computer Throne</a> ]</p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/was-this-necessary" rel="bookmark" class="crp_title">Was This Necessary?</a></li><li><a href="http://danielmiessler.com/blog/vista-an-exercise-in-more-of-the-same" rel="bookmark" class="crp_title">Vista: An Exercise In More Of The Same</a></li><li><a href="http://danielmiessler.com/blog/whats-a-cooler-name-magnus-or-thor" rel="bookmark" class="crp_title">What&#8217;s a Cooler Name: Magnus or Thor?</a></li><li><a href="http://danielmiessler.com/blog/sick-wooden-laptop-case" rel="bookmark" class="crp_title">Sick Wooden Laptop Case</a></li><li><a href="http://danielmiessler.com/blog/the-computer-case-of-doom" rel="bookmark" class="crp_title">The Computer Case of Doom</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/sick-computer-throne/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux: Filtering Spam And Viruses Without Amavis</title>
		<link>http://danielmiessler.com/blog/linux-filtering-spam-and-viruses-without-amavis</link>
		<comments>http://danielmiessler.com/blog/linux-filtering-spam-and-viruses-without-amavis#comments</comments>
		<pubDate>Wed, 12 Apr 2006 22:18:37 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/742</guid>
		<description><![CDATA[For anyone who dislikes complex mail configurations on their Linux mail server, I have a solution other than amavis* for filtering your email. As with most things *nix, there are many ways to go about this; my way uses Maildrop and my .mailfilter file in my home directory. The punchline is that incoming mail to [...]]]></description>
			<content:encoded><![CDATA[<p>For anyone who dislikes complex mail configurations on their Linux mail server, I have a solution other than <code>amavis*</code> for filtering your email.</p>

<p>As with most things *nix, there are many ways to go about this; my way uses <code>Maildrop</code> and my <code>.mailfilter</code> file in my home directory. The punchline is that incoming mail to my account gets:</p>

<ol>
    <li>Scanned by Google (Gmail)</li>
    <li>Scanned by Spamassassin</li>
    <li>Run through ClamAV</li>
    <li>Processed by my filtering rules</li>
</ol>

<p>&#8230;and the beauty of it is that, using Debian, this only takes like 5 minutes to setup. And yes, that includes the installation and configuration of <code>Postfix</code> and <code>Courier-Imap</code>. Essentially, all you need is a single <code>apt-get</code> command and some basic configuration of <code>Postfix</code> and <code>Courier-Imap</code>.</p>

<p><code>apt-get install postfix courier-imap maildrop spamassassin clamav</code></p>

<p>That&#8217;s it for the packages. From there just set up mail as you normally would. Also, don&#8217;t forget to add your clamav user:</p>

<p><code>groupadd clamav
useradd -g clamav -s /bin/false clamav</code></p>

<p>From there just fire up your editor and edit/create your <code>.mailfilter</code> to include the following content:
<code>---------------------------------------------------</code></p>

<p><code><font color="blue"># Run all mail through ClamAV</font>
if (<code>/usr/bin/clamscan --no-summary --stdout - | grep -c 'FOUND'</code> == 1)
{
VSCANNER=<code>/usr/bin/clamscan -V</code>
VIRUSID=<code>/usr/bin/clamscan --no-summary --stdout - | grep FOUND | cut -d" " -f2</code>
xfilter "reformail -A 'X-Virus-Checker: $VSCANNER'"
xfilter "reformail -A 'X-Virus-Infected: Yes'"
xfilter "reformail -A 'X-Virus-Identification: $VIRUSID'"
to "Maildir/.Infected";
}
else
{
xfilter "reformail -A 'X-Virus-Checker: $VSCANNER'"
xfilter "reformail -A 'X-Virus-Infected: No'"
}
<font color="blue"># Run all mail through Spamassassin</font>
xfilter "/usr/bin/spamc -u $user"</code></p>

<p>if ( /^X-Spam-Flag: YES/ )
{
to &#8220;Maildir/.Junk&#8221;
}</p>

<p><code>---------------------------------------------------</code></p>

<p>So the cool thing about this setup for me is that it doesn&#8217;t require you to hack up your <code>/etc/postfix/main.cf</code> file or anything. You keep <code>Postfix</code> processing pretty much as normal (with the exception of the <code>mailbox_command = /usr/bin/maildrop</code> addition).</p>

<p>Once you hand delivered mail off to <code>Maildrop</code>, your <code>.mailfilter</code> file handles the rest. Spam, Viruses, and standard filtering based on content. The bits I added above will add headers to virus infected emails saying the version of <code>clamscan</code> you&#8217;re running, what the message was infected with, etc. Cool stuff.</p>

<p>Now, I&#8217;m sure there are plenty of advantages to using <code>amavis</code> &#8212; large environments, more complex configurations, etc. But for me, with just a few users and the need to sanitize and process mail, using this method is most excellent. For me, simplicity is golden.</p>

<p>Anyway, that&#8217;s pretty much it. If you have any questions feel free to <a href="http://dmiessler.com/contact">drop me an email</a>.:</p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/ubuntu-aptitude-apt" rel="bookmark" class="crp_title">Ubuntu: aptitude > apt-*</a></li><li><a href="http://danielmiessler.com/blog/linux-xargs-vs-exec" rel="bookmark" class="crp_title">Linux: <code>xargs</code> vs. <code>exec {}</code></a></li><li><a href="http://danielmiessler.com/blog/learning-git" rel="bookmark" class="crp_title">Learning git</a></li><li><a href="http://danielmiessler.com/blog/getting-with-git" rel="bookmark" class="crp_title">Getting with Git</a></li><li><a href="http://danielmiessler.com/blog/new-pc-setup-steps" rel="bookmark" class="crp_title">New PC Setup Steps</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/linux-filtering-spam-and-viruses-without-amavis/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OpenSSH Donation Pledge Drive</title>
		<link>http://danielmiessler.com/blog/openssh-donation-pledge-drive</link>
		<comments>http://danielmiessler.com/blog/openssh-donation-pledge-drive#comments</comments>
		<pubDate>Wed, 12 Apr 2006 19:38:46 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/740</guid>
		<description><![CDATA[I&#8217;ve already blogged about helping this project in the recent past, but my buddies at ATU have come together with a more organized effort. So once again I ask you, my fellow geeks, if you enjoy what OpenSSH offers and have a few bucks to spare, please go ahead and give what you can. This [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already <a href="http://dmiessler.com/archives/725">blogged about helping this project</a> in the recent past, but my buddies at <a href="http://www.dslreports.com/forum/unixdsl">ATU</a> have come together with a more organized effort. So once again I ask you, my fellow geeks, if you enjoy what <a href="http://openssh.org">OpenSSH</a> offers and have a few bucks to spare, please go ahead and give what you can. This is one of the core projects in the security community and they need our help.</p>

<p><a href="http://www.dslreports.com/forum/remark,15881389">Link: OpenSSH Donation Pledge Drive</a></p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/openssh-80" rel="bookmark" class="crp_title">OpenSSH 4.0</a></li><li><a href="http://danielmiessler.com/blog/openbsd-needs-you" rel="bookmark" class="crp_title">OpenBSD Needs You</a></li><li><a href="http://danielmiessler.com/blog/debate-about-the-word-hacker" rel="bookmark" class="crp_title">Debate About The Word Hacker</a></li><li><a href="http://danielmiessler.com/blog/devrandom-%c2%bb-openssh-new-feature-%e2%80%9cnetcat-mode%e2%80%9d" rel="bookmark" class="crp_title">/dev/random » OpenSSH New Feature: “Netcat mode”</a></li><li><a href="http://danielmiessler.com/blog/unix-geek-humor-3" rel="bookmark" class="crp_title">Unix Geek Humor</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/openssh-donation-pledge-drive/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The MacBookPro: A Version &#8220;A&#8221; Product Example</title>
		<link>http://danielmiessler.com/blog/the-macbookpro-a-version-a-product-example</link>
		<comments>http://danielmiessler.com/blog/the-macbookpro-a-version-a-product-example#comments</comments>
		<pubDate>Sat, 01 Apr 2006 11:17:37 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/729</guid>
		<description><![CDATA[Well, it&#8217;s been nearly a month now since I received my new MacBookPro. As a few of you may know, I had to return my first unit due to a borked optical drive. I was quite upset about it at the time, but was &#8211; and am &#8211; ultimately happy with the overall experience due [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been nearly a month now since I received my new MacBookPro. As a few of you may know, <a href="http://dmiessler.com/archives/715">I had to return my first unit due to a borked optical drive</a>. I was quite upset about it at the time, but was &#8211; and am &#8211; ultimately happy with the overall experience due to the way that Apple handled it.</p>

<p>Now that I&#8217;ve had a few weeks to gauge the overal performance and sftability of the box, I wanted to document the problems that I&#8217;m having with the system in an organized fashion. Hell, I&#8217;ll probably forward this post to Apple support to save time.</p>

<ol>
    <li><strong>Processor &#8220;Whine&#8221; :</strong> This is the often-complained-about issue where the MBP will make a very annoying sound when not being pushed very hard. It&#8217;s almost as if it&#8217;s complaining about not being used to its potential. This particular problem I&#8217;m willing to wait to have fixed, i.e. I&#8217;ll give it a few weeks for things to settle down at Apple with the new release before asking for a solution. No biggie, but I&#8217;m damn sure not leaving it this way for the life of the system.</li>
    <li><strong>Wireless Card Issues :</strong> I actually just found out tonight that I have this problem. I can&#8217;t stay connected to my Linksys wireless access point. Other Windows and *nix machines work perfectly with the AP, as does my old 12&#8243; PowerBook G4. This is unacceptable. I need this fixed immediately. How could they ship a wireless system that won&#8217;t stay connected for more than 5 minutes at a time to the most commonly deployed AP in the country? Bad form indeed.</li>
    <li><strong>Heat Issues :</strong> Well, I wouldn&#8217;t call it an issue. The systems are just hot. I mean <em>nuclear</em> hot. As in, &#8220;Don&#8217;t touch it because it&#8217;ll hurt you.&#8221; hot. This I&#8217;m actually not too worried about. It doesn&#8217;t effect performance as far as I can tell, and I am going to just chalk it up to having so much going on in such a thin case. I&#8217;ll label this an &#8220;almost non-issue&#8221;.</li>
    <li><strong>Sleep Recovery :</strong> For some reason, I&#8217;ve come out of sleep a few times and been prompted for my password (I&#8217;ve set it up to do that), only to be prompted for my password again like 2 seconds into my recovered session. It&#8217;s like it didn&#8217;t register that I had already re-authenticated or something. Bad form. It&#8217;s just an annoyance, to be sure, but it lends support to the whole, &#8220;This product&#8217;s not quite ready&#8221; sentiment. I&#8217;d like to see a fix for this in the next month or so. No rush, but I don&#8217;t want to live with it forever.</li>
</ol>

<h4>What I&#8217;ve Learned</h4>

<p>The moral of the story here is very simple &#8212; <em>it&#8217;s true that version A products are buggy.</em></p>

<p>Millions of people already knew that, and some of them even tried to warn me, but now I know, based on first-hand experience, that it&#8217;s true. Don&#8217;t ever doubt it. Some launches may be better than others, but as a whole it&#8217;s probably going to be the case.</p>

<p>It&#8217;s not that I doubted it either, actually; I understood the logic behind the claim as much as the next guy. But I didn&#8217;t think the issues would be this major. I didn&#8217;t think I&#8217;d be unable to read CDs, or that my wireless would drop connection every five minutes. Those are issues that I would have bet against &#8212; and lost money.</p>

<h4>Why I&#8217;m Still Happy</h4>

<p>But I&#8217;m still happy. Why? Because in all of my conversations with Apple thus far I&#8217;ve heard a consistent, overriding message.</p>

<p><em>&#8220;We&#8217;ll get it taken care of. We&#8217;ll make sure you&#8217;re happy.&#8221;</em></p>

<p>This is precisely what I want to hear, and it&#8217;s what I <em>should</em> be hearing. What it means to me as a consumer is that I can worry less about flaws with my system. I can relax, enjoy my computer, and have faith that the company I bought it from will make things right. If it takes a few weeks then that&#8217;s cool. If there are a few glitches in the process, then that&#8217;s cool too. As long as they don&#8217;t say, &#8220;Well, you bought the first version so that&#8217;s on you.&#8221;, I&#8217;m ok with having a few problems.</p>

<h4>Lessons</h4>

<p>Ultimately I&#8217;ve learned two things from this ordeal thus far.</p>

<ol>
    <li>Be wary of version A products. They really do have issues.</li>
    <li>You can trust Apple to treat you right &#8212; even if you <strong>do</strong> buy a version A product.</li>
</ol>

<p>Anyway, I&#8217;ll keep this post updated as I work to get these issues resolved. Hopefully everything will go smoothly from here on out, and if you have any similar or related MacBookPro stories I&#8217;d love to hear them.:</p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/macbookpro-disappointment" rel="bookmark" class="crp_title">MacBookPro Disappointment</a></li><li><a href="http://danielmiessler.com/blog/security-is-not-a-technology-problem-why-companies-need-to-be-looking-at-organizational-issues-instead-of-products" rel="bookmark" class="crp_title">Security Is Not A Technology Problem: Why Companies Need To Be Looking At Organizational Issues Instead Of Products</a></li><li><a href="http://danielmiessler.com/blog/the-real-reason-apple-is-so-popular-right-now" rel="bookmark" class="crp_title">The Real Reason Apple is So Popular Right Now</a></li><li><a href="http://danielmiessler.com/blog/leopard-instead-of-vista-three-reasons-why-your-next-computer-should-be-a-mac" rel="bookmark" class="crp_title">Leopard Instead of Vista: Three Reasons Why Your Next Computer Should Be A Mac</a></li><li><a href="http://danielmiessler.com/blog/new-mac-cleanup" rel="bookmark" class="crp_title">New Mac, Cleanup</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/the-macbookpro-a-version-a-product-example/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>This Guy Likes Macs</title>
		<link>http://danielmiessler.com/blog/this-guy-likes-macs</link>
		<comments>http://danielmiessler.com/blog/this-guy-likes-macs#comments</comments>
		<pubDate>Mon, 23 Jan 2006 04:28:10 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/659</guid>
		<description><![CDATA[http://flickr.com/photos/visualseed/86410009/in/pool-tuawrigs/ Related ContentTry *That* in WindowsFireball AttackNew 335iThis Is Cool For Multiple ReasonsVideo of the iPhone 4&#8242;s Resolution]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/visualseed/86410009/in/pool-tuawrigs/">http://flickr.com/photos/visualseed/86410009/in/pool-tuawrigs/</a></p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/try-that-in-windows" rel="bookmark" class="crp_title">Try *That* in Windows</a></li><li><a href="http://danielmiessler.com/blog/fireball-attack" rel="bookmark" class="crp_title">Fireball Attack</a></li><li><a href="http://danielmiessler.com/blog/new-335i" rel="bookmark" class="crp_title">New 335i</a></li><li><a href="http://danielmiessler.com/blog/this-is-cool-for-multiple-reasons" rel="bookmark" class="crp_title">This Is Cool For Multiple Reasons</a></li><li><a href="http://danielmiessler.com/blog/more-iphone-4-video" rel="bookmark" class="crp_title">Video of the iPhone 4&#8242;s Resolution</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/this-guy-likes-macs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Remember Your TCP Flags</title>
		<link>http://danielmiessler.com/blog/how-to-remember-your-tcp-flags</link>
		<comments>http://danielmiessler.com/blog/how-to-remember-your-tcp-flags#comments</comments>
		<pubDate>Mon, 29 Aug 2005 15:52:06 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Protocols]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dmiessler.com/?p=479</guid>
		<description><![CDATA[Many people are familiar with the concept of a mnemonic [nəˈmɑnɪk] &#8212; a memory device that uses a phrase based on the first letter of words in a list. Perhaps the most popular of these in the field of networking is the one for the OSI Model. The mnemonic is: All People Seem To Need [...]]]></description>
			<content:encoded><![CDATA[<p>Many people are familiar with the concept of a <a href="http://en.wikipedia.org/wiki/Mnemonic">mnemonic</a> [nəˈmɑnɪk] &#8212; a memory device that uses a phrase based on the first letter of words in a list. Perhaps the most popular of these in the field of networking is the one for the <a href="http://en.wikipedia.org/wiki/OSI_model">OSI Model</a>. The mnemonic is:</p>

<p><em><strong>A</strong>ll <strong>P</strong>eople <strong>S</strong>eem <strong>T</strong>o <strong>N</strong>eed <strong>D</strong>ata <strong>P</strong>rocessing.</em></p>

<p>Well, for those that deal with <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP </a>a lot, I thought it might be helpful to have a mnemonic for the TCP flags as well. What I&#8217;ve come up with is:</p>

<p><em><strong>U</strong>nskilled <strong>A</strong>ttackers <strong>P</strong>ester <strong>R</strong>eal <strong>S</strong>ecurity <strong>F</strong>olks</em></p>

<p>Unskilled = URG
Attackers = ACK
Pester = PSH
Real = RST
Security = SYN
Folks = FIN</p>

<p>The way this helps me the most is when isolating traffic to capture using <a href="http://en.wikipedia.org/wiki/Tcpdump">Tcpdump</a>. It&#8217;s possible, for example, to capture only SYNs (new connection requests), only RSTs (immediate session teardowns), or <em>any</em> combination of the six flags really. As noted in <a href="http://dmiessler.com/study/tcpdump">my own little Tcpdump tutorial</a>, you can capture these various flags like so:</p>

<p><strong>Find all SYN packets</strong>
<code>tcpdump 'tcp[13] &amp; 2 != 0'</code></p>

<p><strong>Find all RST packets</strong>
<code>tcpdump 'tcp[13] &amp; 4 != 0'</code></p>

<p><strong>Find all ACK packets</strong>
<code>tcpdump 'tcp[13] &amp; 16 != 0'</code></p>

<p>Notice the SYN example has the number 2 in it, the RST the number 4, and the ACK the number 16. These numbers correspond to where the TCP flags fall on the binary scale. So when you write out:</p>

<p><strong>U A P R S F</strong></p>

<p>&#8230;that corresponds to:</p>

<p><strong>32 16 8 4 2 1</strong></p>

<p>So as you read the SYN capture <code>tcpdump 'tcp[<strong>13</strong>] &amp; <strong>2</strong> != 0'</code>, you&#8217;re saying find the <strong>13th</strong> byte in the TCP header, and only grab packets where the flag in the <strong>2</strong>nd bit is not zero. Well if you go from right to left in the UAPRSF string, you see that the spot where 2 falls is where the S is, and that&#8217;s how why you&#8217;re capturing only SYN packets when you apply that filter.</p>

<p>Remembering these flags and how to isolate them can go a long way in helping low-level network troubleshooting/security work by isolating what it is you want to see and/or capture. And of course the more you can isolate what you want to see, the faster you can solve the problem. I encourage anyone not making use of this powerful feature already to go ahead and add it to their repertoire.</p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/english-precision-matters" rel="bookmark" class="crp_title">English: Precision Matters</a></li><li><a href="http://danielmiessler.com/blog/character-encoding-which-schemes-encode-to-which-sizes" rel="bookmark" class="crp_title">Character Encoding: Which Schemes Encode to Which Sizes?</a></li><li><a href="http://danielmiessler.com/blog/linux-xargs-vs-exec" rel="bookmark" class="crp_title">Linux: <code>xargs</code> vs. <code>exec {}</code></a></li><li><a href="http://danielmiessler.com/blog/7-relatively-unknown-but-very-powerful-vim-features" rel="bookmark" class="crp_title">7 Relatively Unknown But Very Powerful Vim Features</a></li><li><a href="http://danielmiessler.com/blog/never-argue-again-about-the-pronunciation-of-os-x-proof-included" rel="bookmark" class="crp_title">Never Argue Again About The Pronunciation Of &#8220;OS X&#8221; (Proof Included)</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/how-to-remember-your-tcp-flags/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Security And Obscurity: It&#8217;s Not What You Think</title>
		<link>http://danielmiessler.com/blog/security-and-obscurity-its-not-what-you-think</link>
		<comments>http://danielmiessler.com/blog/security-and-obscurity-its-not-what-you-think#comments</comments>
		<pubDate>Sat, 20 Aug 2005 21:10:08 +0000</pubDate>
		<dc:creator>Daniel Miessler</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://dmiessler.com/archives/465</guid>
		<description><![CDATA[Many of us are familiar with a concept know as Security by Obscurity. The term has quite negative connotations within the security community &#8212; often for the wrong reasons. There&#8217;s little debate about whether security by obscurity is bad; this is true because it means the secret being hidden is the key to the entire [...]]]></description>
			<content:encoded><![CDATA[<p>Many of us are familiar with a concept know as <em>Security by Obscurity</em>. The term has quite negative connotations within the security community &#8212; often for the wrong reasons.</p>

<p align="center">There&#8217;s little debate about whether security <em><strong>by</strong></em> obscurity is bad; this is true because it means <em>the secret being hidden is the key to the entire system&#8217;s security</em>. Obscurity itself, however, when added to a system that already has decent controls in place, <em>is not necessarily a bad thing</em>. In fact, when done right, obscurity can be a strong addition to an overall approach.</p>

<p>So what&#8217;s the difference?</p>

<h4>Security *Through* Obscurity</h4>

<p>An example of security <strong>by</strong> obscurity is when someone has an expensive house outfitted with the latest alarm system, but they keep the key and alarm code in the planter box next to the front door. This is security <em>by</em> obscurity because <em>if anyone knows the secret, i.e. that the key and code are stored in the planter, then the security of the system is compromised.</em></p>

<p>That&#8217;s security <strong>by</strong> obscurity: if the secret ever gets out, <em>it&#8217;s game over</em>. The concept comes from <a href="http://en.wikipedia.org/wiki/Cryptography">cryptography</a>, where it&#8217;s utterly sacrilegious to base the security of a system on the secrecy of the algorithm.</p>

<h4>Obscurity As A Layer</h4>

<p>Obscurity as <em>a layer</em>, however, can be used to enhance security that already exists. One excellent example of this is <a href="http://www.portknocking.org/">Portknocking</a>.</p>

<p>Portknocking allows one to hide their network services behind an additional layer of quasi-authentication. Using the technology you can have an SSH server sitting live on the Internet that portscanners literally <em>can&#8217;t find</em>. This works because your firewall sits between the Internet and your listening SSH server.</p>

<p>Your firewall listens to the incoming requests and ignores all standard SSH attempts to your box. If, however, you ask in a very specific way, i.e. using the secret &#8220;knock&#8221;, it&#8217;ll open access to the server <em>for your source IP</em>.</p>

<p align="center"><strong>The part that most people miss is that <em>you still have to authenticate to SSH.</em> You didn&#8217;t <em>replace</em> SSH&#8217;s security with portknocking, you simply added it as a layer. Remember, the <a href="http://www.nsa.gov">NSA</a> most likely has great algorithms but they still don&#8217;t publish them.</strong></p>

<p>So the next time the subject comes up, remember a simple concept: security <em>by</em> obscurity is bad, but obscurity itself &#8212; when added as a layer on top of existing security &#8212; can be quite useful. Those who dismiss obscurity out of hand are regurgitating something they&#8217;ve heard rather than thinking through the concepts themselves.:</p>
<div id="crp_related"><h3>Related Content</h3><ul><li><a href="http://danielmiessler.com/blog/a-short-security-and-obscurity-summary" rel="bookmark" class="crp_title">A Short &#8220;Security and Obscurity&#8221; Summary</a></li><li><a href="http://danielmiessler.com/blog/security-and-obscurity-does-changing-your-ssh-port-lower-your-risk" rel="bookmark" class="crp_title">Security and Obscurity: Does Changing Your SSH Port Lower Your Risk?</a></li><li><a href="http://danielmiessler.com/blog/the-textmate-test-post" rel="bookmark" class="crp_title">The TextMate Test Post</a></li><li><a href="http://danielmiessler.com/blog/is-portknocking-real-security" rel="bookmark" class="crp_title">Is Portknocking Real Security?</a></li><li><a href="http://danielmiessler.com/blog/2-ssh-brute-force-countermeastures" rel="bookmark" class="crp_title">2 SSH Brute-Force-Attack Countermeasures</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://danielmiessler.com/blog/security-and-obscurity-its-not-what-you-think/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

