War Games/Bandit - OverTheWire

[Bandit-OverTheWire] Level 3 -> Level 4

Bandit Level 3 → Level 4 Level Goal The password for the next level is stored in a hidden file in the inhere directory. Commands you may need to solve this level ls, cd, cat, file, du, find bandit3@bandit:~$ ls inhere 디렉토리를 확인해보면 inhere라는 또다른 디렉토리가 있는걸 확인할 수 있습니다. bandit3@bandit:~/inhere$ ls 막상 ls로 디렉토리를 확인해보면 아무것도 없는 것을 확인할 수 있습니다. 이거는 ls의 옵션에 대해서 물어보는 문제인데, 모르는 사람은 글 읽고 옵시다. withcoding.com/89 ..

2020.09.17 게시됨

War Games/Bandit - OverTheWire

[Bandit-OverTheWire] Level 2 -> Level 3

다양한 방법으로 풀어보겠습니다. 1. tab(자동완성) 이용하기 리눅스에서 일정 파일 이름을 치고 tab키를 누르면 디렉토리 안에 있는 파일 이름으로 자동완성됩니다. 따라서 spa까지 치고 tab을 치면 자동으로 파일이름을 완성시켜주기 때문에 이걸 가지고 풀 수 있습니다. bandit2@bandit:~$ ls spaces in this filename bandit2@bandit:~$ cat spaces\ in\ this\ filename UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK 1-2. \(역슬래시) 이용하기 사실 1번이랑 같아서 1-2로 뺐는데, 이 문제를 기본적인 지식으로 풀 수 없는 이유가 기본적으로 리눅스는 스페이스를 기준으로 명령어를 나누기 때문에 파일 이름을 cat space..

2020.09.17 게시됨

[pwnable.xyz] grownup(50 pts) :: Write-Up 포스팅 썸네일 이미지

War Games/pwnable.xyz

[pwnable.xyz] grownup(50 pts) :: Write-Up

Are you old enough for this one? Flag is in the binary itself. 플래그는 바이너리 자체에 있다고 하네요. 잘 분석해봅시다. 일단 main함수를 보면 가장 먼저 setup()함수가 실행되는 것을 확인할 수 있습니다. 일단 전체적인 흐름을 파악하기 위해 이따가 보도록합시다. 그 뒤에서는 18살보다 나이가 더 많은지 적은지 확인한 뒤 y로 대답하는 경우에는 프로그램이 종료되고, 아닌 경우에는 src에 0x84만큼 공간을 할당한 뒤에 이름을 입력받고 종료됩니다. 근데 21번줄에서 프린트하는 방식이 특이하네요. 뭔가 수상하니 우선 qword_601160부터 알아봅시다. 그전에 아까전에 처음 실행된 setup()함수를 확인해 줍시다. signal함수라는 처음보는 함수..

2020.09.17 게시됨

[Bandit-OverTheWire] Level 1 -> Level 2 포스팅 썸네일 이미지

War Games/Bandit - OverTheWire

[Bandit-OverTheWire] Level 1 -> Level 2

접속합시다 $ ssh bandit1@bandit.labs.overthewire.org -p2220 This is a OverTheWire game server. More information on http://www.overthewire.org/wargames bandit1@bandit.labs.overthewire.org's password: boJ9jbbUNNfktd78OOpsqOltutMc3MY1(입력) 문제 전문입니다. Level Goal The password for the next level is stored in a file called - located in the home directory Commands you may need to solve this level ls, cd, cat, ..

2020.09.09 게시됨

[Bandit-OverTheWire] Level 0 -> Level 1 포스팅 썸네일 이미지

War Games/Bandit - OverTheWire

[Bandit-OverTheWire] Level 0 -> Level 1

OverTheWire Bandit은 리눅스 명령어에 대한 문제들을 만들어 놓은 곳입니다. 보통 시스템 해킹을 하면 윈도우보다는 리눅스를 훨씬 더 많이 사용하기 때문에 리눅스 명령어는 평소 말하는것처럼 할줄 알아야합니다. 링크: overthewire.org/wargames/bandit/ OverTheWire: Level Goal We're hackers, and we are good-looking. We are the 1%. Level Goal The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220..

2020.09.09 게시됨

[pwnable.xyz] misalignment(50 pts) :: Write-Up 포스팅 썸네일 이미지

War Games/pwnable.xyz

[pwnable.xyz] misalignment(50 pts) :: Write-Up

