DownUnderCTF2024
打西瓜杯去了,比赛结束才想起了在公告上的这个比赛,直接成赛后补题了
土澳出的题目,比赛网址
https://play.duc.tf/
题目仓库
https://github.com/DownUnderCTF/Challenges_2024_Public
Web
parrot the emu
from flask import Flask, render_template, request, render_template_stringapp = Flask(__name__)@app.route('/', methods=['GET', 'POST'])def vulnerable(): chat_log = [] if request.method == 'POST': user_input = request.form.get('user_input') try: result = render_template_st ...
ctfshow-XGCTF2024
Crypto
奇怪的条形码
hgame2024过来的,一眼就是斜着看生成器生成的图片,从手机充电口往里看就能得到字符串
Y3Rmc2hvd3t4aWd1YmVpX21pc2NfZ3JhbV9oZXJlX2ZsYWd9
ctfshow{xigubei_misc_gram_here_flag}
简单密码
647669776d757e83817372816e707479707c888789757c92788d84838b878d9d
一开始我想的是两位一组,也确实如此,但我考虑到异或算法那边去了,就没做出来
然后赛后就拿到exp了,确实也是根据ctfshow{}这个flag头来下手的,只能说比赛的时候没好好观察分析
cipher = "647669776d757e83817372816e707479707c888789757c92788d84838b878d9d"for i in range(0, len(cipher), 2): print(int(cipher[i:i+2], 16), end=' ...
UIUCTF2024
Crypto
X Marked the Spot
题目
from itertools import cycleflag = b"uiuctf{????????????????????????????????????????}"# len(flag) = 48key = b"????????"# len(key) = 8ct = bytes(x ^ y for x, y in zip(flag, cycle(key)))with open("ct", "wb") as ct_file: ct_file.write(ct)
简单的异或算法
根据uiuctf{}拿到key,因为我们一开始就可以获取到key的前七位,而正好flag的长度为48,所以最后的},可以帮我们确认key的最后一位
from pwn import *with open("ct", 'rb')as cipher: m = cipher. ...
WaniCTF2024
周末了,复习小小暂停一下下,耍一哈CTF()
复习周摸摸鱼,跟虾饺皇的大佬们一起打,拿点贡献度(),下面某些题会存在一些参考成分,有点久没打了,思路有点卡壳了
难一点的GoogleCTF一进去,发现要谷歌账号,直接就下班了
发现比赛平台还开着,比赛地址
https://score.wanictf.org/#/challenge
按难度划分,应该是新生赛(官方标的,还是有一定难度的,可能这就是国外的比赛吧),有兴趣可以去看看
Crypto
beginners_rsa
直接分解n
from Crypto.Util.number import *n = 317903423385943473062528814030345176720578295695512495346444822768171649361480819163749494400347e = 65537enc = 127075137729897107295787718796341877071536678034322988535029776806418266591167534816788125330265p = [995316292 ...
关于CBC字节翻转攻击
CBC,密文分组链接模式,是分组加密工作模式的一种
CBC字节翻转攻击,针对的是CBC Mode,只要分组密码工作在CBC模式下,都适用于字节翻转攻击
CBC Mode如下:
(本来是想拿《图解密码技术》的图的,看了一眼,发现它的解密是错误的)
平时我们需要注意的是加密使用到的初始向量IV,还有密钥key
CBC Mode的加解密的处理都是连续的,并不是并行处理
因此,CBC字节翻转攻击的实现就是基于连续处理这样的特点
每一组密文进行分组算法解密之后,需要和前一组的密文异或才能得到明文
CBC字节翻转攻击的核心原理是通过破坏一个比特的密文来篡改一个比特的明文
假设此时我们已知第n-1组的密文中的某一位的值a,以及第n组的密文的同一位置的值经过解密算法的b,那么第n组该位置上的明文为c=a⊕bc=a\oplus bc=a⊕b
此时,我们通过篡改第n-1组的a为a⊕c⊕xa\oplus c\oplus xa⊕c⊕x,x为我们想要的,那么,解密出来的第n组明文,为a⊕c⊕x⊕b=c⊕c⊕x=0⊕x=xa\oplus c\oplus x\oplus b=c\oplus c\oplus x ...
LitCTF2024
队伍ID:圈圈使徒
Rank:26
学弟想的好名字,我是Qanux的小迷妹,吸溜吸溜
非常好,pwn和re交给了Qanux,牛逼,再给他点时间真要AK了,被压力到了
tql,学弟的Web也要AK啦,差点要回家种田了
真好,我润去打简单题了,先打了misc,呦西,题卡在tj“美照”上了()。然后开始打密码,前面的很基础,然后卡在多项式上了,我们下午省赛开幕式3点才开始打这个新生赛,RSA数太大爆掉了?牛魔,Qanux丢给GPT,然后就出来了
16道密码,牛,进阶题没有时间打了
以下是比赛时加比赛后复现的全方向题解(re还有两题就不管了,反正我是不会的,我就负责Web、Crypto、Misc)
pwn
atm
选项2可以有栈溢出,直接ret2libc
from pwn import *from LibcSearcher import *context(log_level = 'debug', arch = 'amd64', os = 'linux')p=remote("node1.anna.nssctf.cn&quo ...
复现计划——NewStarCTF 2023
五一开肝,上学期太摆烂了,打了两周就打不动了,不打了,这次一定要赢回来,会萤的
Web
week1
泄漏的秘密
查看/robots.txt和/www.zip
Begin of Upload
查看前端代码
function validateForm() { var fileInput = document.getElementById("file"); var file = fileInput.files[0]; var allowedExtensions = ["jpg", "jpeg", "png", "gif"]; var fileExtension = file.name.split('.').pop().toLowerCase(); if (!file) { alert ...
复现计划——DASCTF X GFCTF 2024|四月开启第一局
下一篇NewStarCTF 2023,回到梦的起点
Web
cool_index
查看server.js
import express from "express";import jwt from "jsonwebtoken";import cookieParser from "cookie-parser";import crypto from "crypto";const FLAG = process.env.DASFLAG || "DASCTF{fake_flag}";const app = express();app.use(express.json());app.use(cookieParser());app.use(express.static("static"));app.set("view engine", "ejs");const JWT_SECRET = crypto.randomByt ...
第九届中国海洋大学信息安全竞赛wp
Web
ezPHP
<?phpinclude "flag.php";highlight_file(__FILE__);error_reporting(0);$a = 'O.U.C';$query = $_SERVER['QUERY_STRING'];parse_str($query);if (preg_match('/_|%5f|\.|%2E/i',$query)){ die('听说你是黑客');}echo '你知道b等于什么能绕过这个弱类型吗(〃` 3′〃)'.'<br>';if (md5($a)==md5($_GET['b'])&&$a!=$_GET['b']){ echo "哎呦,不错喔".'<br>'; $O_U_C=$_GET['O_U_C'] ...
XYCTF2024wp
复现网址:gz.原神师范大学.cn
Web全解,好像是Java反序列化全场唯一解?
https://blog.csdn.net/qq_39947980/article/details/138249895
Crypto方向大佬
https://dexterjie.github.io/2024/04/26/赛题复现/2024XYCTF/#Crypto
Web
Web ezmake
题目提示flag在当前目录下,直接读一下flag试试?
url/flag
算是非预期了
去了解一下makefile究竟是怎么读取文件的
https://www.yisu.com/ask/27496422.html
content := $(shell cat flag)
Web ezhttp
robots.txt,得到账号密码
Referer: yuanshen.comUser Agent: XYCTFClient-IP: 127.0.0.1Via: ymzx.qq.comCookie: XYCTF
记一个常用的请求头
X-Forwarded-For:127.0.0.1Client-ip:127.0.0.1 ...