Yara hunting phishing samples
So, I made a yara rule a while back based on some suspicious phishing nonsense I found in some open (unauthenticated + file directory listing enabled) cloud storage buckets. I decided only recently to see if I could do some public hunting with these. One possibility was on hybrid analysis. After just a few days, I have 9 detections already found.
The YARA rule is hosted on my github (https://raw.githubusercontent.com/ferasdour/SpecialYaraRules/refs/heads/main/Bucket%20Phishing%20Kits.yar) but basically it's like this (notations added for this post):
rule phishingKits3 {
meta:
description = "PhishingKits3: This was found in multiple phishing kits hosted on open/unauthenticated S3 buckets."
author = "ferasdour"
strings:
$s1 = "https://ajax.googleapis.com/ajax/libs/jquery/" ascii // adds jquery
$s2 = "https://code.jquery.com/jquery-" ascii // several veriants of jquery uesd but counting this version too
$s3 = "window.location.hash.substr(" ascii // Grabs the url part after "#"
$s4 = ".substr((" ascii // pulls substring including another bracketed section
$s5 = ").click(function(event" ascii // looks for click function
$s6 = "Please try again later" ascii // Junk data that seems to be put in to avoid detection
$r1 = /url:(\s)\Shttps:\/\/.[a-zA-Z0-9-_.]{6,200}/is // url that the data is sent to xhr request
$r2 = /type:(\s|\s')POST',/is // post xhr request
$s7 = "email:" ascii // grabs email
$s8 = "password:" ascii // grabs password
$s9 = "btn').html('" ascii // button html change
$header = { (0d 0a | 20 0d 0a 0d 0a | 3c 21 44 4f ) } // looks for specific option of first line headers
condition:
$header at 0 and 6 of ($s*) and all of ($r*) // headers at start of page and 6 of the strings and both regexes
}
The results according to hybrid analysis:
And for the content of the found samples?
When I clicked "view more" is broke, so that's sort of concerning:
Downloading for myself and reviewing, here's the key part, which showcases that the form filled out checks if the email entered appears to be "a valid email" then says it doesn't exist if it fails.
Which matches the expected problems, so the detection is definitely working as expected. That's good. The fact that clicking "view more" on hybrid analysis broke on this is concerning and I'll be reporting that after writing this.
Thanks for reading
If you need any IT or CyberSecurity work remotely or within the DFW area, please contact us over at FeemcoTechnologies.
Comments
Post a Comment