|
地板

楼主 |
发表于 2011-11-18 17:16:24
|
只看该作者
我是winwebmail的系统
一直没差到实质问题 日志里可疑的ip和链接都kill掉了
对方的答复是 如下 检查
It will be one of the following scenarios:
1) It's a NAT firewall, in which case it is a NAT
in front of a machine that is infected with spam
sending spamware.
2) It's directly infested with spam sending spamware.
This detection is of the DarkMailer/YellSOFT DirectMailer
Spamware.
You can find out more detail on this by doing google searches
for "YellSOFT DirectMailer" or "DarkMailer", including
screenshots of the control panel this software installs on
your web server (the control panel in Russian).
See, for example, http://en.wikipedia.org/wiki/Dark_Mailer
http://forums.cpanel.net/showthread.php?p=496217
Note the references to "csf SMTP_BLOCK" and "WHM's SMTP Tweak"
This detection is that of a spammer who has broken into your
web server (usually) via cracked or keylogged FTP credentials.
Once they've logged in via FTP, they install perl scripts
that do the spamming. CPanel and Plesk installations are the
most common infectees, but others (including Apache) are also
subject to this problem.
ANY web server capable of running Perl scripts (whether
Windows, UNIX, Linux, FreeBSD etc) and permits FTP access for
customers/users OR EVEN administrators to change their web
pages is potentially a victim of this spamware.
In order to keep this IP delisted from the CBL, not only does
the infestation hae to be found and removed, you must implement
measures to prevent it from recurring. Changing FTP passwords
or suspending users (usually not necessary) will not prevent
future infestations. You must implement measures to
stop Darkmailer uploads _OR_ prevent Darkmailer infection being
able to send email - in other words, implementing outbound
firewall restrictions on email except from the userids associated
with your mail server. Eg: "CPanel/WHM's SMTP Tweak", the
"CSF SMTP_BLOCK", or something similar to the iptables command
we give below. If your IP continues to get reinfected we will
stop delisting.
Furthermore, please examine your system logs (eg: /var/log/messages)
for uploads of the script. If you find any, please send us a copy.
They will look something like this:
Mar 4 04:02:11 enam pure-ftpd: (skgurun.41.229.131) [NOTICE]
/home2/skgurun//public_html/rocker/dark.cgi uploaded (74627 bytes,
126.66KB/sec)
Mar 4 05:03:54 enam pure-ftpd: (skgurun.41.229.131) [NOTICE] Deleted
dark.cgi
[Notice how it was uploaded and deleted after about an hour.
You can often identify this (on UNIX/Linux systems) by
doing "ps" (process status) and finding many (often 10
or more) long-running processes named "<something>.cgi",
"<something>.php" or "<something>.pl" that are owned by the
same user as your web server instance. As an example, one
infectee saw 25 copies of a "dm.cgi" program running under
his Apache server's userid.
The other type can be seen by (as root) running the
command "netstat -nap". Lines like this (with random
program names rather than your MTA software) means you're
infected:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 1 192.168.2.2:58246 212.69.102.240:25 SYN_SENT 12614/b.pl
tcp 0 0 192.168.2.2:35843 209.85.201.27:25 ESTABLISHED 7996/ciwhcnsb.pl
tcp 0 0 192.168.2.2:53051 81.13.48.2:25 TIME_WAIT -
tcp 0 0 192.168.2.2:53623 77.243.121.126:25 TIME_WAIT -
tcp 0 0 192.168.2.2:57816 217.13.210.81:25 TIME_WAIT -
tcp 0 1 192.168.2.2:50531 217.16.16.81:25 SYN_SENT 12270/nxhbo.pl
tcp 0 0 192.168.2.2:52437 217.198.11.26:25 TIME_WAIT -
tcp 0 1 192.168.2.2:50140 195.64.222.2:25 SYN_SENT 9273/yzezihd.pl
Foreign addresses that end with ":25" indicate _outbound_
email connections. TIME_WAIT means the connection has been
shutdown, but other states indicate active outbound
connections. You probably won't be able to find the
program names (eg: b.pl, ciwhcnsb.pl, nxhbo.pl etc) on your
file system, because they deleted themselves immediately after
starting. But you will be able to find the process via
"ps" based on process id (PID).
Note that darkmailer is often uploaded, run, and deleted
quite quickly, so you might not see anything except if you're
lucky enough to run the command while the darkmailer script
is actually running.
There are two main versions of this spamware:
In the first, it works by uploading a series of ".php" and
".pl" scripts via FTP (you'll see this in your FTP logs), and
then invoking them via your web server. Once the programs
are invoked, they delete themselves from the file system,
but remain running.
In the second, the spamware is a "cgi" Perl script that does
not delete itself. It can be called anything - eg: "dm.cgi",
"test.cgi", "dark.cgi" etc.
It will most often be in the cgi-bin directory, perhaps that
of an individual user, not the system-wide one.
You also may find various files like "from.txt", "replyto.txt"
etc. There is sometimes also a "sys" directory that contains a
lot of "*.mx" files. This all has to be eradicated.
Whether these exist depends on the configuration of the
DarkMailer/DirectMailer spamware that is infecting your machine.
Dealing with this can be difficult, because as long as your
FTP passwords can be cracked (or stolen from an infected web
developer's PC) it can come back at any time.
First: minimize FTP access. Secure/change all passwords.
If you can do your customer uploads some other way, turn off
FTP, or prevent FTP from writing directly into the web server's
document directory.
It is entirely possible that this spamware can be installed
by other means (eg: FrontPage extensions), but we have not
heard of it actually being done. Yet....
Second: Find the infection. If it's the second version ("cgi"),
you can find it, remove it and kill any running copies.
If it's the first version, there's nothing to find because
it's deleted itself, instead you have to stop the current
processes running. The simplest way is to reboot the server.
Or, if you can identify _all_ of the rogue processes, killing
them should be enough. Just make sure they stay dead.
Third: Configure your system to absolutely prohibit any userid
except root or your mail server's userid (often "mailman" or
something like that) from getting access to outbound port 25.
In this way, even if you do get infected, the spamware can't
get email out to the Internet.
In the above links, take note of the references to "CPanel/WHM's
SMTP Tweak" and "CSF SMTP_BLOCK".
"SMTP Tweak" is apparently a standard feature in WHM. "SMTP_BLOCK"
is a feature in ConfigServer's "CSF" firewall.
WHM "SMTP Tweak" doesn't always work, because it doesn't do quite
the same things as SMTP_BLOCK, and "SMTP Tweak" can sometimes be
"clobbered" by other applications.
Note also that the CSF SMTP_BLOCK blocks all port 25 connections
initiated from your server, inluding those to localhost. "localhost"
may be used by your webmail application or some other things. If,
after you turn SMTP_BLOCK on, legitimate email gets blocked too
(eg: webmail, web-based email applications etc), set SMTP_ALLOWLOCAL
to "1".
There are many other ways to accomplish this for other web servers,
for example, IPTables on Linux, PF on FreeBSD etc.
These IPtables commands do the same thing as CSF SMTP_BLOCK and
SMTP_ALLOWLOCAL does (both set to "1").
iptables -A OUTPUT -d 127.0.0.1 -p tcp -m tcp --dport 25 -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --gid-owner mail -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --gid-owner mailman -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 25 -m owner --uid-owner root -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 25 -j REJECT --reject-with icmp-port-unreachable
[Permits only the users "mail", "mailman" and "root" to go outbound
on port 25.
If you're using cPanel and APF, APF by default will wipe out iptables
rules you enter manually leaving the server vulnerable. If you are using
APF, you should make the above change via APF, then APF won't wipe them
out. Furthermore, APF will take care of reissuing the commands upon
reboot or reset.
Note that while this description may seem vague, be assured that
there is NO POSSIBILITY that this listing was caused by any form
of legitimate mail or network activity. Secondly, there is also
NO POSSIBILITY that the IP address was spoofed. Thirdly, the
presence or lack of anti-virus software in your mail server
CANNOT and DOES NOT prevent this from happening, because most of
these infections contain their own mail clients, and they bypass
your mail server software.
You will need to examine the machine for a virus or spam sending
spyware/adware/worm.
Up-to-date anti-virus and anti-spyware tools are essential.
For NAT firewalls, we recommend you pay careful attention to
the next paragraph:
If the IP is a NAT firewall, we strongly recommend configuring
the firewall to prevent machines on your network connecting to
the Internet on port 25, except for machines that are supposed to
be mail servers. Once you have done this, you can use your
firewall logs to detect which machines are infected/compromised.
Note that many NAT routers/gateways support UPNP capabilities.
If yours does, and you don't need it, turn it off.
http://cbl.abuseat.org/advanced.html has more information on
finding infected machines on a NAT, as well as more details
on UPNP.
Running a combination of anti-spyware and anti-virus programs should
help to find the malware.
It is unfortunate, however, the track record of current/popular
Anti-Virus software at finding current and severe threats is abysmal.
In fact, recent studies have shown that "new" threats are only caught by
_any_ of 35 of the most common A-V packages 23% of the time, and that
only improves to 50% after a month. In other words, if you were running
ALL of those 35 A-V products at once, a new threat would be caught only
23% of the time by _any_ of them.
http://www.mynetwatchman.com/tools/sc/ (the seccheck tester) will
probably be the most helpful in analyzing system security, as well
as yielding information we can use to help others to find/kill it.
However, Seccheck requires considerable Windows system internals
experience, and other tools may be more appropriate.
"Hijackthis" is similar to seccheck. There are online forums where
you can upload hijackthis reports and have an expert analyse
them, identify what is wrong, and make suggestions on how to fix it.
Perhaps one of the best tools for spot-removal of specific current and
common threats without requiring very high levels of expertise is the
Microsoft Malicious Software Removal tool (MSRT) at
http://www.microsoft.com/security/malwareremove/default.mspx
MSRT is NOT a replacement for a good A-V scanner. It's just good at
finding/removing many of the BOTs we detect (eg: cutwail, srizbi,
storm, etc).
MSRT is continuously updated with new heuristics. If your copy of
MSRT is more than a day or two old, download it from Microsoft
again.
If this IP is a firewall, scanning/eradication of viruses on your
internal network will NOT reliably keep the IP out of the CBL.
You MUST apply the configuration changes we recommend above to
NAT firewalls.
If you are running Barracuda, you MUST turn off the "bounce
spam and viruses" option. As spam and viruses are always
forged, the "bounce" feature simply results in mailbombing
innocent third parties with misdirected garbage - in other
words, the Barracuda is spamming.
Notes:
- False "gheg" detections have been seen with M&Wise's MTA
software, "UMS". Please contact your vendor for a patch.
We believe that most installations using this software have
already been patched.
- False "gheg" detections have also been observed with
challenge/response messages from the "TotalBlock"
challenge-response (C/R) anti-spam solution (www.totalblock.net).
Please contact your vendor for a patch.
Note: C/R is a bad idea in the first place because it bombards
innocent third parties with challenges to emails that they didn't
send. The CBL does _not_ list on this basis (it has no way of
knowing the email is a challenge), but other DNSBLs do. In this
case, the challenge emails are implemented poorly and trigger
gheg detections.
I've removed the entry from the list.
It may take a few hours to propagate to the public nameservers.
WARNING: the CBL WILL relist this IP if the underlying issues are not
resolved, and the CBL detects the same thing again. |
|