LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-05-2019, 11:58 PM   #1
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Rep: Reputation: Disabled
spam bypassing captcha!!!


Hello,

I am having trouble blocking unwanted spam from being mailed to me from online contact us form on my website.

I put up a captcha, my own version which outputs a 5 digit number on a shaded background.

Noticed that spam mail is still getting through. So I checked access.log for the IPs and found that they are using on two pages to get the captcha. and then third post message to submit it.

i am storing captcha in session file so how come the spammer get my captcha code.

Using PHP 7 on apache on linux.

I want to know how are they getting the captcha code right.

Thanks

CMG

Last edited by cmgeo; 03-06-2019 at 12:04 AM.
 
Old 03-06-2019, 03:48 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
A large amount of this spam is auto-generated to fill in the forms but the actual solving of the captcha is done by "outsourced" workers in known spam / scam countries like India and China.
 
1 members found this post helpful.
Old 03-07-2019, 08:27 AM   #3
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
The supposed humans are accessing only the index.php and captcha.php and then submitting it via post arguments. How can i prevent users from only viewing these two files and ensure legitimate users only post message to me.

My request is kind of little screwed but i don't like spammers screwing me by using only two files mentioned above.

CMG
 
Old 03-07-2019, 01:19 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
My guess:
Your form submission is not using the captcha correctly...that is, it's apparently possible to submit the post without the captcha.
Look into how the captcha is supposed to prevent the submission, and why that is not working.
For example, is there something in your php script that checks for the source of the post and only accepts posts from your server?
 
Old 03-08-2019, 10:18 AM   #5
cmgeo
Member
 
Registered: Oct 2011
Location: India
Distribution: Win 10, Debian and ubuntoooo
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
My guess:
Your form submission is not using the captcha correctly...that is, it's apparently possible to submit the post without the captcha.
Look into how the captcha is supposed to prevent the submission, and why that is not working.
For example, is there something in your php script that checks for the source of the post and only accepts posts from your server?
Thanks i was not checking this part of the problem. I was just checking whether the captcha was correctly submitted or not and whether it was the same as i provided, but was not checking whether the submission originated from my own server.

A Big Thanks for the Idea. I learnt something new.
 
Old 03-08-2019, 12:45 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by cmgeo View Post
Thanks i was not checking this part of the problem. I was just checking whether the captcha was correctly submitted or not and whether it was the same as i provided, but was not checking whether the submission originated from my own server.

A Big Thanks for the Idea. I learnt something new.
You're most welcome. To give credit where due, that's not my idea. I learnt it from Matt Wright's FormMail script, which checks the "referring URL," among other things, to validate an input.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: What is Captcha? | Why Do Use Captcha Codes On Websites? LXer Syndicated Linux News 0 05-17-2018 03:54 PM
spam filter that puts spam into spam folder? paul_mat Linux - Software 3 03-31-2009 04:18 AM
Postfix "humancheck" or captcha-like thingies. Are they existing? lorenzodarkside Linux - Server 1 06-12-2008 04:16 PM
LXer: Microsoft’s CAPTCHA successfully broken LXer Syndicated Linux News 0 06-03-2008 07:50 AM
LXer: Three ways to test Web form input with a CAPTCHA LXer Syndicated Linux News 0 04-14-2008 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration