MySQL
Here we are exploiting a MySQL database server and changing credentials of wordpress file and then also gaining access to phpmyadmin page
Port scanning with
nmap
nmap -sV 10.2.29.246
# Scans 1000 common ports21/tcp open ftp Microsoft ftpd
22/tcp open ssh OpenSSH 7.1 (protocol 2.0)
80/tcp open http Microsoft IIS httpd 7.5
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds
3306/tcp open mysql MySQL 5.5.20-log
4848/tcp open ssl/http Oracle Glassfish Application Server
7676/tcp open java-message-service Java Message Service 301
8080/tcp open http Sun GlassFish Open Source Edition 4.0
8181/tcp open ssl/http Oracle GlassFish 4.0 (Servlet 3.1; JSP 2.3; Java 1.8)
9200/tcp open wap-wsp?
49152/tcp open msrpc Microsoft Windows RPC
49153/tcp open msrpc Microsoft Windows RPC
49154/tcp open msrpc Microsoft Windows RPC
49155/tcp open msrpc Microsoft Windows RPC
Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windowsAccess the web server with a browser
http://10.2.29.246/http://10.2.29.246/hahaha.jpgView page source

Other webpages
https://10.2.29.246:4848/http://10.2.29.246:8080/http://10.2.29.246:9200/http://10.2.29.246:8484/http://10.2.29.246:8585/http://10.2.29.246:8585/wordpress/





#MySQL

Search for MySQL exploits
Brute-force MySQL
📌
rootpassword is empty


Change
adminWordPress user's password
❗ DO NOT Change passwords in a real pentest
Access via browser
http://10.2.26.45:8585/wordpress/wp-admin

Try to gain access to phpMyAdmin using MSF
Access the target through SMB and modify phpMyAdmin configuration file
Move into the
wampfolder

Change WordPress
adminpassword

Access phpMyAdmin
http://10.2.26.45:8585/phpmyadmin/it automatically logs in since the
rootpassword isnull
phpMyAdmin

❗ DO NOT Change passwords in a real pentest
Last updated