2 points · by codingcall · 5y ago · 12 comments
I am trying to help a friend avoid a really serious problem in their website. Here is the scenario:
They open an access for admission form at 9:00am in certain days. After they close admission, they chose the first person who filled the form and award them the admission.
My question is: Is it possible for a hacker or a technically knowledgeable person to prevent access for others for a few seconds and submit his/her request before anyone else?
I have tried the form in the specific time. There is a countdown until the form shows up, and then a server error occurs for a few seconds before the form shows up. I was thinking this is maybe because of too many requests, but the number of users who visit the website is not more than a thousands people.
Anyone has any idea if manipulation could take place in such a case?
Thanks a lot,
As another commenter suggested, if I truly wanted to prevent anyone from abusing the system, I’d take all submissions within the first N minutes and pick a random entry from that entire sample. Instead of trying to solve the original problem, prevent it entirely.
"Hi friends,
my teacher gave me the homework to hack the school's website and the instagram account of a girl in my class. How do?"
If this is in fact an honest request, then set up some dDoS protection (cloudflare) and go with the random pick route (raffle) and don't forget to seed the RNG somehow.
I have thought of cloudflare and it is in the top of my recommendations. So far, the random pick is the most feasible solution. Thanks for your feedback
2. Include a hidden nonce in the submission form whose value must be correctly. Thus the attacker cannot just blindly send a submission on the strike of 9:00; the attacker has to obtain something from your server which is only available at 9:00 or later: the form markup containing the correct nonce, unique to their session.
3. Include a question in the form that must be correctly answered, but is likely hard to do for a robot. Of course, the question is different everyday.
What someone might do, as others suggested, is script it. They could also try to geolocate themselves closely to the webserver (by renting a VPS nearby maybe). The server error could be from someone's script. It doesn't take much to cause 500 errors if clients are not ratelimited. Tell him to add ratelimiting.
Thanks again