TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

46 点作者 ievans超过 4 年前

5 条评论

lwansbrough超过 4 年前
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 未加载
netsectoday超过 4 年前
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 未加载
blackflame7000超过 4 年前
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.
js4ever超过 4 年前
Summary: add a rate limiter to your api endpoints to block DoS, and a cdn like cloudflare to block DDOS
daghan超过 4 年前
You can use flask_limiter library for flask