GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: 更新Pro版本4.2.6 新增大量功能 · gstjee/SKRoot-linuxKernelRoot@f588728

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Pro(众测开放中)
    • SKRoot(Pro)功能介绍.txt
    • build
      • SKRootPro_4.2.6.apk
    • sources
      • PermissionManager/app
        • build.gradle
      • testModule
        • kernel_module_kit_test
          • kernel_module_kit_test.cpp
          • test_linux_kernel_offset.h
        • kernel_module_kit/include
          • kernel_offset_file.h
        • module_hide_sh_exec
          • idle_killer.cpp
          • idle_killer.h
          • jni
            • Android.mk
            • Application.mk
            • build_macros.mk
          • module_hide_sh_exec.cpp
          • su_interactive.cpp
          • su_interactive.h
          • webroot
            • index.html
            • main.js
            • request.js
            • style.css
        • 目录清单.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Pro(众测开放中)/SKRoot(Pro)功能介绍.txt‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/SKRoot(Pro)功能介绍.txt
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
支持的特质:
44
一、支持动态的Linux内核模块功能,一个模块跨所有内核运行。(SKRoot内核模块)
55
二、支持热修改Hook内核,最高支持10万个Hook位置,且无性能损耗(不使用kprobe)
6-
三、包含隐藏Bootloader模块
7-
四、包含隐藏目录模块
8-
五、包含Linux内存读写模块
9-
六、可管理授权Root程序
6+
三、可管理授权Root程序
7+
四、包含模块:隐藏Bootloader模块、隐藏目录模块、Linux内存读写模块
108

119
环境特质:
1210
1.不需要Linux内核源码
Collapse file

‎Pro(众测开放中)/build/SKRootPro_4.2.5.apk‎ ‎Pro(众测开放中)/build/SKRootPro_4.2.6.apk‎Pro(众测开放中)/build/SKRootPro_4.2.5.apk renamed to Pro(众测开放中)/build/SKRootPro_4.2.6.apk

Copy file name to clipboard
6.96 MB
Binary file not shown.
Collapse file

‎Pro(众测开放中)/sources/PermissionManager/app/build.gradle‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/sources/PermissionManager/app/build.gradle
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
minSdk 26
1111
targetSdk 31
1212
versionCode 1
13-
versionName "4.2.5"
13+
versionName "4.2.6"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
externalNativeBuild {
Collapse file

‎Pro(众测开放中)/sources/testModule/kernel_module_kit/include/kernel_offset_file.h‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/sources/testModule/kernel_module_kit/include/kernel_offset_file.h
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,18 @@ KModErr get_file_f_inode_offset(uint32_t & offset);
2828
* 返回: OK 表示成功;其它值为错误码
2929
***************************************************************************/
3030
KModErr get_file_f_op_offset(uint32_t & offset);
31+
32+
/***************************************************************************
33+
* 获取 file 结构体中 struct cred *f_cred; 字段的偏移量
34+
* 参数: offset 输出参数,返回 f_cred 字段相对于 file 起始的偏移量(字节)
35+
* 返回: OK 表示成功;其它值为错误码
36+
***************************************************************************/
37+
KModErr get_file_f_cred_offset(uint32_t & offset);
38+
39+
/***************************************************************************
40+
* 获取 file 结构体中 void* private_data; 字段的偏移量
41+
* 参数: offset 输出参数,返回 private_data 字段相对于 file 起始的偏移量(字节)
42+
* 返回: OK 表示成功;其它值为错误码
43+
***************************************************************************/
44+
KModErr get_file_private_data_offset(uint32_t & offset);
3145
}
Collapse file

