当前位置:网站首页>第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')
边栏推荐
- The most complete GIS related software in history (CAD, FME, ArcGIS, ArcGISPro)
- 【语义分割】2015-UNet MICCAI
- 睡前故事|用Bitmap与AST做一个配置化时长系统
- 苹果字体查找
- (十二)STM32——NVIC中断优先级管理
- How to submit a PR?【OpenHarmony Growth Plan】【OpenHarmony Open Source Community】
- 深度学习实战教程(一):感知器
- 【图像分类】2017-MobileNetV1 CVPR
- 转铁蛋白修饰蛇床子素长循环脂质体/负载三七皂苷R1的PEG-PLGA纳米粒([email protected] NPs)
- Oracle 的开窗函数使用详解(二)
猜你喜欢
转铁蛋白Tf功能化β-榄香烯-雷公藤红素/紫杉醇PLGA纳米粒/雷公藤甲素脂质体(化学试剂)
Date picker component (restrict year to set only displayed months)
深度学习实战教程(一):感知器
双 TL431 级联振荡器
详叙c中的分支与循环
@Autowired注解 --required a single bean, but 2 were found出现的原因以及解决方法
2019河北省大学生程序设计竞赛部分题题解
姜还是老的辣,看看老战哥的老底儿和严谨劲儿
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
【golang map】 深入了解map内部存储协议
随机推荐
测试开发【Mock 平台】08 开发:项目管理(四)编辑功能和Component抽离
转铁蛋白修饰蛇床子素长循环脂质体/负载三七皂苷R1的PEG-PLGA纳米粒([email protected] NPs)
大小端的理解以及宏定义实现的理解
铁蛋白-AHLL纳米颗粒|人表皮生长因子-铁蛋白重链亚基纳米粒子(EGF-5Cys-FTH1)|铁蛋白颗粒包载氯霉素Chloramphenicol-Ferritin
机器学习模型验证:被低估的重要一环
[SemiDrive source code analysis] [MailBox inter-core communication] 52 - DCF Notify implementation principle analysis and code combat
leetcode 547.省份数量 并查集
多功能纳米酶Ag/PANI|柔性衬底纳米ZnO酶|铑片纳米酶|Ag-Rh合金纳米颗粒纳米酶|铱钌合金/氧化铱仿生纳米酶
实施MES管理系统前,这三个问题要考虑好
这些mysql基础命令、基础知识还记得吗?(面试,学习,复习都可以)一万三千字总结
链表应用----约瑟夫问题
Heme - gold nanoparticles (Heme - AuNP) composite nanometer enzyme | gold nanoparticles nuclear porous hollow carbon nanometer spherical shell (Au @ HCNs) nano enzyme
Ransom Letter Questions and Answers
Pt/CeO2 monatomic nanoparticles enzyme | H - rGO - Pt @ Pd NPs enzyme | carbon nanotube load platinum nanoparticles peptide modified nano enzyme | leukemia antagonism FeOPtPEG composite nano enzyme
转铁蛋白修饰长春新碱-粉防己碱脂质体|转铁蛋白修饰共载紫杉醇和金雀异黄素脂质体(试剂)
(十二)STM32——NVIC中断优先级管理
cordova installation error Command failed: powershell solution
关于 NFT 版权保护的争议
Redis命令手册
“蔚来杯“2022牛客暑期多校训练营7 F