Guestbook Spammers Bypassing My Entry Forms?

He has: 688 posts

Joined: Feb 2001

Aaaahhhh! Mad

[The following is a follow up to this previous thread (only since the June 8th follow up). I decided to move the discussion here because recent developments have now made this a technical issue.]

This now seems like a security risk. And since it looks like these ***holes will force me to soon shut down that entire section of my personal site, [link removed].

Before you look around, first click "Sign Guestbook". You'll see I wrote "disabled due to spammers" in the URL form. What I did was change the input name so that it couldn't add the URL to the correct field name in the database. I left the field in the form even though it doesn't work because I wanted to 'catch' the spammers signing my guestbook but not allow them to get their spam-urls on my guestbook.

Now go back to the guestbook and you'll see the last entry is from me. I entered an URL in that spot and it did not work. (On my guestbook the URL icon is a little gray circle with a "42" in it.). Great! I proved that my form won't register URL's anymore.

But now look at the entry right before mine, from "frank". He spammed me from the same crappy w w w s k e e z y site that spams me every day, AFTER I puroposely broke my form. So how did he get his entry into my guestbook if that field in the form doesn't function? Can they be bypassing the form completely? Do you think the 'bot just recognizes the system used and then goes right for the database?

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

Quote: But now look at the entry right before mine, from "frank". He spammed me from the same crappy w w w s k e e z y site that spams me every day, AFTER I puroposely broke my form. So how did he get his entry into my guestbook if that field in the form doesn't function? Can they be bypassing the form completely? Do you think the 'bot just recognizes the system used and then goes right for the database?

Absolutely! I once had a popular submit-your-own-links script in place on a website I ran, and I ran into the same exact thing. The way that they spam so many guestbooks is by having a program that completely bypasses that actual form and page completely. They just fill out the fields in a program or in another web page, and it goes through and submits that form directly to URLS that have been found to use that popular script.

That's why, whenever I use one now that allows anonymous submitting of links or guestbook signatures, or anything similar, I just write it myself, using unusual form element names.

He has: 688 posts

Joined: Feb 2001

Hmmm. I suppose I will need to get into my phpMyAdmin and either
A) delete the url field from the database
B) change the url field in my database and web form to an unusual name and allow real people to post again.

But if I do "B", will the 'bots just learn the new field name and continue spamming again?

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

In my personal experience, no. I believe (and this is conjecture) that they only know exactly how popular scripts works. ie They know the form fields that it accepts as input.

Is the script you're currently using one that you downloaded and implemented without modification to the part that actually takes the form's input and puts it in the database?

He has: 688 posts

Joined: Feb 2001

Yes. I used a visual theme but the guts of the operation were as is from a script I downloaded off the net. So I never changed, nor even chose, the name of the form input field or the corresponding database field.

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

That would fit with my theory of how the spammers work, then. It's still theory, as I have no desire to download whatever program(s) they use and actually check it out, but it does fit the facts.

Try your option B you listed above, and let me know how it works.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

One thing you can do it change your script that processes the submition, have it check to make sure that the refering page is your own site. Two things come from this.

1. People who have the referer blocked (either by their browser, or by using a virus program that does it without them knowing), won't be able to use it. On your error page, let them know this is why, as like I said, there are some people that don't even know AV programs may block this by default.

2. Since the information comes from the browser, I'm sure there would be SOME way of faking referring page info. But it may be worth a try to see if something that simple won't fix it.

Another posibility I just thought of, and again, if the user has it blocked it still won't work, but have the form page set a temp cookie that the submittion page looks for.

Now these may prevent some people from using the form, but it is a lot let people that are prevented compared to just shutting it down.

And remember, make sure your "error" page nicely and in simpliest terms lets the users know why it was rejected (either becuase referer was missing, or cookie was refused). Add a note explainging you are forced to do this due toe the spammers.

-Greg

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Also, just checked the source code for you page, you may wish to remove all indications you are using Xeobook.

The spammers probably do a search for sites that have known code in them for that guestbook, and make a list of sites to nail from that.

I know this is what I would do anyhow. (I have agreat criminal mind, luckily I only use it for preventing others from doing the same to me Wink

AyntRyte's picture

He has: 145 posts

Joined: Jun 2004

One idea I formulated from a Viper GB I ran: These "attacks" come in two waves. The first being the "Great Site!" posts that you mentioned in the previous thread. These posts appear to be "probes" or data collection. The second wave is the hack attack. In my case, every post in the GB was erased. Viper had a fix posted for this, but I figured out an easier method the prevent the frustration and hair-pulling: Delete the GB Laughing out loud If anyone has something worthwhile to say, they can post it on the message board, which I prefer to be a less known (under the radar) script, such as punbb. And now life is good (or better anyway.)

\\// Robert

The grass is always greener on the other side -- but that's because they use more manure.

He has: 688 posts

Joined: Feb 2001

Thanks y'all. Here's an update on what I did, how it worked, and what's happening now.

I changed the field name on the form AND the database and did a mass find/replace on all other instances of where that old field name showed up in the application. My form does still work.

Today it seems like I got this change just in the nick of time. What had started as a few posts each day has turned into several posts every hour now. And the good news is that although you can list a homepage if you actually use my web form, all these recent spammers auto-entries are void of any URLs! Smiling

However, I didn't anticipate the exponential growth in guestbook entries per day (or per hour now) and I think they're still going to ruin my guestbook with their masses of generic "great job" messages. So it looks like I'll need to go back in and change the code for all of the other fields that show up in the display as well (name, email, message). Sad

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

I've always hated spam emails. Who doesn't? But it really irks me bad when spammers place porn links on a personal family website, an me having to work this hard to change what I was doing just for fun.
SPAMMERS SUCK!

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Have you notified your provider? Does it seem to be all coming form same IP (or IP range)? Notify them, maybe they can put a block on it.

Did you try the requiring the referrer to match your site?

-Greg

He has: 688 posts

Joined: Feb 2001

8 more since I wrote this morning. That's a lot since my guestbook only had about 50 in the past several years. They're starting to repeat similar phrases and names.

Greg K wrote: Have you notified your provider? Does it seem to be all coming form same IP (or IP range)? Notify them, maybe they can put a block on it.

Do you mean my host? No, I haven't told them yet. My gb program records a bunch of other information Every single of my recent spammers lists the following info: 69.31.86.244 neg229.named1.com

I have cPanel, which has a bunch of features I've never used. One says "IP Deny Manager". It looks like it should do the trick but will it work if they aren't actually using the website to access my database? (note: my logs do show Mozilla 4.0 as a user agent). I'll enter that IP in there and see what happens over the next 24 hours or so.

Greg K wrote: Did you try the requiring the referrer to match your site?

I wouldn't have a clue how to do that. Me is simple man.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Since recently, I get poker spam in comments on my blog. I'd been expecting it for about a year, since my site was launched. I was starting to worry that I had none while everyone else was getting it -- I saw it as a measure of success, or the extent of publication, I guess. Sticking out tongue

Anyway, I was prepared for it when it came a few weeks back. I spent a couple of weeks manually handling the spam to wait and see if it was the real thing. When I was satisfied that it was, I simply installed Drupal's Spam.module. Works like a charm. Smiling

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

You can try installing this:
http://www.plebian.com/news.php?artc=138&

it will stop bots cold

He has: 688 posts

Joined: Feb 2001

Thanks everybody for the help. "IP Deny Manager" may or may not have worked. I woke up this morning to a new flood of guestbook spam and thought the Deny Manager didn't work because it wasn't using my webform anyway. But after checking my database I can see that all the new spam is now from 63.246.133.54 unknown.sagonet.net. So the bottom line is that it's pointless to try to ban them. Crap! I'm about to notify my host provider and also try those links y'all mentioned. Thanks again.

One follow up question: If they aren't using my webform to submit info to my MySQL database, then how can they add information without knowing my username and password????

Confused

They have: 33 posts

Joined: Aug 2005

Hi everyone... I'm new on here, and this is my first post. I've been searching the web regarding a question I have about guestbooks and spammers, and that brought me here. I'm glad to be on board.

After reading fifeclub's posts (and dropping in on his site) I feel guilty posting my question 'cause I'm not getting spammed, yet. Here it is, though....

I have a hobby site that's been up just short of two months. Shortly after it opened, I installed a guestbook (phpBook 1.50). Within days I got spammed, but only two messages. Both had some BS text that had nothing to do with the gambling site they were promoting, and the log showed the hits coming from Slovenia and Israel. The spam links were within the message text. I deleted the two entries, and I haven't been spammed since. But....

I am seeing some odd behaviour in my site tracker. After the spam entries, I would receive hits from Israel every few days, from 80.74.111.114. The hits always came in pairs, a few minutes apart, and went straight to the guestbook. Nothing was entered in the book, however. After seeing this for a couple weeks, I decided to use phpBook's IP blocker and shut them out. Five days later, the Israel/guestbook hits started again, this time from IP 212.29.214.240. Still no spam.

My apologies again to fifeclub for complaining about something so insignificant compared to his problem. This is a startup site, and traffic is low, and it just annoys me that almost 7% of the hits listed in my site tracker are from this Israel/guestbook IP. I've considered blocking this new IP, but I figure the problem will just migrate to a new one.

I can tolerate the situation, but what I would like to know is (1) Is this a security issue I should be concerned about? and (2) Is it possible to put a stop to this, or will I just be chasing IP's?

Thanks!
R/L

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

You have to realize how this works.

Normally you have a form on your site, that when submitted, sends the information to a script on your site that processes all of the information. (sometimes, it is the same file, usually not).

Here is what is most likely happening. They call your script file, just as your form would. They have it programmed to send the same information your form sends in. (which is why changing the names of the form fields can make a difference). You script does realize that the information it is being sent is NOT coming from your form.

If i remember right, your script is in PHP. If so, go in there where it saves the data to your database. Make a field in your database, and send to it the value of $_SERVER['HTTP_REFERER']. This is the page that the person was at when they clicked to get to your script. Normally, this should be the URL of your form.

Remember though, some people have this information blocked (either manually, or their antivirus software does it without them knowing).

After a day, check these values, you will most likely notice all the spam ones are coming from "-" (or just an empty string) which indicates that it was directly called. Well you know your script should always be called from your form, so if the referer isn't your form, block the saving of information.

Like I said, you may loose those whose refer is blocked, but that is a lot less than how many you loose by shutting off the guestbook. Again, remember to leave a "polite" error message explaining why the information was not submitted. "We're sorry, but we were unable to determine which page sent you here. Either you have your 'referer' information disabled, or your antivirus software may have blocked this information."

BTW, ever wonder why all these sites anymore have those weird text pictures and ask you to enter the text?? This is exactly why. Bots automatically making new accounts.

-Greg

He has: 688 posts

Joined: Feb 2001

I took the time to change all the fields of my mySQL database. It worked for over a month but they're starting to sneak back in again, even thought I customized all the database fields to non-standard names.

I can't figure out if these new entries are automated or entered manually (automation should be much more difficult now) but the latest entry has an odd message that I wanted to ask about. The website field is empty but the message field is full of spam links. Then it ends off with "If see this message email THIS url to [email protected]"

Is this a trick? I assume that if I send an email to this address (from Russia once again) that I'll just be put on 10,000 more spamming lists.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

fifeclub wrote: Then it ends off with "If see this message email THIS url to [[email protected]][email protected][/email]"

I've seen enough spam to say I think this is just a poorly translated "click here to remove" message.

And did you try the suggestion in my last message I had posted about this topic?

RangerLord wrote: I can tolerate the situation, but what I would like to know is (1) Is this a security issue I should be concerned about? and (2) Is it possible to put a stop to this, or will I just be chasing IP's?

First, welcome to the forums! Now as to your questions. The security issue well that would depend on the script you are using, if it has any security issues. Mainly it is just going to be an annoyance filling up your guestbook (why do you think there are so many "Type the characters in the box below (that you need some good drugs to make look like letters)" things in effect anymore.

As to putting a stop to it, again the filtering would be based on your script and/or your own coding ability to do so. If you can don't filter by individual IP addresses, do a whole group of them that the one IP address belongs to. This really comes down to how much time you want to spend on it.

The whole thing in general is just something you ahve to put up with when you offer a free place for people to post what ever they want.

-Greg

chrishirst's picture

He has: 379 posts

Joined: Apr 2005

It's not the database fields, it's the form input names that are the issue. What these bots do is rescrape the page source and retrieve the names.

With a bit of programming you can generate random names for the inputs each time the page is opened, store the names & fields in a cookie\session variable and retrieve these on submission. This makes it absolutely impossible for auto-submitters to recover the names for future use because they will never be the same on two occasions.
For instance; You can use the session id and split that into say 8 char chunks for the names this will be unique for each visit.

definitely don't reply

Chris

Indifference will be the downfall of mankind, but who cares?
Venue Capacity Monitoring
Code Samples

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.