‎Pro(众测开放中)/sources/testModule/kernel_module_kit_test/kernel_module_kit_test.cpp‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/sources/testModule/kernel_module_kit_test/kernel_module_kit_test.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ KModErr Test_install_kernel_function_after_hook() {
174174
int main(int argc, char *argv[]) {
175175
//TODO: 在此修改你的Root key值。
176176
fake_skroot_module_main("vzXtDKDAltAGxHtMGRZZfVouy90dgNqFsLM6UGeqb6OgH0VX");
177-
178177
// 单元测试:内核模块基础能力
179178
int idx = 1;
180179
TEST(idx++, Test_execute_kernel_asm_func); // 执行shellcode并获取返回值
@@ -227,6 +226,8 @@ int main(int argc, char *argv[]) {
227226
TEST(idx++, Test_get_file_f_path_offset); // 获取 file 结构体中 f_path 字段的偏移量
228227
TEST(idx++, Test_get_file_f_inode_offset); // 获取 file 结构体中 f_inode 字段的偏移量
229228
TEST(idx++, Test_get_file_f_op_offset); // 获取 file 结构体中 f_op 字段的偏移量
229+
TEST(idx++, Test_get_file_f_cred_offset); // 获取 file 结构体中 f_cred 字段的偏移量
230+
TEST(idx++, Test_get_file_private_data_offset); // 获取 file 结构体中 private_data 字段的偏移量
230231
TEST(idx++, Test_get_vm_area_struct_vm_offset); // 获取 vm_area_struct 结构体中 vm 字段的偏移量
231232
TEST(idx++, Test_get_vm_area_struct_vm_flags_offset); // 获取 vm_area_struct 结构体中 vm_flags 字段的偏移量
232233
TEST(idx++, Test_get_vm_area_struct_vm_file_offset); // 获取 vm_area_struct 结构体中 vm_file 字段的偏移量
Collapse file

‎Pro(众测开放中)/sources/testModule/kernel_module_kit_test/test_linux_kernel_offset.h‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/sources/testModule/kernel_module_kit_test/test_linux_kernel_offset.h
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,45 @@ KModErr Test_get_dentry_d_iname_offset() {
125125
}
126126

127127
KModErr Test_get_file_f_path_offset() {
128+
REQUIRE_ROOT_OR_RETURN();
128129
uint32_t offset = 0;
129130
RETURN_IF_ERROR(kernel_module::get_file_f_path_offset(offset));
130131
printf("Output offset: 0x%x\n", offset);
131132
return KModErr::OK;
132133
}
133134

134135
KModErr Test_get_file_f_inode_offset() {
136+
REQUIRE_ROOT_OR_RETURN();
135137
uint32_t offset = 0;
136138
RETURN_IF_ERROR(kernel_module::get_file_f_inode_offset(offset));
137139
printf("Output offset: 0x%x\n", offset);
138140
return KModErr::OK;
139141
}
140142

141143
KModErr Test_get_file_f_op_offset() {
144+
REQUIRE_ROOT_OR_RETURN();
142145
uint32_t offset = 0;
143146
RETURN_IF_ERROR(kernel_module::get_file_f_op_offset(offset));
144147
printf("Output offset: 0x%x\n", offset);
145148
return KModErr::OK;
146149
}
147150

151+
KModErr Test_get_file_f_cred_offset() {
152+
REQUIRE_ROOT_OR_RETURN();
153+
uint32_t offset = 0;
154+
RETURN_IF_ERROR(kernel_module::get_file_f_cred_offset(offset));
155+
printf("Output offset: 0x%x\n", offset);
156+
return KModErr::OK;
157+
}
158+
159+
KModErr Test_get_file_private_data_offset() {
160+
REQUIRE_ROOT_OR_RETURN();
161+
uint32_t offset = 0;
162+
RETURN_IF_ERROR(kernel_module::get_file_private_data_offset(offset));
163+
printf("Output offset: 0x%x\n", offset);
164+
return KModErr::OK;
165+
}
166+
148167
KModErr Test_get_vm_area_struct_vm_offset() {
149168
REQUIRE_ROOT_OR_RETURN();
150169
uint32_t vm_start_offset = 0, vm_end_offset = 0;
Collapse file

‎Pro(众测开放中)/sources/testModule/module_hide_sh_exec/idle_killer.cpp‎

Copy file name to clipboard
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include "idle_killer.h"
2+
3+
static int64_t now_ns() {
4+
using namespace std::chrono;
5+
return duration_cast<nanoseconds>(steady_clock::now().time_since_epoch()).count();
6+
}
7+
static int64_t to_ns(std::chrono::seconds s) {
8+
using namespace std::chrono;
9+
return duration_cast<nanoseconds>(s).count();
10+
}
11+
12+
void IdleKiller::start(std::chrono::seconds timeout, OnTimeout cb) {
13+
m_timeout_ns = to_ns(timeout);
14+
m_on_timeout = std::move(cb);
15+
touch();
16+
bool expected = false;
17+
if (!m_started.compare_exchange_strong(expected, true, std::memory_order_acq_rel)) return;
18+
std::thread([this] {
19+
for (;;) {
20+
const auto last = m_last_activity_ns.load(std::memory_order_acquire);
21+
const auto now = now_ns();
22+
23+
if (last != 0 && (now - last) > m_timeout_ns.load(std::memory_order_acquire)) {
24+
// 先取出回调再执行,避免回调里 _exit 导致奇怪竞态
25+
auto cb = m_on_timeout; // copy
26+
if (cb) cb();
27+
return;
28+
}
29+
std::this_thread::sleep_for(std::chrono::seconds(1));
30+
}
31+
}).detach();
32+
}
33+
void IdleKiller::touch() { m_last_activity_ns.store(now_ns(), std::memory_order_release); }
Collapse file

‎Pro(众测开放中)/sources/testModule/module_hide_sh_exec/idle_killer.h‎

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
#include <atomic>
3+
#include <chrono>
4+
#include <functional>
5+
#include <thread>
6+
#include <utility>
7+
8+
class IdleKiller {
9+
public:
10+
using OnTimeout = std::function<void()>;
11+
void start(std::chrono::seconds timeout, OnTimeout cb);
12+
void touch();
13+
private:
14+
std::atomic<bool> m_started{false};
15+
std::atomic<int64_t> m_last_activity_ns{0};
16+
std::atomic<int64_t> m_timeout_ns{0};
17+
OnTimeout m_on_timeout;
18+
};
Collapse file

‎Pro(众测开放中)/sources/testModule/module_hide_sh_exec/jni/Android.mk‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
LOCAL_MODULE := module_hide_sh_exec
5+
6+
LOCAL_SRC_FILES := ../module_hide_sh_exec.cpp ../su_interactive.cpp ../idle_killer.cpp
7+
8+
KERNEL_MODULE_KIT := $(LOCAL_PATH)/../../kernel_module_kit
9+
LOCAL_C_INCLUDES += $(KERNEL_MODULE_KIT)/include
10+
LOCAL_LDFLAGS += $(KERNEL_MODULE_KIT)/lib/libkernel_module_kit_static.a
11+
12+
include $(LOCAL_PATH)/build_macros.mk
13+
14+
include $(BUILD_SHARED_LIBRARY)
15+
16+
Collapse file

‎Pro(众测开放中)/sources/testModule/module_hide_sh_exec/jni/Application.mk‎

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_ABI := arm64-v8a
2+
APP_STL := c++_static

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.