Injection Point repair Tutorial

Source: Internet
Author: User

 

I will block this website's security address. You don't have to find the injection point. I have fixed it.

We want to protect network security, not damage, so please forgive me.

 

First, insert a sentence in the news

 

Then back up the kitchen knife connection http://www.bkjia.com/admin/Databackup/3.asp

 

Next we will find our injection vulnerability file, and add our anti-injection code CompHonorBig. asp to the top of the file.

Http://www.bkjia.com/CompHonorBig. asp? Id = 35

<%

'Dim yisenceinje_Post, yisenceinje_Get, yisenceinje_In, yisenceinje_Inf, yisenceinje_Xh, yisenceinje_db, yisenceinje_dbstr

 

'You can add the parameters to be filtered in yisenceinje_In and separate them #.

Yisenceinje_In = ''#;#and # exec # insert # select # delete # update # count # chr # mid # master # truncate # char # declare'

Yisenceinje_Inf = split (yisenceinje_In ,'#')

 

'Determine the post Parameter

If Request. Form <> ''then StopInjection (Request. Form)

'Determine the get Parameter

If Request. QueryString <> ''then StopInjection (Request. QueryString)

'Determine cookie Parameters

If Request. Cookies <> ''then StopInjection (Request. Cookies)

 

 

Function StopInjection (values)

For Each yisenceinje_Get In values

For yisenceinje_Xh = 0 To Ubound (yisenceinje_Inf)

If Instr (LCase (values (yisenceinje_Get), yisenceinje_Inf (yisenceinje_Xh) <> 0 Then

Response. write' <Script Language = JavaScript> alert ('search tech prompts you: \ n please do not include invalid characters in the parameter. '); </Script>'

Response. write' illegal operation! The system has recorded your current operation: <br>'

Response. Write 'Operation IP Address: '& Request. ServerVariables ('remote _ ADDR') & '<br>'

Response. Write 'Operation time: '& Now &' <br>'

Response. write' operation page: '& Request. ServerVariables ('url') &' <br>'

Response. Write 'submit data: '& values (yisenceinje_Get)

Response. End

End If

Next

Next

End Function

%>

 

OK. Now we have no access to the injection point.

 

This is just a single file anti-injection multi-injection method: we can look at the code to see that he called that file, such as the file at this injection point, called the CONN under the INC folder. ASP, we directly add the code to CONN. the top of the ASP folder is enough.

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.