General
总结
这部分主要讲了一些基本操作和理论知识,包括代理拦截修改和开发者工具的使用
HTTP Basics
要求给出请求的这两项
直接看网页源码并且查找magaic
可以看到这里magicnum被设置成41,所以猜测magic number是41,成功提交
<form class="attack-form" accept-charset="UNKNOWN"
method="POST" name="form"
th:action="@{/HttpBasics/attack2}">
<script>
// sample custom javascript in the recommended way ...
// a namespace has been assigned for it, but you can roll your own if you prefer
webgoat.customjs.assignRandomVal = function () {
var x = Math.floor((Math.random() * 100) + 1);
document.getElementById("magic_num").value = x;
};
webgoat.customjs.assignRandomVal();
</script>
<input type="hidden" name="magic_num" id="magic_num" value="foo" />
<table>
<tr>
<td>Is this form sending a POST or a GET:</td>
<td><input name="answer" value="" type="TEXT" /></td>
<td></td>
</tr>
<tr>
<td>What is the magic number:</td>
<td><input name="magic_answer" value="" type="TEXT" /><input
name="SUBMIT" value="Go!" type="SUBMIT" class="spacing" /></td>
<td></td>
</tr>
</table>
</form>
这里的原理是“foo”被随机数覆盖,但还是会在网站源码中显示,即在网页源码中就会显示随机数。
将请求拦截
将magic的两个参数改成一样的,成功提交
原理在于,源码中将两个数进行了比较
HTTP Proxies
题目要求:
改成这样就可以了
Developer Tools
简单的控制台使用
让查特定字段:
直接拦截就行
CIA Triad
主要讲了CIA的理论知识,包括保密性,完整性,可用性
。。所以这里本来是应该有题目的吗
Writing new lesson
看它给的代码,发现是一个简单的字符串匹配,这里将secretValue和param1进行了匹配,而 private final String secretValue = "secr37Value";
已给出
License:
CC BY 4.0