Spammers: Advice being sought


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Spammers: Advice being sought
# 1  
Old 04-10-2007
Spammers: Advice being sought

The Web-based contact form on my site has been under distributed spamming attacks for nearly a month already. Obviously, a spammer has tried to generate HTTP requests containing ads to male drugs and all sorts of similar stuff directly to the form mail processor script on my site using a robot, as I can see from my logs that dozens of them were being recorded nearly every hour.

Although I have programmed some trickeries with the form processor way back in 2006 that was sufficient to prevent those spam mail from actually being sent to my mailbox at all, the attacks are filling up my log files and I think I should do something to stop that, as they are also wasting my bandwidth and processing power having to serve them.

The spammer has apparently been able to attack hundreds of hosts and launch the attacks through them, as nearly all spam were originated from different IP addresses and thus far I have been able to capture several hundreds IP addresses of those initiating those requests over just a couple of weeks. However, the design of my form allows me to find out the original IP address from which the form used in the attacks was initially captured, which resolves to an IP address from a netblock owner in New Jersey, who captured the form in mid March 2007 which was then used in all attacks thereafter.

As I know you all are seasoned sysadmins, what should I do now? And have you all experienced similar issues, and how did you go about that?
# 2  
Old 04-10-2007
I ended up doing a very basic "captcha" style implementation on my contact form - just to get the user to type in a word, in a certain case, otherwise the request fails validation - http://www.zazzybob.com/contact.html - this is an *extremely* basic form of validation - but it works - and I no longer get my daily Viagra and Rolex ads ;-)

Something like this may be more robust....

Cheers
ZB
# 3  
Old 04-10-2007
Hi Zazzybob,

I have been able to block those requests from actually sending email with my present strategy. What I am interested to know, is that, as sysadmins whether you are hunting those frequent abusers down and report to the netblock owner concerned? Or put the question simply, what are your typical resolution for issues like that?
# 4  
Old 04-10-2007
Yes, I'm doing this often. Usually it's coming from one IP, so it's not difficult to trace. Do a whois for the IP, and send full headers + log file to $abuse@ contact.

In order to avoid large log file you may do the following with apache :

Code:
SetEnvIf Request_Method ^your-pattern-here$ nofsckinglog

CustomLog "|xx /wwwlog/your-vhost/%Y-%m-%d/access.log" combined env=!nofsckinglog
ErrorLog "|xx /wwwlog/your-vhost/%Y-%m-%d/errors.log"

Code:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^your-pattern-here
RewriteRule ^/ %{DOCUMENT_ROOT}/some-empty-file [F,L]

# 5  
Old 04-10-2007
It's a shared Web hosting account. I have no access to such Apache directives, but the logs are accumulating and they are increasingly eating my quota (but I can't remove them, either). And the attacks were recorded from hundreds of hosts thus far with nearly no repeat, although I believe the attacks are coordinated by one party from behind, as shown by an identical cryptographic signature for all attacks. Apart from Apache logs, some logs are written by my site scripts that I can provision, but unless the source can be stopped those requests are still dragging down the server and leaving me lots of logs.

As for abuse report, do netblock owners typically entertain them?
# 6  
Old 04-11-2007
The mod_rewrite trick should be allowed even on shared host. Just put this in .htaccess file at your server root and see if it works. As for the netblocks, every respected company / ISP should comply with regulations, namely, blocking whole /24 nets when a proven spammer is being detected - take a look at spamhaus' drop list
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Traceback spammers using an obfuscation of their URL

I have on occasion been forced to divulge my address to the odd enterprise, here and there. Some time later I've mysteriously found myself on the receiving end of spam. I have a plan to copy said enterprise's domain or part thereof to a bash terminal and obfuscate it, then paste the obfuscated... (2 Replies)
Discussion started by: nohspamjose
2 Replies

2. Shell Programming and Scripting

awk & basename puzzler - advise sought

Hi I have been able generate a file ($ELOG) that can have multiple lines within it. The first column represents the full path source file and the other is the full path target ... the file names are the same but the target directory paths are slightly different. <source_dir1>/file1 ... (4 Replies)
Discussion started by: davidra
4 Replies

3. Cybersecurity

How were UNIX machines taken over by SPAMMERS?

Hello, Three of our machines at work were sending out SPAM on the internet. 2 of them were so old I knew that the hackers just exploited the vulnerabilities in the old systems. The cause of concern is that one one of the machines is a new Centos 5.3 box.The only proof we have is that 4-6 emails... (3 Replies)
Discussion started by: mojoman
3 Replies
Login or Register to Ask a Question