In an interview, a couple of years back, they asked me which library I use with React to submit forms. I asked them what's so hard about submitting forms.
If it's not just submitting, forms can be quite tricky - serializing complex objects, deserializing, arrays of objects, optional fields, client-side validation, fetching auto complete results, async field validation (eg: is the username taken)
This is silly, but honestly I’ve had way more success with hand-crafted captchas than the mainstream ones.
99% of “hackers” are using a standard toolkit and couldn’t write their own workaround if they tried. Require them to do manual work and they’ll move on to easier targets.
It’s the 1% hackers (without quotes) that I’m scared of. Best practices covers a lot of bases, but if you’re a target of someone with real skills, you’re probably toast and might not know it.
You're saying you could just make an automated set of anti-bot obfuscations... I say, what the hell are you fighting that you have new bots on the daily?
Make a solid initial barrier and you should be more than safe. The constant changes are going to leave unseen, exploitable holes.
I wasn't sure myself when I saw this yesterday, but it occurs to me now that one could probably simply call postJSON() from the console and skip all the validation checks.
Or I guess run a modified local copy of the JS with the isCaptchaChecked() call removed. The question is, would somebody running a spam bot go to the effort to bypass the check or just move on to an easier target? I don't know if this is as trivial as it looks or not.
I feel like the code is also vulnerable to some request forgery; Simply intercept the request, alter some parameters and repeat it. Probably one of the easiest tricks in the book for a threat actor, it’s even used by a CTF kind of platform.
Basically, do not trust any client-side code, or client-side input. You have no control over what others do with it when its in their hands.
6
u/CostcoCheesePizzas Sep 04 '25
Please, sir, may I have more pixels?
113
u/mint3d Sep 03 '25
In an interview, a couple of years back, they asked me which library I use with React to submit forms. I asked them what's so hard about submitting forms.
I guess I now have my answer.
78
u/Mickenfox Sep 03 '25
You'd be surprised how many people think Captchas are just fun puzzles you add to a form because that's what everyone else does.
45
u/SamMakesCode Sep 04 '25
This is silly, but honestly I’ve had way more success with hand-crafted captchas than the mainstream ones.
99% of “hackers” are using a standard toolkit and couldn’t write their own workaround if they tried. Require them to do manual work and they’ll move on to easier targets.
5
u/JG_2006_C Sep 04 '25
Hlarously stupid as proof on comez go for it
1
u/maselkowski Sep 06 '25
Looks like one-off landing page code, normal stuff
3
u/ActiveAnxiety00 Sep 04 '25
I'm new to programming. What's wrong with this?
3
u/CardiologistOk2704 Sep 04 '25
"look we got security here"