Re: [sqlmap-users] SQL Query To Retrieve MySQL Server IP Address
Brought to you by:
inquisb
From: Miroslav S. <mir...@gm...> - 2012-11-28 09:04:38
|
Hi. If you want to get IP addresses of interest you could try something like this: --sql-query="SELECT host, user FROM mysql.user WHERE user LIKE '%root%' OR user LIKE '%admin%'" back-end DBMS: MySQL >= 5.0.0 [10:00:24] [INFO] fetching SQL SELECT statement query output: 'SELECT host, user FROM mysql.user WHERE user LIKE '%root%' OR user LIKE '%admin%'' SELECT host, user FROM mysql.user WHERE user LIKE '%root%' OR user LIKE '%admin%' [6]: [*] 127.0.0.1, root [*] 172.16.162.1, root [*] 192.168.21.1, root [*] debian-5.0-i386, root [*] localhost, root Kind regards, Miroslav Stampar On Wed, Nov 28, 2012 at 9:55 AM, Zaki Akhmad <zak...@gm...> wrote: > On Wed, Nov 28, 2012 at 3:53 PM, Leon Jacobs <leo...@gm...> wrote: > > On Wed, Nov 28, 2012 at 10:48 AM, Miroslav Stampar > > <mir...@gm...> wrote: > >> > >> That proposed solution is equivalent to the SELECT @@hostname (except > that > >> last one doesn't need that non-query SHOW statement). Only thing is that > >> you'll get a same result as in --hostname which is not an IP address > that > >> your require. Have to seek what can be used here. > > > > > > Yeah this is perfect. And then hopefully getting the IP is as simple as > > looking up the hostname, assuming it resolves but that is not > guaranteed. =p > > the --sql-query="select @@hostname" works :-) > > -- > Zaki Akhmad > -- Miroslav Stampar http://about.me/stamparm |