强网杯部分web复现腾讯云开发者社区

这次的强网杯好难 其实是我太菜了,不过确实学到了很多新东西

打开注册登录后有个向admin机器人发送指令的功能,简单抓包分析下后发现向admin机器人发送的指令用了websocket连接,同时发现其未对origin头进行验证,存在websocket劫持(和CSRF类似),有关websocket劫持的利用可以参考

有个修改密码的功能,还有个让admin去访问你给的链接的功能,那直接让admin去访问你构造的恶意网站造成websocket劫持修改admin的密码

题目给了说明admin-bot是在8888端口启动的

exp:

购买hint拿到源码

审计源码发现其后端购买商品的业务用了python和go两种语言,所以存在json解析差异的漏洞

简单说一下

审计题目的源码发现python中用了标准库中的json解析器,golang中用了三方JSON解析器(buger/jsonparser)

而python标准库中的JSON解析器,针对重复键,将返回最后一个键值对

golang中高性能的第三方JSON解析器(buger/jsonparser),针对重复键,它会返回第一个键值对

这样就造成了json解析差异,可以构造如下payload

这样在python中取到的num为1,而在go中取到的num为0

而结算算资金的业务在go中,拿到商品的业务在python中,于是就成功“购买”到了flag

审计源码发现存在这个函数

这个函数就有意思了

在其黑名单中发现并未有 .inc

那我们的利用思路就是上传一个 .inc 木马文件,构造合适的cookie进行反序列化从而达成RCE

但是我们上传的文件名要和我们反序列化的那个类名要一样才能使 spl_autoload_register() 去加载我们上传的文件,而题目中对文件做了这样的处理

所以我们所上传的文件中的class类的类名也要定义成其对应的 md5(time()) 值,这要求速度待快,只能用脚本实现了

构造所上传的文件内容为

exp:

成功执行命令(题目环境关了,本地测试成功)

这题的flag在504页面

有关pickle反序列化的东西网上有很多,这里不再赘述

pickle 反序列化, 过滤了 “R”, 构造 opCode 可实现命令执行多进程同时打 sleep 20 ,阻塞出现504,获取flag

浅浅解释一下

504 是网关超时, 我们的请求是通过第一个服务器转发给实际处理逻辑的服务器的, 第一个服务器拿不到实际处理逻辑的服务器就会报 504, 实际处理逻辑的服务器能同时响应的连接是有限的, 假设有 20个, 我们反序列化命令(函数)执行让后端每个都 sleep 20 秒(超过第一个服务器等待的时间), 这样我们的第 21 个进程迟迟得不到处理, 第一个服务器就报 504 了

