当前位置:网站首页>第14届全国大学生信息安全竞赛-创新实践能力赛
第14届全国大学生信息安全竞赛-创新实践能力赛
2022-08-10 20:30:00 【MssnHarvey】
前言
CTF高考好耶!
第一卷-Web
easy_source
来源于:https://r0yanx.com/2020/10/28/fslh-writeup/
php反射,使用ReflectionMethod内置类的getDocComment方法 , 然后爆破一下rb的值得知函数名q,进而得到flag:CISCN{1yVxf-Nt5Gc-ITZhp-6rqwI-2sE6S-} payload:
http://114.116.229.178:25042/?rc=ReflectionMethod&ra=User&rb=q&rd=getDocComment
easy_sql
报错注入 + 无列名注入 卷不动了~
第一卷-Misc
tiny_traffic
首先在流量包中提取出test与secret两个br文件 接着我们找到脚本解码得到对应的proto3文件test1、secret1 附上下载地址(提取码:ddql)
python brotlipython.py test test1
python brotlipython.py secret secret1
最后在用protoc解密,整理得到flag:CISCN{e66a22e23457889b0fb1146d172a38dc}
protoc --decode=PBResponse test1 < secret1
附上安装protoc命令(Linux-kali)
PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
running_pixel
首先分解gif(得分解为png或者bmp的,要是jpg最后整出来可能会导致像素信息损失)
convert running_pixel.gif ./out/out.png
接着把每一帧的rgb是233 233 233的像素放到一张图上,跑下脚本得到画好的382张图 关键就在于通过对比每十帧里的相同的图片,进而找到(233,233,233)这个点 最后解出来了出题人还要恶心你一下,一帧一帧按顺序去看就能得到flag:CISCN{12504d0f-9de1-4b00-87a5-a5fdd0986a00}(PS:382张图,字还特小)
放个flag的gif演示图
附上脚本
from PIL import Image
import matplotlib.pyplot as plt
IMG = Image.new("RGB", (400,400), (0,0,0))
res = []
for m in range(382):
img = Image.open('./out/out-'+str(m)+'.png').convert('RGB')
t = ''
for i in range(400):
for j in range(400):
p1 = img.getpixel((i,j))
if p1==(233,233,233):
IMG.putpixel((j,i),(255,255,255))
IMG.save('./gif/'+str(m)+'.png')
print(len(res))
plt.imshow(IMG)
plt.show()
IMG.save('flag.png')
第一卷-Reverse
glass
反编译发现在so层加密,解包打开IDA,分析函数得知是rc4加密,跑下脚本得到flag:CISCN{6654d84617f627c88846c172e0f4d46c}
附上脚本
from Crypto.Cipher import ARC4
res = [0xA3, 0x1A, 0xE3, 0x69, 0x2F, 0xBB, 0x1A, 0x84, 0x65, 0xC2, 0xAD, 0xAD, 0x9E, 0x96, 0x05, 0x02, 0x1F, 0x8E, 0x36, 0x4F, 0xE1, 0xEB, 0xAF, 0xF0, 0xEA, 0xC4, 0xA8, 0x2D, 0x42, 0xC7, 0x6E, 0x3F, 0xB0, 0xD3, 0xCC, 0x78, 0xF9, 0x98, 0x3F]
key = b"12345678"
rc4 = ARC4.new(key)
key = list(key)
for i in range(39):
res[i] ^= key[i % 8]
for i in range(0, 39, 3):
tmp0 = res[i]
tmp1 = res[i+1]
tmp2 = res[i+2]
res[i] = tmp1 ^ tmp2
res[i+2] = tmp0 ^ res[i]
res[i+1] = res[i+2] ^ tmp2
print(rc4.decrypt(bytes(res)))
第二卷-Web
middle_source
session文件包含 扫描web文件得到了.listing,.listing文件内容有个php文件you_can_seeeeeeee_me.php 访问you_can_seeeeeeee_me.php是个phpinfo(),有开PHP_SESSION_UPLOAD_PROGRESS,并且拿到了session的路径: /var/lib/php/sessions/jehaahfcad/ 这样我们可以通过上传文件,然后使用文件包含执行这个/var/lib/php/sessions/jehaahfcad/sess_xxxxxxxxxx文件 phpinfo有ban了函数 , 不能执行命令,所以用scandir去读取目录
第二卷-Misc
隔空传话
首先我们拿到了一堆加密的通话数据,得知是短信编码中的PDU(但是给的数据过多,懒狗肯定想办法整个批量的 附上批量脚本
import requests
import time
import re
f = open('data.txt')
url = 'https://www.smspdu.be/'
data = {'action': 'ppdu',
'pdu': '',
'submit': 'Decode'}
rep = re.compile(r'<TD>(.*?)</TD>')
ff = open('out.txt','a',encoding='utf-8')
rr = f.readlines()
for i in range(len(rr)):
c = rr[i]
data['pdu'] = c.strip()
r = requests.post(url,data).text
res = re.findall(rep,str(r))
print(c)
print(res[20])
ff.write(res[20]+'\n')
time.sleep(0.5)
接着根据pdu信息里本身包含的时间信息排序,排起来就是一张png(指的是后面的16进制数据
附上排序脚本
f = open('data.txt').readlines()
f1 = open('out.txt').readlines()
res = {}
d = {}
for i in range(4,len(f)):
l = f[i][42:44][::-1]+f[i][44:46][::-1]
res[int(l)] = f1[i-4].strip()
print(l)
f2 = open('final.txt','a')
for i in range(3924,4938):
try:
f2.write(res[i])
except:
pass
最后crc爆破宽度会发现前面解码给的w465意思就是宽度是465,进而整理得到flag:CISCN{15030442_b586_4c9e_b436_26def12293e4}(手动滑稽~
第三卷-Misc
robot
把TCP的第一个流导出来,然后所有的坐标都在里面,提取一下就能得到flag:CISCN{easy_robo_xx}
附上脚本
import re
from PIL import Image
import matplotlib.pyplot as plt
f = open('tmp').read()
reg = re.compile(r'tgPos.*?]')
res = re.findall(reg,f)
print(res)
print(len(res))
img = Image.new('RGB',(500,500),(255,255,255))
for i in res[:-1]:
tmp = eval(i.split('.')[2])
img.putpixel((tmp[0],tmp[1]),(0,0,0))
img.save('flag.png')
边栏推荐
- ACM MM 2022 统一归一化:加速Transformer工业部署的归一化方法
- Transferrin-modified vincristine-tetrandrine liposomes | transferrin-modified co-loaded paclitaxel and genistein liposomes (reagents)
- The 2021 ICPC Asia Shanghai Regional Programming Contest D、E
- 指针常量和常量指针
- 验证码倒计时自定义hooks
- .NET现代应用的产品设计 - DDD实践
- Echart饼状图标注遮盖解决方案汇总
- 报错:runtime error: reference binding to null pointer of type ‘std::vector<int, std::allocator<int>>‘
- Heme - gold nanoparticles (Heme - AuNP) composite nanometer enzyme | gold nanoparticles nuclear porous hollow carbon nanometer spherical shell (Au @ HCNs) nano enzyme
- ansible各个模块的详解和使用
猜你喜欢
- [email protected]纳米模拟酶|PtCo合金纳米粒子"/>
水溶性合金量子点纳米酶|CuMoS纳米酶|多孔硅基Pt(Au)纳米酶|[email protected]纳米模拟酶|PtCo合金纳米粒子
(十二)STM32——NVIC中断优先级管理
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
(12) findContours function hierarchy explanation
转铁蛋白(TF)修饰紫杉醇(PTX)脂质体(TF-PTX-LP)|转铁蛋白(Tf)修饰姜黄素脂质体
The most complete GIS related software in history (CAD, FME, ArcGIS, ArcGISPro)
【一致性hash】负载均衡器分发请求
机器学习笔记:t-SNE
- [email prot"/>
Transferrin-modified osthole long-circulating liposomes/PEG-PLGA nanoparticles loaded with notoginsenoside R1 ([email prot
(10) Sequence and deserialization of image data
随机推荐
2020 ICPC Shanghai Site G
(十二) findContours函数的hierarchy详解
2021年中国工业互联网安全大赛(福建省选拔赛) 暨首届福建省工业互联网创新大赛
血红素-金纳米颗粒(Heme-AuNP)复合纳米酶|金纳米颗粒核多孔空心碳纳米球壳([email protected])纳米酶
ACM MM 2022 统一归一化:加速Transformer工业部署的归一化方法
Tf铁蛋白颗粒包载顺铂/奥沙利铂/阿霉素/甲氨蝶呤MTX/紫杉醇PTX等药物
(十二)STM32——NVIC中断优先级管理
@Autowired annotation --required a single bean, but 2 were found causes and solutions
测试开发【Mock 平台】08 开发:项目管理(四)编辑功能和Component抽离
【图像分类】2019-MoblieNetV3 ICCV
【图像分类】2018-MobileNetV2
线性结构----链表
Rider调试ASP.NET Core时报thread not gc-safe的解决方法
铁蛋白-AHLL纳米颗粒|人表皮生长因子-铁蛋白重链亚基纳米粒子(EGF-5Cys-FTH1)|铁蛋白颗粒包载氯霉素Chloramphenicol-Ferritin
The evolution history of Go programmers
C 语言 时间函数使用技巧(汇总)
单选点击可取消功能
redis如何查看key的有效期
sklearn 笔记 TSNE
Ferritin particle-loaded raltitrexed/pemetrexed/sulfadesoxine/adamantane (scientific research reagent)