1.SLQ:操作数据
数据库结构
create/drop database
create/alter/drop table
数据库内容
insert values语句
insert into table_name(col1,col2) values(value1,value2)
insert select语句
insert into table_name(col1,col2) select col1,col2 ... from tablename where search condition
update语句
update table_name set columnname1=value1[,columname2=value2]... where search condition
delete
delect from tablename where condition

2.sql注入漏洞查找
通用法则
单引号 ‘

条件法则 and 1=1 、and 1=2

时间法则 sleep(盲注)
数据库语句写法
数字型

字符型

搜索型

3.SQL——手工注入

select user()——获取当前登录账号
select version()——获取数据库版本
select database()——获取当前数据库
全局函数
@@datadir
@@hostname
@@version
@@version_conpile_os
常用技巧
- ascll转字符:char()
- 连接字符串:concat_ws(char(32,58,32),user(),database(),version())
- 切分函数:substring_index(user(),"@",1)
- 计算哈希:md5(),借助与此服务器进行计算
4.手工获取数据库表及字段的方法

5.漏洞利用

6.sql注入防护措施