Try not using a debugger for this one. pwnable.xyz misalignment입니다. 간단히 포인터 장난인데, 봅시다 v5+7의 값을 0xDEADBEEF에서 0xB000000B5로 값을 바꾸어 주면 되네요. add랑 비슷한 맥락인것 같습니다. 일단 쉬운 이해를 위해 입력을 받기 전 v5의 상태를 보겠습니다. 저렇게 0xdeadbeef가 들어가있는 상황입니다. 리눅스에서는 리틀엔디안 기법이 적용되기때문에 저렇게 반대로 입력이 됩니다. 그럼 우리가 만들고 싶은 상황은 다음과 같겠죠? 네 그럼 v5[0]에는 0xb500000000000000를 넣으면 되고, v5[1]에는 0x0b000000를 넣어주면 됩니다. 입력받는건 10진수로 입력받으니 각 값을 10진수로 바꾸면? v5..

2020.09.08 게시됨

[해커스쿨 LOB] END: Death Knight 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] END: Death Knight

END. Death Knight 진짜 마지막! login id : death_knight pw : got the life 디렉토리를 확인해보면 [death_knight@localhost death_knight]$ ls dropped_item.txt dropped item이 하나 있네요. 끝! 여러분은 이 데이터 덩어리를 얻기 위해 열심히 달려오셨습니다. LOB를 풀면서 gdb와 시스템의 메모리 구조에 대해서 조금이나마 더 깊은 이해를 할 수 있었으면 좋겠습니다. 수고많으셨습니다~

2020.09.02 게시됨

[해커스쿨 LOB] Level20: Xavius >> Death Knight 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] Level20: Xavius >> Death Knight

Level 20. Xavius >> Death Knight Theme: remote BOF login id : xavius pw : throw me away bash2 & 코드 확인 [xavius@localhost xavius]$ bash2 [xavius@localhost xavius]$ cat death_knight.c /* The Lord of the BOF : The Fellowship of the BOF - dark knight - remote BOF */ #include #include #include #include #include #include #include #include #include main() { char buffer[40]; int server_fd, client_fd; str..

2020.09.01 게시됨

[해커스쿨 LOB] Level19: Nightmare >> Xavius 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] Level19: Nightmare >> Xavius

Level 19. Nightmare >> Xavius Theme: arg login id : nightmare pw : beg for me bash2 & 코드확인 [nightmare@localhost nightmare]$ bash2 [nightmare@localhost nightmare]$ cat xavius.c /* The Lord of the BOF : The Fellowship of the BOF - xavius - arg */ #include #include #include main() { char buffer[40]; char *ret_addr; // overflow! fgets(buffer, 256, stdin); printf("%s\n", buffer); if(*(buffer+47) == '..

2020.08.31 게시됨

[해커스쿨 LOB] Level18: Succubus >> Nightmare 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] Level18: Succubus >> Nightmare

Level 18. Succubus >> Nightmare Theme: PLT login id : succubus pw : here to stay bash2 & 코드 확인 [succubus@localhost succubus]$ bash2 [succubus@localhost succubus]$ cat nightmare.c /* The Lord of the BOF : The Fellowship of the BOF - nightmare - PLT */ #include #include #include #include main(int argc, char *argv[]) { char buffer[40]; char *addr; if(argc < 2){ printf("argv error\n"); exit(0); } //..

2020.08.30 게시됨

[해커스쿨 LOB] Level17: Zombie Assassin >> Succubus 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] Level17: Zombie Assassin >> Succubus

Level 17. Zombie Assassin >> Succubus Theme: calling functions continuously login id : zombie_assassin pw : no place to hide bash2 & 코드확인 [zombie_assassin@localhost zombie_assassin]$ bash2 [zombie_assassin@localhost zombie_assassin]$ cat succubus.c /* The Lord of the BOF : The Fellowship of the BOF - succubus - calling functions continuously */ #include #include #include // the inspector int che..

2020.08.30 게시됨

[해커스쿨 LOB] Level16: Assassin >> Zombie Assassin 포스팅 썸네일 이미지

War Games/해커스쿨 LOB

[해커스쿨 LOB] Level16: Assassin >> Zombie Assassin

Level 16. Assassin >> Zombie Assassin Theme: FEBP 로그인 id : assassin pw : pushing me away bash2 & 코드확인 [assassin@localhost assassin]$ bash2 [assassin@localhost assassin]$ cat zombie_assassin.c /* The Lord of the BOF : The Fellowship of the BOF - zombie_assassin - FEBP */ #include #include main(int argc, char *argv[]) { char buffer[40]; if(argc < 2){ printf("argv error\n"); exit(0); } if(argv[1][4..

2020.08.30 게시됨