Wargames

[Wargames] Bandit Notes

Special File Name:

cat ./-
# -- stops parsing params
rm -- -filename
  • space in between
cat space\ in\ between

File Properties:

  • find
find / -name file* -size 1033c -redable -user hublee -group mygroup ! -perm /111 2>/dev/null
  • file
file somefile

File Content:

  • sort | uniq
cat somefile | sort | uniq -u
  • strings
strings somefile | grep '^===*'
  • base64
base64 -d somefile
  • md5sum
echo I am user $myname | md5sum | cut -d ' ' -f 1
  • tr
cat data.txt | tr [a-zA-Z] [n-za-mN-ZA-M]
  • diff
diff password.new password.old

Compress/Decompress:

gzip -d for *.gz
bzip2 -d
tar -xvf

Network:

  • ssh
ssh -i privatekey.file user@host cat readme.txt

Note:RSA-key file is of the form:

—–BEGIN RSA PRIVATE KEY—–
xxx
—–END RSA PRIVATE KEY—–

  • nc
    #connect to IP PORT
nc -v 127.0.0.1 30000

#create a listening port

nc -l 9000
  • openssl
openssl s_client -ign_eof -connect localhost:30001
  • nmap
nmap -p 31000-32000 localhost