need urgent help , i'm under spam attack

Discussion in 'Site & Server Administration' started by evolving, Aug 27, 2006.

  1. #1
    someone is using the form on my site to send me hundreds of emails
    what can i do , i need your help
     
    evolving, Aug 27, 2006 IP
  2. iconv

    iconv Well-Known Member

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Quickest probable to block their ip from accessing your site at all.
     
    iconv, Aug 27, 2006 IP
  3. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #3
    $badStrings = array("Content-Type:",
                         "MIME-Version:",
                         "Content-Transfer-Encoding:",
                         "Bcc:",
                         "Cc:",
                         "To:");
    
    foreach($_POST as $k => $v){
       foreach($badStrings as $v2){
           if(strpos(strtolower($v), strtolower($v2)) !== false){
               header("HTTP/1.1 403 Forbidden");
               exit();
           }
       }
    }
    
    PHP:
    If your server supports PHP, then add this piece of code to the top of form processing script. It will validate the POST data against the bad header injection strings and exit with 403 forbidden status code if it is found to be header injection attack.

    Hope it helps.
     
    vishwaa, Aug 27, 2006 IP
  4. evolving

    evolving Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i am using the form presented by my host

    so i'm practically putting the form code in an html file ....

    is the code given can be put in this html file or should
    it be put in the processing file used by my host

    ....
     
    evolving, Aug 27, 2006 IP
  5. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #5
    You should place this code in your PHP script and not in HTML.

    I guess your form processing script must be written in PERL. In such case you will need to put a similar perl code which performs the same action. Otherwise you should modify the processing script to php.

    If it is a simple contact us form, please let me know. I can help you upto some extend.
     
    vishwaa, Aug 27, 2006 IP
  6. evolving

    evolving Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yes indeed it is a simple contact us form
     
    evolving, Aug 27, 2006 IP
  7. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #7
    Why don't you delete contact form while you straighten this out. You can put up notice form temporarily down for upgrade or some such.
     
    Smyrl, Aug 27, 2006 IP
  8. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #8
    Add a captcha (image verification script) to your form.
     
    eXe, Aug 28, 2006 IP
  9. evolving

    evolving Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i've done this for some time
    then i guess the spammer went so i've put it again
    now i'm simply trying to find ways to prevent it from hapenning again
     
    evolving, Aug 30, 2006 IP