prettify code

顯示具有 shellcode 標籤的文章。 顯示所有文章
顯示具有 shellcode 標籤的文章。 顯示所有文章

2017年3月21日 星期二

[Write-up] 0ctf 2017 qual - pwn647 pages


Introduction

binary

This is not a normal but very interesting pwn challenge. The target of this chal is to "guess" random 64 bits.

When running binary, it'll fetch 64 random bits from /dev/urandom, and mmap 64 pages according to the following rule:
// bits = random 64 bits
void* base = 0x200000000;
for(int i=0;i<64;i++) {
  mmap(base+(2*i+bits[i]) * 0x1000, 0x1000, ...);
}