mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-06-24 04:05:03 +07:00
fix
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
io = process(['./1000levels'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
io = process(['./1000levels'], env={'LD_PRELOAD':'./libc-2.23.so'})
|
||||
|
||||
one_gadget = 0x4526a
|
||||
system_offset = 0x45390
|
||||
|
@ -4,8 +4,8 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./sentosa'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
libc = ELF('libc.so.6')
|
||||
io = process(['./sentosa'], env={'LD_PRELOAD':'./libc-2.23.so'})
|
||||
libc = ELF('libc-2.23.so')
|
||||
|
||||
def start_proj(length, name, price, area, capacity):
|
||||
io.sendlineafter("Exit\n", '1')
|
||||
|
@ -4,9 +4,9 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./gundam'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
io = process(['./gundam'], env={'LD_PRELOAD':'./libc-2.26.so'})
|
||||
#elf = ELF('gundam')
|
||||
libc = ELF('libc.so.6')
|
||||
libc = ELF('libc-2.26.so')
|
||||
|
||||
def build(name):
|
||||
io.sendlineafter("choice : ", '1')
|
||||
|
@ -4,9 +4,9 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./SecretHolder'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
io = process(['./SecretHolder'], env={'LD_PRELOAD':'./libc-2.23.so'})
|
||||
elf = ELF('SecretHolder')
|
||||
libc = ELF('libc.so.6')
|
||||
libc = ELF('libc-2.23.so')
|
||||
|
||||
small_ptr = 0x006020b0
|
||||
big_ptr = 0x006020a0
|
||||
|
@ -4,9 +4,9 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./SleepyHolder'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
io = process(['./SleepyHolder'], env={'LD_PRELOAD':'./libc-2.23.so'})
|
||||
elf = ELF('SleepyHolder')
|
||||
libc = ELF('libc.so.6')
|
||||
libc = ELF('libc-2.23.so')
|
||||
|
||||
small_ptr = 0x006020d0
|
||||
big_ptr = 0x006020c0
|
||||
|
@ -4,8 +4,8 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./houseoforange'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
libc = ELF('libc.so.6')
|
||||
io = process(['./houseoforange'], env={'LD_PRELOAD':'./libc-2.23.so'})
|
||||
libc = ELF('libc-2.23.so')
|
||||
|
||||
def build(size, name):
|
||||
io.sendlineafter("Your choice : ", '1')
|
||||
|
@ -4,8 +4,8 @@ from pwn import *
|
||||
|
||||
#context.log_level = 'debug'
|
||||
|
||||
io = process(['./300'], env={'LD_PRELOAD':'./libc.so.6'})
|
||||
libc = ELF('libc.so.6')
|
||||
io = process(['./300'], env={'LD_PRELOAD':'./libc-2.24.so'})
|
||||
libc = ELF('libc-2.24.so')
|
||||
|
||||
def alloc(idx):
|
||||
io.sendlineafter("free\n", '1')
|
||||
|
BIN
src/writeup/6.1.31_pwn_hitbctf2018_mutepig/libc-2.23.so
Executable file
BIN
src/writeup/6.1.31_pwn_hitbctf2018_mutepig/libc-2.23.so
Executable file
Binary file not shown.
BIN
src/writeup/6.1.31_pwn_hitbctf2018_mutepig/mutepig
Executable file
BIN
src/writeup/6.1.31_pwn_hitbctf2018_mutepig/mutepig
Executable file
Binary file not shown.
@ -2,9 +2,9 @@
|
||||
|
||||
from pwn import *
|
||||
|
||||
io = process(['./freenote'], env={'LD_PRELOAD':'./libc.so.6_1'})
|
||||
io = process(['./freenote'], env={'LD_PRELOAD':'./libc-2.19.so'})
|
||||
elf = ELF('freenote')
|
||||
libc = ELF('libc.so.6_1')
|
||||
libc = ELF('libc-2.19.so')
|
||||
|
||||
def newnote(x):
|
||||
io.recvuntil("Your choice: ")
|
||||
|
@ -1 +1 @@
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:"env LD_PRELOAD=./libc.so_1 ./freenote" &
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:"env LD_PRELOAD=./libc-2.19.so ./freenote" &
|
||||
|
@ -63,7 +63,7 @@ p.recvuntil('Name: ')
|
||||
|
||||
leak = u64(p.recv(6).ljust(8, '\x00'))
|
||||
libc = leak - 0x3c4b78 # 0x3c4b78 = leak - libc
|
||||
system = libc + 0x045390 # $ readelf -s libc.so.6 | grep system@
|
||||
system = libc + 0x045390 # $ readelf -s libc-2.23.so | grep system@
|
||||
|
||||
log.info("leak => 0x%x" % leak)
|
||||
log.info("libc => 0x%x" % libc)
|
||||
|
@ -1 +1 @@
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:"env LD_PRELOAD=./libc.so.6 ./main.elf" &
|
||||
socat tcp4-listen:10001,reuseaddr,fork exec:"env LD_PRELOAD=./libc-2.23.so ./main.elf" &
|
||||
|
Reference in New Issue
Block a user