<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[查找centos linux服务器上的webShell后门]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Tue, 14 Feb 2012 08:26:57 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	服务器被挂马或被黑的朋友应该知道,黑客入侵web服务器的第一目标是往服务器上上传一个webshell,有了webshell黑客就可以干更多的事情,网站被挂马后很多人会束手无策,无从查起,其实并不复杂,这里我将以php环境为例讲几个小技巧,希望对大家有帮助。<br/><br/>先讲一下思路，如果服务器上被上传了webshell那么我们肯定能够查到蛛丝马迹，比如php文件的时间，如果我们可以查找最后一次网站代码更新以后的所有php文件，方法如下：<br/><br/>假设最后更新是10天前我们可以查找10天内生成的可以php文件:<br/><div class="code"><br/>find /var/webroot -name &quot;*.php&quot; -mtime -10<br/>&#91;/find&#93;<br/>命令说明：<br/>/var/webroot为网站根目录<br/>-name “*.php”为查找所有php文件<br/>-time -10为截止到现在10天<br/><br/>如果文件更新时间不确定，我们可以通过查找关键字的方法来确定，要想查的准确需要熟悉webshell常用的关键字，我这里列出一些常用的，其他的大家可以从网收集一些webshell，总结自己的关键字，括号里面我总结的一些关键字（eval,shell_exec,passthru,popen,system）查找方法如下：<br/>&#91;code&#93;<br/>find /var/webroot -name &quot;*.php&quot; &#124;xargs grep &quot;eval&quot; &#124;more<br/>find /var/webroot -name &quot;*.php&quot; &#124;xargs grep &quot;shell_exec&quot; &#124;more<br/>find /var/webroot -name &quot;*.php&quot; &#124;xargs grep &quot;passthru&quot; &#124;more<br/></div><br/>当然你还可以导出到文件，下载下来慢慢分析：<br/><div class="code"><br/>find /home -name &quot;*.php&quot; &#124;xargs grep &quot;fsockopen&quot; &#124;more &gt;test.log<br/></div><br/>这里我就不一一罗列了，如果有自己总结的关键字直接替换就可以，当然并不是所有的找出的文件都是webshell需要自己做一下判断，判断的方法也简单，直接从浏览器访问一下这个文件或者和自己找的一些webshell比较一下，看得多了，基本上一眼就可以判断是不是webshell文件。<br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/webshell/" rel="tag">webshell</a> , <a href="http://www.dzhope.com/tags/find/" rel="tag">find</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 查找centos linux服务器上的webShell后门]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>