]> git.mxchange.org Git - ctracker.git/blobdiff - libs/lib_detector.php
Added "detection" of open_basedir and php:// protocol:
[ctracker.git] / libs / lib_detector.php
index bb7173395858dc931b31c5ac77fd99117f535920..b7b50e050ffc5e995c61fb7eda0f0ac78e4a35c3 100644 (file)
@@ -93,6 +93,7 @@ function initCrackerTrackerArrays () {
 
                // php.ini settings
                'allow_url_fopen', 'allow_url_include', 'auto_prepend_file', 'disable_functions', 'safe_mode',
+               'open_basedir',
 
                // PHP commands/scripts
                'fopen', 'fwrite', 'phpinfo()', '\<?', '?\>', 'base64_decode', 'file_put_contents',
@@ -106,7 +107,7 @@ function initCrackerTrackerArrays () {
                '_phplib', '__callbackparam',
 
                // Generic remote inclusion
-               '=http://', '=https://',
+               '=http://', '=https://', '=php://',
                'path=', 'sql=',
                '=%7BQUOT%7D', '=%5C', '=%22http','=%22ftp','=%22file','=%27http','=%27ftp',
                '=%27file',
@@ -147,11 +148,10 @@ function initCrackerTrackerArrays () {
                // @TODO Misc/unsorted
                'cgi-', '.eml', '$_request', '$_get', '$request', '$get', '.system',
                '&aim', 'new_password', '&icq', '.conf', 'motd ', 'HTTP/1.',
-               'window.open', 'img src', 'img src', '.jsp', 'servlet',
-               'wwwacl', '.js', '.jsp', 'server-info', 'server-status',
-               'secure_site, ok', 'chunked', 'org.apache', '/servlet/con',
-               '<script', 'mod_gzip_status', '.system', 'http_',
-               'uol.com', ',0x', '(0x'
+               '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',
        );
 
        // BLock these words found in User-Agent
@@ -191,6 +191,9 @@ function initCrackerTrackerArrays () {
                'starhack', 'DeLiMehmet', 'hisset', 'Hisset', 'delimert', 'MecTruy'
        );
 
+       // Also block these requests (mostly you don't want CONNECT to some SMTP sites)
+       $GLOBALS['ctracker_blocked_requests'] = array('CONNECT' => TRUE);
+
        // Init more elements
        $GLOBALS['ctracker_post_track']   = '';
        $GLOBALS['ctracker_checked_get']  = '';
@@ -213,6 +216,8 @@ function isCrackerTrackerWormDetected () {
                        $GLOBALS['ctracker_checked_get'] != crackerTrackerQueryString(TRUE) && (!in_array(crackerTrackerQueryString(TRUE), $GLOBALS['ctracker_whitelist']))
                ) || (
                        $GLOBALS['ctracker_checked_ua'] != crackerTrackerUserAgent(TRUE)
+               ) || (
+                       isset($GLOBALS['ctracker_blocked_requests'][crackerTrackerRequestMethod()])
                )
        );
        //* DEBUG-DIE: */ die('isWorm='.intval($isWorm).PHP_EOL.'get='.PHP_EOL.'"'.$GLOBALS['ctracker_checked_get'].'"'.PHP_EOL.'"'.crackerTrackerQueryString().'"'.PHP_EOL.'ua='.PHP_EOL.'"'.$GLOBALS['ctracker_checked_ua'].'"'.PHP_EOL.'"'.crackerTrackerUserAgent().'"'.PHP_EOL);