일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 시그널
- 시스템
- wargame
- 컴퓨터구조
- 프로그래밍
- 취약점
- 어셈블리어
- C++
- 리눅스
- kernel
- 시스템 프로그래밍
- Pwnable.kr
- 워게임
- 리눅스커널
- Bandit
- 드론
- 리버싱
- 시스템프로그래밍
- C언어
- radare2
- 커널
- 알고리즘
- 리눅스 커널
- 시스템해킹
- css
- pwn.college
- px4
- Leviathan
- write up
- pwncollege
Archives
- Today
- Total
Computer Security
#5 Wargame leviathan5 (Level6 ~ Level7(End)) 본문
반응형
Level6 -> Level7
1. ls -al 을 확인해보니, leviathan6 라는 파일이 있고, 얘도 역시 setuid 이다.
leviathan6@leviathan:~$ ls -al
total 28
drwxr-xr-x 2 root root 4096 Aug 26 2019 .
drwxr-xr-x 10 root root 4096 Aug 26 2019 ..
-rw-r--r-- 1 root root 220 May 15 2017 .bash_logout
-rw-r--r-- 1 root root 3526 May 15 2017 .bashrc
-r-sr-x--- 1 leviathan7 leviathan6 7452 Aug 26 2019 leviathan6
-rw-r--r-- 1 root root 675 May 15 2017 .profile
2. ./leviathan6 를 해보니, 4자리 비밀번호를 입력해야 하는 것 같다. bruite force 공격이 떠오른다.
leviathan6@leviathan:~$ ./leviathan6
usage: ./leviathan6 <4 digit code>
leviathan6@leviathan:~$ ./leviathan6 1111
Wrong
3. r2 leviathan6 -d 로 분석을 해보자.
위를 살펴보면, mov dword 0x1bd3 인데, 16진수를 10진수로 바꾸면 7123이 나온다. 얘를 넣고 cmp 를 하는거 보니, 얘가 비밀번호인것 같다.
4. ./leviathan6 7123 을 쳐보니, 쉘권한을 얻은걸 보아 비밀번호가 맞는 것 같다.
leviathan6@leviathan:~$ ./leviathan6 7123
$ cat /etc/leviathan_pass/leviathan7
ahy7MaeBo9
5. 위에서 얻은 leviathan7 비밀번호:ahy7MaeBo9 로 leviathan7에 접속하면 성공!
이로써, leviathan의 모든 문제를 끝냈다!
문제를 풀면서 정말 많이 느낀 점이 초반에 컴퓨터구조론, 어셈블리어를 익혀놓은 것이 결국 리버싱 할 때 매우 많이 좋은 이점으로 작용한 것 같다.
반응형
'Wargame:leviathan' 카테고리의 다른 글
#4 Wargame leviathan4 (Level5 ~ Level6), link 명령어 (0) | 2022.07.29 |
---|---|
#3 Wargame leviathan3 (Level3 ~ Level5), db,dc,px, ltrace, 아스키코드 변환 (0) | 2022.07.28 |
#2 Wargame leviathan2 (Level2 ~ Level3), radare2,Command injection (0) | 2022.07.27 |
#1 Wargame leviathan1 (Level0 ~ Level2), radare2 (0) | 2022.07.26 |
Comments