|
(Under construction) IntroductionSecurity on the web is relatively immature, and not widely embedded in development processes. With so many teams building web applications, and these performing critical functions such as online banking, this vector poses a major avenue of attack. These risks generally only apply to dynamic web sites - sites where there is server-side programming. Static websites have very few technical security risks. I think of sites as being in one of three levels of criticality:
SolutionsHow to go from low to medium: Developer rules Use SQL bind params Careful with xpath Don't do other stuff - call shell, etc. Testing black box / code review How to go from medium to high Much harder! Define the objectives: Server can't be directly attacked (that's a req for low too) Server can't cause unwanted actions (e.g. mail relay, proxy) Don't give away any information, e.g. if an email address corresponds to a user Site is "secure" even when malicious site open in another browser window Auth is "secure" i.e. password lockouts, etc. (auth wouldn't generally exist on low) forgotten password People can only access intended stuff Don't leave a trace on a cyber cafe Don't leak info in comments and such Can't help a phishing attack (e.g. redirect) Three prongs Consider security in design (i.e. threat modelling) Secure coding guidelines Testing Short term: developer training, threat modelling, pen testing, web app firewall Medium term: security in frameworks Long term: changes to technologies.High Risk SitesOr, how do you fix phishing and trojans? 1) User education. There is good advice for phishing (bookmarks/type in address). Only solid advice for trojans (separate classifications) is not that practical 1a) Aids to user education - anti phishing bar, high assurance ssl 2) Strengthen authentication. Not a complete fix, but raises the bar. Smart cards and SSL certs can prevent phishing. Issuing a physical device, or re-using one (mobile phone) 3) Risk assessment with additional authentication. Again, doesn't prevent "Just in time attacks" 4) Separate device that displays transaction details. Not many options, but mobile phone is one. Or a device that reads a barcode off the screen, or one you just type numbers into Most practical fix is using phone Detective controls - user notificationAn idea: Unicode syntax charactersMany attacks are injection attacks - they work by injecting a character with syntax meaning to cause malicious effect. One of the problems preventing such attacks is that these characters are widely used. For example, in HTML, ampersand (&) is a syntax character, and it's also often used in normal text. The general solution to this is escaping such characters, but this gets messy. The idea is to allocate some new unicode characters who's sole role is to be syntax characters; they would never appear in normal text. An escaping mechanism will still be required, in the case that syntax characters needed to appear as their character from (rather than as they function they provide), e.g. source code being display in a web page. To do this neatly, allocate some more characters, to represent escaped forms. Perhaps the characters could be: syntax-character, alternate-syntax-character, left-syntax-character and right-syntax-character. These would be rendered differently depending on the context; perhaps in HTML as single quite, double quote, less-than sign and greater-than sign. There would also be syntax-character-escaped, alternate-syntax-character-escaped, etc. And syntax-character-escaped2, etc. and syntax-character-escaped3, etc. Random NotesThere's direct server attacks (sql injection, parameter tampering, file upload flaws) And user trickery attacks, from phishing through xss And stuff like harvesting email addresses, abusing server resources, etc. WAFs IPS Frameworks with built-in security Code auditing / pen test / etc. Users can do their bit certain precautions protect against CSRF, some XSS, etc.© 1998 - 2008 Paul Johnston, distributed under the BSD License Updated:30 Jan 2008 |