Goede morgen allemaal,
Ik ben bezig met een wormkillerscript te installeren, en nu heb ik het idee dat ie niks doet.
ik draai linux met apache, komt nu een stukje uit het script:
nou dat lijkt een simpel script, maar ik ben niet zo held.
Stukje van me apache:
Nu heb ik dus die directory /home/httpd/html/scripts/ gemaakt met daarin een bestandje root.exe maar dat is eigelijk die wormkiller.cgi
Tevens een symlink gemaakt met default.ida die verwijst naar die root.exe
nog een lijntje in die sudoers file:
Ik ben bezig met een wormkillerscript te installeren, en nu heb ik het idee dat ie niks doet.
ik draai linux met apache, komt nu een stukje uit het script:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
| # READ THIS FIRST!! # # What does it do? # **************** # W32/Nimda, Code Red, Code Red II etc... killer. # This script will kill IP adresses which are requesting files to infect them with a worm/ # # # Sudo support # ************ # Add a line to /etc/sudoers: # ApacheUser HostName = NOPASSWD: /sbin/iptables # # Where ApacheUser is the user that is running Apache, HostName is the Hostname of the computer # running Apache. # Of course, if you have ipchains support instead, change /sbin/iptables to /sbin/ipchains. # If you don't know your ApacheUser: 'ps -fC httpd' # (please select the user you see most, usually wwwrun or nobody NOT ROOT) # If you don't know your HostName: 'hostname' # # # Installation Instructions # ************************* # # 1) in your Apache httpd.conf, add .exe to CgiHandler (maybe add .ida while you're there). # add a new directory, something like this: # <Directory "/usr/local/apache/htdocs/scripts"> # Options Indexes FollowSymLinks Includes ExecCGI # Order allow,deny # Allow from all # </Directory> # # 2) now, create a directory "scripts", or whatever you like (but be sure that it is the same as # the <Directory> above!), in your Apache web tree. # Now put this CGI in a file called "root.exe" and chmod it 755, you can also name it anyway you like # (but you will have to create a symlink to /scripts/root.exe). # # 3) actually, there is no step 3... But you can Symlink this CGI script to /default.ida (to the root dir # of your Apache web; check step 1 for .ida CgiHandler!). Alternatively you can also use Apache for this; # in your httpd.conf add: # Alias /default.ida "<webtree>/scripts/default.ida" # Whenever there is a new virus/worm that wants to infect a server and bothers you, add a new Alias! :) # # # Configuration # ************* # # Only one thing remaining, check your firewall (if it's ipchains or iptables), and uncomment the # appropriate lines below. # An option to ignore some IP adresses is now available. # An option to log these IP adresses is available, defaults to the ipblockfile used by ADSL4Linux firewall. # # Changes # ******* # # 11 November 2001: added some lines to prevent the script from adding # duplicate IP numbers to the ipblockfile. (Kees Monshouwer) # Changed the lines to Perl code instead of system calls (Cyberdude47). # # 11 November 2001: changed the method of adding lines to the ipblockfile # to Perl. Probably this will speed up things more. # # 12 November 2001: added an "Ignore IP" option. This file contains the ips # you wish to ignore. Such as 192.168.1.1 etc... # # 12 November 2001: fixed the last fix ;) Now your 'friends' are blocked even # without a ignoreips file. (Kees Monshouwer) |
nou dat lijkt een simpel script, maar ik ben niet zo held.
Stukje van me apache:
code:
1
2
3
4
5
6
7
8
| <Directory "/home/httpd/html/scripts"> Options Indexes FollowSymLinks Includes ExecCGI order allow,deny Allow from all </Directory> Alias /default.ida "/home/httpd/html/scripts/default.ida" ScriptAlias /scripts/ "/home/httpd/html/scripts/" |
Nu heb ik dus die directory /home/httpd/html/scripts/ gemaakt met daarin een bestandje root.exe maar dat is eigelijk die wormkiller.cgi
Tevens een symlink gemaakt met default.ida die verwijst naar die root.exe
nog een lijntje in die sudoers file:
Nou ik hoop dat iemand me hierbij kan helpen, ik heb me eigen rot gezocht maar kon niks vinden.# User privilege specification
root ALL=(ALL) ALL
apache 'hostname' = NOPASSWD: /sbin/iptables
-edit-