Xss vulnerability attack and Prevention Measures
Xss is also called cross site Scripting (css. A malicious attacker inserts malicious html code into a web page. When a user browses this page, the html code embedded in the web page is executed, this achieves the Special Purpose of malicious attacks to users.
Put a tag on the Source Page and write this. textlabel. text = request ["msg"] in the background page_load.
Build an attack to pass data to the target page after the attack
The build code is as follows:
Msg = <form action = 'HTTP: // www.zhutiai.com 'method = 'get'> bank account: <input type = 'text' name = 'id'/> password: <input type = 'text' name = 'pwd'/> <input type = 'submit 'value = 'login'/> </form>
, Solution
The most important thing is to increase awareness and strictly control input and output. The specific execution methods are as follows:
1. Perform reliable input verification on all submitted content by the input party. The submitted content includes url, query keyword, http header, and post data.
2. In terms of output, use the <xmp> label in the user's input content. The content in the label is not explained and displayed directly.
Third, strictly control the number of characters entered.
Fourth, there should be no user input in the script execution area.
========================================================== ==================
SQL Injection
If the content submitted by the user contains a; number, the SQL statement will be truncated... and the consequence will be
After the page is loaded, execute login