<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Pwn files with gzip?</title>
	<atom:link href="http://tipotheday.com/2007/09/13/pwn-files-with-gzip/feed/" rel="self" type="application/rss+xml" />
	<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/</link>
	<description>techno tips and tricks</description>
	<lastBuildDate>Sat, 24 Mar 2012 16:34:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Nic Wolff</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-448</link>
		<dc:creator>Nic Wolff</dc:creator>
		<pubDate>Thu, 13 Sep 2007 20:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-448</guid>
		<description>Heh I guess I had this window open a while before commenting...</description>
		<content:encoded><![CDATA[<p>Heh I guess I had this window open a while before commenting&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nic Wolff</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-447</link>
		<dc:creator>Nic Wolff</dc:creator>
		<pubDate>Thu, 13 Sep 2007 20:03:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-447</guid>
		<description>That throws an error because you&#039;re trying to change the contents of a file you can&#039;t write to. But you &lt;i&gt;can&lt;/i&gt; write to the directory, so you can delete the file and put a new one in its place, which is all gzip is doing. Go ahead and try this: &lt;code&gt;cp test.txt foo; rm test.txt; mv foo test.txt&lt;/code&gt; and you&#039;ll see the same effect.</description>
		<content:encoded><![CDATA[<p>That throws an error because you&#8217;re trying to change the contents of a file you can&#8217;t write to. But you <i>can</i> write to the directory, so you can delete the file and put a new one in its place, which is all gzip is doing. Go ahead and try this: <code>cp test.txt foo; rm test.txt; mv foo test.txt</code> and you&#8217;ll see the same effect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-446</link>
		<dc:creator>Brandon</dc:creator>
		<pubDate>Thu, 13 Sep 2007 17:03:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-446</guid>
		<description>Thanks for the additional clarificatisn Bjones and Marc!</description>
		<content:encoded><![CDATA[<p>Thanks for the additional clarificatisn Bjones and Marc!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BJones</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-445</link>
		<dc:creator>BJones</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-445</guid>
		<description>Yep</description>
		<content:encoded><![CDATA[<p>Yep</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-444</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-444</guid>
		<description>BJones: it works on directory where you have the write permission. /tmp /var/tmp are special because of the sticky bit (rwxrwxrwt - notice the last t), the sticky bit restricts the w permission in that it forbids you to delete files from other users.
Come on guys, this is basic Unix !</description>
		<content:encoded><![CDATA[<p>BJones: it works on directory where you have the write permission. /tmp /var/tmp are special because of the sticky bit (rwxrwxrwt &#8211; notice the last t), the sticky bit restricts the w permission in that it forbids you to delete files from other users.<br />
Come on guys, this is basic Unix !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mshade</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-443</link>
		<dc:creator>mshade</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-443</guid>
		<description>Not new to unix, but I&#039;ve been pwned by this post :-D</description>
		<content:encoded><![CDATA[<p>Not new to unix, but I&#8217;ve been pwned by this post <img src='http://tipotheday.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-442</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-442</guid>
		<description>The w permission on the directory allows you to remove the file and replace it from the one from the archive, belonging to you. 
You&#039;re obviously new to Unix.</description>
		<content:encoded><![CDATA[<p>The w permission on the directory allows you to remove the file and replace it from the one from the archive, belonging to you.<br />
You&#8217;re obviously new to Unix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mshade</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-441</link>
		<dc:creator>mshade</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:26:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-441</guid>
		<description>Thanks for the explanations, guys.  It makes perfect sense now -- ownership of the current directory being the necessary prerequisite.</description>
		<content:encoded><![CDATA[<p>Thanks for the explanations, guys.  It makes perfect sense now &#8212; ownership of the current directory being the necessary prerequisite.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-440</link>
		<dc:creator>Jose</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-440</guid>
		<description>BJones is absolutely correct, you need to own the directory to do this. And you don&#039;t even need the gzip trick, you can just go right ahead and do:

$ sudo touch test
$ rm test
rm: test: override protection 644 (yes/no)? y</description>
		<content:encoded><![CDATA[<p>BJones is absolutely correct, you need to own the directory to do this. And you don&#8217;t even need the gzip trick, you can just go right ahead and do:</p>
<p>$ sudo touch test<br />
$ rm test<br />
rm: test: override protection 644 (yes/no)? y</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BJones</title>
		<link>http://tipotheday.com/2007/09/13/pwn-files-with-gzip/comment-page-1/#comment-439</link>
		<dc:creator>BJones</dc:creator>
		<pubDate>Thu, 13 Sep 2007 15:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.tipotheday.com/2007/09/13/pwn-files-with-gzip/#comment-439</guid>
		<description>Here&#039;s the deal.  

This only works on directories you own.  If you tried this same operation in a place where everyone has write access (like /var/tmp, /tmp, or /var/mail) it would fail.

We tested this on Solaris 10, but other UNIX/Linux variants may have a hole.  I recommend testing this (a public writeable directory) on systems you are responsible for, just in case.

B</description>
		<content:encoded><![CDATA[<p>Here&#8217;s the deal.  </p>
<p>This only works on directories you own.  If you tried this same operation in a place where everyone has write access (like /var/tmp, /tmp, or /var/mail) it would fail.</p>
<p>We tested this on Solaris 10, but other UNIX/Linux variants may have a hole.  I recommend testing this (a public writeable directory) on systems you are responsible for, just in case.</p>
<p>B</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.035 seconds -->

