<?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>thinking sysadmin &#187; security</title>
	<atom:link href="http://andyleonard.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://andyleonard.com</link>
	<description>qstat -u aleonard -s z</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:47:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick and Dirty VMware ESX Patching</title>
		<link>http://andyleonard.com/2008/07/31/quick-and-dirty-vmware-esx-patching/</link>
		<comments>http://andyleonard.com/2008/07/31/quick-and-dirty-vmware-esx-patching/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 20:41:09 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[patching]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=57</guid>
		<description><![CDATA[On the ESX console, do the following:

Read the documentation for each patch.
Group patches that can be installed together into a directory, possibly an NFS mount available on all your ESX hosts.
Cd into the patch directory and untar the patches:
for i in `ls *.tgz`; do
tar -xvzf $i
done
Install the patches:
for i in `ls`; do
 if [ -d [...]]]></description>
			<content:encoded><![CDATA[<p>On the ESX console, do the following:</p>
<ul>
<li>Read the documentation for each patch.</li>
<li>Group patches that can be installed together into a directory, possibly an NFS mount available on all your ESX hosts.</li>
<li>Cd into the patch directory and untar the patches:
<p><code>for i in `ls *.tgz`; do<br />
tar -xvzf $i<br />
done</code></li>
<li>Install the patches:
<p><code>for i in `ls`; do</code><br />
<code> if [ -d $i ]; then</code><br />
<code> cd $i</code><br />
<code> esxupdate --noreboot update</code><br />
<code> cd ..</code><br />
<code> fi</code><br />
<code>done</code></li>
<li>Reboot.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2008/07/31/quick-and-dirty-vmware-esx-patching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thought you fixed that DNS spoofing bug?  You might need to think again.</title>
		<link>http://andyleonard.com/2008/07/27/thought-you-fixed-that-dns-spoofing-bug-you-might-need-to-think-again/</link>
		<comments>http://andyleonard.com/2008/07/27/thought-you-fixed-that-dns-spoofing-bug-you-might-need-to-think-again/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 15:14:21 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[spoofing]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=55</guid>
		<description><![CDATA[So you thought you fixed the DNS spoofing vulnerability that was all over the news this month?  You applied the patches and moved on to the other fifty-seven things crowded on your to-do list, thinking that you were safe?  If your resolvers are behind a NAT, you might want to think again, smart [...]]]></description>
			<content:encoded><![CDATA[<p>So you thought you fixed the <a href="http://www.doxpara.com/?p=1185">DNS spoofing vulnerability</a> that was all over the news this month?  You applied the patches and moved on to the other fifty-seven things crowded on your to-do list, thinking that you were safe?  If your resolvers are behind a NAT, you might want to <a href="http://blogs.iss.net/archive/dnsnat.html">think again</a>, smart guy.<br />
<span id="more-55"></span><br />
In a nutshell, your handy-dandy NAT box is quite possibly making your resolver&#8217;s now-random UDP source ports sequential, making you vulnerable again.  The only &#8220;vendors&#8221; I&#8217;m aware of that don&#8217;t have this issue are Linux&#8217;s IPTables and OpenBSD&#8217;s PF (also available on FreeBSD, of course) &#8211; funny that, since those guys aren&#8217;t really vendors at all.  I could be just ignorant or looking in the wrong place, but this doesn&#8217;t even seem to be on <a href="http://www.cisco.com/web/about/security/intelligence/dns-bcp.html">Cisco&#8217;s radar</a> right now, for example.</p>
<p>The tester in the sidebar at <a href="http://www.doxpara.com/">DoxPara Research</a> seems to do a good job of testing your configuration end-to-end for this vulnerability.</p>
<p>(File this under &#8220;Just another reason why NAT is evil.&#8221;)</p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2008/07/27/thought-you-fixed-that-dns-spoofing-bug-you-might-need-to-think-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My small contribution to the update-your-DNS-server panic</title>
		<link>http://andyleonard.com/2008/07/14/my-small-contribution-to-the-update-your-dns-server-panic/</link>
		<comments>http://andyleonard.com/2008/07/14/my-small-contribution-to-the-update-your-dns-server-panic/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 18:47:25 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[bind]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=47</guid>
		<description><![CDATA[How to find the version of BIND that you&#8217;re running:
&#62; dig @localhost version.bind txt chaos
; &#60;&#60;&#62;&#62; DiG 9.3.2  &#60;&#60;&#62;&#62; @localhost version.bind txt chaos
; (2 servers found)
;; global options:  printcmd
;; Got answer:
;; -&#62;&#62;HEADER&#60;&#60;- opcode: QUERY, status: NOERROR, id: 7775
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind.  [...]]]></description>
			<content:encoded><![CDATA[<p>How to find the version of BIND that you&#8217;re running:</p>
<p><code>&gt; dig @localhost version.bind txt chaos</code></p>
<p><code>; &lt;&lt;&gt;&gt; DiG 9.3.2  &lt;&lt;&gt;&gt; @localhost version.bind txt chaos<br />
; (2 servers found)<br />
;; global options:  printcmd<br />
;; Got answer:<br />
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 7775<br />
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0</code></p>
<p><code>;; QUESTION SECTION:<br />
;version.bind.                  CH      TXT</code></p>
<p><code>;; ANSWER SECTION:<br />
version.bind.           0       CH      TXT     "9.3.5-P1"</code></p>
<p><code>;; AUTHORITY SECTION:<br />
version.bind.           0       CH      NS      version.bind.</code></p>
<p><code>;; Query time: 57 msec<br />
;; SERVER: 127.0.0.1#53(127.0.0.1)<br />
;; WHEN: Mon Jul 14 11:45:14 2008<br />
;; MSG SIZE  rcvd: 65</code></p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2008/07/14/my-small-contribution-to-the-update-your-dns-server-panic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Developer Litmus Test</title>
		<link>http://andyleonard.com/2008/06/03/my-developer-litmus-test/</link>
		<comments>http://andyleonard.com/2008/06/03/my-developer-litmus-test/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 20:14:07 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=18</guid>
		<description><![CDATA[As a sysadmin, I&#8217;ve had the opportunity to interview candidates for software developer positions.  While I have done some software development, the coding abilities of these candidates generally surpass my own &#8211; or at least that&#8217;s what their resumes claim &#8211; so it&#8217;s somewhat difficult for me to accurately assess their skills.  A [...]]]></description>
			<content:encoded><![CDATA[<p>As a sysadmin, I&#8217;ve had the opportunity to interview candidates for software developer positions.  While I have done some software development, the coding abilities of these candidates generally surpass my own &#8211; or at least that&#8217;s what their resumes claim &#8211; so it&#8217;s somewhat difficult for me to accurately assess their skills.  A solution I&#8217;ve found is to ask the candidates questions relating to application security; this does a remarkably good job of separating the wheat from the chaff &#8211; and a similar approach is good for evaluating software products.<br />
<span id="more-18"></span><br />
For a recent web developer position, I asked each applicant about cross-site scripting and SQL injection.  The best candidates knew what each was and recognized the similarities between the two, the poor candidates said &#8220;my off-the-shelf framework takes care of keeping my app secure, so I don&#8217;t think about security,&#8221; and the worst said, &#8220;Huh?&#8221;</p>
<p>Along the same vein, in evaluating software, I&#8217;ve found it useful &#8211; particularly for web applications &#8211; to look at the requirements for file system permissions.  Two big red flags for me are if the app needs wide-open (<code>chmod 777</code>) permissions, or requires that all its files be owned by the user the web server is running as.  To me, these say that one or more of the following is true:</p>
<ul>
<li><strong>The developer is lazy.</strong>  They slapped their application together, and nothing says slapdash like <code>chmod -R 777</code> when you don&#8217;t care to get the permissions right.  Don&#8217;t kid yourself: lazy developers also don&#8217;t care if their users get compromised.</li>
<li><strong>The developer failed to plan.</strong>  It&#8217;s reasonable to have <em>some</em> files owned or writable by the user the web server is running as in <em>some</em> situations (although often you just need to have the web server user be the only unprivileged user that can <em>read</em> a given file).  However, it seems many developers don&#8217;t give much thought to isolating where the application needs to write to on the file system, and just sprinkle these writable files throughout their installation &#8211; or, worse, they put blanket writable permissions on everything, and can&#8217;t identify to the administrator what the real permission requirements are.</li>
<li><strong>The developer doesn&#8217;t understand the operating system they&#8217;re running on.</strong>  I think this is one of the reasons why so many Java web apps tell you to make the UNIX user running Tomcat own everything &#8211; or why so many Tomcat instances run as root.  Many of these applications were developed on Windows and then brought over to UNIX, and the developer couldn&#8217;t figure out how to make them work without resorting to this.  (Note to developers: <code>man chmod</code>, <code>man chown</code> and <code>man setfacl</code> are your friends.)</li>
<li><strong>The environment the application is running in is flawed.</strong>  This is unfortunately common when running under some shared hosting setups.  My advice?  Find a new webhost &#8211; you shouldn&#8217;t have to contend with exposing your application and data in a likely hostile environment.</li>
</ul>
<p>Now consider &#8211; if one or more of the above is true, what overall level of quality do you expect from the application or installation?</p>
<p>One final bit of my advice, and then it&#8217;s &lt;/soapbox&gt; for me.  If you&#8217;re working with an in-house web developer that doesn&#8217;t understand the above, try getting them to grasp the following: Ask him who should be able to edit their application &#8211; he&#8217;ll probably respond that only he, or his team, should be able to.  Then explain that the file system permissions should reflect this reality &#8211; hopefully he&#8217;ll get it then.</p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2008/06/03/my-developer-litmus-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
