Commit Graph

26 Commits

Author SHA1 Message Date
nichogenius
1f352dc4b4 added b64 pattern for 'require'
added b64 pattern for 'require'
2017-08-19 17:05:23 -06:00
nichogenius
3ff125a978 removed redundant pattern
'create_function' is redundant as 'function' is already present.
2017-08-19 17:02:18 -06:00
nichogenius
4161148d3c base64 pattern updates 2017-08-19 16:58:28 -06:00
nichogenius
b4e09e682a FilesMan Needs to be a regex
FilesMan Needs to be a regex
2017-08-16 00:55:15 -06:00
nichogenius
0fa5ac96f6 Removing fopen('/etc/passwd - Redundant
fopen('/etc/passwd dropped
sub-pattern /etc/passwd exists and is completely contained within fopen('/etc/passwd
2017-08-16 00:31:48 -06:00
nichogenius
b2099f2424 Added New Malware Signatures/Fingerprints
IndoXploit
FaisaL Ahmed aka rEd X
'F'.'il'.'esMan'
FilesMan
2017-08-15 23:58:49 -06:00
nichogenius
3b8dff160b Added Experimental Patterns
Removed anyresults.net from the base64 pattern strings.

Added base64 patterns for $_POST $_GET $_REQUEST $_COOKIE extract and GLOBALS
2017-08-15 23:51:37 -06:00
nichogenius
4d9bcd171b Adding str_, function, echo and include in base64
str_ will match 13 separate php functions, many of which can be used for string/modifcation aka obfuscation
function added to catch function defining.
echo added as it is a  common php  keyword, though experimental... may cause a of false positives
include added as it is often used to link in other malware files.
2017-07-31 12:56:15 -06:00
nichogenius
9d60271b11 Added array_ and cslashes
Found a couple of cases where the php functions array_shift and addcslashes were used in base64 encoded malware.

Adding strings to catch any references to 'cslashes' which will catch both addcslashes and strip cslashes
Adding strings to catch any references to 'array_' which will catch about a dozen array modification functions.
2017-07-31 04:02:04 -06:00
nichogenius
b9b5de9e72 removed mail b64, added chr b64
removed mail b64, added chr b64

mail was generating too many false positives.
chr has only one pattern that is long enough to use with any sort of reliability, but it is one that we want to look out for anyway.
2017-07-28 06:57:23 -06:00
nichogenius
9bc41ee8b4 Added createfunction and gzinflate obfuscations
Added createfunction and gzinflate obfuscations.
also added gzinflate b64 patterns
2017-07-28 03:25:10 -06:00
nichogenius
296db40c8a Added http://www.fopo.com.ar/
http://www.fopo.com.ar/ is a free online php obfuscator that apparently leaves comments in the code which we should be looking for.
2017-07-28 02:38:08 -06:00
nichogenius
12249ae719 Typo fix
Typo fix
2017-07-27 23:18:26 -06:00
nichogenius
34867652d8 shortened base64_decode to just base64
shortened the base64 fingerprints of 'base64_decode' to just 'base64'. will also catch cases of base64_encode which isn't quite so bad but still worth finding.
2017-07-27 23:14:23 -06:00
nichogenius
92d891f212 added file_get_contents, fopen
dropped allow_url_fopen as fopen will catch those references on its own.
2017-07-27 23:11:18 -06:00
nichogenius
3f516f9e15 added create_function
interesting note from the php.net manual on create_function:
Caution
This function internally performs an eval() and as such has the same security issues as eval(). Additionally it has bad performance and memory usage characteristics.
2017-07-27 23:07:54 -06:00
nichogenius
1a5020d65d bad idea... lots of fps
bad idea... lots of fps
removing base_convert
2017-07-27 07:47:04 -06:00
nichogenius
954cfeb10a Adding base_convert as a test
base_convert seems like a rare enough function... trying it out to see if it generates many fp's.
2017-07-27 07:41:58 -06:00
nichogenius
317ff8b6b7 Added functions, dropped Spammer.
Spammers gives false positives.  added a couple more php functions in base64
2017-07-27 07:08:05 -06:00
nichogenius
86be84e8b6 Organizing, categorizing and prioritizing patterns
There's enough raw patterns in here to justify organizing the file.
Now that whitespace and comments are supported, I've been dividing it into sections

More critical problems should be near the top as I would rather the script identify a file as a backdoor instead of as a spammer.

I don't know the history behind a lot of these or the implication of the code, so I'm sure I mis-categorized many.  There are also many that I have not done yet.
2017-07-26 01:27:53 -06:00
nichogenius
32e8992b50 preg_replace b64 sample shortened to 'replace'
preg_replace should be shortened to just replace as it will also match str_replace, str_ireplace, ereg_replace, eregi_replace and many others I'm sure.  Should increase number of hits.  

'preg_replace' base64 strings: (removed)
cHJlZ19yZXBsYWNl
ByZWdfcmVwbGFjZ
wcmVnX3JlcGxhY2

'replace' base64 strings: (added)
cmVwbGFjZ
JlcGxhY2
yZXBsYWNl
2017-07-24 22:32:57 -06:00
nichogenius
34e6238a19 Minor correction to base64 sample
JHZpc2l0Y291bnQgPSAkSFRUUF9DT09LSUVf is correct.  encoded version of "$visitcount = $HTTP_COOKIE_"
I seem to have added a couple of extra characters than what I should have.  Not sure where they came from.
2017-07-24 21:51:43 -06:00
nichogenius
6b55cfd8b3 Added Equivalent base64 pattern samples
Because base64 converts from an 8 bit to a 6 bit character system, you can get 3 unique base64 strings from a single ascii string depending on the position of the first character.

for example:
base64_encode("system");
base64_encode(" system");
base64_encode("(  system");

The above 3 input strings all produce very different base64 signatures even though they all contain the same keyword 'system'.  This is because the first letter of system, 's' fall on indices 0,1,2 respectively.

I updated several of the base64 samples to include their offset counterparts as the originals would only catch about 1 in 3 of the actual present matches.
2017-07-24 12:23:39 -06:00
Gabor Gyorvari
00bc3c1336 Pattern update according to japanese seo hack 2017-02-27 12:47:34 +01:00
Gabor Gyorvari
18929a47aa Japanese keywoard SEO hack
More info at https://developers.google.com/webmasters/hacked/docs/fixing_the_japanese_keyword_hack
2017-02-22 14:01:44 +01:00
Gabor Gyorvari
cd78f4a8ac Separate patterns from code 2017-02-22 13:56:09 +01:00