Skip to content

Commit

Permalink
bullshit
Browse files Browse the repository at this point in the history
  • Loading branch information
PsychoTea committed Jan 29, 2019
1 parent 9d2d32e commit 8e91227
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/shared/root.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,22 @@ kern_return_t elevate_to_root()

// save ucred struct
kread(our_ucred + 0x18, original_ucred_struct, 12); // ucred->cr_posix

void *empty_buffer = calloc(12, 1);
kwrite(our_ucred + 0x18, empty_buffer, 12);

kptr_t label = rk64(our_ucred + 0x78);

// wk64(label + 0x08, 0x0); // AMFI slot
wk64(label + 0x10, 0x0); // Sandbox slot

if (getuid() != 0)
{
void *empty_buffer = calloc(12, 1);
kwrite(our_ucred + 0x18, empty_buffer, 12);
// if (getuid() != 0)
// {

setuid(0);

did_require_elevation = true;
}
// }

wk64(ourproc + 0x100, our_ucred);

Expand Down

0 comments on commit 8e91227

Please sign in to comment.