jsherman212 / xnuspy

an iOS kernel function hooking framework for checkra1n'able devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can kernel hook replacement access static global data?

PhD-5 opened this issue · comments

commented
char config_content[2048] = {0};

static (*orig_kernel_method)();
static xxx_kernel_hooker_replace() {
    // read config_content
    // need copyin ?
}

int main() {
    // Do kernel hook
    syscall(SYS_xnuspy_ctl, XNUSPY_INSTALL_HOOK, offset_xxx, xxx_kernel_hooker_replace, &orig_kernel_method);
   
    // write config_content
    // maybe read from file and write info global array variable.
}

Need copyin?