You escalated privileges on both Linux and Windows.
You land on a system as a low-privileged user. Privilege escalation means finding a misconfiguration or bug that lets you become a more powerful user — usually root on Linux or SYSTEM/Administrator on Windows.
Admins sometimes let a user run one program as root with NOPASSWD, thinking it's harmless. If that program can spawn a shell or write files, it usually isn't. GTFOBins is a well-known reference listing exactly how to abuse common programs this way.
| Vector | Idea |
|---|---|
| SUID binaries | find / -perm -4000 finds programs that run as their owner, not you |
| Cron jobs | A root cron job that runs a script you can edit runs your code as root |
| Writable PATH | If you can write earlier in $PATH, you can shadow a command root runs |
| Kernel exploits | Outdated kernels have known public exploits |
A classic bug is an unquoted service path. If a service's path is C:\Program Files\Vuln Service\app.exe without quotes, and a folder along that path is writable, Windows will try C:\Program.exe first — if you plant a file there, it runs when the service (often running as SYSTEM) starts.
| Vector | Idea |
|---|---|
| Weak service permissions | If you can reconfigure a SYSTEM service's binary, you control what it runs |
| AlwaysInstallElevated | A registry setting that lets any .msi install as SYSTEM |
| Scheduled tasks | A task run as SYSTEM pointing at a file you can overwrite |
| Token impersonation | Privileges like SeImpersonatePrivilege can be abused to become SYSTEM |
sudo -l and spot the risky entry.vulnsvc's config and its folder permissions.NOPASSWD — that program runs as root with no password check.-exec or similar to run another command. Try sudo find . -exec /bin/sh -c whoami \;.sc qc vulnsvc shows the BINARY_PATH_NAME. Look closely for missing quotes around a path containing spaces.copy evil.exe "C:\Program.exe", then sc stop vulnsvc and sc start vulnsvc.