Skip to content

Instantly share code, notes, and snippets.

@paralax
Created March 20, 2019 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paralax/2a31b0a7b1469d9f838c5f5deed7088c to your computer and use it in GitHub Desktop.
Save paralax/2a31b0a7b1469d9f838c5f5deed7088c to your computer and use it in GitHub Desktop.
yara rule to scan for magecart signals in HTML bodies
rule magecart
{
meta:
description = "This rule screens web pages to look for Magecart in script tag sources"
thread_level = 3
in_the_wild = true
strings:
$scriptopen = "<script "
$scriptclose = "</script>"
$d1 = "magesecuritys.com"
$d2 = "magescripts.pw"
$d3 = "js-cloud.com"
$d4 = "cdnmage.com"
$d5 = "cdnassels.com"
$d6 = "mypiltow.com"
$d7 = "configsysrc.info"
$d8 = "cmytuok.top"
$d9 = "mcloudjs.com"
$d10 = "magejavascripts.com"
$d11 = "www.js-cloud.com"
$d12 = "www.cdnmage.com"
$d13 = "www.magescripts.pw"
$d14 = "secure.livechatinc.org"
condition:
for any i in (1..#scriptopen) : any of ($d*) in (@scriptopen[i]..@scriptclose[i])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment