<?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>chys&#039;s random notes &#187; security</title>
	<atom:link href="http://en.chys.info/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://en.chys.info</link>
	<description>Study more problems; Talk less of isms.</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:56:38 +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>.note.GNU-stack</title>
		<link>http://en.chys.info/2010/12/note-gnu-stack/</link>
		<comments>http://en.chys.info/2010/12/note-gnu-stack/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 07:16:17 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://en.chys.info/?p=870</guid>
		<description><![CDATA[GCC always appends one line to any assembler file (.s) file it generates: .section .note.GNU-stack,"",@progbits Literally, it adds an empty section named .note.GNU-stack to the object file, but it actually serves a hint to the linker* that code in this object file does not require an executable stack. GNU assembler also accepts command-line option “--noexecstack”, [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2009/04/dynamic-library-symlinks/' rel='bookmark' title='Dynamic library symlinks'>Dynamic library symlinks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>GCC always appends one line to any assembler file (.s) file it generates:</p>
<blockquote><pre>	.section	.note.GNU-stack,"",@progbits</pre>
</blockquote>
<p>Literally, it adds an empty section named <code>.note.GNU-stack</code> to the object file, but it actually serves a hint to the linker* that code in <em>this</em> object file does <em>not</em> require an executable stack. GNU assembler also accepts command-line option “<code>--noexecstack</code>”, which has the same effect.</p>
<p>If <em>every</em> object file contains a section of this name, the linker knows the whole program does not need an executable stack, and the resulting executable will run with a non-executable stack if the OS and underlying hardware support it (see also <a href="http://en.wikipedia.org/wiki/NX_bit">NX bit</a>).</p>
<p>Why is this important? In practice, virtually no program needs an executable stack (hackers may sometimes use it, though), but <a href="http://en.wikipedia.org/wiki/Buffer_overflow">buffer overflow attacks</a> frequently insert and run code in stacks. A non-executable stack helps improve security without any overhead.</p>
<p>* GNU linker only.</p>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2009/04/dynamic-library-symlinks/' rel='bookmark' title='Dynamic library symlinks'>Dynamic library symlinks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2010/12/note-gnu-stack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>su without password</title>
		<link>http://en.chys.info/2008/11/su-without-password/</link>
		<comments>http://en.chys.info/2008/11/su-without-password/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 05:08:00 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.chys.info/2008/11/su-without-password/</guid>
		<description><![CDATA[Google returns a lot of meaningful results for “sudo without password” and “ssh without password.” I don’t know why googling “su without password” gives no useful info. To allow a user to become root with su without entering the password, edit /etc/pam.d/su. For example, in Gentoo (should be the same or similar in other distros) [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2008/11/ssh-without-password/' rel='bookmark' title='SSH without password'>SSH without password</a></li>
<li><a href='http://en.chys.info/2008/11/html2text/' rel='bookmark' title='html2text'>html2text</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Google returns a lot of meaningful results for “sudo without password” and “ssh without password.” I don’t know why googling “su without password” gives no useful info.</p>
<p>To allow a user to become root with <code>su</code> without entering the password, edit <code>/etc/pam.d/su</code>.</p>
<p>For example, in Gentoo (should be the same or similar in other distros) uncommenting the following line allows users in group <code>wheel</code> to <code>su</code> without password:<br />
<blockquote style="font-family: monospace">auth       sufficient   pam_wheel.so use_uid trust</p></blockquote>
<div class="blogger-post-footer">
<hr />
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.</div>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2008/11/ssh-without-password/' rel='bookmark' title='SSH without password'>SSH without password</a></li>
<li><a href='http://en.chys.info/2008/11/html2text/' rel='bookmark' title='html2text'>html2text</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2008/11/su-without-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Always start denyhosts with sshd</title>
		<link>http://en.chys.info/2008/10/always-start-denyhosts-with-sshd/</link>
		<comments>http://en.chys.info/2008/10/always-start-denyhosts-with-sshd/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 23:32:00 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.chys.info/2008/10/always-start-denyhosts-with-sshd/</guid>
		<description><![CDATA[Denyhosts is a small tool that frequently checks SSH daemon logs for incoming requests and put suspective IPs into /etc/hosts.deny. For some reason, denyhosts was not running in recent days in my machine. (It should be automatically started at boot time, but was not.) Today I restarted it, and 7 IPs were immediately banned. They [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2008/12/leap-year-bug-crashes-zune/' rel='bookmark' title='Leap year bug crashes Zune'>Leap year bug crashes Zune</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://denyhosts.sourceforge.net/">Denyhosts</a> is a small tool that frequently checks SSH daemon logs for incoming requests and put suspective IPs into <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/etc/hosts.deny</span>.</p>
<p>For some reason, denyhosts was not running in recent days in my machine. (It should be automatically started at boot time, but was not.) Today I restarted it, and 7 IPs were immediately banned. They are from all around the world: 1 from US, 1 from Germany, 1 from Turkey, 1 from Armenia, and the rest 3 from China (respectively Xiamen University, Tianjin Netcom, and Qingdao Guangdian).</p>
<p>I then checked <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/var/log/messages</span>, and found 5236 attacks in the last 5 days.</p>
<p>Yes, hackers all around the world are doing all kinds of brute-force attacks. Last summer, I found someone was using my anonymous proxy at port 3128, which had been open for just a few hours, to send hundreds of spams.
<div class="blogger-post-footer">
<hr />
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.</div>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2008/12/leap-year-bug-crashes-zune/' rel='bookmark' title='Leap year bug crashes Zune'>Leap year bug crashes Zune</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2008/10/always-start-denyhosts-with-sshd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

