Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Can i still access the database if its on 127.0.0.1

I shelled a site and i found the db config.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306

Can i still access it over the web? I dont have cpanel access.
Yes, but you'll need to access it from the victim since you can't access directly (via WAN IP). If you have a web shell with mysql functions built-in then it should work just fine for you, since all requests from the web shell would be considered localhost for that victim box. Another alternative is to pop a reverse shell, upgrade to some TTY support, then use the mysql client on the victim to connect to the localhost database to peruse as you like.

(Nov 22, 2018 07:51 AM)Vanderbilt Wrote:  I shelled a site and i found the db config.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306

Can i still access it over the web? I dont have cpanel access.

It is not possible to access it externaly over direct connection. You need to connect through the Server to reach it.

The easiest way would be to scan for a sql manager such as phpmyadmin.
Harder would it be to change the config somehow.
Figured this out fairly recently after this thread, thanks guys!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Q00Jan 22, 2025 01:39 AM 12 1,389 Jan 22, 2025 01:39 AM
Last Post: Bastille
by ari12Jun 20, 2015 09:59 PM 6 449 Jun 20, 2015 09:59 PM
Last Post: Viktory
by yellowpadOct 12, 2013 02:44 AM 11 511 Oct 12, 2013 02:44 AM
Last Post: yellowpad