THE END
0.github.com/Admirepowered/APatch/commit/77bcb51082e99c7a411ddis_mounted $POINT; then + local BLOCK=$(find_block $PART) + mount $FLAG $BLOCK $POINT || return + fi + ui_print "- Mounting $POINT" +} + +# mount_ro_ensure +mount_ro_ensure() { + # We handle ro partitions only ihttps://github.com/Admirepowered/APatch/commit/77bcb51082e99c7a411dd5949c2c5e44e857e8bf.diff
1.JsonSource.AdditionalColumnsProperty(Azure.ResourceManagerDataFactoryPipelineReferenceType DataFactoryPipelineRunEntityInfo DataFactoryPipelineRunInfo DataFactoryPrivateEndpointConnectionCreateOrUpdateContent DataFactoryPrivateEndpointConnectionProperties DataFactoryPrivateEndpointProperties DataFactoryPrivateLinkResource DataFactoryPrivateLinkResourceProperties DataFactoryPublicNhttps://docs.microsoft.com/id-id/dotnet/api/azure.resourcemanager.datafactory.models.jsonsource.additionalcolumns?view=azure-dotnet
2.cvelistv5CVE2019CVE Details for CVE: CVE-2019-16905 Summary OpenSSH 7.7 through 7.9 and 8.x before 8.1, when compiled with an experimental key type, has a pre-authentication integer overflow if a client or server is configured to use a crafted XMSS key. This leads to memory corruption and local code exehttps://cvepremium.circl.lu/cve/CVE-2019-16905
3.mirrors.aliyun.com/CTAN/help/greek/gentle/gentlGi`a n`a xana\-epi\-str'e\-youme st`a {\rm roman}, gr'afoume st`on k'wdika {\tt \\rm}. Gi`a par'adeigma, e>~inai dunat`o n`a >'eqoume t`hn >ak'oloujh >agglik`h pr'otash st`on k'wdik'a mac: {\tt I started with roman type, \\it switched to italic https://mirrors.aliyun.com/CTAN/help/greek/gentle/gentl-gr.tex
4.Rockymyxstep1:curl https://raw.githubusercontent.com/dvershinin/apt-get-centos/master/apt-get.sh -o /usr/local/bin/apt-getstep2:chmod 0755 /usr/local/bin/apt-get 2020-10-13 17:38:29 680 原创 多机多卡技术测试-单节点多DCU(数据传输型)https://me.csdn.net/blink/qq_33562636
5.\inputmacfonthistorians aspire (Grundmann, p. 1; Guen\'{e}e, p. 25,\emph{et passim}).\bigskip The story of William Longsword provides a particularly good example of the conspiracy, supported by ecclesiastical and secular writers alike, to cook an embarassingly raw https://people.bu.edu/bobl/longsword.htm
6.西湖论剑2025Writeup(8,b'\x00'))addr32=lambdas:u32(io.recvuntil(s,drop=True,timeout=1).ljust(4,b'\x00'))addr64=lambdas:u64(io.recvuntil(s,drop=True,timeout=1).ljust(8,b'\x00'))byte=lambdan:str(n).encode()info=lambdas,n:print("\033[31m["+s+" -> "+str(hex(n))+"]\033[0m")sh=https://blog.xmcve.com/2025/01/19/%E8%A5%BF%E6%B9%96%E8%AE%BA%E5%89%91-2025-Writeup/
7.ffmpeg命令参数详解(二)ffmpegsimddct-target type specify target file type ("vcd", "svcd", "dvd", "dv", "dv50" , "pal-vcd", "ntsc-svcd", ) -xerror exit on error Advanced options: -map file:stream[:syncfile:syncstream] set input stream mapping -map_meta_data outfile:infile set meta data information of outfilehttps://m.blog.csdn.net/lbaihao/article/details/52138690
8.西湖论剑初赛Web1/5|r.content_type = "text/plain" local t = io.popen('/readflag') local a = t:read("*all") r:puts(a) if r.method == 'GET' then for k, v in pairs( r:parseargs() ) do r:puts( string.format("%s: %s\n", k, v) ) https://guokeya.github.io/post/qKqMPs-ml/
9.gcc.gnu.orgGitmsgstr "AltiVec-argumentti välitetty funktiolle, jolla ei ole prototyyppiä"#: config/s390/s390.c:16057-#, fuzzymsgid "Entity %qs at %L has a deferred type parameter and requires either the POINTER or ALLOCATABLE attribute"-msgstr ""https://gcc.gnu.org/git?p=gcc.git;a=commitdiff;h=47a665af3bc5bc14bff95f66b3a051a0c8d14fe1
10.InPartialFulfillmentB. t:.Íor::ís, "Tile Ilinship oj= iiad.¡ress in Poie' s Dunc-i-ad, " Phil-ologica'l Quart.erl 1' 51 Í îLJ'nJv ê "A: Í l\(L\n'9J¡nu1vn;aJrç! L972)? 8lg -gl. ¡ L6 The a-ccusat i ons road.e aga-_inst Theoh;,a_l-d are acl-al_:https://mspace.lib.umanitoba.ca/xmlui/bitstream/handle/1993/13283/Sheldon_The_meaning.pdf?sequence=1&isAllowed=y
11.[FFmpeg]ffmpeg命令参数详解(帮助说明)强大所有参数-target type specify target file type ("vcd", "svcd", "dvd", "dv", "dv50" , "pal-vcd", "ntsc-svcd", ) -xerror exit on error Advanced options: -map file:stream[:syncfile:syncstream] set input stream mapping -map_meta_data outfile:infile set meta data information of outfilehttps://www.cuplayer.com/player/playercodejs/2014/0711/1432.html
12.github.com/wikimedia/mediawiki/commit/d35cf1708f3bb730dce5c74", @@ -3145,7 +3145,7 @@ "watchlistedit-raw-titles": "Izenburuak:", "watchlistedit-raw-submit": "Jarraitze-zerrenda eguneratu", "watchlistedit-raw-done": "Zure jarraipen zerrenda berritu da.", - "watchlistedit-https://github.com/wikimedia/mediawiki/commit/d35cf1708f3bb730dce5c74e028754cbafdde9f1.patch
13.2024中国能源网络安全大赛②决赛个人赛wgf42420x000000007db0fc10160R--rwd \Device\HarddiskVolume1\Users\ctf\Desktop\777.png export file=mem.raw vol.py -f $file --profile=Win7SP1x64 dumpfiles -Q0x000000007db0fc10-D ./ flag{2shygsbnajwjji} Done | 代理流量 343 号包发现 frp https://www.cnblogs.com/wgf4242/p/18259556
14.typingfrom typing import TypeVar, Iterable, Tuple, Union S = TypeVar('S') Response = Union[Iterable[S], int] # Return type here is same as Union[Iterable[str], int] def response(query: str) -> Response[str]: T = TypeVar('T', int, float, complex) Vec = Iterable[Tuple[T, T]https://docs.python.org/id/3.8/library/typing.html
15.typingfrom typing import TypeVar, Iterable, Tuple, Union S = TypeVar('S') Response = Union[Iterable[S], int] # Return type here is same as Union[Iterable[str], int] def response(query: str) -> Response[str]: T = TypeVar('T', int, float, complex) Vec = Iterable[Tuple[T, T]https://docs.python.org/id/3.7/library/typing.html
16.26.1.typingfrom typing import TypeVar, Iterable, Tuple, Union S = TypeVar('S') Response = Union[Iterable[S], int] # Return type here is same as Union[Iterable[str], int] def response(query: str) -> Response[str]: T = TypeVar('T', int, float, complex) Vec = Iterable[Tuple[T, T]https://docs.python.org/id/3.6/library/typing.html
17.typingfrom collections.abc import Iterable from typing import TypeVar S = TypeVar('S') Response = Iterable[S] | int # Return type here is same as Iterable[str] | int def response(query: str) -> Response[str]: T = TypeVar('T', int, float, complex) Vec = Iterable[tuple[T, T]]https://docs.python.org/id/3.10/library/typing.html
18.从零开始学JAVA(经典)ystore "url","type" 其中: (1) keystore是保留字,表示keystore条目。 (2) url指kestore的URLng url, Properties info) throws SQLException public sta tic Connection getConnection(String url, Stringo.txt","rw"); //得到文件指针和长度 long flag = 0; lon g len = f.length(); //字符https://www.360doc.cn/document/53954678_1055815343.html
19.奇安信攻防社区union联合查询,用于合并左右两侧select语句的结果,得要求两侧select的列数相同,两侧select列数不同发生error,那注入就失败;因此 union注入必须得先进行order by的判断确定列数,后续才能拼接子查询测试。 所以,站点union注入失败的原因在于order by测试没命中 https://forum.butian.net/share/3708
20.bugku论剑场web解题记录lceFIre这里主要需要绕过第一个正则匹配,同时要令$result为真就能得到flag了\d+匹配多个数字字符s 特殊字符圆点 . 中包含换行符D 如果使用$限制结尾字符,则不匹配结尾换行;(详细可百度正则表达式修饰符)这里的/\d+/sD是用来匹配数字,只需字符串就可以绕过is_numeric() 函数用于检测变量是否为数字或数字字符串。https://www.cnblogs.com/lceFIre/p/11628512.html
21.github.com/wikimedia/mediawiki/commit/364f70d6ec6e546eece49007 @@ "prefs-info": "Коьртахаам", "prefs-i18n": "Кхинпараметраш", "prefs-signature": "Куьг", + "continuând cu vechea parolă.", "passwordreset-emailelement": "Nume de utilizator: \n$1\n\nParolă temporară: \n$2", "passwordresethttps://github.com/wikimedia/mediawiki/commit/364f70d6ec6e546eece4900a2754ac6dab79e995.patch