395 points · by wglb · 16y ago · 99 comments
http://www.mythaichicago.com/menu.asp?locationid=000004%20OR...
also, the site was built with dreamweaver. Telltale JS markers. Makes me think it's a web agency/ad agency type.
EDIT:
these are the people responsible:
http://www.orangefuse.com/ - who built www.linusinc.com. I chose another orangefuse site at random and produced an XSS error and a potential path disclosure error (i.e. read other things on the server).
edit: christ they suck. Check out justlines.com (warning: autoplay sound). Click on portfolio and try to actually use the scrolly thing on the left.
But yea, probably not a bad idea to delete that link anyway...
Also: im not sure what they could do. Certainly it breaks no laws I know of.
http://www.mythaichicago.com/default.asp
Looks like they're still experiencing "issues" - http://www.mythaichicago.com/order.asp?locationid=000004 reports:
"Sorry, On-line ordering is currently undergoing service."
No clear indicator who the web design company behind it is though.It was a map of Thailand, so that gave me the type of restaurant. From there it was just a simple Google query combining that knowledge with the URL structure revealed in the blog post:
http://www.google.co.uk/search?q=thai+restaurant+locationid%...
Then it was just a case of working through the list of possibilities (it was second on that list) :-)
At least the content isn't hidden behind a wall of Flash.
Arguably, it was a kick-ass interview question, but I still feel sort of bad about it.
The things you enter into a login form aren't normally displayed to any other users. If you mean you can run arbitrary JavaScript in your own browser, there are much easier ways to do that and you didn't find a vulnerability.
Years ago I struggled to convince a group of sysadmins that server hardening, firewalls and patching were essential for any Internet connected system. I heard things like "there's a million computers on the Internet, why would anyone bother mine" [unless they wanted to use your server to hack someone else or store their porn|warez]" and "nobody can port scan the entire Internet, they'll never find my server" [unless they control an army of scanners].
I made significant progress by having my group perform live IIS5 directory traversal & telnet MTIM attacks at a conference of local sysadmins. (yep, this was a long time ago)
Similarly, today we have a significant number of web developers who don't think it can happen to them, until it does.
Let me try again.
A decade ago, clueless sysadmins put unpatched servers directly on the Internet with no firewall protecting ports that didn't need to be exposed, with no hardening, no patching, etc. An hour later, after their shiny new server got rooted, the clueless sysadmins stood there with the classic deer-headlights look, wondering what just happened.
Today, with OS's that have reasonable default configs on as-shipped, and with firewalls the norm, it's the application developers that are clueless id10t's standing around with the deer-headlights look.
Input validation: solves SQL and other injection issues.
If you're not doing both, you're probably vulnerable somewhere. There is no magic bullet.
For example, you might have a name in the database. What if someone is called O'Beirne? How do we get this into the database? Do we only allow them to have the name OBeirne?
What's the tool ?
Edit: looks like Webinspect: https://h10078.www1.hp.com/cda/hpms/display/main/hpms_conten...
(The marketing copy for it doesn't give much detail, though it does claim you can use this for hipaa compliance, among other things https://h10078.www1.hp.com/cda/hpdc/fetchPDF.do)
WebInspect is a web application scanner. It includes a not-very-useful database of known application vulnerabilities, but also has a well-regarded fuzzer that generates random scary inputs to every input it finds on a site that it spiders. That's what Raf is talking about (his job is, in part, to promote that very expensive tool).
You don't want WebInspect, or AppScan, or any other scanner. If you're a professional, you want Burp Suite, which costs something like EU120 and does just as good a job as a fuzzer as WebInspect. If you're a hobbyist, you want OWASP WebScarab, which is free. Both are Java apps, and will run anywhere Java does.
What are the chances of getting this SQL injection attack vector served on a silver plate right when he needed it?
In my experience? Frighteningly real. You could also ask, "What are the chances of finding an application that has quadratic, cubic, or exponential scaling problems served on a silver plate right when he needed it?", and I'd also have the same reply - frighteningly real.
The most fun I've had in my days was not only demonstrating such security holes, but also finding laughably bad scaling issues while I was running amok. The most frightening thing is, I'm not referring to podunk little companies, but wholesalers or manufacturers with 9 and 10-digit annual revenues. And not small internal apps, but their main presence on the web.
Though I'll say, even as a contractor, these gigs are never enjoyable simply because - despite best trying to avoid it - you've managed to embarrass some people on an epic scale. Once you've fixed what you've been paid for, most places don't look to keep you around much longer unless they truly have a "what's right, not who's right" philosophy.
"So your application produces 60MB of output. The LUNs on the SAN the database server has available is capable of easily sustaining 250MB/s of throughput. Assuming ideal conditions, how fast should it produce the results."
Uh.. about 0.3 seconds?
"Right. However we perform a lot of complex calculations and use some complex logic. Let's assume the penalty for this is two orders of magnitude. How long should it now take?"
About 30 seconds?
"Right. So now do you see why I consider an application that takes 3 1/2 hours to produce the results to have a lot of low-hanging fruit?"
Yeah...
----- -----
I spent the day performing a cursory review. I made three recommendations, only one of which requires non-trivial code changes (but minor in the overall scheme of things), but the overall risk of introducing regressions is very low. Estimated reduction is 97%, which would get it down to about 6 1/2 minutes. Actually refactoring most of the application could certainly get it close to the 30-second mark. The first improvement was simply querying a painful view (which is due to a fundamental schema design flaw) once, instead of querying it N times. It's being tested in their QA department. 82% runtime reduction improvement right off the bat (so from 3 1/2 hours down to 38 minutes)
Not a small company. Very high average level of education amongst the staff. Very bright group in general. Very poor design decisions resulting in very expensive hardware choices to compensate (i.e. FusionIO for a SQL Server tempdb!).
P.s. no you can't have a copy of Scanmus P.p.s if you are really curious just Google the name
Disclaimer: I still work for Y! :) and I'm proud of our security guys
P.p.p.s no that wasn't a challenge
It's amazing that people are still constructing SQL queries as strings in 2010.
Like I said. It's a solved problem, and has been so for a dozen years now.