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

Shells

Kali ships with a set of web shells preinstalled, found here: ls -lah ../../../usr/share/webshells

Now What?

We have covered many ways to generate, send and receive shells. What they all have in common is that they tend to be unstable and non-interactive. Even Unix-style shells, which are easier to stabilise, are not ideal. So what can we do?

On Linux, the ideal is to gain access to a user account. SSH keys stored at /home/<user>/.ssh are often the way in. In CTFs it is also common to find credentials lying around on the box. Some exploits let you add your own account; in particular, something like Dirty C0w or a writeable /etc/shadow or /etc/passwd would quickly give you SSH access, assuming SSH is open.

On Windows the options are often more limited. You can sometimes find passwords for running services in the registry; VNC servers, for example, frequently store passwords there in plaintext. Some versions of the FileZilla FTP server leave credentials in an XML file at C:\Program Files\FileZilla Server\FileZilla Server.xml or C:\xampp\FileZilla Server\FileZilla Server.xml. These can be MD5 hashes or plaintext, depending on the version.

Ideally on Windows you obtain a shell running as the SYSTEM user, or an administrator account with high privileges. From there you can simply add your own account (in the administrators group) to the machine, then log in over RDP, telnet, winexe, psexec, WinRM or any number of other methods, depending on the services running on the box.

The Syntax for This Is as Follows

net user <username> <password> /add
net localgroup administrators <username> /add

The important takeaway from this task:

Reverse and bind shells are an essential technique for gaining remote code execution on a machine, but they will never be as fully featured as a native shell. We always want to escalate into a "normal" method of accessing the machine, since that will invariably be easier to use for further exploitation of the target.