OverTheWire-Bandit全攻略+解析

Level 0

ssh bandit.labs.overthewire.org -p 2220 -l bandit0

Level 0 → Level 1

cat ~/readme

Level 1 → Level 2

cat ~/-

参考资料

http://tldp.org/LDP/abs/html/special-chars.html

Level 2 → Level 3

这一关其实,,,应该关了tab补全

cat ~/spaces\ in\ this\ filename

或者在windows用命令行的方式也行

cat "/home/bandit2/spaces in this filename"
cat "space in this filename

Level 3 → Level 4

cat ~/inhere/.hidden

Level 4 → Level 5

i=0; while [ $i -le 9 ]; do file `python -c "print '/home/bandit4/inhere/-file%02d' % $i"`; i=$((i+1)); done

Level 5 → Level 6

难度不够啊,同大小的就一个...

 find . -type f -size 1033c -print | xargs cat

还要过滤的话文件加-perm参数未必有用,目前考虑用ls -l和file命令做。

Level 6 → Level 7

find / -user bandit7 -group bandit6 -size 33c 2>/dev/null | xargs cat

很见鬼的是,-print后面放哪些东西会出问题...

Level 7 → Level 8

 cat ~/data.txt | grep millionth

Level 8 → Level 9

sort ~/data.txt | uniq -u

Level 9 → Level 10

strings ~/data.txt | grep ==

Level 10 → Level 11

base64 -d ~/data.txt

Level 11 → Level 12

 cat ~/data.txt | tr 'a-zA-Z' 'n-za-mN-ZA-M'

Level 12 → Level 13

xxd -r ~/data.txt | gzip -d - | bzip2 -d - | gzip -d - | tar -xOf - | tar -xOf - | bzip2 -d - | tar -xOf - | gzip -d -

Level 13 → Level 14

Level 14 → Level 15

Level 15 → Level 16

Level 16 → Level 17

Level 17 → Level 18

Level 18 → Level 19

Level 19 → Level 20

Level 20 → Level 21

Level 21 → Level 22

Level 22 → Level 23

Level 23 → Level 24

Level 24 → Level 25

Level 25 → Level 26

Level 26 → Level 27

Level 27 → Level 28

Level 28 → Level 29

Level 29 → Level 30

Level 30 → Level 31

Level 31 → Level 32

Level 32 → Level 33

Level 33 → Level 34