2022年2月

22.2.4

今天被车撞了哈哈哈哈哈哈哈哈

0x01 ctfhub web 网站源码

  1. 不得不说,ctfhub的启动速度真慢,而且还限时。
  2. 诶,好像做完了再写得,就是直接看源码就好了。

0x02 ctfhub web 目录遍历

  1. python代码

    list1=['tar','tar.gz','zip','rar']
    list2=['web','website','backup','back','www','wwwroot','temp']
    from http.client import ImproperConnectionState
    from itertools import product
    from wsgiref import headers
    loop_val = [list2,list1]
    
    import requests
    url="http://challenge-fa64d15e79dc640d.sandbox.ctfhub.com:10800/"
    headers={}
    
    
    for i in list1:
      for j in list2:
        url="http://challenge-fa64d15e79dc640d.sandbox.ctfhub.com:10800/"
    
        tmpurl=url+j+"."+i
        print("-----")
        print(tmpurl)
        resp = requests.get(tmpurl,headers=headers)
        print(resp)
    
    

    输出:

    http://challenge-fa64d15e79dc640d.sandbox.ctfhub.com:10800/www.zip
    <Response [200]>
  2. 下载之后为zip

    ├── 50x.html
    ├── flag_963527584.txt
    └── index.html
  3. 访问http://challenge-fa64d15e79dc640d.sandbox.ctfhub.com:10800/flag_963527584.txt
  4. ctfhub{734a166d266f051f9cb234ef}

吼住

  1. 可以用这个东西

    python3 dirsearch.py -u https://balbalab -e *

0x03 ctfhub web bak文件

  1. http://challenge-e31abed617b09446.sandbox.ctfhub.com:10800/index.php.bak
  2. FLAGctfhub{d588e073d217316d7b3a3c0a}

0x04 ctfhub web vim缓存

  1. 查了查WP还是,实在不知道vim的缓存叫啥
  2. http://challenge-3b111743009ec124.sandbox.ctfhub.com:10800/.index.php.swp
  3. 然后vim -r file
  4. FLAGctfhub{c49261bb85e4089818bc894d}

吼鸡

  1. vim 可以用v进入可视模式,然后安y进行复制。
  2. 其实WSL挺好用的!

22.2.3

0x01 ctfhub web 响应包源代码

  1. 直接看源代码ctfhub{2037d239e206f42bda6b857c}

0x02 ctfhub web 目录遍历

  1. http://challenge-5d63bd25869fa1b4.sandbox.ctfhub.com:10800/flag_in_here/4/4/flag.txt
  2. ctfhub{339190bf5c8f7b930cb7d8a8}
  3. 感觉这些题有点水啊

0x03 ctfhub web PHPINFO

  1. Environment
  2. FLAGctfhub{fdb7f72c115594cab4a04507}

WSL 切换版本

查看版本号

wsl -l -v

PS C:\Users\dayi> wsl -l -v
  NAME          STATE           VERSION
* Debian        Stopped         2
  kali-linux    Running         1
  
  

切换版本

wsl --set-version Debian 2

PS C:\Users\dayi> wsl -l -v
  NAME      STATE           VERSION
* Debian    Stopped         1
PS C:\Users\dayi> wsl --set-version Debian 2
正在进行转换,这可能需要几分钟时间...
有关与 WSL 2 的主要区别的信息,请访问 https://aka.ms/wsl2
转换完成。
PS C:\Users\dayi> wsl -l -v
  NAME      STATE           VERSION
* Debian    Stopped         2

22.2.2

大年初二

0x01 ctfhub web 请求方式

  1. 是HTTP的各种方法的学习
  2. wp来自互联网
  3. from urllib import request
    
    req = request.Request(method='CTFHUB', url='http://challenge-42fddc686b43e68f.sandbox.ctfhub.com:10800/index.php')
    res = request.urlopen(req)
    print(res.read())

