• Stars
    star
    1,811
  • Rank 25,646 (Top 0.6 %)
  • Language
    Java
  • Created almost 5 years ago
  • Updated about 1 year 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
10,005
star
2

epic

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

FreeReflection

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

understand-plugin-framework

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

eadb

eBPF Android Debug Bridge
Rust
444
star
6

markdown-img-upload

markdown图片实用工具
Python
417
star
7

super-adb

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

DirtyPipeRoot

Using DirtyPipe to gain temporary root access for Android devices.
Java
239
star
9

adb_root

Shell
155
star
10

android-native-debug

Debug Android Framework Native Code Tutorial.
C++
148
star
11

AnyLauncher

Any Launcher is OK for MIUI!
Java
50
star
12

VirtualAndroid

An Android emulator for Android device
32
star
13

graph-easy-cn

Perl 模块 Graph::Easy 中文文档
HTML
26
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

15
star
19

genshin_launch

原神启动 for KernelSU!
HTML
12
star
20

docker-build-android-kernel

Build Android kernel with Docker.
9
star
21

PtyProcess

PtyProcess for Android
C++
7
star
22

KernelSU_website

7
star
23

repo-mirror

Python
4
star
24

cmi-r-oss

C
4
star
25

hehe

3
star
26

onedrive

HTML
3
star
27

haskell-learning

my way to haskell
Haskell
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