CNSS-Summer2025-Crypto-WriteUp
1fdf028ba9067cdb279b99764cc0607e0af687b03a3226a154eb0053b482cc2bfcf9020d4c4f9f9d595acccce1b66a702d04af0a35c01fe9c6471f72809aed35e24588ad1c8c7cbba734f5a77d08d02be4ca26ecc134ce6db5cf201d1cee3b6654f00652b1740bb24131a04763227ed58f4800ad6f3959d42ecadb2defd47b98b6deaf01d2ce815effe881bc7afdc458443bdf77ec0a228551d6d9c979672023aa10c1094577fccecbc2f4171baf2ad1356aa7adfab9ad1c0abc12a69b66f94f98a47bc8847969083360e969f97a81ce037c6153ed0070563dff086d9d16ead93218238afd84b254071804344852ce197260dbfaefe0942b1 ...
NSSCTF 4th-WriteUp
哦豁,这场化身AI大师,周末上大分
Web
ez_signin
from flask import Flask, request, render_template, jsonifyfrom pymongo import MongoClientimport reapp = Flask(__name__)client = MongoClient("mongodb://localhost:27017/")db = client['aggie_bookstore']books_collection = db['books']def sanitize(input_str: str) -> str: return re.sub(r'[^a-zA-Z0-9\s]', '', input_str)@app.route('/')def index(): return render_template('index.html', books=No ...
熵密杯2025-重庆
很好,属于是来重庆旅游来了,先爆一下战绩,初始谜题做了一个,差点爆零(bushi)
去年还能做两个初始谜题,后面的夺旗闯关还能有点思路,就是不会写而已
今年的夺旗闯关就真不会了,看得懂一点,但具体不知道要干嘛,证书 sm4 sm2 什么的不会啊
Rank: 90+/205,去年好像也是90多,但今年参赛队伍多了不少,难度也难了不少,都没人AK了(),去年四五支队伍AK,我那一列就两三个……
初始谜题1*
# sm4_encrypt.pyimport binasciifrom pyasn1.codec.der.decoder import decodefrom pyasn1.type import univ, namedtypefrom cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modesfrom cryptography.hazmat.backends import default_backendfrom gmssl import sm3, func, sm2from pyasn1.codec ...
vulnhub打靶记录
此文诞生于本人实习期间,属于是摸鱼成果,虽然但是也没打几个靶场,毕竟哪有这么爽的鱼可以摸
只能说vulnhub这边的靶场比较偏向教育性质,适合新手,可能进阶的那些我还没接触()
在某次训练营中,被主办方设计的比较贴近实际的仿真靶场给虐到了,后续应该会投向与HTB等靶场平台继续学习了……
nmap命令参数介绍
待补充
SickOS1.1
网络适配器设置成NAT模式
这里靶机需要登陆
主机发现和端口扫描
ip a获取kali本机的ip,然后扫描该网段的主机存活信息
nmap -sn 192.168.32.0/24
靶机上线前后各扫一次就可以找到靶机ip了
最小速率10000扫描,-p-扫描全部端口
nmap --min-rate 10000 -p- 192.168.32.129
发现22端口的ssh服务开放,3128端口的squid-http服务开放,8080端口的http服务关闭
tcp再扫一下这三个端口,-sT用TCP扫描,-sV查看服务版本,-O查看操作系统版本,-p后面添加端口号
UDP再扫一次,确保不会漏掉攻击面
nmap -sU -p22,3128,8080 192 ...
零散Web题记录
D3CTF2025 - d3model
import kerasfrom flask import Flask, request, jsonifyimport osdef is_valid_model(modelname): try: keras.models.load_model(modelname) except: return False return Trueapp = Flask(__name__)@app.route('/', methods=['GET'])def index(): return open('index.html').read()@app.route('/upload', methods=['POST'])def upload_file(): if 'file' not in request.files: return jsonify({'err ...
ACTF2025
Misc
signin
签到:https://github.com/team-s2/ACTF-2025
ACTF{w3lc0ME2aCtf2O25h@veAn1ceDAY}
Web
not so web 1
Web不够,其他来凑
这题也算是web吧,AES-CBC字节翻转攻击
先随便注册个账号登进去,拿到server code (encoded),解base64即可得到题目源码
import base64import jsonimport timeimport osimport sysimport binasciifrom dataclasses import dataclass, asdictfrom typing import Dict, Tuplefrom secret import KEY, ADMIN_PASSWORDfrom Crypto.Cipher import AESfrom Crypto.Util.Padding import pad, unpadfrom flask import ( Flask, render_template, ...
XYCTF2025-WriteUp
*代表未解决,可能是卡了,也可能是没思路了,简单做个记录,然后跑了,再或者是后续没来得及复现,在此处留个坑,等以后回来填上……
复现网址
Crypto
Division
LamentXU学不明白除法了,能教教我吗?(adwa这个骗人的大坏蛋>_<,这个才是签到啊)
# -*- encoding: utf-8 -*-'''@File : server.py@Time : 2025/03/20 12:25:03@Author : LamentXU '''import random print('----Welcome to my division calc----')print('''menu: [1] Division calc [2] Get flag''')while True: choose = input(': >>> ') ...
Cryptography趣题记录
这里也记录一下,各种比赛零零散散的题目(觉得比较有意思的)
KalmarCTF2025 - basic sums
with open("flag.txt", "rb") as f: flag = f.read()# I found this super cool function on stack overflow \o/ https://stackoverflow.com/questions/2267362/how-to-convert-an-integer-to-a-string-in-any-basedef numberToBase(n, b): if n == 0: return [0] digits = [] while n: digits.append(int(n % b)) n //= b return digits[::-1]assert len(flag) <= 45flag = int.from_bytes(flag, 'big' ...
DiceCTF2025-WriteUp
Web
cookie-recipes-v3
Mmmmmmm…
const express = require('express')const app = express()const cookies = new Map()app.use((req, res, next) => { const cookies = req.headers.cookie const user = cookies?.split('=')?.[1] if (user) { req.user = user } else { const id = Math.random().toString(36).slice(2) res.setHeader('set-cookie', `user=${id}`) req.user = id } next()})app.get('/' ...
NCTF2024-WriteUp
放在最前面,laogong的wp
Web
ez_dash && ez_dash revenge复现
'''Hints: Flag在环境变量中'''from typing import Optionalimport pydashimport bottle__forbidden_path__=['__annotations__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', ...