当前位置:网站首页>第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=getDocCommenteasy_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_ZIPrunning_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')边栏推荐
猜你喜欢

【golang map】 深入了解map内部存储协议

YOLOv3 SPP source analysis

Detailed explanation and use of each module of ansible
[email protected]纳米模拟酶|PtCo合金纳米粒子"/>水溶性合金量子点纳米酶|CuMoS纳米酶|多孔硅基Pt(Au)纳米酶|[email protected]纳米模拟酶|PtCo合金纳米粒子

Date picker component (restrict year to set only displayed months)

(12) findContours function hierarchy explanation

图扑智慧电力可视化大屏,赋能虚拟电厂精准减碳

@Autowired注解 --required a single bean, but 2 were found出现的原因以及解决方法

【图像分类】2018-MobileNetV2

TortoiseSVN小乌龟的使用
随机推荐
测试开发【Mock 平台】08 开发:项目管理(四)编辑功能和Component抽离
C语言写数据库
win7开机有画面进系统黑屏怎么办
The servlet mapping path matching resolution
【ACM】dp专场训练
【图像分类】2018-MobileNetV2
[SemiDrive source code analysis] [MailBox inter-core communication] 52 - DCF Notify implementation principle analysis and code combat
npm‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
[mysql] 深入分析MySQL版本控制MVCC规则
idea插件 协议 。。 公司申请软件用
指针常量和常量指针
ACM MM 2022 统一归一化:加速Transformer工业部署的归一化方法
C 语言 时间函数使用技巧(汇总)
(十)图像数据的序列与反序列化
导入FontForge生成字体
mysql服务器参数设置
MySQL数据库的主从复制部署详解
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
【go】依赖注入
苹果字体查找