鐵人賽一開始規畫的時候是想要手寫整理資安的各大弱點,不過一直覺得字醜,不過還是嘗試看看這樣的呈現方式。
 
會偽裝連結使受害者點擊惡意連結
CSS z-index 屬性
<iframe> 或其他 HTML 的時候,可以調整標籤的「透明度」、「z-index」,可以設定為透明且最上層,使受害者可以點擊。

header("X-Frame-Options: DENY");
header("Content-Security-Policy: frame-ancestors 'none'", false);
response['X-Frame-Options'] = 'DENY'
response['Content-Security-Policy'] = "frame-ancestors 'none'"
return response
allow-forms、allow-scripts 前者為可允許表單,後者為可允許腳本執行。
這個屬於前端的 issue 這次 lab 就不用 docker
<html>
  <head>
    <style>
      body {
        position: relative;
        margin: 0;
      }
      iframe {
        border: none;
        position: absolute;
        width: 100%;
        height: 100%;
      }
    </style>
  </head>
  <body>
    <iframe src="feifei.com.tw">
    </iframe>
  </body>
</html>
<html>
  <head>
    <style>
      body {
        position: relative;
        margin: 0;
      }
      iframe {
        border: none;
        position: absolute;
        width: 100%;
        height: 100%;
      }
      div {
        z-index: 100;
      }
      a {
        display: block;
      }
    </style>
  </head>
  <body>
    <iframe src="feifei.com.tw">
    </iframe>
    <div>
          <a href="惡意連結">here</a>
    </div>
  </body>
</html>