Bandit Level 11 → Level 12

Level Goal

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

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

 


비밀번호는 data.txt에 저장되어 있으며 대소문자를 13번 이동시킨다.

이해하는데 고생했다....

 

일단 13번 이동이 아닌 3회 이동이라고 한다면 문자 A가 있을 때 D가 출력되면된다.

문자 A B C D E F G H I J K L M N O P Q R S
순서 26 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
치환문자 N O P Q R S T U V W X Y Z A B C D E F
문자 T U V W X Y Z                        
순서 19 20 21 22 23 24 25                        
치환문자 G H I J K L M                        

 

 

힌트의 하단부 tr 명령어의 help는 다음과 같다.

tr SET1 [SET2] : SET1의 데이터를 SET2로 변환한다.

CHAR1-CHAR2: 오름차순으로 CHAR1과 CHAR2사이의 모든 데이터를 선택한다.

 

tr A-Z N-M으로 하면될까 했는데...

순서가 안맞느다고한다. 그렇다면

앞의 숫자 개수와 뒤의 숫자 개수를 맞추면된다

tr [set1](26자) [set2] 26자

 

bandit11@bandit:~$ cat data.txt | tr a-z n-za-m
Ghe password is WIAOOSFmMwXXBC0KbSKBoJ8chQz5yIEv
bandit11@bandit:~$ cat data.txt | tr a-z n-za-m | tr A-Z N-ZA-M
The password is JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv
bandit11@bandit:~$

 

 

와 이번꺼는 어려웠다 처음보는 명령어..

Bandit Level 10 → Level 11

Level Goal

The password for the next level is stored in the file data.txt, which contains base64 encoded data

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

Helpful Reading Material


비밀번호는 data.txt에 존재하며 base64로 인코드 되어있다.

 

디코드는 -d

 

 

bandit10@bandit:~$ base64 -d data.txt
The password is 6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM

 

Bandit Level 9 → Level 10

Level Goal

The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd


비밀번호는 data.txt에 존재하며 '=' 캐릭터 뒤에 사람이 읽을 수 있는 문자열로 존재한다.

 

data.txt

 

데이터에는 사람이 읽을 수 없는 형태의 데이터가 존재한다.

strings data.txt
.....
#pJ_
PJoZP
G^xu
========== G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s

 

strings: 사람이 읽을 수 있는 데이터만 표기한다.

Bandit Level 8 → Level 9

Level Goal

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

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

Helpful Reading Material


비밀번호는 data.txt에 있고 한번만 나타난다.

more data.txt결과

여러 행이 존재하고 이 데이터중 한번만 노출 된 행이 비밀번호이다.

bandit8@bandit:~$ cat data.txt | sort |uniq -c
     10 18DyjwhN856SsMx8bNrFSvr6rJxNQKhE
     10 1iyGemEgn3qUOOFcAJyGPHOiewqZyp1y
     10 2CQ5DQRdtoe9Ft8YpMHqCwQcN1Bk9lCI
     10 365RauAVsFlxktPMpoLtIf1uxijU1TfV
     10 4K2MoVHd1gXfoOdDjvlaRxFNZwmi4A4C
     10 52p0CnGhAvm4m3fPKqz9mTxVDeVYCvnG
     10 5Y76FifuxKStZi4CVovF2uPhgLrZnLzG
     10 7A4l2BI3lPJgNdWAmyXAGlfB8uvCQLX0
     10 8cxarYi5VoKRj3lzo2baLOJaMgUtzoRH
     10 97Qwmy18JE8aGIud1stpTsOrOtUMHeGI
     10 9d8exmGtSsGcU1gz6HmqTfSxmnmI4FBo
     10 A16BW831T94qcsYcGDSkgzYhxnX2xUdK
     10 aAd8RbcAAGVRifo0gE2x1nPIGH2fjgZi
     10 ahwL1iJ5EDLt9wpBjrP2DY8pv6FLdrLy
     10 AiYd84lOOVTA4gqJPX7f6DH8eG3zwq1W
     10 aniL5AEkrKcj4mFR1ujwPZdtF4z1SAin
     10 b0XUx8jfeWYAUGlnOGGAyVRxdNziM4SF
     10 bJDV41So5UyGPR98w9x5pX6nqWsOU2ra
     10 br26ueVSoLeZd8HqErTJpNVCtwFufHGO
     10 BVego1OuHFYy1glUiCH3m5dQxEPV8D6d
     10 bWO8QplAdUvLTPoI07UdQc6zKvON0WS3
     10 cEqNrEqHVIIi9fQKdcvAxaip1brmsSxT
     10 Dml3j9ydZQj13Q6xVRPHVuMhD9pt0NbT
     10 drJxnp5fJxeVRYlCldsIEtrEEwBdyRIL
     10 eJZcdtHKg9jLpvpK9v31Fj1opqlA1A9k
      1 EN632PlfYiZbn3PhVK3XOGSlNInNE00t

 

uniq: 연속된 데이터의 중복을 하나만 남기고 삭제한다.

  • -c: 같은 라인이 몇번 나오닌지 표시한다.
  • -u: 중복이 없는 라인만 출력한다.

sort: 파일의 내용을 정렬한다.(uniq는 중복된 내용이 연속적으로 있어야하기 때문에 sort를 사용하여야한다.)

  • -r: 역순정렬

+ Recent posts