본문으로 바로가기

OvertheWire - Bandit 풀이1

category SOLUTION/Overthewire 2017. 6. 5. 19:02


   OvertheWire - Bandit 풀이 1


   OvertheWire - http://overthewire.org/wargames/bandit/


접속 -  ssh : bandit.labs.overthewire.org   port : 2220


Level 0

login : bandit0    passwd : bandit0


Level 0 → Level 1

1
2
3
4
bandit0@bandit:~$ ls
readme
bandit0@bandit:~$ cat readme
boJ9jbbUNNfktd78OOpsqOltutMc3MY1

IT Security


Level1  Level2

login : bandit1    passwd : boJ9jbbUNNfktd78OOpsqOltutMc3MY1

1
2
3
4
bandit1@bandit:~$ ls
-
bandit1@bandit:~$ cat ./-
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

IT Security


Level2  Level3

login : bandit2    passwd : CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

1
2
3
4
bandit2@bandit:~$ ls
spaces in this filename
bandit2@bandit:~$ cat 'spaces in this filename'
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

IT Security


Level3  Level4

login : bandit3    passwd : UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

1
2
3
4
5
6
7
8
9
10
bandit3@bandit:~$ ls
inhere
bandit3@bandit:~$ cd inhere
bandit3@bandit:~/inhere$ ls -al
total 12
drwxr-xr-x 2 root    root    4096 May 31 18:22 .
drwxr-xr-x 4 bandit3 bandit3 4096 Jun  5 09:43 ..
-rw-r----- 1 bandit4 bandit3   33 May 31 18:22 .hidden
bandit3@bandit:~/inhere$ cat .hidden
pIwrPrtPN36QITSp3EQaw936yaFoFgAB

IT Security


Level4  Level5
login : bandit4    passwd : pIwrPrtPN36QITSp3EQaw936yaFoFgAB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
bandit4@bandit:~$ ls
inhere
bandit4@bandit:~$ cd inhere
bandit4@bandit:~/inhere$ ls
-file00  -file01  -file02  -file03  -file04  -file05  -file06  -file07  -file08  -file09
bandit4@bandit:~/inhere$ file ./-file*
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: data
bandit4@bandit:~/inhere$ cat ./-file07
koReBOKuIDDepwhWk7jZC0RTdopnAYKh

IT Security


Level5  Level6
login : bandit5    passwd : koReBOKuIDDepwhWk7jZC0RTdopnAYKh
1
2
3
4
5
6
7
8
9
10
11
bandit5@bandit:~$ ls
inhere
bandit5@bandit:~$ cd inhere
bandit5@bandit:~/inhere$ ls
maybehere00  maybehere03  maybehere06  maybehere09  maybehere12  maybehere15  maybehere18
maybehere01  maybehere04  maybehere07  maybehere10  maybehere13  maybehere16  maybehere19
maybehere02  maybehere05  maybehere08  maybehere11  maybehere14  maybehere17
bandit5@bandit:~/inhere$ find . -size 1033c -print
./maybehere07/.file2
bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
DXjZPULLxYr17uwoI01bNLQbtFemEgo7

IT Security


Level6  Level7
login : bandit6    passwd : DXjZPULLxYr17uwoI01bNLQbtFemEgo7
1
2
3
4
bandit6@bandit:~$ find / -size 33c -user bandit7 -group bandit6 -print 2> /dev/null
/var/lib/dpkg/info/bandit7.password
bandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs

IT Security


Level7  Level8
login : bandit7    passwd : HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
1
2
3
4
bandit7@bandit:~$ ls
data.txt
bandit7@bandit:~$ cat data.txt | grep millionth
millionth       cvX2JJa4CFALtqS87jk27qwqGhBM9plV

IT Security


Level8  Level9
login : bandit8    passwd : cvX2JJa4CFALtqS87jk27qwqGhBM9plV
1
2
3
4
bandit8@bandit:~$ ls
data.txt
bandit8@bandit:~$ sort data.txt | uniq -u
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

IT Security


