Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The SQL Injection Attack is alive and well.

The SQL Injection Attack is alive and well.

Scheduled Pinned Locked Moved The Lounge
databasequestionannouncement
38 Posts 15 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A AspDotNetDev

    Isn't that more the responsibility of a programmer than a systems administrator? I suppose a properly secured database helps (i.e., you can disallow arbitrary SQL code and only allow stored procedures to execute), but the main step is to not use code that allows for SQL injection.

    [WikiLeaks Cablegate Cables]

    W Offline
    W Offline
    wizardzz
    wrote on last edited by
    #8

    IMO it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters. So, it's everyone's fault. Given the description of the hacked sites, I'm guessing this is the exploitation of a an open source or cheap product they all used in common, assuming that SQL injection would have been accounted for. It could even be an inside job from the developers of the common software.

    "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

    A N S 3 Replies Last reply
    0
    • H Henry Minute

      According to this report[^]. It is difficult to believe that Systems Administrators are unaware of this exploit and yet numerous sites are still vulnerable.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

      A Offline
      A Offline
      Andy Brummer
      wrote on last edited by
      #9

      Yeah, exactly what aspdotnetdev said. SQL injection is an application level exploit.

      Curvature of the Mind now with 3D

      1 Reply Last reply
      0
      • A AspDotNetDev

        Isn't that more the responsibility of a programmer than a systems administrator? I suppose a properly secured database helps (i.e., you can disallow arbitrary SQL code and only allow stored procedures to execute), but the main step is to not use code that allows for SQL injection.

        [WikiLeaks Cablegate Cables]

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #10

        True, but I was basing it on the days when I was an SA. I set the rules and the coders had to stick to them.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

        A 1 Reply Last reply
        0
        • W wizardzz

          IMO it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters. So, it's everyone's fault. Given the description of the hacked sites, I'm guessing this is the exploitation of a an open source or cheap product they all used in common, assuming that SQL injection would have been accounted for. It could even be an inside job from the developers of the common software.

          "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

          A Offline
          A Offline
          Andy Brummer
          wrote on last edited by
          #11

          wizardzz wrote:

          IMO it's the job of the DBA to allow only SP's

          Ugh. I'm happy I don't work with those DBAs, or any DBA for that matter. :-D

          Curvature of the Mind now with 3D

          W 1 Reply Last reply
          0
          • A Andy Brummer

            wizardzz wrote:

            IMO it's the job of the DBA to allow only SP's

            Ugh. I'm happy I don't work with those DBAs, or any DBA for that matter. :-D

            Curvature of the Mind now with 3D

            W Offline
            W Offline
            wizardzz
            wrote on last edited by
            #12

            Haha, me too actually.

            "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

            1 Reply Last reply
            0
            • H Henry Minute

              True, but I was basing it on the days when I was an SA. I set the rules and the coders had to stick to them.

              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

              A Offline
              A Offline
              Andy Brummer
              wrote on last edited by
              #13

              That's an odd relationship. Did they work for you?

              Curvature of the Mind now with 3D

              H 1 Reply Last reply
              0
              • A AspDotNetDev

                OriginalGriff wrote:

                It was in with your Certificate

                Speaking of, did you get yours yet?

                [WikiLeaks Cablegate Cables]

                H Offline
                H Offline
                Henry Minute
                wrote on last edited by
                #14

                Mine arrived last week, has yours not? I'm fibbing. 7th May was the date mine arrived last year.

                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                A 1 Reply Last reply
                0
                • A Andy Brummer

                  That's an odd relationship. Did they work for you?

                  Curvature of the Mind now with 3D

                  H Offline
                  H Offline
                  Henry Minute
                  wrote on last edited by
                  #15

                  Yup. In the sense that I was head of the dept that employed them and conducted the interviews. LAN only stuff back then though. From the comments it would seem that things have changed more than a little since then.

                  Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                  A 1 Reply Last reply
                  0
                  • H Henry Minute

                    Mine arrived last week, has yours not? I'm fibbing. 7th May was the date mine arrived last year.

                    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #16

                    Huh, I wonder why it takes so long.

                    [WikiLeaks Cablegate Cables]

                    H 1 Reply Last reply
                    0
                    • A AspDotNetDev

                      Huh, I wonder why it takes so long.

                      [WikiLeaks Cablegate Cables]

                      H Offline
                      H Offline
                      Henry Minute
                      wrote on last edited by
                      #17

                      Hamsters have problems gripping those fancy writing pens. Calligraphy! That's the word I was looking for. Calligraphy pens.

                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                      1 Reply Last reply
                      0
                      • W wizardzz

                        IMO it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters. So, it's everyone's fault. Given the description of the hacked sites, I'm guessing this is the exploitation of a an open source or cheap product they all used in common, assuming that SQL injection would have been accounted for. It could even be an inside job from the developers of the common software.

                        "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

                        N Offline
                        N Offline
                        Nemanja Trifunovic
                        wrote on last edited by
                        #18

                        wizardzz wrote:

                        it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters.

                        Neither helps with SQL injections. The only cure is using parameterized queries[^].

                        utf8-cpp

                        Sander RosselS W A 4 Replies Last reply
                        0
                        • N Nemanja Trifunovic

                          wizardzz wrote:

                          it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters.

                          Neither helps with SQL injections. The only cure is using parameterized queries[^].

                          utf8-cpp

                          Sander RosselS Offline
                          Sander RosselS Offline
                          Sander Rossel
                          wrote on last edited by
                          #19

                          quotename()[^] might help too in some cases (I think) :D

                          It's an OO world.

                          1 Reply Last reply
                          0
                          • A AspDotNetDev

                            Isn't that more the responsibility of a programmer than a systems administrator? I suppose a properly secured database helps (i.e., you can disallow arbitrary SQL code and only allow stored procedures to execute), but the main step is to not use code that allows for SQL injection.

                            [WikiLeaks Cablegate Cables]

                            C Offline
                            C Offline
                            Chris Meech
                            wrote on last edited by
                            #20

                            AspDotNetDev wrote:

                            but the main step is to not use code that allows for SQL injection.

                            A proper use of security would help as well. It's one thing to allow a user to type or inject "delete ...", it's quite another to actually authorise a user to do that. :)

                            Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                            A 1 Reply Last reply
                            0
                            • N Nemanja Trifunovic

                              wizardzz wrote:

                              it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters.

                              Neither helps with SQL injections. The only cure is using parameterized queries[^].

                              utf8-cpp

                              A Offline
                              A Offline
                              AspDotNetDev
                              wrote on last edited by
                              #21

                              Parameterized queries work by sanitizing the inputs. They just do it for you.

                              [WikiLeaks Cablegate Cables]

                              W 1 Reply Last reply
                              0
                              • N Nemanja Trifunovic

                                wizardzz wrote:

                                it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters.

                                Neither helps with SQL injections. The only cure is using parameterized queries[^].

                                utf8-cpp

                                W Offline
                                W Offline
                                wizardzz
                                wrote on last edited by
                                #22

                                Not sure what you mean here? How does sanitizing input not help with SQL injection? The article you referenced actually just said that. Also, how is parameterized queries exclusive of SP's?

                                "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

                                1 Reply Last reply
                                0
                                • A AspDotNetDev

                                  Parameterized queries work by sanitizing the inputs. They just do it for you.

                                  [WikiLeaks Cablegate Cables]

                                  W Offline
                                  W Offline
                                  wizardzz
                                  wrote on last edited by
                                  #23

                                  Thanks Asp, I was wondering what the poster was talking about. None of the techniques I mentioned are mutually exclusive of parameterized queries, however, if either person in the roles I mentioned had done their part, it would help.

                                  "Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" — Hunter S. Thompson

                                  1 Reply Last reply
                                  0
                                  • N Nemanja Trifunovic

                                    wizardzz wrote:

                                    it's the job of the DBA to allow only SP's and the developer to sanitize any input parameters.

                                    Neither helps with SQL injections. The only cure is using parameterized queries[^].

                                    utf8-cpp

                                    A Offline
                                    A Offline
                                    AspDotNetDev
                                    wrote on last edited by
                                    #24

                                    Also, the advantage of allowing only SP's to execute (using database permissions) is that SQL injection cannot then execute arbitrary code. It can only execute SP's that the user in the connection string has been given access to. This can be used as a backup in the case that the programmer does not use parameterized queries.

                                    [WikiLeaks Cablegate Cables]

                                    1 Reply Last reply
                                    0
                                    • H Henry Minute

                                      Yup. In the sense that I was head of the dept that employed them and conducted the interviews. LAN only stuff back then though. From the comments it would seem that things have changed more than a little since then.

                                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                      A Offline
                                      A Offline
                                      Andy Brummer
                                      wrote on last edited by
                                      #25

                                      That makes more sense. Typically the SA's I've worked with are deployment monkeys that just keep the OS running.

                                      Curvature of the Mind now with 3D

                                      1 Reply Last reply
                                      0
                                      • C Chris Meech

                                        AspDotNetDev wrote:

                                        but the main step is to not use code that allows for SQL injection.

                                        A proper use of security would help as well. It's one thing to allow a user to type or inject "delete ...", it's quite another to actually authorise a user to do that. :)

                                        Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                                        A Offline
                                        A Offline
                                        AspDotNetDev
                                        wrote on last edited by
                                        #26

                                        Indeed, it would help, but still doesn't prevent all forms of mischief. If you have an SP that deletes records of a particular type, then that may allow a user to cause some damage. The main form of defense is the code (parameterized queries).

                                        [WikiLeaks Cablegate Cables]

                                        1 Reply Last reply
                                        0
                                        • H Henry Minute

                                          According to this report[^]. It is difficult to believe that Systems Administrators are unaware of this exploit and yet numerous sites are still vulnerable.

                                          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                                          M Offline
                                          M Offline
                                          Mycroft Holmes
                                          wrote on last edited by
                                          #27

                                          from the article:

                                          Generally, the sites being hit are small businesses, community groups, sports teams and many other mid-tier organisations.

                                          A lot of these would be single devs, possibly juniors getting experience. If I saw this from a senior dev, whoosh out the door. SQL Injection is sooo easy to stop it is ridiculous that it is still a threat.

                                          Never underestimate the power of human stupidity RAH

                                          H C 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups