] ]

 
] ] ]
]
Top 5 Recent Posts ]
View Last Post CF developer East Sussex needed
Last Post By: Guests
Forum: Employers

Posted: 10 August 2010 at: 6:06pm

View Last Post Related selects using bind and cfc
Last Post By: Oyster
Forum: Coldfusion Programming

Posted: 01 July 2010 at: 6:18pm

View Last Post Table layout query
Last Post By: Clarkee21
Forum: HOW TO

Posted: 22 June 2010 at: 3:15pm

View Last Post CF developer required Immediately
Last Post By: jeromesmith
Forum: Employers

Posted: 25 May 2010 at: 8:53am

View Last Post ColdFusion Developer- 9 Month Contract
Last Post By: Ryanadams100
Forum: Employers

Posted: 21 April 2010 at: 4:18pm

]
] ]

] ] ]
]
Welcome Guest ]
Name:
Pass:
Auto Login
Add me to Active Users list
Yes  No

Forgot password? | Register
]
] ]

] ] ]
]
Online Activity ]
People Online: 6
Guest(s): 6
Member(s): 0
Memberships: 2472
The Newest Member is patidarvijay
Most Online: 60
Occured: 22 October 2009
Members[0], Guests[60]
]
] ]

] ] ]
]
Member(s) Visited ]
Total: 0 
No matches found
]
] ]

   
Coldfusion Programming
 CFDeveloper - Coldfusion developer community » Coldfusion Programming
Subject Topic: Stopping a form spammer Post ReplyPost New Topic
Forum Jump  
] ] ]
]
Author
Message Prev Topic | Next Topic 
Clarkee21
Senior Member
Avatar

Senior Member

Joined: 31 January 2005
National Flag of United Kingdom United Kingdom
Posts: 109
Gender: Male
Posted: 19 December 2005 at 2:33pm | IP Logged Quote Clarkee21

Hi guys,

A client of ours has a standard "Contact Us" form running on their website here:
http://www.interpersonalskills.co.uk/contact/contact.cfm

Over the past few months we've been receiving spam emails through it which look similar to this one:

------------------------------------------------
Subject: T.I.P.S - Website Contact Form Submission

Name(s): boldness9042@interpersonalskills.co.uk
Address:boldness9042@interpersonalskills.co.uk
Post Code: boldness9042@interpersonalskills.co.uk
Phone Number: him
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: she, hear what they
bcc: charleslegbe@aol.com
af4798de07d7272102cd5fa8263ea084.
Email: boldness9042@interpersonalskills.co.uk
Keep them updated?: YES

Enquiry:
boldness9042@interpersonalskills.co.uk

Submitted from 202.99.16.206 at 19/12/2005 - 04:58:07

-----------------------------------------

We usually recieve four or five of these in one go all being sent out with a minute and mostly from the same IP address.

We have some basic javascript validation on the form page but currently nothing is validating server-side before the processing. The javascript is obviously being bypassed though as elements like the phone number should be numbers only.

What stands out from this is the insertion of the code...

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: she, hear what they
bcc: charleslegbe@aol.com
af4798de07d7272102cd5fa8263ea084.

... which isn't in the cfmail in the form processing.

Incase it helps here's my processing code...

<cfmail to="client_email_address" bcc="emailed to me" from="info@interpersonalskills.co.uk" subject="T.I.P.S - Website Contact Form Submission" >
 Name(s):    #form.name#
 Address:    
 #form.address#
 Post Code:   #form.postcode#
 Phone Number:  #form.telephone#
 Email:   #form.email#
 Keep them updated?: <cfif IsDefined("form.updates")>YES<cfelse>N0</cfif> ; 
 
 Enquiry:   
 #form.enquiry#
 
 Submitted from #CGI.REMOTE_ADDR# at #DateFormat(now(), "dd/mm/yyyy")# - #TimeFormat(now(), "HH:mm:ss")#
</cfmail>

 <cfquery datasource="tips">
   INSERT INTO enquiry (name, address, postcode, telephone, email, enquiry, updates)
   VALUES ('#form.name#', '#form.address#', '#form.postcode#', '#form.telephone#', '#form.email#', '#form.enquiry#',<cfif IsDefined("form.updates")>1<cfelse>0</cfif> )
 </cfquery>

Has anybody else had a problem like this and if so how can I stop these guys from getting through "the net".

Cheers in advance and Merry Xmas everybody,
James

Back to Top Printable version View Clarkee21's Profile Search for other posts by Clarkee21
 
Russ
Admin Group
Avatar

Admin Group
Snake

Joined: 23 January 2005
National Flag of United Kingdom United Kingdom
Posts: 633
Gender: Male
Posted: 20 December 2005 at 12:24pm | IP Logged Quote Russ

generate a random code on the form, check this code on the action page. Then it will not be possible for someone to download the form and submit from another location, which is probably what happens.

The other way to stop bots from submititng your forms is to use image code. I.E. you display and image and the user has to type the text displayed on the image.



__________________
Russ Michaels
CFDeveloper Administrator
my blog: <a href="http://russ.michaels.me.uk/">russ.michaels.me.uk< ;/a>
Back to Top Printable version View Russ's Profile Search for other posts by Russ Visit Russ's Homepage
 
Clarkee21
Senior Member
Avatar

Senior Member

Joined: 31 January 2005
National Flag of United Kingdom United Kingdom
Posts: 109
Gender: Male
Posted: 20 December 2005 at 6:28pm | IP Logged Quote Clarkee21

Thanks for the help Snake. Do you have any examples of the random code working so I can understand what you mean a bit better?

Cheers again,
James

 

Back to Top Printable version View Clarkee21's Profile Search for other posts by Clarkee21
 
Russ
Admin Group
Avatar

Admin Group
Snake

Joined: 23 January 2005
National Flag of United Kingdom United Kingdom
Posts: 633
Gender: Male
Posted: 21 December 2005 at 11:38am | IP Logged Quote Russ

not off the top of my head.

But it would work something like this.

-- myform.cfm --
<cfset session.UUID = CreateUUID()>
<form method = "post" action="formaction.cfm">
<input type="hidden" name="UUID" value="#session.UUID#">

-- formaction.cfm --
<cfif session.UUID EQ form.UUID>
everything is OK
<cfelse>
form submitted by a bot or somehting that has not generated a session as it can't save cookies

</cfif>



__________________
Russ Michaels
CFDeveloper Administrator
my blog: <a href="http://russ.michaels.me.uk/">russ.michaels.me.uk< ;/a>
Back to Top Printable version View Russ's Profile Search for other posts by Russ Visit Russ's Homepage
 
Clarkee21
Senior Member
Avatar

Senior Member

Joined: 31 January 2005
National Flag of United Kingdom United Kingdom
Posts: 109
Gender: Male
Posted: 22 December 2005 at 8:53am | IP Logged Quote Clarkee21

Once again thanks a lot for your help Snake and have a good Xmas ;)

Cheers,
James

Back to Top Printable version View Clarkee21's Profile Search for other posts by Clarkee21
 
]
] ]
Forum Jump  

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic

] ] ]
]
  ]
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum
]
] ]

] ] ]
]
This page was generated in 1.1104 seconds. ©2004 cfdeveloper.co.uk
]
] ]