How it works


Before learning how e-mail injection works, we must take a look on how the php mail() function works. Here is the basic syntax of this function:

<?php mail($recipient,$subject,$message,$headers); ?>
Using the example above, the following output would be produced:
To: $recipient
Subject: $subject
$headers

$message
Knowing this, we may assume that a malicious user may want to include additional fields to the header, such as the "cc" and "bcc", and even another "to". So, if a spammer discovers any way to inject anything to your headers, he could easilly use your form to send SPAM.

To understand, assume that the following is inserted in the "to" field of your form:
you@place.www%0Acc:any1@site.xxx%0Abcc:some1@host.yyy,person@blah.zzz%0Ato:guy@server.jjj
The real email data would be:
To: you@place.www
cc: any1@site.xxx
bcc: some1@host.yyy,person@blah.zzz
to: guy@server.jjj
Assuming this scenario, the spammer would have successfully sent the message to four people he have chosen.

Not only these fields could be manipulated, but also the subject, the message and anything the malicious user wants. Thus, the spammer could send any message, with any subject to anybody. To complete, if the spammer manipulates the "Content-type" MIME field he can even split the message in parts, so only what he really wants is sent to the victims.

Seems a big trouble? Well, it really is if you don't know how to protect yourself.
Click here to learn some ways to secure your scripts.
Latest News >>
Unplugging The World's Biggest Spam Host-- Temporarily (Linux Today)
"The volume of junk e-mail sent worldwide dropped drastically today after a Web hosting firm identified by the computer security community as a major host of organizations allegedy engaged in spam activity was taken offline, according to security firms that monitor spam distribution online.

Webroot E-Mail Security SaaS Enhancements Deliver Cost-Effective Solution for Improving Security and Manageability (Business Wire via Yahoo! Finance)
BOULDER, Colo.----Webroot, a leading security provider for the consumer, enterprise and SMB markets, today announced significant enhancements to Webroot® E-Mail Security SaaS that provides better protection from the latest email threats, supports the effective enforcement of usage policies, and eases the management of critical email communications.

Security SaaS enhancements for SMBs (CIOL)
BOULDER, USA: Webroot, a leading security provider for the consumer, enterprise and SMB markets , has announced significant enhancements to Webroot E-Mail Security SaaS that provides better protection from the latest email threats, supports the effective enforcement of usage policies, and eases the management of critical email communications.




About us Portuguese version