The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to find which script has been exploited by spammer?

Discussion in 'General Discussion' started by Jeff75, Dec 7, 2006.

  1. Jeff75

    Jeff75 Well-Known Member

    Joined:
    Apr 11, 2003
    Messages:
    555
    Likes Received:
    0
    Trophy Points:
    16
    One of my servers is blacklisted with spamcop. I was told that a spammer has exploited a script on one of the accounts, but all of the headers just show that it was sent by nobody using the server's main IP address.

    Can someone tell me how to find which script is being used so I can shut it down?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Other than trawling your scripts, you should enable extended exim logging by adding the following to the first box in the Exim Configuration Editor in exim:

    log_selector = +arguments +subject

    This will provide you with additional information in /var/log/exim_mainlog that shows a cwd=/home/... line to the directory for the script that sends out email through exim. Using the mail ID you can then tie the two together to identify the likely script.

    I've explained in more detail in this article:
    http://www.configserver.com/free/spammers.html#outbound
     
  3. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Additionally, the next time you recompile Apache using easyapache, apply the PHP mail header patch, available at http://choon.net/php-mail-header.php (see the instructions for cPanel/WHM on there)

    Then, if the script is being abused, the URL to the script and the IP running the script will be in the header of the email
     
Loading...

Share This Page