TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Not all attacks are equal: understanding and preventing DoS in web applications

46 pointsby ievansover 4 years ago

5 comments

lwansbroughover 4 years ago
Our business operates in a market that has a lot of wannabe hacker types: bored teenagers in the gaming community with the minimum knowledge required to order a DDOS. As such, we&#x27;re very very careful about <i>never</i> leaking our IPs anywhere. This has been tricky at times but it&#x27;s well worth it. Cloudflare has made our lives a lot easier as it handles the bulk of the requests. Still, a lot of what it takes to be DDOS resilient is just being able to scale to high concurrency very quickly: ability to cache everything at every level, read-only mode, CDN for everything including HTML when possible, API gateways and self imposed rate limiting to third party services. With that said, there&#x27;s not much you can do if your IP leaks. Some often overlooked areas for IP leaks: user generated content (your server makes a request to a URL specified by the user), or even sending an email (even many services provide the origin sender IP - such as SendGrid - as a matter of policy, so we don&#x27;t use those services.)<p>Still to do: developing our own online ML based monitor which can detect abnormal user behaviour before it becomes a problem (ie. aggressive HTML scrapers, burp suite scans, etc.)
评论 #24450229 未加载
评论 #24454248 未加载
netsectodayover 4 years ago
This is very well written and practical. It&#x27;s exactly how you think about security when you own a company. I&#x27;m guessing the author is&#x2F;was holding a large amount of stock in Heroku&#x2F;Salesforce.<p>Summary:<p>1. Don&#x27;t publicly expose endpoints that are either slow or require a ton of resources.<p>2. If you can&#x27;t get rid of a slow endpoint; put authentication in front of it so you have a lever to pull in the event of an attack.<p>3. Throttle &#x2F; rate limit everything with high barriers so not to impede normal traffic patterns.<p>4. Don&#x27;t make it easy for someone to DoS you; reduce or eliminate well-know attack vectors and vulnerabilities.<p>5. Scan your app for regex and zip bombs.<p>6. The bad guys will sniff-out your N+1 queries, so fix them.<p>7. If necessary: pay for DDoS mitigation from a cloud provider.
评论 #24451366 未加载
blackflame7000over 4 years ago
Some of the best DDOS attacks work by sending data as character by character as slow as possible before the connection times out so as to mimic extremely slow connections and consume handler threads. Also HTTP1.1 downgrade attacks can force the usage of more connections especially if keep-alive is false.
js4everover 4 years ago
Summary: add a rate limiter to your api endpoints to block DoS, and a cdn like cloudflare to block DDOS
daghanover 4 years ago
You can use flask_limiter library for flask