php - 如何在不使用 API 的情况下访问 HTML 登录中的不安全凭据?
问题描述
我正在上一门本科生安全课程来模拟恶意软件攻击。我无法弄清楚如何实施 Broken Authentication 漏洞。我选择模拟如何从一个简单的 HTML/PHP 登录页面访问凭据,但我喜欢的几乎每个示例都使用 API。有人可以帮我编码吗?我想保持简单,因为它是为了上课。
<form action = "validate.php" method= "POST">
<table border = "0" padding = "5" cols = "2" >
<tr>
<td colspan = "2"><input name="usr" type = "text" placeholder = "Email" title = "Please enter your username here (e.g. johndoe1998@whomail.com)" value = "<?php echo $_SESSION['usr']; ?>" class="auto-width" required/><?php echo $_SESSION['usrerr']; ?></td>
</tr>
<tr>
<td colspan = "2"><input name="pw" type = "password" placeholder = "********" title = "Please enter your password " value = "" class = "auto-width" required/>
</td>
</tr>
<tr>
<td><label style='font-size: 50%;'>Remember Me</label></td>
<td><input name="remember" type="checkbox" title="Remember Me for ONE Minute" value="yes" class="auto-width"/></td>
</tr>
<tr>
<td><input type = "submit" value = "Send Info" name = "lgn_submit"/></td>
<td><input type = "reset" value = "Clear"/></td>
<td><?php echo $_SESSION['err'] ?></td>
</tr>
</table>
</form>
解决方案
推荐阅读
- android - 当应用程序在 android webRTC/AppRTC 中处于后台时停止传输音频
- java - 我的位置正在更新,而我没有使用 altbeacon android studio 移动
- flutter - 如何在列表视图构建器中显示特定索引中的项目
- powershell - kubectl 运行中的格式错误的命令
- qt - KeyPress 未在 Android 平板电脑上触发
- javascript - 如何使用 map area="rect" 突出显示图像的可点击区域 - Ionic 4
- javascript - While 循环元素状态 cypress
- laravel - Laravel 从另一个来源获取值
- c# - 表中的 Jquery 自动完成
- c# - 如何自定义渲染器?