Level9  Level10
login : bandit9    passwd : UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
1
2
3
4
5
6
7
8
bandit9@bandit:~$ ls
data.txt
bandit9@bandit:~$ strings data.txt | grep -P '^='
========== is(
=A,$
=$a0'
=>Ek=
========== truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk

IT Security


Level10  Level11
login : bandit10    passwd : truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk
1
2
3
4
bandit10@bandit:~$ ls
data.txt
bandit10@bandit:~$ base64 -d data.txt
The password is IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR

IT Security


Level11  Level12
login : bandit11    passwd : IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR
1
2
3
4
5
6
bandit11@bandit:~$ ls
data.txt
bandit11@bandit:~$ cat data.txt
Gur cnffjbeq vf 5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh
// ROT13 Decoder 사용
The password is 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu

IT Security


Level12  Level13
login : bandit12    passwd : 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
bandit12@bandit:~$ ls
data.txt
bandit12@bandit:~$ mkdir /tmp/myname1
bandit12@bandit:~$ cp data.txt /tmp/myname1
bandit12@bandit:~$ cd /tmp/myname1
bandit12@bandit:/tmp/myname1$ ls
data.txt
bandit12@bandit:/tmp/myname1$ file data.txt
data.txt: ASCII text
bandit12@bandit:/tmp/myname1$ xxd -r data.txt dump.bin
bandit12@bandit:/tmp/myname1$ file dump.bin
dump.bin: gzip compressed data, was "data2.bin", from Unix, last modified: Wed May 31 18:22:33 2017, max compression
bandit12@bandit:/tmp/myname1$ mv dump.bin dump.gz
bandit12@bandit:/tmp/myname1$ gzip -d dump.gz
bandit12@bandit:/tmp/myname1$ file dump
dump: bzip2 compressed data, block size = 900k
bandit12@bandit:/tmp/myname1$ mv dump dump.bz2
bandit12@bandit:/tmp/myname1$ bzip2 -d dump.bz2
bandit12@bandit:/tmp/myname1$ file dump
dump: gzip compressed data, was "data4.bin", from Unix, last modified: Wed May 31 18:22:33 2017, max compression
bandit12@bandit:/tmp/myname1$ mv dump dump.gz
bandit12@bandit:/tmp/myname1$ gzip -d dump.gz
bandit12@bandit:/tmp/myname1$ file dump
dump: POSIX tar archive (GNU)
bandit12@bandit:/tmp/myname1$ tar xvf dump
data5.bin
bandit12@bandit:/tmp/myname1$ file data5.bin
data5.bin: POSIX tar archive (GNU)
bandit12@bandit:/tmp/myname1$ tar xvf data5.bin
data6.bin
bandit12@bandit:/tmp/myname1$ file data6.bin
data6.bin: bzip2 compressed data, block size = 900k
bandit12@bandit:/tmp/myname1$ mv data6.bin data6.bz2
bandit12@bandit:/tmp/myname1$ bzip2 -d data6.bz2
bandit12@bandit:/tmp/myname1$ file data6
data6: POSIX tar archive (GNU)
bandit12@bandit:/tmp/myname1$ tar xvf data6
data8.bin
bandit12@bandit:/tmp/myname1$ file data8.bin
data8.bin: gzip compressed data, was "data9.bin", from Unix, last modified: Wed May 31 18:22:33 2017, max compression
bandit12@bandit:/tmp/myname1$ mv data8.bin data8.gz
bandit12@bandit:/tmp/myname1$ gzip -d data8.gz
bandit12@bandit:/tmp/myname1$ file data8
data8: ASCII text
bandit12@bandit:/tmp/myname1$ cat data8
The password is 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL
 

IT Security





'SOLUTION > Overthewire' 카테고리의 다른 글

[Natas]Natas3 - Natas4  (0) 2017.07.07
[Natas] Natas2 - Natas3  (0) 2017.07.07
[Natas] Natas1 - Natas2  (0) 2017.07.07
[Natas] Natas0 - Natas1  (0) 2017.07.07
OvertheWire - Bandit 풀이 2  (0) 2017.06.05