Security experts warn against Web 2.0 charlatans and 'premature AJAXulation'
Old-school threats to rushed migration
Old-school problems like DoS are a threat to all companies, even the big boys like Google with its Gmail and Microsoft with Live Messenger. Rather than bring down a site, hackers can make it unavailable by choking the internet connections. "Put this in the context of traditional DoS attacks," Sullivan said. "How do you do DoS against Gmail and Live Messenger? You can't overwhelm them with traffic, we are taking their application logic and using it against them. We are finding assumptions and problems in error handling and causing deadlocks."
Other areas for entry points include form files, cookies, headers and newer things like web services, with the WSDL left turned on and helpfully explaining the parameters.
The pair stressed their site was architected and built using advice available on AJAX web sites and though books, indicating these problems exist as fundamental assumptions to many programmers. "We are following the advice we were given," Sullivan said.
According to the duo, the first step to recovery from premature AJAXulation is to learn not trust your client. In the Web-2.0-attack world, the client becomes a gateway to the server and can actually take the hard work out of attacking systems for hackers. In their example, Hoffman and Sullivan showed how a SQL injection attack could be achieved in three queries instead of the usual hundreds.
In the server scenario, the hacker would have to bind to the selected table, but in the AJAX environment, the client can run the JSON request to the database tier with web-server data packaged as database data.
Once you do accept that client-side code cannot be protected, encrypted, or obfuscated and then you can take further protective steps, according to Sullivan and Hoffman. These include:
- Store sensitive data on the server, and enforce controls from the server
- Perform authentication checks on web pages and web services
- Validate all applications inputs - be they HTTP, headers and cookies, or Postdata
- Verify data types, lengths and formats
- Always use parameterized queries
Recalling the work of author James Martin, the pair said re-architecing your applications away from reliance on the client would solve things like SQL injections and process overflows. Martin was writing in the era of punch cards, but the pair said his advice its still valuable today. “Everything can be solved with proper input validations,” Sullivan said.®
Sponsored: The Nuts and Bolts of Ransomware in 2016