直接搜索文件中的 UPX! 字样 ,然后填充00 搞定
不过对于这种文件还是可以修改 upx 的源代码强制解压,目前Linux上还没看到内存中 dump elf 文件的例子
写了个小脚本
<?php
if($argc < 2)
{
print 'usage: xxoo.php <elf file>';
exit(-1);
}
$file = file_get_contents($argv[1]);
if(strlen($file))
{
$file = str_replace('UPX',"\x00\x00\x00",$file);
file_put_contents($argv[1],$file);
echo "OK ~\n";
}
还要注意的就是压缩后的文件中还有一段 upx 的版权信息 ,这个最好也是清 0