Re: MS SQL, find list of tables

From: Bernhard Mueller (research_at_sec-consult.com)
Date: 09/27/05

  • Next message: Michael Gargiullo: "RE: oracle VA/PT"
    Date: Tue, 27 Sep 2005 17:17:35 +0200
    To: PenTest <pen-test@securityfocus.com>
    
    

    MSDN has a complete list of mssql system tables:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sys_00_690z.asp

    normally "SELECT name FROM sysobjects" should do the job, as every
    database has it's own sysobjects table.

    good luck ;)

    Cedric Foll wrote:
    > Hi,
    >
    > I'm doing a pen test on a IIS/MS SQL box and find a SQL Injection on it
    > which permit to execute some SQL command on it.
    >
    > In fact I have a "select" where I can inject an "UNION something".
    > I'd like to use that in order to get login/passwd in the database.
    >
    > I can do:
    > <somethin.asp?page=contact' UNION SELECT * FROM users WHERE '1'='1>
    > But the table users doesn't exist and I failed to guess an existing
    > table name :(.
    >
    > I've tried:
    > <something.asp?page=contact' UNION SELECT * FROM MSysObjects'>
    > but I get
    > ----
    > Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
    >
    > [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no
    > read permission on 'MSysObjects'.
    > ----
    >
    > Someone has an idea ????
    >
    > Regards
    >

    -- 
    _____________________________________________________
    ~  DI (FH) Bernhard Mueller
    ~  IT Security Consultant
    ~  SEC-Consult Unternehmensberatung GmbH
    ~  www.sec-consult.com
    ~  A-1080 Wien  Blindengasse 3
    ~  Tel:   +43/676/840301718
    ~  Fax:   +43/(0)1/4090307-590
    ______________________________________________________
    ------------------------------------------------------------------------------
    Audit your website security with Acunetix Web Vulnerability Scanner: 
    Hackers are concentrating their efforts on attacking applications on your 
    website. Up to 75% of cyber attacks are launched on shopping carts, forms, 
    login pages, dynamic content etc. Firewalls, SSL and locked-down servers are 
    futile against web application hacking. Check your website for vulnerabilities 
    to SQL injection, Cross site scripting and other web attacks before hackers do! 
    Download Trial at:
    http://www.securityfocus.com/sponsor/pen-test_050831
    -------------------------------------------------------------------------------
    

  • Next message: Michael Gargiullo: "RE: oracle VA/PT"

    Relevant Pages

    • Re: database server audit tools
      ... This thing was pretty limited last time I looked at it, and had no database audit capabilities. ... this is a nice SQL injection testing tool. ... >Audit your website security with Acunetix Web Vulnerability Scanner: ... Cross site scripting and other web attacks before hackers do! ...
      (Pen-Test)
    • [NT] Multiple Vulnerabilities in ASPRunner
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... pages, users can search, sort, edit, delete and add data into a database. ... attacker to perform SQL Injection and XSS attacks as well as gather ... Every Page is vulnerable to SQL Injection attacks. ...
      (Securiteam)
    • RE: SQL injection from within a table - is it possible?
      ... "Second order code injection attacks" by Gunter Ollmann ... The document "Advanced SQL Injection In SQL Server Applications" ... > I suppose that if an application was pulling a value from the database ...
      (Pen-Test)
    • RE: [PHP] SQL security
      ... >Doesn't MySQL automatically protect against attacks like SQL injection? ... No - I don't think any database could automatically protect against SQL ...
      (php.general)
    • Re: sql injection: url or form based?
      ... start putting your SQL injection magic in the input boxes to ... Hackers are concentrating their efforts on attacking applications ... Check your website for vulnerabilities to SQL injection, ... Cross site scripting and other web attacks before hackers do! ...
      (Pen-Test)