Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Security Businesses Oracle Databases Programming Software IT

New Attack Exploits "Safe" Oracle Inputs 118

Trailrunner7 writes "Database security super-genius David Litchfield has found a way to manipulate common Oracle data types, which were not thought to be exploitable, and inject arbitrary SQL commands. The new method shows that you can no longer assume any data types are safe from attacker input, regardless of their location or function. 'In conclusion, even those functions and procedures that don't take user input can be exploited if SYSDATE is used. The lesson here is always, always validate and prevent this type of vulnerability getting into your code. The second lesson is that no longer should DATE or NUMBER data types be considered as safe and not useful as injection vectors: as this paper (PDF) has proved, they are,' Litchfield writes."
This discussion has been archived. No new comments can be posted.

New Attack Exploits "Safe" Oracle Inputs

Comments Filter:
  • heh (Score:5, Interesting)

    by stoolpigeon ( 454276 ) * <bittercode@gmail> on Friday April 25, 2008 @03:28PM (#23201688) Homepage Journal
    It's an interesting piece but when he points out that there really is little chance of it being used in the real world, that is an understatement. Using this method in the real world wouldn't even make sense.
     
    In order to pull this off you need to have alter session priveleges. And you need to already have injected sql into the database- which means there is absolutely no point to taking the extra steps to modify some other data type to allow you to do what you have already done.
     
    It's an interesting mental exercise but I don't think it really has an practical ramifications. If you've already handed out alter session to anyone using a form you've hosed yourself so many times over, playing with sysdate or number is the least of your worries.
     
    Anything that reminds people to be careful about how they handle input is good, but I think a lot of people are going to think this is a bigger deal than it is.
  • Re:nTier validation (Score:3, Interesting)

    by Kjella ( 173770 ) on Friday April 25, 2008 @04:07PM (#23202252) Homepage
    Developers? No. Try making a PHB understand that. Or a project manager, which either cuts that or some feature the client will notice right away. Or the guy that gets the ungrateful job of coordinating three teams of completely different teams in different subprojects with different managers, trying to keep a common model of "valid data". The real way it works is more like:

    1. User validation = stupid "have you filled out these fields" validation
    2. Application validation = application logic validation
    3. Data logic = field validation and foreign keys etc. to not leave dangling data that's invalid or inconsistant

    There's no point in making more client-side validation than that, because you can assume an attacker will send raw data at you anyway. The database layer is rather fucked if the commands are already injected - the best a database can do is to treat data types as expected and not fall for that kind of tricks.
  • by Anonymous Coward on Friday April 25, 2008 @04:12PM (#23202302)
    First off, this isn't a new class of attack. This type of attack is already known as second order SQL injection. Second, as several people have noted, you need to be able to execute the ALTER SESSION command. That means you're already issuing SQL commands directly. So, this attack is really only useful when can already inject, but need SQL to run in the context of a more privileged stored procedure. Finally, this attack relies on a very abnormal statement form. All said, that's a whole lot of dominoes that need to line up for a simple elevated SQL privilege.

    This whole thing just sounds like an odd bug that someone at NGS found somewhere. It's certainly clever, but it's not a common pattern or new class of bug--and definitely not worthy of a white paper. What I find really odd is that Litchfield and the NGS guys used to do really impressive work. This is way below the bar of what they've produced in the past.

Kleeneness is next to Godelness.

Working...