Skip to content

Instantly share code, notes, and snippets.

@stvemillertime
Created January 26, 2022 15:01
Show Gist options
  • Save stvemillertime/b87dd7bf979dda6f1b6b5d70bf6620b8 to your computer and use it in GitHub Desktop.
Save stvemillertime/b87dd7bf979dda6f1b6b5d70bf6620b8 to your computer and use it in GitHub Desktop.
import "pe"
import "console"
rule CreatePEPolyObject {
strings:
$a = "CreatePEPolyObject" xor
$b = "CreatePEPolyObject" nocase ascii wide
$c = "CreatePEPolyObject" base64 base64wide
condition:
any of them
}
rule Export_CreatePEPolyObject {
condition:
pe.exports("CreatePEPolyObject")
}
rule Export_CreatePEPolyObject_Loop {
condition:
for any func in pe.export_details:
(
func.name contains "CreatePEPolyObject"
)
}
rule PE_Export_Func_Name {
meta:
note = "Must have console module via yara-4.2.0-rc1+"
condition:
uint16(0) == 0x5A4D and
for any func in pe.export_details:
(
console.log("Export Name: ", func.name)
)
}
//CEO-PC >> ~/yara-4.2.0-rc1 % yara -r test-export.yar ~/vx/ | sort | grep -e 'Export: ' | sort | uniq -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment