【问题标题】:How to protect from this (Evilginx)如何避免这种情况(Evilginx)
【发布时间】:2019-03-29 16:52:06
【问题描述】:

如何避免这种情况?

https://breakdev.org/evilginx-advanced-phishing-with-two-factor-authentication-bypass/

我有很多网站,采用多种技术...我需要一种保护方式。

我想知道事后是否会检查可疑的 IP 活动?

就这个?真的吗?

我可以检查我的 SSL 证书吗?高铁?避免使用 nginx 为我的网站提供服务?

【问题讨论】:

    标签: cookies session-cookies password-protection csrf-protection


    【解决方案1】:

    在您的登录页面上包含类似这样的内容(确保将 X-FRAME-OPTIONS 标头设置为 DENY),将“您的预期来源”更改为...好吧,我相信您可以弄清楚:

    var inP = true, t = self, l = "loc" + "ation", o = "o" + "rigin", ex = "Your " + "expected" + " origin", db = document, b = "bod" + "y", h = "in" + "ner" + "HTML";
    
    try {
      inP = t[l][o] != ex;
    } catch (e) {
      inP = true;
    }
    
    if (inP) {
      db[b][h] = "<p>For security reasons, this site cannot be viewed though a proxy. Please access the site directly at <a href="+ex+" target='_top'>" + ex + "</a>.</p>";
      throw new Error("Prevent any other code in this block from running.");
    }

    试图阻止代理注意到你在做什么是被混淆的,但为了确定,将它与一些对页面运行至关重要的 JavaScript 混合在一起(比如向登录表单添加一个 CSRF 令牌) .这样他们就不能只是阻止文件。 (但随机化混淆以阻止过滤或解析代理中的文件的尝试)。

    添加一个&lt;noscript&gt; 标记,说明出于安全原因您必须在此页面上启用 JavaScript。

    它不是万无一失的(有人真的确定会弄清楚如何绕过你的混淆),但它应该阻止刚刚从教程中安装 Evilginx 的脚本小子。

    进一步改进:实施 WebAuth 并建议您的所有客户使用它。使用功能策略标头和/或使用 JavaScript 将 WebUSB API 设置为 undefined,因为您几乎可以肯定没有使用它,并且基于 WebUSB 的 WebAuth 受到攻击。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 1970-01-01
      • 2013-07-17
      相关资源
      最近更新 更多