Another cryptocurrency rule today, this time focused on matching Ethereum wallet addresses using regular expressions.
rule TTP_contains_ETH_address {
meta:
description = "Matches regex for Ethereum wallet addresses."
last_modified = "2024-01-09"
author = "@petermstewart"
DaysofYara = "9/100"
strings:
$r1 = /0x[a-fA-F0-9]{40}/ fullword ascii wide
condition:
filesize < 5MB and
$r1
}
After yesterday’s post I asked the #100DaysofYARA group on Twitter if they had any suggestions to decrease the performance hit of using regular expressions like this. Answer: use YARA-X (when it’s ready)
Find the rest of my 100DaysofYARA posts here, and the rules themselves on my Github repository.