# AntSword Bypass disable_function
突破 `disable_functions` 执行系统命令,绕过 Open_basedir 等安全机制
## php.ini 样例:
```
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,exec,shell_exec,popen,proc_open,passthru,symlink,link,syslog,imap_open,ld,mail,system
open_basedir=.:/proc/:/tmp/
```
## 安装
### 商店安装
进入 AntSword 插件中心,选择「绕过disable_functions」,点击安装
### 手动安装
1.获取源代码
```bash
$ git clone https://github.com/Medicean/as_bypass_php_disable_functions.git
```
或者
点击 [这里](https://github.com/Medicean/as_bypass_php_disable_functions/archive/master.zip) 下载源代码,并解压。
2.拷贝源代码至插件目录
将插件目录拷贝至 `antSword/antData/plugins/` 目录下即安装成功
## 演示图

## 如何使用
[绕过open_basedir思路(蚁剑插件演示)](https://mp.weixin.qq.com/s/GGnumPklkUNMLZKQL4NbKg)
## 测试环境
参见 [AntSword-Labs/bypass_disable_functions](https://github.com/AntSwordProject/AntSword-Labs/tree/master/bypass_disable_functions/)
## 支持情况:
模式 | Bypass 方式 | Linux | Windows |
:--|:--|:--|:--|
`LD_PRELOAD`|启动新WebServer| Yes | No |
`Fastcgi/PHP_FPM` | 启动新WebServer | Yes | Yes (不支持 IIS PIPE ) |
`Apache_mod_cgi` | 重定向输出到文件 | Yes | No (TODO) |
`JSON_Serializer_UAF` | stdout | Yes | No (TODO) |
`PHP7_GC_UAF` | stdout | Yes | No (TODO) |
`PHP7_Backtrace_UAF`| stdout | Yes | No (TODO) |
`PHP74_FFI`| 重定向输出到文件| Yes | Yes |
`iconv`|启动新WebServer| Yes | No (TODO) |
`PHP7_ReflectionProperty_UAF`| stdout | Yes | No (TODO) |
`PHP7_UserFilter` | stdout | Yes | Yes |
- [x] LD_PRELOAD
利用 LD_PRELOAD 环境变量加载 so 文件, LD_PRELOAD 只在 Linux 系统上才有
- [x] PHP-FPM/FCGI
适用于PHP-FPM/FCGI 监听在 unix socket 或者 tcp socket 上时使用。常见的比如: `nginx + fpm`
IIS+FPM 使用的是「管道」通信,不适用
- [x] COM (windown, php 5.3~5.6 已在antsword核心集成)
- [x] Apache Mod CGI
- [x] Json Serializer UAF ([PHP-Bug-#77843](https://bugs.php.net/bug.php?id=77843))
- [x] GC with Certain Destructors UAF ([PHP-Bug-#72530](https://bugs.php.net/bug.php?id=72530))
- [X] Backtrace UAF ([PHP-Bug-#76047](https://bugs.php.net/bug.php?id=76047))
- [x] PHP7 FFI
- [x] iconv
- [x] PHP7 ReflectionProperty UAF ([PHP-Bug-#79820](https://bugs.php.net/bug.php?id=79820))
- [x] PHP 7.0-8.0 user_filter ([PHP-Bug-#54350](https://bugs.php.net/bug.php?id=54350))
## 相关链接
* [AntSword 文档](http://doc.u0u.us)
* [dhtmlx 文档](http://docs.dhtmlx.com/)
* [mm0r1/exploits](https://github.com/mm0r1/exploits/)

weixin_44000149
- 粉丝: 0
最新资源
- 电子商务专科毕业论文写作格式.doc
- 【自主水下航行器】基于模型预测控制的三维路径跟踪系统设计:AUV在复杂海洋环境中的鲁棒控制与仿真(含详细代码及解释)
- 电力电子基于二次侧PWM可控整流的多路LLC谐振变换器交错并联均流控制研究:解决参数偏差引起的电流不均衡问题(含详细代码及解释)
- 单片机电子时钟设计方案.doc
- 电力系统基于Dual Grid-Forming Converter的双模电网形成变流器控制模型仿真与分析:IEEE论文复现及扩展应用(含详细代码及解释)
- 单片机温控制系统的设计.doc
- 【铁路信号系统】基于光纤布拉格光栅的列车轴计数系统设计与实现:抗电磁干扰的光学传感器解决方案(含详细代码及解释)
- 浅议iTtools网络教学平台对信息技术课堂教学有效性的促进作用.docx
- 电力电子三相矩阵变换器新型调制方法研究:数学理论与验证测试结果分析及工业应用(含详细代码及解释)
- java课程设计方案学生成绩管理系统.doc
- 项目管理办公室(PMO)在研发制造企业的运用研究.docx
- 【珊瑚骨骼生长特征的数字影像分析】基于Python的珊瑚生长密度与生长率提取及环境因素关系分析:实现月尺度高分辨率研究(含详细代码及解释)
- 这篇文章详细介绍了沪深港股票市场关联性动态演化的研究,主要从多层网络视角出发,探讨了“沪港通”和“深港通”政策实施后,沪深港股票市场间的关联性变化(含详细代码及解释)
- 电力电子基于电力电子变压器的16kV/320kW高压脉冲电源方案:高频隔离技术与SiC器件应用详解(含详细代码及解释)
- 这篇文章详细探讨了基于空气单负材料的多通道滤波器设计,特别是由μ负(MNG)介质、空气和ε负(ENG)介质组成的夹层结构中的电磁波隧穿现象(含详细代码及解释)
- 【车联网通信】基于V2V-VLC的室外传播特性建模与可视化:动态LOS/NLOS模型及DCMC容量分析(含详细代码及解释)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



评论0