Overthewire wargame-bandit


#Overthewire wargame

Bandit

Level 0->Level 1

ssh bandit0@bandit.labs.overthewire.org -p 2220
cat readme

Level 1-> Level 2

cat ./-
password: CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

Level 2->Level 3

cat spaces\ in\ this\ filename
password: UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

Level 3-> Level 4

cat inhere/.hidden
password: pIwrPrtPN36QITSp3EQaw936yaFoFgAB

Level 4->Level 5

The password for the next level is stored in the only human-readable file in the inhere directory
find . -exec file {} \;|grep ASCII|cut -b -9|xargs cat
password: koReBOKuIDDepwhWk7jZC0RTdopnAYKh

Level 5->Level 6
The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

  • human-readable
  • 1033 bytes in size
  • not executable

find inhere/ -size 1033c -exec file {} \;|cut -d : -f 1|xargs cat
password: DXjZPULLxYr17uwoI01bNLQbtFemEgo7

Level 6 -> level 7

The password for the next level is stored somewhere on the server and has all of the following properties:

  • owned by user bandit7
  • owned by group bandit6
  • 33 bytes in size

find / -user bandit7 -group bandit6 -size 33c
password; HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs

Level 7-> Level 8

grep millionth data.txt
password: cvX2JJa4CFALtqS87jk27qwqGhBM9plV

Level 8 -> Level 9

The password for the next level is stored in the file data.txt and is the only line of text that occurs only once

cat data.txt |sort|uniq -c|grep '1 '
password: UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

Level 9-> Level 10

The password for the next level is stored in the file data.txt in one of the few human-readable strings, beginning with several ‘=’ characters.
strings data.txt |grep ===
password: truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk

Level 10-> Level 11

The password for the next level is stored in the file data.txt, which contains base64 encoded data
strings data.txt |base64 -d
password: IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR

Level 11-> Level 12

The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions
cat data.txt |tr 'A-Za-z' 'N-ZA-Mn-za-m'
password:5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu

Level 12->Level 13

The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)

xxd -r data.txt > data
file data
mv data data.gz
gunzip data.gz
反复用file gunzip, tar xvf 或bunzip2
password: 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL

Level 13->Level 14

The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. Note: localhost is a hostname that refers to the machine you are working on

ssh bandit14@localhost -i private.key
password: 4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e

Level 14->Level 15

The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.
telnet localhost 30000
4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e
password: BfMYroe26WYalil77FoDi9qh59eK5xNr

Level 15->Level 16

The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL encryption.
openssl s_client -ign_eof -connect localhost:30001
password: cluFn7wTiGryunymYOu4RcffSxQluehd

Level 16->Level 17

The credentials for the next level can be retrieved by submitting the password of the current level to a port on localhost in the range 31000 to 32000. First find out which of these ports have a server listening on them. Then find out which of those speak SSL and which don’t. There is only 1 server that will give the next credentials, the others will simply send back to you whatever you send to it.
nmap localhost -p 31001-32001
openssl s_client -connect localhost:31xxx
or
echo aaa |nc localhost 31xxx and then openssl s_client -connect localhost:31xxx -quiet
private key: -----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAvmOkuifmMg6HL2YPIOjon6iWfbp7c3jx34YkYWqUH57SUdyJ imZzeyGC0gtZPGujUSxiJSWI/oTqexh+cAMTSMlOJf7+BrJObArnxd9Y7YT2bRPQ Ja6Lzb558YW3FZl87ORiO+rW4LCDCNd2lUvLE/GL2GWyuKN0K5iCd5TbtJzEkQT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elyZ9FsGxsgtRBXRsqXuz7wtsQAgLHxbdLq/ZJQ7YfzOKU4ZxEnabvXnvWkU YOdjHdSOoKvDQNWu6ucyLRAWFuISeXw9a/9p7ftpxm0TSgyvmfLF2MIAEwyzRqaM 77pBAoGAMmjmIJdjp+Ez8duyn3ieo36yrttF5NSsJLAbxFpdlc1gvtGCWW+9Cq0b dxviW8+TFVEBl1O4f7HVm6EpTscdDxU+bCXWkfjuRb7Dy9GOtt9JPsX8MBTakzh3 vBgsyi/sN3RqRBcGU40fOoZyfAMT8s1m/uYv52O6IgeuZ/ujbjY= -----END RSA PRIVATE KEY-----
save the private key to a file and chmod 400 abc.priv

Level 17 -> Level 18

There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new
diff passwords.old passwords.new
password: kfBf3eYk5BPBRzwjqutbbfE887SVc5Yd

Level 18->Level 19

The password for the next level is stored in a file readme in the homedirectory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH.

cmd: ssh bandit18@bandit.labs.overthewire.org -p 2220 /bin/sh
password: IueksS7Ubh8G3DCwVzrTd8rAVOwq3M5x

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值