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.

Web App Security Best Practices

88 pointsby jamessocolalmost 13 years ago

4 comments

Spearchuckeralmost 13 years ago
Posts like this are awesome at raising awareness, but it seems difficult to find guidance on what to secure, whether to secure or not, and what to secure against. I'm not talking about SQL injection or XSS - both of which are hugely relevant for web apps, but rather a broader approach, like threat modelling.<p>The idea (for <i>any</i> system) is to start with understanding an adversary's perspective by:<p>- Listing application entry points (where does data enter into the application?)<p>- Cataloguing assets (what's being protected?)<p>- Identifying trust levels (who needs access to what?)<p>Then defining the security of the app/system by:<p>- Defining use scenarios<p>- Identifying implementation assumptions (parameter-based SQL?) and external dependencies (payment system?)<p>- Modelling the application/solution (data flow diagram that shows interactions with external entities, and machine and process boundaries)<p>The final stage is identifying threats, analysing them, and determining vulnerabilities. Threats typically fall into one of 6 categories:<p>- Spoofing<p>- Tampering<p>- Repudiation<p>- Information disclosure<p>- Denial of service<p>- Elevation of privilege<p>That stuff I've just written doesn't begin to do threat modelling justice, but it's enough to start some research.<p>And before anyone starts suggesting that it's not important/requires big design up front/we need to pivot/etc consider that exactly those arguments are what landed the likes of LinkedIn, Sony, etc. in hot water.
评论 #4261625 未加载
评论 #4262903 未加载
评论 #4261215 未加载
kirinanalmost 13 years ago
People forget how quick it can be to get the tools to do simple things like SQL Injection and XSS without even trying. They are free and EXTREMELY easy to get. Not covering those basic security flaws will allow any "script kiddies" to get into all of your data. Even still though, some of the more sophisticated attacks, like Social engineering, are not being made into tools that anyone that can use a computer can use. Its not so easy to make secure things because the hackers only need to be right once, you need to be right every time. Also remember, you're only secure as your weakest link.
评论 #4261104 未加载
评论 #4262714 未加载
bluesnowmonkeyalmost 13 years ago
Wow, they had to write their own code to do localization safely with regard to XSS. I'm surprised that's not already available off the shelf.
评论 #4262398 未加载
zeroonetwothreealmost 13 years ago
CSRF seems to be missing from the "basics" section.
评论 #4262366 未加载