Почтовый сценарий отправки спама введен

DNS используется для получения до сервера, затем привязка Apache использует для определения, какой сайт обрабатывает запрос.

Таким образом, сначала я добавил бы подстановочные знаки DNS и удостоверился бы, что проверка с помощью ping-запросов их решит к IP-адресу на сервере Apache. Это - первый шаг.

Затем добавьте привязку в Apache, чтобы иметь обработанный корректным сайтом и привезенный в корректной подпапке.

1
задан 8 May 2013 в 22:18
3 ответа

If you know the mail account the spam comes from, you will definitely have to change the password. How do you know the spam is sent via some script?

If it is sent via some vulnerable (PHP?-)script, to find out where it comes from, you should create a sendmail wrapper, as scripts are usually using the sendmail binary to send out mails.

Create a file /usr/sbin/sendmail-wrapper with this content:

#!/bin/sh
TODAY=`date -Iseconds`
echo $TODAY sendmail-wrapper called $USER from $PWD >>/tmp/mail.send
(echo X-Additional-Header: $(dirname $PWD);cat) | /usr/sbin/sendmail-real "$@"

To get your wrapper active, move the real sendmail binary:

mv /usr/sbin/sendmail /usr/sbin/sendmail-real

and move the wrapper:

mv /usr/sbin/sendmail-wrapper /usr/sbin/sendmail

Everytime sendmail is called, it will add an additional header to the mail and will log the path sendmail was called from to /tmp/mail.send . This way, you should be able to find the problematic script.

Make sure to put the original sendmail binary back in place afterwards to stop /tmp/mail.send from growing indefinitely.

2
ответ дан 3 December 2019 в 17:50

Возможно, используется скрипт php Если вы используете php 5.3.x или более того, установите:

mail.add_x_header=1
mail.log=/var/log/phpmail

в php.ini.
Также убедитесь, что / var / log / phpmail доступен для записи во всем мире, чтобы каждый процесс php мог его писать.
Затем перезапустите apache.

После этой проверки заголовки исходящей почты должны содержать имя php-скрипта (X-PHP-Originating-Script)

2
ответ дан 3 December 2019 в 17:50

can you disable user clubmaga? why can't you change clubmaga's password? have you tried to kill or kill -9 your suspected evil proggy? purge the mail-queue assuming you can? is your system up to date?

Until you know how you were compromised you are still compromised - as far as you know the bad guy is still on the machine and even if not since you are not willing/able to change passwords your machine is still totally available.

Unless you really know what you are doing you should either clean install or restore a backup you know is clean. Anything else will likely have little positive effect as you are still compromised or at least comprisable in the same way that already worked.

0
ответ дан 3 December 2019 в 17:50

Теги

Похожие вопросы