Overthewire War Games (Bandit)

Bandit 0

alt text

  • ssh server login with port specification
  • syntax ssh <username>@<host> -p <port>

Bandit 1

alt text

  • ssh server login
  • ls to view directory content
  • cat to view file content

Bandit 2

alt text

  • ssh server login
  • ls to view directory content
  • cat to view file content
  • accessing dashed filenames

Bandit 3

alt text

  • ssh server login
  • cd to change directory
  • ls -a to view hidden directory content
  • cat to view file content

Bandit 4

alt text

  • ssh server login
  • cd to change directory
  • ls -a to view hidden directory content
  • cat <path>/-filename view dashed filenames

Bandit 5

alt text

  • ssh server login
  • cd to change directory
  • find search for files in a directory hierarchy
  • du estimate file space usage
  • ls list directory content
  • find -readable -type f ! -executable -exec du -b {} + | grep 1033 or find -readable -type f ! -executable -exec ls -l {} + | grep 1033

Bandit 6

alt text

  • ssh server login
  • cd to change directory
  • find search for files in a directory hierarchy
  • ls list directory content
  • find -type f -size 33c -exec ls -l {} + | grep -E 'bandit6|bandit7'

Bandit 7

alt text

  • ssh server login
  • grep print lines that match patterns
  • grep data.txt | grep millionth

Bandit 8

alt text

  • ssh server login
  • sort sort lines of text files
  • uniq report or omit repeated lines
  • sort data.txt | uniq -u

Bandit 9

alt text

  • ssh server login
  • strings print the sequences of printable characters in files
  • grep print lines that match patterns
  • strings data.txt | grep ===

Bandit 10

alt text

  • ssh server login
  • base64 base64 encode/decode data and print to standard output
  • base64 -d data.txt

Bandit 11

alt text

  • ssh server login
  import codecs
  print(codecs.decode('Gur cnffjbeq vf WIAOOSFzMjXXBC0KoSKBbJ8puQm5lIEi', 'rot13'))