Skip to main content

linux - How to find which script on my server is sending spam emails?





My server is sending the spam email and I am not able to find out
which script is sending them.



The emails were
all from nobody@myhost so disabled from the cpanel that
nobody should not be allowed to send
emails



Now at least they are not going out, I
keep receiving them. This is mail I
get:



A message that you sent could
not be delivered to one or more of its
recipients. This is a permanent error.
The following address(es) failed:



eckert@clearfieldjeffersonredcross.org
Mail sent by user nobody being
discarded due to sender restrictions in WHM->Tweak
Settings

------ This is a copy of the message, including all the
headers. ------

Return-path:

Received: from nobody by
cpanel.myserver.com with local (Exim 4.80)
(envelope-from
)
id 1UBBap-0007EM-9r


for eckert@clearfieldjeffersonredcross.org; Fri, 01 Mar 2013 08:34:47
+1030
To: eckert@clearfieldjeffersonredcross.org
Subject: Order
Detail
From: "Manager Ethan Finch"

X-Mailer: Fscfz(ver.2.75)
Reply-To:
"Manager Ethan Finch"
Mime-Version:
1.0
Content-Type:
multipart/alternative;boundary="----------1362089087512FD47F4767C"
Message-Id:

Date: Fri, 01 Mar 2013 08:34:47
+1030


------------1362089087512FD47F4767C
Content-Type:
text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding:
7bit


This is my logs
for exim logs:



2013-03-01 14:36:00
no IP address found for host gw1.corpgw.com (during SMTP connection from
[203.197.151.138]:54411)
2013-03-01 14:36:59 H=() [203.197.151.138]:54411
rejected MAIL gpgjouczsr@gmail.com: HELO required before
MAIL

2013-03-01 14:37:28 H=(helo) [203.197.151.138]:54411 rejected
MAIL admin@gmail.com: Access denied - Invalid HELO name (See RFC2821
4.1.1.1)
2013-03-01 14:37:28 SMTP connection from (helo)
[203.197.151.138]:54411 closed by DROP in ACL
2013-03-01 14:37:29
cwd=/var/spool/exim 2 args: /usr/sbin/exim -q
2013-03-01 14:37:29 Start queue
run: pid=12155
2013-03-01 14:37:29 1UBBap-0007EM-9r **
eckert@clearfieldjeffersonredcross.org R=enforce_mail_permissions: Mail sent by user
nobody being discarded due to sender restrictions in WHM->Tweak
Settings
2013-03-01 14:37:29 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t
-oem -oi -f <> -E1UBBap-0007EM-9r
2013-03-01 14:37:30 1UBHFp-0003A7-W3
<= <> R=1UBBap-0007EM-9r U=mailnull P=local S=7826 T="Mail delivery failed:
returning message to sender" for nobody@cpanel.server.com
2013-03-01 14:37:30
cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1UBHFp-0003A7-W3
2013-03-01
14:37:30 1UBBap-0007EM-9r Completed
2013-03-01 14:37:32 1UBHFp-0003A7-W3
aspmx.l.google.com [2607:f8b0:400e:c00::1b] Network is
unreachable

2013-03-01 14:37:38 1UBHFp-0003A7-W3 =>
johnmyk@server.com R=lookuphost T=remote_smtp
H=aspmx.l.google.com [74.125.25.26] X=TLSv1:RC4-SHA:128
2013-03-01 14:37:39
1UBHFp-0003A7-W3 Completed
2013-03-01 14:37:39 End queue run:
pid=12155
2013-03-01 14:38:20 SMTP connection from [127.0.0.1]:36667 (TCP/IP
connection count = 1)
2013-03-01 14:38:21 SMTP connection from localhost
[127.0.0.1]:36667 closed by QUIT
2013-03-01 14:42:45 cwd=/ 2 args:
/usr/sbin/sendmail -t
2013-03-01 14:42:45 1UBHKv-0003BH-LD <=
root@cpanel.server.com U=root P=local S=1156 T="[cpanel.server.com] Root Login from IP
122.181.3.130" for johnmyk@server.com
2013-03-01 14:42:45 cwd=/var/spool/exim
3 args: /usr/sbin/exim -Mc 1UBHKv-0003BH-LD
2013-03-01 14:42:47
1UBHKv-0003BH-LD aspmx.l.google.com [2607:f8b0:400e:c00::1a] Network is
unreachable
2013-03-01 14:42:51 1UBHKv-0003BH-LD => johnmyk@server.com
R=lookuphost T=remote_smtp H=aspmx.l.google.com [74.125.25.27]
X=TLSv1:RC4-SHA:128

