# 你所不知道的資安漏洞 `6/1 @淡江` ## language ### 前端 所有內容client都可以修改 ( ==檢查、過濾放前端沒用== ) * HTML * JavaScript > alert("~") ### 後端 * SQL > 資料庫 ### 框架 ( Framework ) 通常是多人維護的大型專案 :+1: 安全性高、易上手 :-1: 肥大 * CSS > Bootstrap, SemanticUI * JS > Vue, React, Angular JS, JQuery * 後端 > Rails, Django, Flask, Laravel, Actix Web ## protocol * HTTP/HTTPS > cookie ## 常用工具 * Wappalyzer * hackbar * tamper data * BurpSuite ## 漏洞通報 * HITCON ZeroDay * HackerOne > Bug Bounty Program ## 攻擊 ### XSS ( Cross-Site Scripting ) * Reflected XSS [~~try it~~](https://jaid.tw:8080) * Stored XSS [~~try it~~](https://jaid.tw:8081) * DOM-based XSS [~~try it~~](https://jaid.tw:8082) ```js <input class="form-control mr-sm-2" type="text" name="g" autofocus placeholder='' aria-label="Search"> ``` #### 防禦方式 * 盡可能過濾跳脫危險字元 * 後端檢查 XSS Auditor bypass, CSP bypass XSS Polyglot > 多種情境下都適用的 payload cheat sheet [練習](https://xss-game.appspot.com/) [練習](https://xss-quiz.int21h.jp/) [練習](https://polyglot.innerht.ml/) ### SQL injection * relational database * SQL ```SQL SELECT * FROM users WHERE users = "~" ``` #### 防禦方式 * ORM * PHP PDO * 使用框架 cheat sheet [練習](http://jaid.tw:8005) [練習](http://140.122.185.174:5678/WebGoat/login) [練習](https://hackme.inndy.tw/login0/) [練習](https://hackme.inndy.tw/login1/) ### LFI 使用路徑取得檔案 #### 防禦方式 * 避免路徑能被控制 * 過濾危險字元 ( 例如./ ) * 權限管理 [練習](http://jaid.tw:8083) [練習](https://hackme.inndy.tw/lfi/) ## 網站學習 * W3School * MND * [Fiddle](https://jsfiddle.net)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up