김승현

[OverTheWire] Bandit Level 10 → Level 11 본문

Linux/OverTheWire : Bandit

[OverTheWire] Bandit Level 10 → Level 11

kshind 2023. 2. 16. 16:20

문제

문제 원문

password는 data.txt에 있고 base64로 인코딩 되어있다고 한다.

 

여기서 base64란 binary data들을 일련의 문자열로 바꾸는 인코딩 방식이다.

명령어를 통해 base64를 디코딩할 수 있지만 간단하게 사이트를 통해서도 디코딩할 수도 있다.

참고 사이트


 

Base64 - Wikipedia

From Wikipedia, the free encyclopedia Group of binary-to-text encoding schemes using 64 symbols (plus padding) In computer programming, Base64 is a group of binary-to-text encoding schemes that represent binary data (more specifically, a sequence of 8-bit

en.wikipedia.org

 

풀이

 

ls -al을 했을 때 출력되는 화면

문제에 적혀 있듯이 data.txt가 존재한다.

cat data.txt를 해보면 임의의 문자열들이 나열되어 있는 것을 볼 수 있는데

이건 base64로 인코딩 되어있기 때문에 디코딩할 필요가 있다.

base64로 인코딩을 하거나 base64를 디코딩할 땐 base64 명령어를 사용하면 간단히 해결된다.

base64 : base64로 인코딩 또는 디코딩 해주는 명령어이다.

base64 [파일명] : base64로 인코딩 해줌
base64 -d [파일명] : base64를 디코딩 해줌

우리가 필요한 건 디코딩이기에 base 64 -d를 사용하면 된다.

비밀번호를 획득함
decode한 내용을 바로 보여줘서 그런가 cat을 쓰지 않아도 바로 볼 수 있다...


다음 문제

https://kshind.tistory.com/13

 

[OverTheWire] Bandit Level 11 → Level 12

문제 password는 data.txt에 있고 소문자(a-z), 대문자(A-Z)들은 13번 이동됐다? 이런 의미인 것 같다. 구글에 찾아보니까 rot13이라는 카이사르 암호의 일종으로 영어 알파펫을 13글자씩 밀어서 만드는 것

kshind.tistory.com