You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
《Beyond XSS:探索網頁前端資安宇宙》3-4 ~ 3-6
3-4 只用 CSS 也能攻擊?CSS injection 基礎篇
用 HackMD 偷資料
3-5 CSS injection 進階篇
import
,巢狀嵌套的去偷import
會先載入先 response 回來的 CSS章節回顧 QA
next.config
設定允許的圖片路徑style-src
設成 self 或是只能載入 google font 來源的字體3-6 就算只有 HTML 也能攻擊?
反向標籤劫持(Reverse tabnabbing)
window.opener
去存取原本頁面的 locationrel="noreferrer noopener"
就無法存取原頁面的屬性,避免被惡意修改target=_blank
預設有noopener
效果,但其他瀏覽器不確定,建議開發時自己要檢查allow-scripts
,就可以在 iframe 內執行 JavaScriptscript-src self
src
或href
有<
或換行,就不會發出請求章節回顧 QA
QA
針對 HackMD 的例子
其他討論
Beta Was this translation helpful? Give feedback.
All reactions