오늘도 Bandit 문제를 풀어봅시다
Bandit Level 10 → Level 11 문제 풀이
ssh bandit10@bandit.labs.overthewire.org -p 2220
password : G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s
Bandit Level 10 → Level 11 문제는 data.txt 파일 안에 비밀번호가 base64로 인코딩 되어있다고 합니다
data 파일을 확인해 보니 base64로 인코딩 되어있습니다 이 인코딩 문자를 디코딩 해야 우리가 원하는 Level 11의 패스워드를 찾을 수 있습니다
base64 : 바이너리 데이터를 문자 코드에 영향을 받지 않는 공통 ASCII 문자로 표현하기 위해 만들어진 인코딩입니다
이 base64 명령어를 사용하여 해당 문자열을 디코딩 할 수 있습니다
base64의 --decode라는 옵션을 이용해서 이렇게 디코딩 할 수 있습니다 추가로 base64 --help 명령어를 이용하여 다른 옵션들도 확인해 보세요
[ 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
Bandit Level 11 → Level 12 문제 풀이
ssh bandit11@bandit.labs.overthewire.org -p 2220
password : 6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM
Bandit Level 11 → Level 12 문제는 data.txt 파일 내부 비밀번호의 모든 대소문자 위치가 13칸씩 밀렸다고 합니다
이번에는 base64와 다르게 ROT13 즉, 카이사르 암호문을 복호화 하는 문제입니다
카이사르 암호문 : 간단한 치환 암호의 일종인데 암호화하고자 하는 내용을 알파벳별로 일정한 거리만큼 밀어서 다른 알파벳으로 치환하는 방식입니다
문제에서 준 ROT13 위키백과를 확인하면 사용법을 자세히 알 수 있습니다
tr : Translate characters의 약자로 규칙에 의해 문자의 변환이나 삭제를 할 수 있습니다
해당 사진에서는 tr 명령어는 대소문자 A-Z를 각각의 대소문자 N-Z 다음으로 A-M으로 치환하라는 의미입니다
ROT13은 아스키코드 테이블 상에서 13만큼 넘겨 암호화하는 고전 암호의 일종입니다
그래서 'A'는 'N', 'M' 은 'Z', 'N'은 'A'로 치환되는 구조입니다
이렇게 위키백과에 주어진 예제를 이용하여 패스워드를 찾아냈습니다
[ ROT13 - 위키백과 ]
ROT13 - Wikipedia
From Wikipedia, the free encyclopedia Simple encryption method ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the latin alphabet. ROT13 is a special
en.wikipedia.org
이번 시간에는 암호화 위주에 문제를 풀어봤습니다
[ TMI ]
ROT13에 대해 구글링하다 한 번에 문자열을 암호화 / 인코딩 / 디코딩 하는 사이트를 찾게 되었습니다
ROT13 decoder: Decrypt and convert ROT13 to text
ROT13 (rotate by 13 places) replaces a letter with the letter 13 letters after it in the alphabet. It has been described as the "Usenet equivalent printing an answer to a quiz upside down" as it provides virtually no cryptographic security.
cryptii.com
ROT13 말고도 Base64 인코딩 / 디코딩 및 다양한 암호 기능들이 있습니다