D
damon
Guest
Some php script on my server is being used to crank out massive numbers of spam emails and I can't find the source.
I've tried the suggesions in the sw-soft.com knowledgebase.
http://kb.swsoft.com/article_22_766_en.html
Example header from the latest batch.
I've run that and it shows all the php scripts that run, but doesn't help find the bad script, since most of the sites on the server run php scripts of various kinds.
Any suggestions? This is driving me crazy and I'm sure will lead to my new IP's getting on block lists.
Damon
I've tried the suggesions in the sw-soft.com knowledgebase.
http://kb.swsoft.com/article_22_766_en.html
Example header from the latest batch.
Received: (qmail 11909 invoked by uid 48); 23 Apr 2007 03:57:53 -0500
Date: 23 Apr 2007 03:57:53 -0500
Message-ID: <20070423085753.11907.qmail@example>
To: [email protected]
Subject: HSBC LONDON
From: Benjamin Ghanemy <[email protected]>
Reply-To: [email protected]
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
from sw-soft
If 'Received' line contains UID of 'apache' user (for example "invoked by uid 48") - it means that theSPAM was sent via some PHP script. In this case you can try to find the spammer using information from thespam mails (from/to addresses, subjects or anything else). But usually it is very hard to find SPAMsource in this case. If you are sure that at the current moment some script is sending SPAM (queuegrows very fast), you can use this little script to find out what PHP scripts are running in real-time:
Code:
# 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've run that and it shows all the php scripts that run, but doesn't help find the bad script, since most of the sites on the server run php scripts of various kinds.
Any suggestions? This is driving me crazy and I'm sure will lead to my new IP's getting on block lists.
Damon