How do we stop hackers?

One way is with Web Application Firewalls (WAFs)!

Web Application Firewalls

i.e. Main leading providers: Imperva, Akamai, Cloudflare

Protection at different OSI Layers

  • DNS Level
  • HTTP Request Level (i.e string matching)

Can protect against

  • SQL Injection
  • XSS
  • XXE
  • etc

  • Tuning and stopping false positives is resource intensive

  • There are whole careers and vendors dedicated to detecting and blocking attacks.

Buuuutttttttttt!
You can't protect against everything, they need to be constantly improved upon as new exploits are found.