2013-03-01 14:42:51 1UBHKv-0003BH-LD
Completed
2013-03-01 14:43:22 SMTP connection from [127.0.0.1]:37499 (TCP/IP
connection count = 1)
2013-03-01 14:43:23 SMTP connection from localhost
[127.0.0.1]:37499 closed by
QUIT


Is there any way
to find which script, or which user, is generating those?



Answer




Linux Malware Detect ( href="http://www.rfxn.com/projects/linux-malware-detect/"
rel="noreferrer">http://www.rfxn.com/projects/linux-malware-detect/)
installation is quite easy :). Go via this link, download href="http://www.rfxn.com/downloads/maldetect-current.tar.gz"
rel="noreferrer">http://www.rfxn.com/downloads/maldetect-current.tar.gz.
The link to this file is located at the very top of the web-page. Then unzip this
archive, go to newly created directory by running cd in your terminal.
In the
directory run




sudo
./install.sh



which will install the scanner to
your system. To perform the scanning itself you are to
run



sudo /usr/local/sbin/maldet -a
/



-a option here means that you want ro scan all
the files. Use -r instead to scan only recent ones. / specifies the directory where scan
should be performed. So just change it to any directory you want.



Just that )



Comments

Popular posts from this blog

iLO 3 Firmware Update (HP Proliant DL380 G7)

The iLO web interface allows me to upload a .bin file ( Obtain the firmware image (.bin) file from the Online ROM Flash Component for HP Integrated Lights-Out. ) The iLO web interface redirects me to a page in the HP support website ( http://www.hp.com/go/iLO ) where I am supposed to find this .bin firmware, but no luck for me. The support website is a mess and very slow, badly categorized and generally unusable. Where can I find this .bin file? The only related link I am able to find asks me about my server operating system (what does this have to do with the iLO?!) and lets me download an .iso with no .bin file And also a related question: what is the latest iLO 3 version? (for Proliant DL380 G7, not sure if the iLO is tied to the server model)

linux - Awstats - outputting stats for merged Access_logs only producing stats for one server's log

I've been attempting this for two weeks and I've accessed countless number of sites on this issue and it seems there is something I'm not getting here and I'm at a lost. I manged to figure out how to merge logs from two servers together. (Taking care to only merge the matching domains together) The logs from the first server span from 15 Dec 2012 to 8 April 2014 The logs from the second server span from 2 Mar 2014 to 9 April 2014 I was able to successfully merge them using the logresolvemerge.pl script simply enermerating each log and > out_putting_it_to_file Looking at the two logs from each server the format seems exactly the same. The problem I'm having is producing the stats page for the logs. The command I've boiled it down to is /usr/share/awstats/tools/awstats_buildstaticpages.pl -configdir=/home/User/Documents/conf/ -config=example.com awstatsprog=/usr/share/awstats/wwwroot/cgi-bin/awstats.pl dir=/home/User/Documents/parced -month=all -year=all...

linux - How can I get my mediawiki to stop thinking I have cookies disabled?

I've searched half a day for how to resolve this issue, and can't figure it out. Shortly after I made my wiki a simple private wiki according to the instructions at Mediawiki's website, it started giving me this weird login error message: Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again. If I remove those private wiki settings, the error disappears, even if I try logging in. But I need it to be a private wiki for only my team. So what do I do? Here's what I've done so far. Just to be safe, after ever change, I try rebooting Apache using: sudo /etc/init.d/apache2 restart In my php.ini file, I have the following set: session.save_path = "/var/lib/php5" session.cookie_secure = secure session.cookie_path = /tmp session.cookie_domain = my server's internal URL (should I even set this? this field was blank before, but not commented out) session.referer_check = Off I ran the following to ensure that the fold...