Bwapp--low--html injection-reflected (GET)

Source: Internet
Author: User

HTML injection-reflected (GET)

Enter the interface,

HTML tag Injection

Low level is not protected

1 functionHtmli ($data)2 {3          4     Switch($_cookie["Security_level"])5     {6         7          Case"0":8             9             $data= No_check ($data); Ten              Break; One          A          Case"1": -              -             $data= Xss_check_1 ($data); the              Break; -          -          Case"2": -                         +             $data= Xss_check_3 ($data);  -              Break; +          A         default: at              -             $data= No_check ($data);  -              Break;;  -  -     }        -  in     return $data; -  to } +  -<label>set your security level:</label><br/> the          *<select name= "Security_level" > $             Panax Notoginseng<option value= "0" >low</option> -<option value= "1" >medium</option> the<option value= "2" >high</option> +              A</select>

This is the core code

1<div id= "Main" >2     34 5<p>enter your first and last name:</p>6 7<form action= "<?php Echo ($_server["Script_name"]);? > "method=" GET ">8 9<p><label for= "FirstName" >first name:</label><br/>Ten<input type= "text" id= "FirstName" name= "FirstName" ></p>//first Name box One   A<p><label for= "LastName" >last name:</label><br/>//last Name box -<input type= "text" id= "LastName" Name= "LastName" ></p> -  the<button type= "Submit" name= "form" value= "submit" >Go</button>//Button label -  -</form> -  +<br/> -<?PHP +  A     if(isset($_get["FirstName"]) &&isset($_get["LastName"])//Get the FirstName and Lastname,isset detection of form delivery in the Get mode is present at     {    -  -         $firstname=$_get["FirstName"]; Accept Parameters -         $lastname=$_get["LastName"];  -  -         if($firstname= = "" or$lastname== "")//If one of them is empty, the bottom content is displayed in         { -  to             Echo"<font color=\" red\ ">please enter both fields...</font>";  +  -         } the  *         Else             $         { Panax Notoginseng  -             Echo"Welcome". Htmli ($firstname) . " " . Htmli ($lastname); Without any filtering, show it directly the  +         } A  the     } +  -?> $  $</div>

can <script> tags add XSS

Bwapp--low--html injection-reflected (GET)

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.