Re: Table enumeration
From: Kevin Spett (kspett@spidynamics.com)Date: 02/19/02
- Previous message: Kristian Franzen: "Attacking via CIM http 'proxies'"
- In reply to: A***: "Table enumeration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Kevin Spett" <kspett@spidynamics.com> To: <pen-test@securityfocus.com>, "A***" <abdulla@mail.auk.kg> Date: Mon, 18 Feb 2002 15:21:35 -0800
MS SQL Server databases have a table called "sysobjects" that has the
names of all of the objects in the database in a column called "name". To
get the list of all of the user-defined tables in the database, you can use
the following query:
SELECT name FROM sysobjects WHERE xtype='U'
To get the views, change the 'U' to 'V', for the system tables it's 'S' and
for stored procedures use 'P'. After you've got the table names, you can
use the system table "syscolumns" to get the names of the columns in each
table using a query like this:
SELECT name FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name
= 'TableName')
Hope that helps.
Kevin.
kspett@spidynamics.com
----- Original Message -----
From: "A***" <abdulla@mail.auk.kg>
To: <pen-test@securityfocus.com>
Sent: Friday, February 15, 2002 1:54 AM
Subject: Table enumeration
> Hi all!
> How is it possible to enumerate table names in a database file? I've heard
in
> ms sql server there is system table name called sysobjects which contains
all
> table names. A little help would be really appreciated. Thanks.
> A***
>
>
> --------------------------------------------------------------------------
-- > This list is provided by the SecurityFocus Security Intelligence Alert (SIA) > Service. For more information on SecurityFocus' SIA service which > automatically alerts you to the latest security vulnerabilities please see: > https://alerts.securityfocus.com/ > >---------------------------------------------------------------------------- This list is provided by the SecurityFocus Security Intelligence Alert (SIA) Service. For more information on SecurityFocus' SIA service which automatically alerts you to the latest security vulnerabilities please see: https://alerts.securityfocus.com/
- Previous message: Kristian Franzen: "Attacking via CIM http 'proxies'"
- In reply to: A***: "Table enumeration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]