zoukankan      html  css  js  c++  java
  • DVWA系列のXSS

    Reflected Cross Site Scripting (XSS)

    等级为low时,直接<script>alert(‘xss’)</script>

    等级为medium时,

    源代码将<script>替换为空,此时可用<scr<script>ipt>alert('xss')</script>来替换,如图

    等级为high时

     

    Stored Cross Site Scripting (XSS)

    等级为low时,对message过滤了反斜杠等特殊符号,对name则没有过滤反斜杠,但是对name限制了长度

    直接可在html中修改name字段长度

    然后将<script>alert(‘xss’)</script>输入到name中,点击提交,xss触发

    在等级为medium时

     

     

    从代码可知,message字段依旧是重重过滤,而name字段新增了遇到<script>替换为空的函数。

    还是先修改name字段长度,然后用<scr<script>ipt>alert('medium')</script>绕过,结果如图

    等级为high时,对message和name两个字段都进行了过滤

    目前不会。

    Trim:

    移除字符串两侧的字符("Hello" 中的 "He" 以及 "World" 中的 "d!"):

  • 相关阅读:
    PHP-会话控制
    PHP-文件上传
    PHP-文档目录
    PHP-正则表达式
    PHP-数组类型
    PHP-函数编程
    PHP-基础知识
    $_FILES系统函数
    话说 MAX_FILE_SIZE
    Hello~! 我的blog
  • 原文地址:https://www.cnblogs.com/vincebye/p/6440577.html
Copyright © 2011-2022 走看看