All Projects → lqiz → KeySoSafe

lqiz / KeySoSafe

Licence: other
将秘钥等放入SO,并添加APK签名判断

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to KeySoSafe

Jxnet
Jxnet is a Java library for capturing and sending custom network packet buffers with no copies. Jxnet wraps a native packet capture library (libpcap/winpcap/npcap) via JNI (Java Native Interface).
Stars: ✭ 26 (+52.94%)
Mutual labels:  jni
sentencepiece-jni
Java JNI wrapper for SentencePiece: unsupervised text tokenizer for Neural Network-based text generation.
Stars: ✭ 26 (+52.94%)
Mutual labels:  jni
gradle-native
The home of anything about Gradle support for natively compiled languages
Stars: ✭ 36 (+111.76%)
Mutual labels:  jni
clojure-rust-graalvm
An example of Clojure program calling a Rust library, all combined into one executable using GraalVM.
Stars: ✭ 113 (+564.71%)
Mutual labels:  jni
java-cpp-example
Example of using C++ classes from Java. Showcases SWIG, JNA and JNI
Stars: ✭ 135 (+694.12%)
Mutual labels:  jni
terra-java
Lua/Terra + Java Native Interface
Stars: ✭ 20 (+17.65%)
Mutual labels:  jni
Easyincrementalupdate
Android差分补丁库,通过native层合并APK,实现增量更新升级,让你更新的APK更小。
Stars: ✭ 233 (+1270.59%)
Mutual labels:  jni
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+1488.24%)
Mutual labels:  jni
ffmpeg4java
FFmpeg4Java provides a JNI wrapper of FFmpeg library
Stars: ✭ 21 (+23.53%)
Mutual labels:  jni
VoiceChange
Android NDK开发
Stars: ✭ 39 (+129.41%)
Mutual labels:  jni
Android
Swift library for Android
Stars: ✭ 48 (+182.35%)
Mutual labels:  jni
monero-java
A Java library for using Monero
Stars: ✭ 76 (+347.06%)
Mutual labels:  jni
gdx-jnigen
jnigen is a small library that can be used with or without libGDX which allows C/C++ code to be written inline with Java source code.
Stars: ✭ 32 (+88.24%)
Mutual labels:  jni
JNI RSA Sign
通过JNI实现验证App签名获取公钥
Stars: ✭ 86 (+405.88%)
Mutual labels:  jni
jcrfsuite
Java interface for CRFsuite: http://www.chokkan.org/software/crfsuite/
Stars: ✭ 44 (+158.82%)
Mutual labels:  jni
Android Disassembler
Disassemble ANY files including .so (NDK, JNI), Windows PE(EXE, DLL, SYS, etc), linux binaries, libraries, and any other files such as pictures, audios, etc(for fun)files on Android. Capstone-based disassembler application on android. 안드로이드 NDK 공유 라이브러리, Windows 바이너리, etc,... 리버싱 앱
Stars: ✭ 250 (+1370.59%)
Mutual labels:  jni
Libbulletjme
A JNI interface to Bullet Physics and V-HACD
Stars: ✭ 55 (+223.53%)
Mutual labels:  jni
jni-bind
JNI Bind is a set of advanced syntactic sugar for writing efficient correct JNI Code in C++17 (and up).
Stars: ✭ 42 (+147.06%)
Mutual labels:  jni
NativeGL demo
此程序使用android native代码实现EGL,并使用SurfaceView作为OpenGL绘图窗口。即可提高图形渲染性能,又可使用java层定义的图形界面
Stars: ✭ 43 (+152.94%)
Mutual labels:  jni
ChangeVoice
NDK语音消息的变声处理
Stars: ✭ 33 (+94.12%)
Mutual labels:  jni

KeySoSafe

本工程使用最简单的 cmake 将秘钥放入SO,通过包名和签名的比对,以防止可以防止so库被其他人二次打包

使用方法

  1. src/main/cpp/native-lib.cpp 里的 const char *app_signature 需要设置为 app 的签名,具体方法见源文件注释。
  2. 当前 sign_sha1_verify 必定返回false,设置后返回true,既验证正确。
  3. 当更改包结构时,要注意 ApiKeyGeneractor 里 keyFromJNI 对应 cpp文件里的 函数名,该函数需要重新生成。

安全说明

以上只是最简单的措施,只是增加了破解代价,并非绝对安全,将秘钥放置客户端自身就无法做到绝对安全。

  1. 通过IDA进行反编译so进行破解。(对应:so加固)
  2. 可以修改了这些java引用路径,欺骗so,让他获取到正确的签名。(对应:apk加固)
  3. IDA动态分析。(对应:反dump和反调试)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].