Comment on page
Linux Snippets
/sbin/getcap -r / 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
sudo -l
cat /etc/sudoers
fuser <filename>
lsof <filename>
ls /dev
for p in {1..65535}; do echo hi > /dev/tcp/<ip>/$p && echo port $p is open > scan 2>/dev/null; done
arp-scan -l | tee <name>.txt
python gateway-finder.py -f arp.txt -i <public ip>
modprobe nbd
qemu-nbd -r -c /dev/nbd2 <name>.vmdk
mount /dev/nbd1p1 /mnt
find / -newermt "<start-date>" ! -newermt '<end-date>' 2>/dev/null
# stty method
python -c "import pty; pty.spawn('/bin/bash')"
ctrl+z
stty raw -echo
fg
<enter>
<enter>
# rlwrap method
rlwrap <command>
gunzip -dc history.log.1.gz | less #from /var/log/apt
Last modified 9mo ago