Inject away...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jwerd
    Confirmed User
    • Jun 2003
    • 1953

    #1

    Inject away...

    I set up a small script on my site that looks for a GET type variable, and looks up a username. Now this is just a test script, your objective is to delete the user John. Can you do it?

    Column name is username
    Table name is exploit
    Value inside we are wanting to delete John.
    Variable name sql
    Can you guys do it?

    http://www.lamerhood.com/exploits/sq...p?sql=whatever

    err sorry, it's "john" not "John". And I'll let you guys know if it works or not
    Last edited by jwerd; 06-18-2004, 04:42 PM.
    Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com
  • arial
    Confirmed User
    • Jul 2002
    • 4012

    #2
    DELETE FROM `exploit` WHERE username=`John`

    Comment

    • jwerd
      Confirmed User
      • Jun 2003
      • 1953

      #3
      Originally posted by arial
      DELETE FROM `exploit` WHERE username=`John`
      Did not work.
      Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com

      Comment

      • jwerd
        Confirmed User
        • Jun 2003
        • 1953

        #4
        Ok now it will keep displaying "john" until it is deleted successfully. Let the injecting begin :P And I appreciate it guys, thanks...
        Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com

        Comment

        • arial
          Confirmed User
          • Jul 2002
          • 4012

          #5
          Originally posted by lamerhooD
          Did not work.
          Try it in phpMyAdmin make John=john

          Comment

          • jwerd
            Confirmed User
            • Jun 2003
            • 1953

            #6
            Originally posted by arial
            Try it in phpMyAdmin make John=john
            The point is, I want someone completely random to delete that entry so I can see if it truly is possible to do...without knowing much of anything and without having access to database/server tools
            Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com

            Comment

            • jwerd
              Confirmed User
              • Jun 2003
              • 1953

              #7
              PHP Code:
                  $q = mysql_query("select * from exploit 
              
              where username = '" .$_GET['sql'] . "'");
                  if(!$q)
                      die(mysql_error()); 
              
              Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com

              Comment

              Working...