Back to all posts
Day 123Wednesday, June 3, 20263 min read

Contact Forms, Validation, and Anti-Spam Thinking

cybersecuritywebfundamentalsgithubpagesdocumentationtoolinglearningprocess
View original post

๐Ÿ”„ Topic

Reviewing the contact flow as both a conversion path and an abuse target.


๐ŸŽฏ Goal

Understand how form validation and abuse controls reduce noise and protect a small public website.


๐Ÿ›  What I Did

I looked at the contact and order-related flow as a public input surface. Even a simple form can be abused by bots, spam campaigns, malformed input, or automated submissions. The Farina project uses structured validation thinking with React Hook Form and Zod, plus practical anti-spam ideas such as honeypot fields, timing checks, and cooldown protection. The point was not to pretend this is enterprise-grade security. The point was to reduce obvious abuse while keeping the form usable.

Main areas covered:

  • field validation
  • clear error messages
  • honeypot field
  • submission timing checks
  • cooldown protection
  • safe handling of user input

๐Ÿ”— Key Cybersecurity Connections

Forms matter because user input is where many web problems start. Even static frontend projects need to think about abuse paths before adding backend services or integrations.


๐Ÿ” Investigation Questions

  • Which fields accept user input?
  • What input is required?
  • What happens with malformed input?
  • Can bots submit the form repeatedly?
  • Are errors helpful without leaking implementation details?

๐Ÿšจ Detection Opportunities

Potential monitoring ideas:

  • submission spikes
  • many failed validation attempts
  • honeypot field populated
  • rapid repeated submissions
  • same IP or user agent abusing the form

Example:

project=farina-farm-website
change_type=public_website_update
risk_area=repository_deployment_or_public_input
triage=review_change_intent_and_validate_build

๐Ÿงญ MITRE ATT&CK Techniques

Possible mappings depending on confirmed behavior:

  • T1190 โ€” Exploit Public-Facing Application
  • T1110 โ€” Brute Force
  • T1595 โ€” Active Scanning

๐Ÿ—บ Visual Investigation Diagram

Public form
    โ†“

Validation โ†“ Anti-spam checks โ†“ Submission handling โ†“ Monitoring/maintenance


โš  Challenges

The challenge was balancing protection and usability. Too much friction can hurt real customers; too little protection invites abuse.


๐Ÿ“š What I Learned

I learned that form security starts with simple controls: validate, limit, monitor, and avoid trusting input.


โžก Next Steps

  • Review form fields
  • Keep validation strict but user-friendly
  • Plan backend handling carefully if serverless forms are added

๐Ÿง  Reflection

This was useful because it turned a real project into security-aware learning without pretending that every task was a pure cybersecurity lab.


๐Ÿงฉ Lessons Learned

What worked

Thinking about abuse before backend integration.

What broke

Assuming a small form is harmless.

Why it broke

Any public input can become a target.

Fix / takeaway

Treat every form as an input boundary.


๐Ÿ“ˆ Skill Progression Context

This supports SOC progression because many alerts and incidents start with public-facing inputs: forms, login pages, APIs, and upload points.


๐Ÿ˜„ TL;DR

A contact form is also an attack surface.