php中%3ch1%3e是什么意思,bWAPP学习笔记 - A1 Injection (一)

HTML Injection - Reflected (GET)

Level: Low

在低级难度,输入数据没有验证

First name:

hello

Last name:

world

也可以注入XSS

Level: Medium

在中级难度,源码中做了简单的字符替换

// Converts only "" to HTLM entities

$input = str_replace("

$input = str_replace(">", ">", $input);

可以通过URL编码绕过

First name: %3Ch1%3Ehello%3C/h1%3E

Last name: %3Ch1%3Eworld%3C/h1%3E

Level: High

在高级难度,使用了htmlspecialchars()函数过滤

return htmlspecialchars($data, ENT_QUOTES, $encoding);

无法直接绕过

HTML Injection - Reflected (POST)

html代码注入到页面中--通过POST方法

各个界别的绕过方法,与GET方法一致,仅仅是提交方式不同

不再列举

HTML Injection - Reflected (URL)

Level: Low

代码中没有过滤

$url = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];

可以通过 Burp Suite 修改主机头,在路径中加入html代码

GET: /bWAPP/htmli_current_url.php#

hello

Host: hello.world

77347b1c30ac?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=weixin

HTML Injection - Reflected (URL)(Burp Suite)

显示结果:

77347b1c30ac?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=weixin

Level: Medium/High 无法绕过

HTML Injection - Stored (Blog)

Level: Low

直接输入html语句即可:

hello

77347b1c30ac?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=weixin

HTML Injection - Stored (Blog)(Low)

Level: Medium/High

代码已经加过滤:

}

while($row = $recordset->fetch_object())

{

if($_COOKIE["security_level"] == "1" or $_COOKIE["security_level"] == "2")

{

?>

<?php echo $row->id; ?><?php echo $row->owner; ?><?php echo $row->date; ?><?php echo xss_check_3($row->entry); ?>

iFrame Injection

Level: Low

查看页面源码,只需闭合iframe标签即可

iFrame Injection

提交URL,ParamUrl,ParamWidth,ParamHeight3个参数适当闭合即可:

比如:

ParamUrl=robots.txt">

hello

p><p%20align= 77347b1c30ac?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=weixin

iFrame Injectio(Low)

Level: Medium

源码中加入了addslashes,过滤掉单引号‘、双引号“和反斜杠\,但大部分html特殊字符代码依然可以使用

在ParamWidth后面闭合依然有效:

URL路径中,将ParamWith参数改为:

ParamWidth=250">

hello

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值