nbs-system / php-malware-finder

GNU Lesser General Public License v3.0
305 stars 56 forks source link

Write a better rule? #3

Closed EMSeek closed 3 years ago

EMSeek commented 3 years ago

Given how many .htaccess based web shell blog posts and clones there is of my project I seriously don't think my handle is a great rule. You could match on the .htaccess syntax instead and catch others. If not I guess I'll just alter my repo and invalidate your rule

wargio commented 3 years ago

@jvoisin

jvoisin commented 3 years ago

I don't understand the issue: there is no trace of your username in the rules.

wargio commented 3 years ago

me neither.

wireghoul commented 3 years ago

Sorry, I opened the issue with the wrong account. Your current rule will flag on all of my projects, including secure coding libraries, but not flag other people's .htaccess based web shells.

wargio commented 3 years ago

i think it is handled by the yara rules.

wireghoul commented 3 years ago

You mean this rule? https://github.com/nbs-system/php-malware-finder/blob/5a7f1303b7df1752fff6099014072c75eeec78d6/php-malware-finder/php.yar#L315

wargio commented 3 years ago

no i mean to detect php stuff, like shells etc.. are in the yara rules

wireghoul commented 3 years ago

My only complaint is for the rule that detects my handle. Which I linked above.

jvoisin commented 3 years ago

Oh, yeah, we've got your handle in the rules, because people are stupid. But it's not the only way we're using to detect htaccess-based shells.

wargio commented 3 years ago

i agree. there are plenty of rules that are detecting webshells and other stuff in pmf.

wargio commented 3 years ago

thank you for reporting this, but i'm going to mark it as invalid.

wireghoul commented 3 years ago

Using my handle for detection isn't smart in my opinion, and if you're insisting on making me play the bypass your rules game to prove my point I will.

wargio commented 3 years ago

what we meant is that often script kiddies use your scripts as they are. but there are also other signatures to detect malicious files.

wireghoul commented 3 years ago

I understood your comment, but for unmodified scripts there are other things you can match on that is equally effective, or even hashes so your argument again doesn't really hold up.

wargio commented 3 years ago

If you want to help to improve the rules, please make a PR, i will be more than happy to merge it.