zoukankan      html  css  js  c++  java
  • xctf-web

    view source

    Q:无法用鼠标右键查看原码,怎么办?
    A:浏览器地址栏在网址前输入 view-source: 即可查看源码

    get post

    Q:用 get 提交 a=1,用 post 提交 b=2
    A:url后加 ?a=1,用 hackbar 提交b=2

    robots

    Q:robots.txt
    A:域名后加 robots.txt

    backup

    Q:找到网站的备份文件
    A:暴力域名。常见备份后缀git .svn .swp .~ .bak .bash_history

    cookie

    Q:cookie
    A:用F12查看cookie到cookie.php,查看消息头

    disable button

    Q:前端知识:如何按一个按不了的按钮
    A:F12 将按钮的disable删除

    simple js

    Q: A:网页源码

    <script type="text/javascript">
    function dechiffre(pass_enc){
        var pass = "70,65,85,88,32,80,65,83,83,87,79,82,68,32,72,65,72,65";
        var tab  = pass_enc.split(',');
        var tab2 = pass.split(',');
        var i,j,k,l=0,m,n,o,p = "";i = 0;j = tab.length;
                        k = j + (l) + (n=0);
                        n = tab2.length;
                        for(i = (o=0); i < (k = j = n); i++ )
            {o = tab[i-l];p += String.fromCharCode((o = tab2[i]));
                                if(i == 5)break;}
                        for(i = (o=0); i < (k = j = n); i++ ){
                        o = tab[i-l];
                                if(i > 5 && i < k-1)
                                        p += String.fromCharCode((o = tab2[i]));
                        }
        p += String.fromCharCode(tab2[17]);
        pass = p;return pass;
    }
    String["fromCharCode"](dechiffre("x35x35x2cx35x36x2cx35x34x2cx37x39x2cx31x31x35x2cx36x39x2cx31x31x34x2cx31x31x36x2cx31x30x37x2cx34x39x2cx35x30"));
    h = window.prompt('Enter password');
    alert( dechiffre(h) );

    x35x35x2cx35。。。为一串编码,用python转为数字字符串,再转出相应编码的字符

    xff_referer

    Q:伪造 xff 与 referer头 A:用代理工具添加 X-Forwarded-For 与 Referfer, 键值对的键首字母要大写

    X-Forwarded-For(XFF)
    是用来识别通过HTTP代理或负载均衡方式连接到Web服务器的客户端最原始的IP地址的HTTP请求头字段。通俗来说,就是浏览器访问网站的IP。一般格式:
    ==>    X-Forwarded-For: client1, proxy1, proxy2, proxy3
    左边第一个是浏览器IP,依次往右为第一个代理服务器IP,第二个,第三个(使用逗号+空格进行分割)  
    

    weak auth

    Q:用 admin 登录。
    A:用字典暴力。是123456

    web shell

    直接用菜刀连,或用php命令慢慢试。

    command_execution

    命令执行漏洞,; + 命令

    simple_php

    ?<?php
    show_source(__FILE__);
    include("config.php");
    $a=@$_GET['a'];
    $b=@$_GET['b'];
    if($a==0 and $a){
        echo $flag1;
    }
    if(is_numeric($b)){
        exit();
    }
    if($b>1234){
        echo $flag2;
    }
    ?>

    要 $a == 0,且不能等同false。即$a可强制转为0但不能是0。可用 0+字母。
    $b 不能是数字且大于1234,可用 1235%00 将 is_numeric函数截断。

    python template injection

    SSTI知识点,https://www.freebuf.com/column/187845.html

    {{''.__class__.__mro__[2].__subclasses__()[71].__init__.__globals__['os'].listdir('.')}}

    {{''.__class__.__mro__[2].__subclasses__()[40]('fl4g').read()}}

  • 相关阅读:
    Python学习札记(十五) 高级特性1 切片
    LeetCode Longest Substring Without Repeating Characters
    Python学习札记(十四) Function4 递归函数 & Hanoi Tower
    single number和变体
    tusen 刷题
    实验室网站
    leetcode 76. Minimum Window Substring
    leetcode 4. Median of Two Sorted Arrays
    leetcode 200. Number of Islands 、694 Number of Distinct Islands 、695. Max Area of Island 、130. Surrounded Regions 、434. Number of Islands II(lintcode) 并查集 、178. Graph Valid Tree(lintcode)
    刷题注意事项
  • 原文地址:https://www.cnblogs.com/zhangzixian/p/10913756.html
Copyright © 2011-2022 走看看