Watch your door-attack server (4)-http parameter injection attack

Source: Internet
Author: User

The first thing to declare is that this article is purely an ignorant view of a little developer without foresight and knowledge, and is intended only for reference in Web system security.

1. HTTP parameter injection attack

If a user submits a parameter that is used as a parameter in the back-end HTTP request, this can cause an HTTP parameter injection.
A bad analogy that you think of yourself:
One-to-peer transfer system: money, where to go (from).
A very simple system. At the time of development, in order to reuse the code, add a judgment character (check), of course, this judgment character (check) will not appear in the system of the transfer of the peer to the document system;

2. A typical source code that is easily injected into an HTTP parameter

httpaddparam.jsp

<%@ page language="java" import="java.util.*,javax.servlet.http.*" pageencoding=" UTF-8 "%><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" ><html>  <head>    <title>Watch your door,-ah, classmate.</title>  </head>  <body>Your address:<%= (String)request. GETREMOTEADDR ()%> <br>    <%StringFrom = (String)Request. GetParameter ("from");StringMoney = (String)Request. GetParameter ("Money");String  to= (String)Request. GetParameter ("to");StringCheck = (String)Request. GetParameter ("Check");if(Check = =NULL) {check ="0"; }if(Check.equals ("1") {Out.write ("Ok,show me the money." "); }Else{Out.write ("Send money to:"+ to); }%> <br>  </body></html>

3. A typical case of soap injection attacks
Follow the normal input of the assumed document:

http://127.0.0.1:8080/webStudy/httpAddParam.jsp?from=andson&to=iris&money=10显示:你的地址:127.0.0.1sendto :iris

But the check parameter was discovered by the attacker, and the attacker added the check parameter:

http://127.0.0.1:8080/webStudy/httpAddParam.jsp?from=andson&to=iris&money=10&check=1显示:你的地址:127.0.0.1the money。

HTTP parameter injection attack completed.

Watch your door-attack server (4)-http parameter injection attack

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.