/usr/bin/level5 프로그램은 /tmp 디렉토리에level5.tmp 라는 이름의 임시파일을 생성한다. 이를 이용하여 level6의 권한을 얻어라. 라고 한다. 그럼 우선 /usr/bin 디렉토리에 들어가서 level5 를 실행시켜보자. 분명 이 프로그램은 /tmp 디렉토리에 level5.tmp 라는 이름의 임시파일을 생성한다고 했으나,파일 목록을 보면 .tmp 파일은 없다. 그래서 /tmp 디렉토리에 level5.tmp 라는 파일을 임의로 생성해주고다시 /usr/bin 디렉토리에서 level5 를 실행시켰다. 그 후 /tmp 디렉토리에 있는 level5.tmp 파일을 읽었더니 이런식으로 next password 내용이 덮어씨워졌다. level6 password is what the hell
level4 의 hint를 보면 누군가 /etc/xinetd.d/에 백도어를 심어놓았다.! 라고 뜬다. 디렉토리 이동을 하고 파일 목록을 보면 backdoor가 보인다. backdoor 파일은 read 할 수 있고, 열어보면 [level4@ftz xinetd.d]$ cat backdoorservice finger{disable= noflags= REUSEsocket_type= streamwait= nouser= level5server= /home/level4/tmp/backdoorlog_on_failure+= USERID} 이렇게 뜬다. 다른 파일들을 열었을때는 이런식으로 service (읽은 파일명) { ... } 인데[level4@ftz xinetd.d]$ cat services# default: o..
cat 으로 hint 파일을 열면 [level3@ftz level3]$ cat hint 다음 코드는 autodig의 소스이다. #include #include #include int main(int argc, char **argv){ char cmd[100]; if( argc!=2 ){ printf( "Auto Digger Version 0.9\n" ); printf( "Usage : %s host\n", argv[0] ); exit(0); } strcpy( cmd, "dig @" ); strcat( cmd, argv[1] ); strcat( cmd, " version.bind chaos txt"); system( cmd ); } 이를 이용하여 level4의 권한을 얻어라. more hints.- 동시에..
id = level2 / pw = hacker or cracker level2 문제도 역시나 hint 파일이 있다.cat 명령어를 통해 실행시키면 텍스트 파일 편집 중 쉘의 명령을 실행시킬 수 있다는데... 라고 뜬다. 우선 setuid가 있는 파일을 찾아보자. [level2@ftz level2]$ find / -perm -4000 -user level3 2> /dev/null/usr/bin/editor 이번엔 editor 라는 파일에 setuid가 걸려있다. 텍스트 파일 '편집' 중 이라고 했으니 이 파일이 맞는 것 같다. [level2@ftz bin]$ cd /usr/bin[level2@ftz bin]$ ./editor editor를 실행시키면 vim에 관한게 뜬다.이 때 :!/bin/bash 명령어..
id = level1 pw = level1 level1 문제의 파일들과 권한을 보면 hint 라는 파일이 있다.hint가 있을 것 같다. hint파일을 실행시켜 보면 level2 권한에 setuid가 걸린 파일을 찾는다. 라고 써있다. find 명령어를 통해 찾아보자 [level1@ftz level1]$ find / -perm -4000find: /lost+found: Permission deniedfind: /boot/lost+found: Permission deniedfind: /proc/1/fd: Permission deniedfind: /proc/2/fd: Permission deniedfind: /proc/3/fd: Permission deniedfind: /proc/4/fd: Permissio..
- Total
- Today
- Yesterday
- ftz
- pwnable.kr
- C
- 설치
- 워게임
- attackme
- 0xdeadbeef
- wargame.kr
- my-pass
- 1번
- 웹해킹
- lob
- 명령어
- ubuntu
- Lord of SQL Injection
- c언어
- webhacking.kr
- MySQL
- 자바
- java
- WebHacking
- Los
- BOF
- pwnable
- lord of sqlinjection
- wargame
- cobolt
- 파이썬
- 우분투
- Python
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |