Hello everyone!
Recently over the past few weeks i have been having restless nights because of nimda virus. Yes my box is on linux and nimda has no effect on linux but still the overhead created by nimda on apache on my box is really massive. I get atleast 5-10 attacks per second on apache on my box with nimda. Now i tried to go through various posts here and came to the best conclusion to include the following inside my httpd.conf
RedirectMatch Permanent ^/(.*cmd\.exe.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*cmd\.exe*.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*root\.exe.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*root\.exe*.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*default\.ida.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*default\.ida*.*)$ http://127.0.0.1/
Now i know this is not legal etc but i had no choice my machine was getting too much of lead. Apache itself was taking upto 40% of resources. The situation improved and it went on. After 3-4 days the situation reverted back to the same old, apache again started to take too much resouces on server. After checkup and searching on the net i added the following to the httpd.conf
Redirect /scripts http://127.0.0.1
Redirect /c http://127.0.0.1
Redirect /msadc http://127.0.0.1
Redirect /MSADC http://127.0.0.1
Redirect /_mem_bin http://127.0.0.1
Redirect /winnt http://127.0.0.1
Redirect /d http://127.0.0.1
Still the situation didn't change.
I also came across the solution which was recommended by itf here at cpanel forums. Using iptables with string matching and droping them. The following i came when searching on the net for answers.
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &/default.ida?& -j DROP
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &.exe?/c+dir& -j DROP
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &.exe?/c+tftp& -j DROP
Everywhere the above was being recommened to stop nimda on the servers. Now when i try to run any of the above chains i get the following errors:
iptables v1.2.5: Couldn't load match `string':/lib/iptables/libipt_string.so: cannot open shared object file: No such file or directory
Again went the session of searching on the net and it revealed that the particular patch has to be installed inside the kernel and then only the string option would work.
Now my probs is right now i can't go for a kernel upgrade as we have some real heavy traffic on our server and it can't be put down for quite time to come. Is there any other solution / rpm available to get this string option available inside iptables ?? I searched on rpmfind.net and found that the iptables rpm shipped with suse contained the string option already. When i tried to download the rpm i got a not found page. So any solutions guys ??
Would appreciate any help in this matter as its driving me nuts.
regards,
Anand
Recently over the past few weeks i have been having restless nights because of nimda virus. Yes my box is on linux and nimda has no effect on linux but still the overhead created by nimda on apache on my box is really massive. I get atleast 5-10 attacks per second on apache on my box with nimda. Now i tried to go through various posts here and came to the best conclusion to include the following inside my httpd.conf
RedirectMatch Permanent ^/(.*cmd\.exe.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*cmd\.exe*.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*root\.exe.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*root\.exe*.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*default\.ida.*)$ http://127.0.0.1/
RedirectMatch Permanent ^/(.*default\.ida*.*)$ http://127.0.0.1/
Now i know this is not legal etc but i had no choice my machine was getting too much of lead. Apache itself was taking upto 40% of resources. The situation improved and it went on. After 3-4 days the situation reverted back to the same old, apache again started to take too much resouces on server. After checkup and searching on the net i added the following to the httpd.conf
Redirect /scripts http://127.0.0.1
Redirect /c http://127.0.0.1
Redirect /msadc http://127.0.0.1
Redirect /MSADC http://127.0.0.1
Redirect /_mem_bin http://127.0.0.1
Redirect /winnt http://127.0.0.1
Redirect /d http://127.0.0.1
Still the situation didn't change.
I also came across the solution which was recommended by itf here at cpanel forums. Using iptables with string matching and droping them. The following i came when searching on the net for answers.
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &/default.ida?& -j DROP
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &.exe?/c+dir& -j DROP
iptables -t filter -A INPUT -i eth0 -p tcp -d YOUR_IP --dport http -m string --string &.exe?/c+tftp& -j DROP
Everywhere the above was being recommened to stop nimda on the servers. Now when i try to run any of the above chains i get the following errors:
iptables v1.2.5: Couldn't load match `string':/lib/iptables/libipt_string.so: cannot open shared object file: No such file or directory
Again went the session of searching on the net and it revealed that the particular patch has to be installed inside the kernel and then only the string option would work.
Now my probs is right now i can't go for a kernel upgrade as we have some real heavy traffic on our server and it can't be put down for quite time to come. Is there any other solution / rpm available to get this string option available inside iptables ?? I searched on rpmfind.net and found that the iptables rpm shipped with suse contained the string option already. When i tried to download the rpm i got a not found page. So any solutions guys ??
Would appreciate any help in this matter as its driving me nuts.
regards,
Anand