Skip to main content

Commands

FIND

# Search for SUID
find / -type f -perm -04000 -ls 2>/dev/null

# Search for Writable Folders
find / -writable 2>/dev/null | cut -d "/" -f 2 | sort -u

GREP

# Search Hardcoded Passwords
grep -iorE '(password|pwd|pass)[[:space:]]*=[[:space:]]*[[:alpha:]]+' 2>/dev/null

# Search IP Addresses
grep -roE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" 2>/dev/null

Capabilities

# Search for Capabilities
getcap -r / 2>/dev/null

Network

# Show Active Connections
(netstat -punta || ss -nltpu || netstat -anv) | grep -i LISTEN

# Similar Tools
lsof -i -n
rpcinfo -p

Other

:: Arch Linux
:: Required Packages [python2 python-virtualenv]
:: Switch to Legacy Python2 [Virtual Environment]
virtualenv -p /usr/bin/python2 testing_py
. /home/<Username>/testing_py/bin/activate
:: Debian
:: Required Packages [build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git]
:: Switch to Legacy Python2 [Virtual Environment]
curl https://pyenv.run | bash

:: Using [ZSH]
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init --path)"\nfi' >> ~/.zshrc

exec $SHELL
pyenv install 2.7.18
pyenv global 2.7.18
pyenv versions