- Oct 13, 2019
- 784
I noticed something cool when revisiting my fake ransomware that used 7z.exe to ransom data. ESET now detects it as "MSIL/Hoax.FakeFilecoder.FP"
So that begs the question: How is ESET going to respond to some variations in this binary? So here's some quick experiments:
1. Changed just the string I print out at the end. It's now "A Variant Of MSIL/Hoax.FakeFilecoder.FP"
2. Changed the file extension from ".encrypted" to ".ransom". Still "A Variant Of MSIL/Hoax.FakeFilecoder.FP"
3. Split the arguments to 7zip:
Before:
After:
No Detection:
As a bonus test, I just fired up a new VM and created a new project, and copy-pasted the exact same C# code into it. Kind of puzzled: No detection either:
It's an interesting look at the signatures that ESET produced for this file. As I expected, it will detect straightforward variations but it seems like they centered the detection around the arguments to 7zip, and if those are broken apart or reordered, even though the application does the exact same thing, a static scanner has a hard time being able to discern that.
This is one of the gripes I have with static scanning. Many tools and methods exist for obfuscating code to make it difficult to statically inspect. What you ultimately cannot hide is the fact that this thing, on execution, will try to run 7zip. I would say a rule around using "7z.exe" with a -p (password) and a -sdel (source delete) argument should be considered highly highly suspicious. While it's normal to use 7zip, using it with those two arguments strongly implies something fishy is going on.
NOTE: As a caveat, perhaps because they labeled this as a hoax, they do not consider it serious enough of a threat to produce high-quality signatures for.
So that begs the question: How is ESET going to respond to some variations in this binary? So here's some quick experiments:
1. Changed just the string I print out at the end. It's now "A Variant Of MSIL/Hoax.FakeFilecoder.FP"
2. Changed the file extension from ".encrypted" to ".ransom". Still "A Variant Of MSIL/Hoax.FakeFilecoder.FP"
3. Split the arguments to 7zip:
Before:
Code:
string args = " a -t7z -pransom -sdel " + string.Format("\"{0}\" \"{1}\"", dst, src);
Code:
string args = string.Format("{0} {1} {2} {3}", "a", "-t7z", "-pransom", "-sdel") + string.Format("\"{0}\" \"{1}\"", dst, src);
As a bonus test, I just fired up a new VM and created a new project, and copy-pasted the exact same C# code into it. Kind of puzzled: No detection either:
It's an interesting look at the signatures that ESET produced for this file. As I expected, it will detect straightforward variations but it seems like they centered the detection around the arguments to 7zip, and if those are broken apart or reordered, even though the application does the exact same thing, a static scanner has a hard time being able to discern that.
This is one of the gripes I have with static scanning. Many tools and methods exist for obfuscating code to make it difficult to statically inspect. What you ultimately cannot hide is the fact that this thing, on execution, will try to run 7zip. I would say a rule around using "7z.exe" with a -p (password) and a -sdel (source delete) argument should be considered highly highly suspicious. While it's normal to use 7zip, using it with those two arguments strongly implies something fishy is going on.
NOTE: As a caveat, perhaps because they labeled this as a hoax, they do not consider it serious enough of a threat to produce high-quality signatures for.
Last edited: