MYSQL updatexml Error Injection

Source: Internet
Author: User

First understand the next updatexml () function

Updatexml (Xml_document, xpath_string, New_value);
The first parameter: Xml_document is a string format, the name of the XML Document object, and the doc
The second argument: Xpath_string (a string in XPath format), you can find tutorials online If you don't know the XPath syntax.
Third parameter: new_value,string format, replacing found eligible data
Action: Change the value of a node in the document that matches the criteria

Change the value of xpath_string in Xml_document

And our injection statement is:

Updatexml (1,concat (0x7e, (SELECT @ @version), 0x7e), 1)
where the concat () function is linked to a string, and therefore does not conform to the xpath_string format, resulting in a format error, burst
Error 1105 (HY000): XPATH syntax error: ': [email protected] '

XPath format: http://www.cnblogs.com/Loofah/archive/2012/05/10/2494036.html

MYSQL updatexml Error Injection

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.