본문 바로가기
LINUX

overthewire bandit - linux 명령어 연습

by Rainbound-IT 2021. 5. 14.
반응형

https://overthewire.org/wargames/

 

OverTheWire: Wargames

We're hackers, and we are good-looking. We are the 1%. Wargames The wargames offered by the OverTheWire community can help you to learn and practice security concepts in the form of fun-filled games. To find out more about a certain wargame, just visit its

overthewire.org

위사이트에 가보면 문제를 풀수 있는데

 

putty 를 설치후

host : bandit.labs.overthewire.org

port: 2220

접속후 문제마다 username이 주어지고 다음 레벨로 갈수있는 비밀번호를 문제를 풀면 알수있다.

처음에는 bandit0/bandit0로 들어가면 된다.

 

나는 11번까지 풀었다.

밑은 답과 약간의 해설이다.

 

level password

0 bandit0

1 boJ9jbbUNNfktd78OOpsqOltutMc3MY1

2 CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

3 UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

4 pIwrPrtPN36QITSp3EQaw936yaFoFgAB

5 koReBOKuIDDepwhWk7jZC0RTdopnAYKh

6 DXjZPULLxYr17uwoI01bNLQbtFemEgo7

7 HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs

8 cvX2JJa4CFALtqS87jk27qwqGhBM9plV

9 UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

10 truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk

11 IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR

12 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu

 

풀이

0 cat readme

1 cat ./-

2 cat spaces\ in\ this\ filename 그리고 “ “ 해도됨

3 ls -la 후 cat ./.hidden

4 file ./-file0*

 

5 find [경로] -size [파일크기/-파일크기/+파일크기][b/c/k/w]

블록단위(512KB),  byte, kbyte, 2byte(word)

find ./inhere -size 1033c -ls

 

6 find / -user bandit7 -group bandit6 -size 33c 2>/dev/null 

/dev/null은 0 값을 갖는 null 파일이고 표준 에러(2)를 표준 출력(1)으로 리다이렉션         하라는 의미이다.

2>&1 : 2(표준에러)를 1(표준출력)으로 보내라.

. >/dev/null 2>&1 : 앞에 1이 생략 (1>/dev/null 2>&1) → 표준출력,표준에러 다 버려라.

 

7 cat data.txt |grep millionth

sort [-옵션] [-o 저장될 파일명] 정렬할 파일명 [병합할 파일명....]

 

8 sort data.txt | uniq -c

9 strings data.txt|grep '==='

10 cat data.txt |base64 --d

11 cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'

 

반응형

'LINUX' 카테고리의 다른 글

Ubuntu에 java 설치  (0) 2022.01.28
Ubuntu gateway 설정(vm 인터넷 안됨)  (0) 2022.01.27
Tee 명령어  (0) 2021.10.01
dd(UNIX)  (0) 2021.07.28
linux 명령어  (0) 2021.04.30

댓글