Skip to content

Commit

Permalink
Merge pull request #211 from KnugiHK/main
Browse files Browse the repository at this point in the history
Create a bcheck for detecting malicious Polyfill CDN
  • Loading branch information
Hannah-PortSwigger authored Jun 27, 2024
2 parents d5e6908 + d349a70 commit 29fb2a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions other/Javascript/malicious_polyfill_cdn.bcheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
metadata:
language: v2-beta
name: "Malicious Polyfill CDN In Use"
description: "Look in responses to see if there are malicious Polyfill CDNs is in use"
author: "KnugiHK"
tags: "passive","javascript"

given response then
if {latest.response} matches "<script.*?src=\"(https?:)?//(cdn.)?polyfill.io/v[0-9]/polyfill\.min\.js.*?\".*?>" then
report issue:
severity: high
confidence: firm
detail: "The malicious Polyfill CDN polyfill.io is used on the website."
remediation: "Self-host a Polyfill service or use a more reliable CDN."
end if

0 comments on commit 29fb2a7

Please sign in to comment.