Month: August 2006

  • Behavior profiling for web apps

    I regularly read Bruce Schneier’s blog. Last week, he blogged about behaviorial profiling.

    One of the key methods of detecting fraud is anomaly checks. I think this can be done statistically by reviewing history about a user and determining how likely it is that they will perform any particular set of actions. I am thinking about writing a security pattern on how to do this in a general fashion – ie determine “usual behavior” by what they’ve done before and see if the new input matches known past behavior within confidence levels.
    For example, if a user always uses Firefox to access a web app, and they are located in Australia, and generally does less than a couple of hundred dollars per session, is it right to flag behavior which comes from an agentless connection from Brazil right up to the daily maximum? But this might match a Brazilian user’s normal behavior. A behaviorial profiling security pattern might sort things out or at least provide a clue as to unusual behavior, and would benefit many applications if it was easily available and implementable.
    However, my statistics is not as it once was. Dear readers – are any of you half decent with statistics? If so, feel free to suggest a suitable method of determining what is significant (or likely) and based upon a set of general inputs. Even links to a decent maths / stats site so I can brush up. I own a HP 48G+ ubercalculator if that helps, and a spare 49G which I keep at work (in RPN mode, natch!) in case I need to think deep thoughts.

  • Ajax Security

    Good news, everyone!

    I’m writing a new book on Ajax Security. You can follow development at

    http://www.ajaxsecurity.info/
    I am looking for a co-author to bring the book to fruition faster (and to avoid marital breakdown!), so if you’re interested and have lots of Ajax and security experience (20 years or better!) and have the mad writing skillz to write at least 125 pages, please drop me a line.

  • PHP 5.2 to get HttpOnly!

    Ilia has just blogged that HttpOnly is now supported in PHP 5.2.

    This prevents the usual sort of basic XSS attacks, like:

    Supported browsers:

    • IE 6.0 SP1 and later – prevents reading, but not over-writing (still allows preset CSRF attacks)
    • IE 7.0 – prevents reading and writing – safest
    • Safari 1.3 – not support (update)
    • Opera 8 and later – not supported (update)
    • Mozilla – not supported
    • Firefox – not supported
    • IE 5.x for Mac – will actually fail to render the page. Use browser detection to encourage them to migrate to Safari or Firefox once it supports HttpOnly

    There is a potential solution for Firefox’s and Mozilla’s lack of support.

    Now all we need is for Firefox, Mozilla, Safari (=WebKit), and Opera to climb aboard!

    Update: Chris and I spent some time working out if HttpOnly works on a range of browsers. Sadly, some browsers I thought had support… don’t. Oh well.

  • James Van Allen dies at 91


    IOWA CITY, Iowa (AP) — Physicist James A. Van Allen, a leader in space exploration who discovered the radiation belts surrounding the Earth that now bear his name, died Wednesday. He was 91.

    A sad day for astronomy and space geeks. More here

  • Defcon is dead, long live Defcon

    Well, that was Day 3 of Defcon out of the road. I didn’t get to see too many actual talks due to the hallway track being far more interesting than the actual three track program. Again, few webappsec talks, and some were repeats of the BH talks I’d already seen.

    I caught up with a few fine folks, including Jeremiah Grossman, TC, RSnake, Arian Evans (possibly the funniest infosec guy I’ve ever met!), Dinis and more! It was a total hoot, and we did a lot of good work^Wdrinking.

    The more esoteric talks were right up there. I wanted to go to Peter Gutmann’s talk on phishing, but unfortunately it was far too early after the night before. Luckily, I have the slides in PDF form, and soon we will have the DVD at work, so that’s no biggie.

    The biggest change is the venue. The new location at the Riveria is excellent – it’s still old and crusty which is a la Defcon at Alexis Park, but it has *air conditioning* and it can handle zillions of geeks in the manner which they are accustomed – ie without bathing.

    However, the smoking problem is worse than ever. I made my most valiant of efforts to kill them all using my onion ring with crab cake special edition flatus, but unfortunately, it backfired late at night thus causing me more grief than any of the smokers. When will conference organizers equate smokers == law suits for obvious and gross negligence when the dangers of said disgusting habit are well known?

    In other news, Tanya picked up a huge stogy for her old man.

  • BlackHat Day 2

    Day 2 had a complete web app sec track. This is a huge change from last year, where there was like … my talk and that was about it. And you know what? It was full! Every session I’ve attended so far today has been near full. Plus, it’s top material.

    Let’s get on with the details.

    Hacking Intranet Websites from the Outside “JavaScript malware just got a lot more dangerous”

    Jeremiah Grossman & TC Niedzialkowski

    The Register missed the boat – they went to the wrong talk. They should have gone to this talk instead.

    Jeremiah and TC showed a bunch of demos which totally 0wned the browser of the victim. This talk was downright scary. They did a basic CSRF attack against a DSL router (incidentally, the model I have at home – luckily I *have* changed the default password), and demo’d the ability to make the victim’s browser the attacker’s complete biatch.

    Essentially, you can do two things:

    a) don’t go to any sites
    b) turn off the Internet

    They didn’t even use the Ajax stuff which is now possible, such as using cross-domain XHR and Flash based arbitrary header re-writes and forgery, which when taken together essentially mean that an attacker has an extremely wide array of vulnerable sites, such as MySpace and others, to send hostile code to your computer to do with as they please. I am certain this is how the malicious mofos behind commercial / organized crime spamming and bot nets will try to infect millions of boxes over the next few years.

    Ajax talks

    These two talks were interesting, but didn’t extend the state of the art much beyond where I was back in February. All of the next three talks had overlapping content, which got a bit monotonous by the end.

    “AJAX (in)security”
    Billy Hoffman

    Billy talked about four areas of Ajax security, but my favorite was how he extended the method of using mash ups to be evil via the mash up proxy and hide where you’re from. That’s cool. Billy did go a little bit further with an idea to use Ajax to create a proper worm, but used the ol’ MySpace worm and the Yahoo mail worm to show previous examples.

    Billy’s talk was energetic and he talked at a thousand miles an hour. He could have done with some demos. I had a chat with him before the talk, and I think there’s some potential there to collaborate on future stuff.

    “Breaking AJAX Web Applications: Vulns 2.0 in Web 2.0”
    Alex Stamos & Zane Lackey

    With Ajax stuff, it is necessary to bootstrap the audience … this year. The guys went through the basics of Ajax … again … and then went on to talk about the problems as they saw them. Again, not much new here, but at least there was a look at different frameworks, particularly Java based frameworks. I’ve mostly looked at PHP frameworks, so this was pretty interesting.

    The guys ran out of time, and so didn’t talk long enough about the methods to prevent attacks. It’s not hard for the main part, but too little detail doesn’t help the BlackHat audience (who are mainly security geeks at larger corporations) who want to know the problem … and the solution. At DefCon, you don’t have to worry about the solution as they’re just interested in the problem.

    “Six Degrees of XSSploitation”
    Dan Moniz & HD Moore

    This talk was interesting as HD Moore and Dan Moniz are relatively (in-) famous. However, it was a fairly lightweight presentation, again introducing XSS and Ajax and the MySpace worm. There was some good material in here, potentially looking at things you can do once you’ve found yourself a nice juicy XSS.

    I would have liked to hear more about the ActiveX null pointer execution thing that is apparently coming out next week, but obviously that one is under NDA. HD took a back seat to Dan most of the time, but that’s okay – they imparted a lot of information in not much time.

    “Analysis of Web Application Worms and Viruses”
    Billy Hoffman

    Placeholder

  • Blackhat Day 1

    “TBA” – David Litchfield

    David did a talk on the problems with Informix. Awesome talk, and shows that all database servers are vulnerable. He totally 0wned his server in a set of well rehearsed demos.

    I don’t use Informix so it wasn’t that useful to me, but a take home message is total props to IBM for solving these problems. Oracle can learn a few things from IBM on how to listen to professional security researchers, and fix stuff in a reasonable time frame.

    “How to Unwrap Oracle PL/SQL”
    Pete Finnigan

    Pete went through the basics of figuring out how to unwrap (decode) PL/SQL. I’ve just finished doing a major PL/SQL code review, and I was hoping it was about how to do good code reviews of this language. It turns out that some folks encode their PL/SQL (which is essentially Ada with some extensions) to obfuscate the source. We don’t do that, so I found this stuff pretty dull. However, I’ll keep it filed away in case we get some third party code which has been “wrapped”.

    Wrapping is an encoded form of DIANA. Pete showed how to decode this representation from the raw bytes stashed by Oracle. He also had some unkind words for the tools which supposedly decode this stuff today.

    Lastly, 10g went backwards. They don’t use this method, instead favoring just base64 encoding. That’s cool, as it makes it easier to decode stuff in 10g.

    Oracle Rootkits 2.0: The Next Generation
    Alexander Kornbrust

    Awesome talk. More when I have time to get my thoughts together. Take home point: take the time to secure your database servers, and isolate them.

    Hallway track

    So awesome to be here and meet the folks who do the research. I met a bunch of really smart folks and did a bit of an interview. If it comes out, I will update this entry.