• Stars
    star
    1,669
  • Rank 27,038 (Top 0.6 %)
  • Language
    Java
  • Created over 4 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PoC of fighting against force-stop kill process on Android

Leoric

Leoric 是一个 Android 上的黑科技保活方法的 PoC,它可以对抗在任意 Android 版本上的 force-stop 杀进程。

Leoric 是 Dota 中的英雄"骷髅王",本项目名取自骷髅王的大招「重生」。

Leoric

编译环境

JDK 11 + NDK 19.2.5345600

重现方法

虽然理论上这个方法可以支持任意的 Android 版本,但本 PoC 在 Android 9.0 及 Android 10 上测试过。具体使用方式参见 demo 项目。

实现原理

应对方法

下面是一种简单的方法杀死 Leoric:

ps -A | grep `ps -A | grep me.weishu.leoric | awk '{print $1}' | head -1` | awk '{print $2}' | xargs kill -19 && am force-stop me.weishu.leoric

对于系统有两种思路可以选择:

  1. 加入在 force-stop 期间不允许启动新的进程的逻辑
  2. 修改 force-stop 的杀进程逻辑为:预先收集好所有进程再进行 kill(如有必要还可以先发送 SIGSTOP)

Contact me

Email: [email protected]

郑重声明

本项目仅做学习研究使用,出现任何问题概不负责。另外,本 PoC 离实际投入使用还有很长的路要走,请不要妄想直接接入代码就能得到永生。

之所以公开代码,是为了推动厂商对系统做出改进,提供应对之法;请不要滥用!!

License

Copyright (C) 2015, Mars Kwok

Copyright (C) 2020, weishu

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

MarsDaemon

More Repositories

1

KernelSU

A Kernel based root solution for Android
Kotlin
8,050
star
2

epic

Dynamic java method AOP hook for Android(continution of Dexposed on ART), Supporting 5.0~11
Java
4,322
star
3

FreeReflection

A library that lets you use reflection without any restriction above Android P
C++
2,783
star
4

understand-plugin-framework

demos to help understand plugin framwork
Java
2,613
star
5

markdown-img-upload

markdown图片实用工具
Python
418
star
6

eadb

eBPF Android Debug Bridge
Rust
405
star
7

super-adb

Enhance the adb shell using busybox, supporting vi、grep and awk etc. No need root.
Python
288
star
8

android-native-debug

Debug Android Framework Native Code Tutorial.
C++
143
star
9

DirtyPipeRoot

Using DirtyPipe to gain temporary root access for Android devices.
Java
135
star
10

adb_root

Shell
105
star
11

AnyLauncher

Any Launcher is OK for MIUI!
Java
35
star
12

VirtualAndroid

An Android emulator for Android device
27
star
13

graph-easy-cn

Perl 模块 Graph::Easy 中文文档
HTML
25
star
14

everything-in-python

The python implement of [everything](https://www.voidtools.com/)
25
star
15

ebpf-jnitrace

Trace jni calls with eBPF on Android
24
star
16

art-dex-interpret

Load dex on ART in interpret mode
Java
17
star
17

tiann.github.io

my personal blog
HTML
17
star
18

tiann

14
star
19

docker-build-android-kernel

Build Android kernel with Docker.
8
star
20

KernelSU_website

7
star
21

genshin_launch

原神启动 for KernelSU!
HTML
7
star
22

PtyProcess

PtyProcess for Android
C++
6
star
23

cmi-r-oss

C
4
star
24

repo-mirror

Python
3
star
25

onedrive

HTML
3
star
26

haskell-learning

my way to haskell
Haskell
2
star
27

hehe

2
star
28

arts

2
star
29

SyncService

1
star
30

ideas

inspiration
1
star
31

cross-paste

cross platform copy&paste tool
Python
1
star
32

py-luchchy-go

Py-launchy-Go is a Launchy python plugin that activates open windows from Launchy. It’s a python remake of an old Launchy plugin called Go-Y.
Python
1
star