본문 바로가기

전체 글

Bandit: Level 4 PS C:\Users\USER> ssh bandit4@bandit.labs.overthewire.org -p2220...bandit4@bandit.labs.overthewire.org's password:...bandit4@bandit:~$ The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command. bandit4@bandit:~/inhere$ ls -altotal 48drwxr-xr-x 2 root root 4096 Apr 10 14:23 .drwxr-xr-x 3 roo.. 더보기
Bandit: Level 3 PS C:\Users\USER> ssh bandit3@bandit.labs.overthewire.org -p2220...bandit3@bandit.labs.overthewire.org's password:...bandit3@bandit:~$ Bandit3의 서버에 접속했다. The password for the next level is stored in a hidden file in the inhere directory. 먼저 inhere 디렉토리로 들어가 보자. bandit3@bandit:~$ pwd/home/bandit3bandit3@bandit:~$ ls -altotal 24drwxr-xr-x 3 root root 4096 Apr 10 14:23 .drwxr-xr-x 70 root root 409.. 더보기
Bandit: Level 2 다음 단계로 접속한다.PS C:\Users\USER> ssh bandit2@bandit.labs.overthewire.org -p2220...bandit2@bandit.labs.overthewire.org's password:...bandit2@bandit:~$ 비밀번호는 역시 전 단계에서 구한 것을 복사 붙여넣기해주면 되고, 화면에 출력되지는 않는다. The password for the next level is stored in a file called spaces in this filename located in the home directory 문제의 설명에 따라 비밀번호를 담고 있는 파일을 읽어보자. bandit2@bandit:~$ pwd/home/bandit2bandit2@bandit:~$ l.. 더보기
Bandit: Level 1 전 단계와 마찬가지로 ssh 원격접속을 통해 서버에 진입한다.이때 username은 bandit1이 되고, 비밀번호는 이전 단계에서 알아낸 것을 사용하면 된다. PS C:\Users\USER> ssh bandit1@bandit.labs.overthewire.org -p2220 ... Enjoy your stay! bandit1@bandit:~$ 이전 단계처럼 긴 접속 화면을 거쳐 접속에 성공했다. The password for the next level is stored in a file called - located in the home directory 위와 같이 문제의 발문이 나와 있으므로 이전 단계에서 readme 파일을 읽었던 것처럼 - 파일의 내용을 읽어보자. bandit1@bandit:~.. 더보기
Bandit: Level 0 Level0는 bandit 서버에 접속하는 법을 찾는 과정이다.문제 설명에 SSH를 사용하라고 친절히 명시해 놓았다. SSH란? 원격 서버에 안전하게 접속하기 위한 프로토콜로, 명령어는 아래와 같이 사용한다.ssh username@address [-p portnum] [-i keyfile] 문제에서 주어진 대로 username에 bandit0, address에 bandit.labs.overthewire.org를 넣어준 뒤 2220번 포트로 연결지정을 하면 아래와 같이 bandit 서버에 연결된다. 중간에 [bandit0@bandit.labs.overthewire.org's password:] 라고 비밀번호를 물어보는데, 문제에 나와있는 대로 bandit0를 입력해주면 된다. PS C:\Users\USER.. 더보기
Bandit Wargame : Intro 워게임이란..? 정보보안/해킹을 공부하는 사람들이 온라인 상에서 풀어보면서 학습할 수 있는 문제들로 국내외에 워게임을 제공하는 유명 사이트들이 존재한다. OverTheWire 역시 워게임을 제공하는 사이트 중 하나이고, 이 사이트에서 제공하는 게임의 목록은 아래와 같다. 이 중 오늘 리뷰해 볼 게임은 Bandit 이다. Bandit은 리눅스 기본 명령어를 익히기 위한 게임으로, 이 사이트에서 가장 쉬운 난이도이다. 사이트 상에서는 Bandit → Leviathan / Natas / Kypthon → Narnia → ... 의 순서로 플레이하기를 권장하고 있다. 워게임에 대한 설명을 읽다 보면 아래 쪽에 다음과 같은 문구가 있다. Each shell game has its own SSH port Infor.. 더보기
C언어 학습하기-printf C언어의 기본 문법 printf에 대해 배워보겠습니다. 다음 코드를 살펴봅시다. #include int main() { printf("서식지정자를 이용하여 숫자 출력하기\n"); printf("%d\n", 421); return 0; } #include stdio.h는 standard input output library(표준 입출력 라이브러리)의 약자입니다. printf 문법을 사용하기 위해 해당 라이브러리를 선언해 주어야 합니다. 추후 #include 뒤에 다른 라이브러리를 선언하여 다른 문법들을 사용할 수도 있습니다. int main() int는 정수형 자료형이고 main은 함수 이름입니다. 중괄호 안에 든 것이 main 함수의 내용입니다. printf(" ") printf는 큰따옴표(")내에 든 .. 더보기