]> git.mxchange.org Git - ctracker.git/blobdiff - libs/lib_detector.php
Continued:
[ctracker.git] / libs / lib_detector.php
index 505df9ec7c2869412e54c258687e14c1f648f9b9..f7bde09388f6218d30a4bd5b502ceb2b4ea35678 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            3.0.0
- * @copyright  Copyright (c) 2009 Cracker Tracker Team
+ * @copyright  Copyright (c) 2009 - 2017 Cracker Tracker Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -154,7 +154,7 @@ function initCrackerTrackerArrays () {
                'window.open', 'img src', 'img src', '.jsp', 'servlet', 'org.apache',
                'wwwacl', 'server-info', 'server-status', '/servlet/con', 'http_',
                'secure_site, ok', 'chunked', '<script', 'mod_gzip_status', '.system',
-               'uol.com', ',0x', '(0x', 'INSERT_RANDOM_NUMBER_HERE',
+               'uol.com', ',0x', '(0x', 'INSERT_RANDOM_NUMBER_HERE', 'addtype'
        ];
 
        // BLock these words found in User-Agent
@@ -185,6 +185,34 @@ function initCrackerTrackerArrays () {
                'proc/self/environ',
        ];
 
+       // BLock these words found in User-Agent
+       $GLOBALS['ctracker_ua_blacklist'] = array(
+               // Compiler/interpreter
+               'bin/g++ ', 'bin/c++ ', 'cc ', 'bin/python', 'bin/python', 'bin/tclsh',
+               'bin/tclsh', 'bin/nasm', '/perl', 'cmd.exe',
+               'nc.exe', 'ftp.exe', 'wget ', 'system(', 'curl ',
+
+               // php.ini settings
+               'allow_url_fopen', 'allow_url_include', 'auto_prepend_file', 'disable_functions', 'safe_mode',
+
+               // PHP commands/scripts
+               'fopen', 'fwrite', 'phpinfo()', '\<?', '?\>', 'base64_decode', 'file_put_contents',
+               'set_magic_quotes_runtime', 'set_magic_quotes_runtime', 'display_errors', 'passthru',
+
+               // Typical PHP script remote-inclusions and typical include file names
+               '.inc.php', '.lib.php', '.class.php', 'config.php', '.inc', '_php',
+               'php_', 'class_', '_class.php', 'db_mysql.inc',
+
+               // PHP arrays
+               '_phplib', '__callbackparam',
+
+               // Request header being inserted
+               'content-type',
+
+               // /proc/ and other forbidden paths
+               'proc/self/environ',
+       );
+
        // Block these words found in POST requests
        $GLOBALS['ctracker_post_blacklist'] = [
                // This line is for detecting hidden link spam in wikis, forums, guestbooks, etc.
@@ -257,6 +285,7 @@ Request-string  : ' . crackerTrackerQueryString() . '
 Filtered string : ' . $GLOBALS['ctracker_checked_get'] . '
 Server          : ' . crackerTrackerServerName() . '
 Script          : ' . crackerTrackerScriptName() . '
+Method          : ' . crackerTrackerRequestMethod() . '
 Referrer        : ' . crackerTrackerReferer() . '
 -----------------------------------------------------
 ';
@@ -287,10 +316,11 @@ function sendCrackerTrackerTicketMails () {
 function crackerTrackerSendMail ($mail, $recipient = NULL, $subject = NULL) {
        // Construct dummy array
        $rowData = [
-               'remote_addr' => determineCrackerTrackerRealRemoteAddress(),
-               'proxy_addr'  => getenv('REMOTE_ADDR'),
-               'check_get'   => $GLOBALS['ctracker_checked_get'],
-               'server_name' => crackerTrackerServerName()
+               'remote_addr'    => determineCrackerTrackerRealRemoteAddress(),
+               'proxy_addr'     => getenv('REMOTE_ADDR'),
+               'check_get'      => $GLOBALS['ctracker_checked_get'],
+               'server_name'    => crackerTrackerServerName(),
+               'request_method' => crackerTrackerRequestMethod(),
        ];
 
        // Only send email if not yet found
@@ -335,6 +365,7 @@ Request-string       : ' . crackerTrackerQueryString() . '
 Filtered string      : ' . $GLOBALS['ctracker_checked_get'] . '
 Server               : ' . crackerTrackerServerName() . '
 Script               : ' . crackerTrackerScriptName() . '
+Method               : ' . crackerTrackerRequestMethod() . '
 Referrer             : ' . crackerTrackerReferer() . '
 -----------------------------------------------------
 POST string          : ' . $GLOBALS['ctracker_post_track'] . '