PCTF题解
misc流量分析还要加深学习,其他方向后面也会有时间就去接触了。
MISC
cancanneed


后面的就是电话
1z_gif

gif分解


U2FsdGVkX1/Jnjw7kjk86/l86VHMyAu3l4UtTWLT/NTnMII6rmLIsitb/RJr0rUt iw0mlEma4zdBD337n+RM+Q==
AES或者3DES加密

key

密文有个空格记得去掉
Cyber_Master

解码

base91

base32

base32
zmx已经出来了

base64
env_forensics

看到了hint.txt和flag.zip

可疑进程cmd.exe

cmdscan扫描
ez_vol

密码提取

还有一半在这里
w3nx1z1去哪儿

查坐标,在厦门,那应该是刚结束的美亚杯

万*朝宗
flag{美亚杯_白瓷观止美术馆}
PyChallenge

逃逸进目录

提示很明显

OvO的礼物

去做异或运算
# coding:utf-8
# @Author:Tummy
def xor_encrypt_decrypt(input_file, output_file, key):
with open(input_file, 'rb') as f:
data = bytearray(f.read())
# 对数据进行抑或操作
for i in range(len(data)):
data[i] ^= key
with open(output_file, 'wb') as f:
f.write(data)
def main():
input_file = r"E:\CTF脚本\0x23.txt" # 输入文件名
encrypted_file = 'E:\CTF脚本\encrypted' # 加密后文件名
decrypted_file = 'E:\CTF脚本\decrypted' # 解密后文件名
key = 0x23 # 可以自定义密钥,范围为0x00到0xFF,文件名提示0x23
# 加密
xor_encrypt_decrypt(input_file, encrypted_file, key)
print(f'文件 {input_file} 已被加密并保存为 {encrypted_file}.')
# 解密
xor_encrypt_decrypt(encrypted_file, decrypted_file, key)
print(f'文件 {encrypted_file} 已被解密并保存为 {decrypted_file}.')
if __name__ == "__main__":
main()
得到文件

查看文件签名,为png

用stegsolve

WEB
Sign In

控制台在空页面打开,然后去看php页面

easyupload

先造一个这样的文件

上传文件,修改filename

REVERSE
文学ida与化学gdb

看不懂,但是打开就有
baby_python

脚本逆向
import base64
# 用户输入:脚本接受用户输入 ( a)
a = input()
b = []
# XOR 运算:它迭代输入中的每个字符,与 0x10(十进制的 16)执行 XOR 运算,并将结果附加到列表 ( b)
for i in a:
b.append(chr(ord(i) ^ 0x10))
#它将列表中的异或字符连接起来以创建一个新字符串 ( b)
b = "".join(b)
# 使用 Base64 对异或字符串进行编码。
encoded_result = base64.b64encode(b.encode('utf-8'))
if bytes.decode(encoded_result) == "dnxxd2tAaWR4X35PIWNPYnVxISEpT3l+ZHVidWNkWX53IWkxMTFt":
print("You are right!!!")
else:
print("nonono, try again.")
源码分析
xor这次比赛考查的比较多
crypto
原神,启动!

原神字符,手动解码

baby_python
# -*- coding: utf-8 -*-
import gmpy2
import time
# 展开为连分数
def continuedFra(x, y):
cF = []
while y:
cF += [x / y]
x, y = y, x % y
return cF
def Simplify(ctnf):
numerator = 0
denominator = 1
for x in ctnf[::-1]:
numerator, denominator = denominator, x * denominator + numerator
return (numerator, denominator)
# 连分数化简
def calculateFrac(x, y):
cF = continuedFra(x, y)
cF = map(Simplify, (cF[0:i] for i in xrange(1, len(cF))))
return cF
# 解韦达定理
def solve_pq(a, b, c):
par = gmpy2.isqrt(b * b - 4 * a * c)
return (-b + par) / (2 * a), (-b - par) / (2 * a)
def wienerAttack(e, n):
for (d, k) in calculateFrac(e, n):
if k == 0: continue
if (e * d - 1) % k != 0: continue
phi = (e * d - 1) / k
p, q = solve_pq(1, n - phi + 1, n)
if p * q == n:
return abs(int(p)), abs(int(q))
print
'not find!'
time.clock()
n = 7014146481864932983614894110831332509103387549853658254259827375677922729485167647372390237238184995025425752119039146186010813040313425917316949832151617
e = 4778503335635619935190878916122172868154385882208731133793725852425155334251003752094703669146172170604574703611006806466807793696614573611672437476381499
c = 2027621276203969349393569990976149581012128863819625391920546398399170289247469537365399608065540439647873909575003230404104801456945714033977361448390603
print('e', e, 'n', n)
p, q = wienerAttack(e, n)
print '[+]Found!'
print ' [-]p =', p
print ' [-]q =', q
print ' [-]n =', p * q
d = gmpy2.invert(e, (p - 1) * (q - 1))
print ' [-]d =', d
print ' [-]m is:' + '{:x}'.format(pow(c, d, n)).decode('hex')
print '\n[!]Timer:', round(time.clock(), 2), 's'
print '[!]All Done!'
python2代码,已知n e c,计算

mobile
find_the_cat

主活动,取证思路
雑魚mobile

dexdump

被折叠的 条评论
为什么被折叠?



