<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[Linux shell快速查找PHP木马]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[Linux技术]]></category>
<pubDate>Sun, 28 Apr 2013 17:51:52 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	<span style="font-size: 14px;">查找一句话PHP木马：</span><br/># find ./ -name "*.php" &#124;xargs egrep "phpspy&#124;c99sh&#124;milw0rm&#124;eval&#92;(gunerpress&#124;eval&#92;(base64_decode&#124;spider_bc"> /tmp/php.txt<br/><br/># grep -r --include=*.php&nbsp;&nbsp;'[^a-z]eval($_POST' . > /tmp/eval.txt<br/><br/># grep -r --include=*.php&nbsp;&nbsp;'file_put_contents(.*$_POST&#92;[.*&#92;]);' . > /tmp/file_put_contents.txt<br/><br/># find ./ -name "*.php" -type f -print0 &#124; xargs -0 egrep "(phpspy&#124;c99sh&#124;milw0rm&#124;eval&#92;(gzuncompress&#92;(base64_decode&#124;eval&#92;(base64_decode&#124;spider_bc&#124;gzinflate)" &#124; awk -F: '&#123;print $1&#125;' &#124; sort &#124; uniq<br/><br/><span style="font-size: 14px;">查找最近一天被修改的PHP文件：</span><br/>#&nbsp;&nbsp; find -mtime -1 -type f -name &#92;*.php<br/><br/><span style="font-size: 14px;">修改网站的权限：</span><br/># find -type f -name &#92;*.php -exec chmod 444 &#123;&#125; &#92;;<br/><br/># find ./ -type d -exec chmod 555&#123;&#125; &#92;;<br/><br/>建议将php相关危险函数在php.ini里面禁用掉。<br/>disable_functions = system,exec,shell_exec,passthru<br/>Tags - <a href="http://www.zhanghaijun.com/tags/linux/" rel="tag">linux</a> , <a href="http://www.zhanghaijun.com/tags/shell/" rel="tag">shell</a> , <a href="http://www.zhanghaijun.com/tags/php%25E6%259C%25A8%25E9%25A9%25AC/" rel="tag">php木马</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] Linux shell快速查找PHP木马]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>