• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Queue Full Of Spam

S

stanleyjobson2

Guest
Hello,
I have a serious problème with my web server. The queue of Qmail is full of Spam, i've tried to empty it, but after some hours, the queue is full.

I followed instructions in this KB # 766 :

Code:
webdispo:~# /var/qmail/bin/qmail-qstat
messages in queue: 793
messages in queue but not yet preprocessed: 0

After :

Code:
27 Sep 2007 19:02:32 GMT  #2346873  3198  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:33 GMT  #2346942  3212  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:34 GMT  #2347011  3202  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:35 GMT  #2347080  3200  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:36 GMT  #2347149  3192  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:39 GMT  #2347218  3198  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:40 GMT  #2347287  3200  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:41 GMT  #2347356  3196  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:45 GMT  #2347494  3200  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:46 GMT  #2347563  3199  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:47 GMT  #2347632  3200  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:51 GMT  #2347701  3204  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:52 GMT  #2347770  3201  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:53 GMT  #2347839  3197  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:02:54 GMT    3200  <[email protected]>
        remote  [email][email protected][/email]
27 Sep 2007 19:03:35 GMT  #2345079  3883  <>
        remote  [email][email protected][/email]
27 Sep 2007 19:04:41 GMT  #2345171  3804  <>
        remote  [email][email protected][/email]

After :
find /var/qmail/queue/mess/ -name 2347908

Code:
/var/qmail/queue/mess/22/2347908

After :
nano /var/qmail/queue/mess/22/2347908

Code:
Received: (qmail 14729 invoked by uid 33); 27 Sep 2007 19:02:54 +0200
Date: 27 Sep 2007 19:02:54 +0200
To: [email][email protected][/email]
Subject: Reative seu email agora!!
From: [email][email protected][/email] <[email protected]>
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
Content-Transfer-encoding: 8bit
Reply-To: [email][email protected][/email] <[email protected]>
Message-ID: <[email protected]>
X-Priority: 3
X-MSmail-Priority: High
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Mailer: iGMail [[url]www.ig.com.br[/url]]
X-Originating-Email: [[email protected]]
X-Sender: [email][email protected][/email]
X-Originating-IP: [201.201.120.121]
X-iGspam-global: Unsure, spamicity=0.570081 - pe=5.74e-01 - pf=0.574081 - pg=0.$
#2347908

After : # grep 33 /etc/passwd

But The problem is that, the next command don't work, i talk about this commande :
# lsof +r 1 -p `ps axww | grep httpd | grep -v grep | awk ' { if(!str) { str=$1 } else { str=str","$1}}END{print str}'` | grep vhosts | grep php


I have PLESK 8.2.1 and DEBIAN SARGE.


What can i do to solve this problem of SPAM ?

How can I Blacklist the ip's adresses ?

Thanks to you and sorry for my english, i'm french
 
Greetings:

Note: While typically work with just H-Sphere, H-Sphere uses qmail

Presuming Debian supports iptables (I've worked on various Unix flavors, but Debian is not one of them), then you could do something like:

iptables -I INPUT -s 201.201.120.121 -j DROP

I typically use qmqtool from http://jeremy.kister.net/code/qmqtool/ for cleaning up spam et al.

You didn't have it in your post, but is UID in /etc/passwd as a regular user (you don't have to post the info)?

If yes, then check their web document area for either malware uploaded there via web-based injection attacks; and check for vulnerable applications or scripts for which the hacker may be using.

Thank you.
 
I,
When i try to find the PHP script that sends mails from my server, i followed this link :

http://kb.swsoft.com/article_22_1711_en.html

But look :


Code:
webdispo:~# !/bin/sh(echo X-Additional-Header: $PWD ;cat) | tee -a /var/tmp/mail.send|/var/qmail/bin/sendmail-qmail "$@"
-bash: !/bin/sh(echo X-Additional-Header: $PWD ;cat) | tee -a /var/tmp/mail.send|/var/qmail/bin/sendmail-qmail "$@": event not found

????
 
I've installed the package LSOF, and when i did :




33 /etc/passwd[/B]

I have :
Code:
www-data:x:33:33:www-data:/var/www:/bin/sh

??
 
If you look at the procedure outlined in the wiki entry, this tells you it is coming from an exploitable php application.

Your second problem is you need to create a script from the sw-soft kb article, not paste the output into the shell.
 
How to create This Script ??

The first command didn't work
 
Someone for help me ?

Code:
webdispo:/# grep 33 /etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh

I found that userid maps to apache. How to find now the script who send the spams ?
 
Back
Top