<?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>shellcode &#8211; richliu&#039;s blog</title>
	<atom:link href="https://blog.richliu.com/tag/shellcode/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Sat, 21 May 2011 19:23:51 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>ubuntu 跑 shellcode 會出現 Segmentation fault</title>
		<link>https://blog.richliu.com/2011/05/22/1087/ubuntu-%e8%b7%91-shellcode-%e6%9c%83%e5%87%ba%e7%8f%be-segmentation-fault/</link>
					<comments>https://blog.richliu.com/2011/05/22/1087/ubuntu-%e8%b7%91-shellcode-%e6%9c%83%e5%87%ba%e7%8f%be-segmentation-fault/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Sat, 21 May 2011 19:06:44 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ELF]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shellcode]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=1087</guid>

					<description><![CDATA[<p>最近在弄 shellcode, 不過在寫測試程式的時候, 卻都會跑出來 Segmentation fault  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2011/05/22/1087/ubuntu-%e8%b7%91-shellcode-%e6%9c%83%e5%87%ba%e7%8f%be-segmentation-fault/">ubuntu 跑 shellcode 會出現 Segmentation fault</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近在弄 shellcode, 不過在寫測試程式的時候, 卻都會跑出來 Segmentation fault</p>
<p>查了一下, ubuntu 在 9.04 之後有將 CONFIG_CC_STACKPROTECTOR 啟動.<br />
啟動這個 Option 之後, Kernel 可以保護 userspace  ELF 的 internal stack.<br />
(請參閱    <a href="https://wiki.kubuntu.org/Security/Features/Historical" target="_blank" rel="noopener"> Security Features Historical</a> )<br />
若是要跳過這個機制, 在 compile time 可以加上 &#8220;-z execstack&#8221;<br />
不確定是不是要 CPU 支援 <a href="http://en.wikipedia.org/wiki/NX_bit" target="_blank" rel="noopener">NX bit</a> </p>
<p>如果用 readelf -a 來看二個執行檔, 一般的 ELF 程式在 Type 的地方會是 EXEC(Executable file), 如果是加上 -z execstack 的程式會是 REL (Relocatable file).<br />
Section Header 以 REL 會單純許多</p>
<p>Ref.<br />
<a href="http://ubuntuforums.org/showthread.php?t=1684333" target="_blank" rel="noopener">Testing ShellCodes in Ubuntu 10.10</a></p>
<p>這樣感覺 Linux 很難摸 ;-/</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2011/05/22/1087/ubuntu-%e8%b7%91-shellcode-%e6%9c%83%e5%87%ba%e7%8f%be-segmentation-fault/">ubuntu 跑 shellcode 會出現 Segmentation fault</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2011/05/22/1087/ubuntu-%e8%b7%91-shellcode-%e6%9c%83%e5%87%ba%e7%8f%be-segmentation-fault/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