0x02 ctfhub web 302跳转

  1. owo

    [root@oao ~]# curl http://challenge-66684d04baa09987.sandbox.ctfhub.com:10800/index.php
    ctfhub{e083eb87c1eb8f6f4cef2e23}

0x03 ctfhub web Cookie

  1. 用插件Edit this cookie改掉
  2. ctfhub{3d00d90799b8dc1b1d7b87ee}

0x04 ctfhub web 基础认证

  1. 不容易,ctfhub{130b2dd63035026a4958912f}
  2. 代码

    
    
    
    f=open('dic.dic','r',encoding="utf-8")
    arr=f.readlines()
    arr2=[]
    for i in arr:
      arr2.append(i.strip('\n'))
    
    print(arr2)
    
    
    import requests
    import base64
    import time
    
    #import faker #pip install faker
    import asyncio
    def get(str1):
      b64=base64.b64encode(str1.encode())
      try:
        headers = {'Authorization': 'Basic '+b64.decode()}
        r = requests.get(url, headers=headers,timeout=2)
        print(headers['Authorization'])
        print(str(r)+str(r.status_code))
        return r.status_code
      except:
        try:
          headers = {'Authorization': 'Basic '+b64.decode()}
          r = requests.get(url, headers=headers,timeout=2)
          print(headers['Authorization'])
          print(str(r)+str(r.status_code))
          return r.status_code
        except:
          print("oppos")
    
    url="http://challenge-3e6e821e7aab6f8b.sandbox.ctfhub.com:10800/flag.html"
    for i in arr2:
      str1="admin:"+i
      #print(str1)
      
      #print(b64)
      #print("---------------------")
      if get(str1) != 401:
        break
      time.sleep(0.01)
    
    out:
    Basic YWRtaW46ZnVja21l
    <Response [401]>401
    Basic YWRtaW46Njk2OQ==
    <Response [200]>200

22.2.1

0x01 buu crypto 异性相吸

  1. 没有思路,看了看wp
  2. 这个操作真的没想到。
  3. flag{ea1bc0988992276b7f95b54a7435e89e}

0x02 buu misc 面具下的flag

  1. binwalk 进行伪加密
  2. 得到flag.vmdk
  3. +++++ +++++ [->++ +++++ +++<] >++.+ +++++ .<+++ [->-- -<]>- -.+++ +++.<
    ++++[ ->+++ +<]>+ +++.< +++++ +[->- ----- <]>-- ----- --.<+ +++[- >----
    <]>-- ----- .<+++ [->++ +<]>+ +++++ .<+++ +[->- ---<] >-.<+ +++++ [->++
    ++++< ]>+++ +++.< +++++ [->-- ---<] >---- -.+++ .<+++ [->-- -<]>- ----- .<
    
    flag{N7F5_AD5
  4. 这里卡住了,没想到,又是linux文件问题

    7z x flag.vmdk -o./
    cat key_part_two/where_is_flag_part_two.txt:flag_part_two_is_here.txt
    Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
    
    balabal

_i5_funny!}


5. `flag{N7F5_AD5_i5_funny!}`



## 0x03 buu misc 九连环

1. 感觉不妙

2. ```shell
┌──(root?kali)-[/home/kali/Desktop/ouo]
└─# tree _123456cry.jpg.extracted                                                                                                                    127 ⨯ 1 ⚙
_123456cry.jpg.extracted
├── 4C68.zip
└── asd
    ├── good-已合并.jpg
    ├── qwe.zip
    └── _qwe.zip.extracted
        ├── 0.zip
        └── flag.txt

2 directories, 5 files
  1. 再次卡住

    zsteg -a /home/kali/Desktop/ouo/_123456cry.jpg.extracted/asd/good-已合并.jpg
    [!] #<ZPNG::NotSupported: Unsupported header "\xFF\xD8\xFF\xE0\x00\x10JF"
    反正不是png隐写。
  2. WP

    steghide extract -sf good.jpg
    看到这个图片就是压缩包的密码:
    bV1g6t5wZDJif^J7
    
  3. 得到flag

    flag{1RTo8w@&4nK@z*XL}