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