Baby_Rudolph (pwnable)
vulnerability
There is Buffer Overflow in vuln function
. It is triggered by calling read
.
And Using get_arm
function, we can get the sh. So it is easy bof. just overwrite retur address to get_arm
.
We need ARM, because the binary is for ARM architecture. So They gave docker. but it didn’t work. I used qemu for constructing analysis environment./usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a57 -m 128 -kernel ./kernel -initrd ./rootfs -nographic -serial mon:stdio -append console=ttyAMA0
exploit
1 | from pwn import * |
Oil_System (pwnable)
vulnerability
It opens the file with the name I entered. and also it uses System
function when it opens the file.
(ex Syste(/home/~~))
When i entered the name, It called check_upper_lower
function. But it only check whether the first character is lowercase or not. It means the name can contain ;
or |
after first character. So we can use command injection
. if i enter the name as A;/bin/sh, can get the sh.
exploit
1 | from pwn import * |