SQL query. How to find the table?
So you mean you cant understand this http://www.securiteam.com/securityreviews/5DP0N1P76E.html ?
UNION ALL SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES –
that finds the first table name. then you take that name and do:
UNION ALL SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME NOT IN ('tblOne'); –
Then you just keep adding to it like ('tblOne','tblTwo','etc','etc');
Something fun I discovered recently is this '; shutdown with nowait; – :P Fun stuff. It shuts the SQL server offline. No damage really, just annoying to users + admins.
xp_cmdshell is a great routine as well (it comes on MS-SQL servers), espically if you have sa provilages.
although its kinda rare these days, you'd be suprised how many admins dont think things through when setting up an SQL server… in fact, alot of admins don't know why its a good idea to remove the sa account, or to disable xp_cmdshell…. :|