CTracker
24.03.2008, 18:28
ctracker.php in das include-Verzeichnis
************
PHP-Code:
<?php // Cracker Tracker Protection System // Created by: Christian Knerr - [url="www.cback.de"]CBACK.DE - Der Online Computerguide[/url] // phpBB Users: Please use our complete phpBB2 Mod! // Version: 2.0.0 // // License: GPL // // // Begin CrackerTracker StandAlone // require_once("bittorrent.php"); require_once("global.php");
dbconn(true);
$cracktrack = $_SERVER['QUERY_STRING']; $wormprotector = array('chr(', 'chr=', 'chr%20', '%20chr', 'wget%20', '%20wget', 'wget(', 'cmd=', '%20cmd', 'cmd%20', 'rush=', '%20rush', 'rush%20', 'union%20', '%20union', 'union(', 'union=', 'echr(', '%20echr', 'echr%20', 'echr=', 'esystem(', 'esystem%20', 'cp%20', '%20cp', 'cp(', 'mdir%20', '%20mdir', 'mdir(', 'mcd%20', 'mrd%20', 'rm%20', '%20mcd', '%20mrd', '%20rm', 'mcd(', 'mrd(', 'rm(', 'mcd=', 'mrd=', 'mv%20', 'rmdir%20', 'mv(', 'rmdir(', 'chmod(', 'chmod%20', '%20chmod', 'chmod(', 'chmod=', 'chown%20', 'chgrp%20', 'chown(', 'chgrp(', 'locate%20', 'grep%20', 'locate(', 'grep(', 'diff%20', 'kill%20', 'kill(', 'killall', 'passwd%20', '%20passwd', 'passwd(', 'telnet%20', 'vi(', 'vi%20', 'insert%20into', 'select%20', 'nigga(', '%20nigga', 'nigga%20', 'fopen', 'fwrite', '%20like', 'like%20', '$_request', '$_get', '$request', '$get', '.system', 'HTTP_PHP', '&aim', '%20getenv', 'getenv%20', 'new_password', '&icq','/etc/password','/etc/shadow', '/etc/groups', '/etc/gshadow', 'HTTP_USER_AGENT', 'HTTP_HOST', '/bin/ps', 'wget%20', 'uname\x20-a', '/usr/bin/id', '/bin/echo', '/bin/kill', '/bin/', '/chgrp', '/chown', '/usr/bin', 'g\+\+', 'bin/python', 'bin/tclsh', 'bin/nasm', 'perl%20', 'traceroute%20', 'ping%20', '.pl', '/usr/X11R6/bin/xterm', 'lsof%20', '/bin/mail', '.conf', 'motd%20', 'HTTP/1.', '.inc.php', 'config.php', 'cgi-', '.eml', 'file\://', 'window.open', '<SCRIPT>', 'javascript\://','img src', 'img%20src','.jsp','ftp.exe', 'xp_enumdsn', 'xp_availablemedia', 'xp_filelist', 'xp_cmdshell', 'nc.exe', '.htpasswd', 'servlet', '/etc/passwd', 'wwwacl', '~root', '~ftp', '.js', '.jsp', 'admin_', '.history', 'bash_history', '.bash_history', '~nobody', 'server-info', 'server-status', 'reboot%20', 'halt%20', 'powerdown%20', '/home/ftp', '/home/www', 'secure_site, ok', 'chunked', 'org.apache', '/servlet/con', '<script', '/robot.txt' ,'/perl' ,'mod_gzip_status', 'db_mysql.inc', '.inc', 'select%20from', 'select from', 'drop%20', '.system', 'getenv', 'http_', '_php', 'php_', 'phpinfo()', '<?php', '?>', 'sql=', 'UPDATE', 'DELETE', 'DROP', 'INSERT', '$mysql_', 'java script:');
$checkworm = str_replace($wormprotector, '*', $cracktrack);
if ($cracktrack != $checkworm) { $cremotead = $_SERVER['REMOTE_ADDR']; $cuseragent = $_SERVER['HTTP_USER_AGENT']; write_log("ctracker", "$cremotead - $cuseragent"); die( "Attack detected! <br /><br /><b>Dieser Angriff wurde erkannt und blockiert:</b><br />$cremotead - $cuseragent" ); }
// // End CrackerTracker StandAlone //
?>
bittorrent.php
**************
PHP-Code:
require_once("include/shoutcast.php");
danach
PHP-Code:
require_once('include/ctracker.php');
für die loganzeige
füge die tabelle 'ctracker' in der sitelog struktur hinzu
öffne log.php
*************
PHP-Code:
case "remwarn": return "Verwarnung entfernt";
danach
PHP-Code:
case "ctracker": return "Versuchte Angriffe";
20 zeilen darunter ist folgende spalte
PHP-Code:
$types = array('torrentupload', 'torrentedit',...........
einfach hier auch die 'ctracker' abfrage dazu, z.b.
PHP-Code:
$types = array('torrentupload', 'ctracker', 'torrentedit',...........
einfach in deine DB, danach die Tabelle "sitelog" auswählen
Dann das Feld "Typ" bearbeiten und 'ctracker' einfügen
PHP-Code:
'torrentupload','torrentedit','torrentdelete','promotion','demotion','addwarn','remwarn','accenabled','parked','accdisabled','accdeleted','waitgrant','waitreject','passkeyreset','passkeyadminreset','torrentgranted','ctracker'
hier mal der komplette SQL-Part
sql Code:
ALTER TABLE sitelog CHANGE COLUMN `typ` `typ` ENUM('torrentupload','torrentedit','torrentdelete','promotion','demotion','addwarn','remwarn','accenabled','parked','accdisabled','accdeleted','waitgrant','waitreject','passkeyreset','passkeyadminreset','torrentgranted','ctracker','modmessages','sledit') NOT NULL DEFAULT 'torrentupload' COLLATE latin1_swedish_ci ;
Das ist in unserer DB so -- Bitte anpassen
das ist inclusive der Fixes gegen SQL-Injection
Angeh?ngte Grafiken
Angeh?ngte Dateien
|
Cerberus
Administrator
Registriert seit: 07.03.2008
Ort: 3. Bit Links hinter dem Kernel
Alter: 49
Beitr?ge: 9.639
Abgegebene Danke: 1.121
Erhielt 4.499 Danke für 458 Beiträge
Downloads: 18
Uploads: 9 Nachrichten: 2258
|
|