Skip to content

attempt to solve snow clash when snow protected page opens itself#82

Closed
weizman wants to merge 7 commits intomainfrom
fix-issue-81
Closed

attempt to solve snow clash when snow protected page opens itself#82
weizman wants to merge 7 commits intomainfrom
fix-issue-81

Conversation

@weizman
Copy link
Copy Markdown
Member

@weizman weizman commented Jun 6, 2023

Attempt to fix #81.

The idea is to tell opened windows (such as tabs) from child windows (such as iframes), because opened windows have their own top.

Consider a few scenarios:

Normal single app load

  • App loads
  • Snow attempts to apply first protection (to top)
    • Trying to set mark
      • No mark
        • Mark and protect
      • Marked
        • Since this is a top window, warn user that the page is probably compromised and bail on protection - this really should never happen, only if something malicious ran before SNOW

App load + iframe

  • App loads
  • Snow protects top
  • Attacker opens iframe
    • Trying to set mark
      • No mark
        • Mark and protect
      • Marked
        • Since this is NOT a top window, apply infinite loop and DoS page because only attacker can cause this
    • Snow instance in iframe loads
      • Snow protection is called
      • Since window is not top, Snow bails
        • Safe because top already protected iframe when created
          • PROBLEM TO FIX: If some inner page applies different Snow protection than upper page, it will be ignored by Snow!
            • ALSO: Is this problem relevant to next scenario as well?

App load + open window

  • App loads
  • Snow protects top
  • Attacker opens tab
    • Trying to set mark
      • No mark
        • Mark and protect
      • Marked
        • Since this is a top window, but it is also being protected by opener Snow, tell user Snow bails and that it's ok
    • Snow instance in opened tab loads
      • Snow protection is called
      • Trying to set mark
        • No mark
          • Mark and protect
        • Marked
          • Will fail to set mark because opener already marked
          • Since window is in fact a top, bail on mark attempt, we trust opener has set protection

@weizman weizman temporarily deployed to github-pages June 15, 2023 12:51 — with GitHub Pages Inactive
@weizman weizman temporarily deployed to github-pages June 15, 2023 14:17 — with GitHub Pages Inactive
@weizman
Copy link
Copy Markdown
Member Author

weizman commented Jun 15, 2023

Moving this effort to another attempt @ #97

@weizman weizman closed this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clash when snow protected page opens itself

1 participant