TLSHook-main.zip
180.4 KB
Hook opengl es function call on Android by replacing TLS entry point, compatible with Android 5.x ~ 12.x
Apktool-2.9.3.zip
35.2 MB
Latest Jadx-GUI and apktool (run in pc)
Let's discuss each part of the code that I created:
1. Header Files and Basic Definitions:
2. Data Type Definition:
3. Variabel Global:
This defines the base address and size of the target library to be hooked.
4. Example Hook Function:
5. Example of a Hook with Return Value:
6. Hook use Original Function:
7. Main Thread:
8. Constructor:
#Example deploy lib hook
#java
Download Hook
https://github.com/Qwanwin/Hook-library
Deployment using :
- Aide android
- android studio
Some credit @Qwanwin
#Java #Smali #C++
1. Header Files and Basic Definitions:
#include <various_headers>
// Header files include standard C++ functions, thread handling, memory management, dll
2. Data Type Definition:
#define __int8 char
#define __int16 short
#define __int32 int
#define __int64 long long
// Defines data types for compatibility with the Game Guardian format
3. Variabel Global:
uintptr_t Mylib;
DWORD libMylibBase = 0;
DWORD libMylibAlloc = 0;
unsigned int libMylibSize = 0x48B49;
This defines the base address and size of the target library to be hooked.
4. Example Hook Function:
void* hook_memcpy(char* dest, const char* src, size_t size) {
// This function hooks standard memcpy with additions security check:
// - Checks the calling function // - Validate the buffer size // - Null pointer check
}5. Example of a Hook with Return Value:
__int64 __fastcall sub_588C344(__int64 a1) {
// Simple hook that always returns the value 4
return 4LL;
}6. Hook use Original Function:
int (*osub_B32DE)(int a1, unsigned char *a2, size_t a3);
int hsub_B32DE(int a1, unsigned char *a2, size_t a3) {
// Hook that allows calling the original function // Only process if buffer size is 0x16 or 0x32
}
7. Main Thread:
void * Qwan_thread(void *) {
// Thread waiting for the target library to load // Then apply the defined hooks
}8. Constructor:
__attribute__((constructor)) void mainload() {
// This function is called when the library is loaded // Create a thread to run the hooking process
}#Example deploy lib hook
method static constructor <clinit>()V
.registers 1
.line 1
:try_start_0
const-string v0, "Mylib"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
#java
static {
System.loadLibrary("Mylib");
}Download Hook
https://github.com/Qwanwin/Hook-library
Deployment using :
- Aide android
- android studio
Some credit @Qwanwin
#Java #Smali #C++
🔥2👍1
AntiTemper.cpp
5.3 KB
Ini adalah hasil uji coba. saya membuat antitemper hanya menggunakan C+ yaa.. ,
untuk percobaan selanjutnya saya akan coba membuat seperti :
obfuscation pada kode, anti-debugging,network callback,
native code enc,SSL pinning.
Perjalanan saya masih panjang jadi pantau saja perkembangan nya😊
This is the result of my experiment to make antitemper using only C+, For the next experiment I will try to make something like: code obfuscation, anti-debugging, network callbacks, native code enc, SSL pinning. I still have a long way to go so just keep an eye on the progress😊
Protection:
- Verifikasi integritas memory
- Multiple file integrity checks
- Encrypted signatures
- Random timing intervals
- Violation counter
- SHA-256 hashing
- AES-256 encryption
- Random key generation
- Secure memory cleanup
- Multiple check files
- Timing attack protection
- Violation counter untuk menghindari false positives
- Secure cleanup sebelum Exit Program
- Exception handling
Powered release by @Qwanwin
#CPP
untuk percobaan selanjutnya saya akan coba membuat seperti :
obfuscation pada kode, anti-debugging,network callback,
native code enc,SSL pinning.
Perjalanan saya masih panjang jadi pantau saja perkembangan nya😊
This is the result of my experiment to make antitemper using only C+, For the next experiment I will try to make something like: code obfuscation, anti-debugging, network callbacks, native code enc, SSL pinning. I still have a long way to go so just keep an eye on the progress😊
Protection:
- Verifikasi integritas memory
- Multiple file integrity checks
- Encrypted signatures
- Random timing intervals
- Violation counter
- SHA-256 hashing
- AES-256 encryption
- Random key generation
- Secure memory cleanup
- Multiple check files
- Timing attack protection
- Violation counter untuk menghindari false positives
- Secure cleanup sebelum Exit Program
- Exception handling
Powered release by @Qwanwin
#CPP
🔥7
MainActivity.java
520 B
Make sure you replace "com_yourpackage_YourClass" with the name of your Java package and class
ProtectV2.cpp
5.6 KB
Halo teman" saya kembali lagi 😁
Kali ini membicarakan progress terbaru saya. Ya itu menambahkan anti debugging. Apa saja sih fitur antibugging saya?
Hello friends, I'm back again 😁 This time discussing my latest progress. Yes it adds anti debugging. What are my antibugging features?
1. Pemeriksaan /proc/self/status untuk TracerPid
2. Signal handler untuk menangkap sinyal debugging
3. Random delay untuk mempersulit analisis timing
4. Terminasi program jika terdeteksi debugger
Apa saja sih protect yang ada di anti temper V2?
- Verifikasi integritas memory
- Multiple file integrity checks
- Encrypted signatures
- Random timing intervals
- Violation counter
- SHA-256 hashing
- AES-256 encryption
- Random key
- Timing attack protection
- Violation counter untuk menghindari false positives
- Secure cleanup sebelum Exit Program
- Antibugging
Menambah kan toast untuk anti debugging + java !
Progress selanjut sedang di uji coba ya tunggu saja😘
Powered by @Qwanwin
#CPP #JAVA
Kali ini membicarakan progress terbaru saya. Ya itu menambahkan anti debugging. Apa saja sih fitur antibugging saya?
Hello friends, I'm back again 😁 This time discussing my latest progress. Yes it adds anti debugging. What are my antibugging features?
1. Pemeriksaan /proc/self/status untuk TracerPid
2. Signal handler untuk menangkap sinyal debugging
3. Random delay untuk mempersulit analisis timing
4. Terminasi program jika terdeteksi debugger
Apa saja sih protect yang ada di anti temper V2?
- Verifikasi integritas memory
- Multiple file integrity checks
- Encrypted signatures
- Random timing intervals
- Violation counter
- SHA-256 hashing
- AES-256 encryption
- Random key
- Timing attack protection
- Violation counter untuk menghindari false positives
- Secure cleanup sebelum Exit Program
- Antibugging
Menambah kan toast untuk anti debugging + java !
Progress selanjut sedang di uji coba ya tunggu saja😘
Powered by @Qwanwin
#CPP #JAVA
👍3❤2🔥1
Codex
https://github.com/Qwanwin/Shell-Encryption
Redownload again
Change logs
- Fixed parse not defined
- Optimal code
Change logs
- Fixed parse not defined
- Optimal code
Cara Kerja Proteksi Ijiami:
1. Deklarasi native method
2. Method
Sebelum manggil native method, dia setup dulu:
1. Di method
2. Di
Flow nya:
1.
2. Manggil
3. Native method
4.
Native code inilah yang kemudian melakukan:
1. Loading dex tambahan
2. Modifikasi ClassLoader
3. Injeksi dex ke runtime
Nah terus Native mana yang di panggil?
"Coba cek smal N"
Metode
Jadi tuh ijiami pertama manggil dari method classdex utama
Smali
Nah dari sini bisa muncul
Smali
Ngak perlu ku kasih banyak" nanti kepanjangan.
Terus kenapa kalo dump jadi nop?
Padahal dalam semua kelas smali ijiam ngak ada nop nya
"Jadi tuh dia manggil al() "
Nah all tuh buat load library
fungsi library itu saat mendeteksi dump. Ntah pakek frida atau yang lain dia akan langsung melempar ke dalam class duplikat yang isi nya nop tuh sampe pusing kalian liat
Method nya? Ngak ada. karena untuk detect dia pakek lib.
jadi decrypt library nya pakek IDA atau yang. Jika ingin mempelajari system Ijiami
"Makan tuh kode bejibun di lib😂"
Kenapa ngak di hapus aja bang lib nya? 😂
Mendinh lu cek fungsi lib di atas pahami kata nya!
Dah ya... Gua capek ngetik
by @Qwanwin
1. Deklarasi native method
al():.method public static native al(Ljava/lang/ClassLoader;Landroid/content/pm/ApplicationInfo;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/ClassLoader;
2. Method
instantiateClassLoader() yang manggil native al():# code yang manggil native method
iget-object v0, p0, Ls/h/e/l/l/A;->packageName:Ljava/lang/String;
iget-object v1, p0, Ls/h/e/l/l/A;->orignAppName:Ljava/lang/String;
invoke-static {p1, p2, v0, v1}, Ls/h/e/l/l/N;->al(Ljava/lang/ClassLoader;Landroid/content/pm/ApplicationInfo;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/ClassLoader;
Sebelum manggil native method, dia setup dulu:
1. Di method
ls():iget-object v0, p1, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;
sput-object v0, Ls/h/e/l/l/S;->f:Ljava/lang/String;
2. Di
instantiateClassLoader():invoke-static {}, Ls/h/e/l/l/S;->gST()V
invoke-direct {p0, p2}, Ls/h/e/l/l/A;->ls(Landroid/content/pm/ApplicationInfo;)VFlow nya:
1.
instantiateClassLoader() dipanggil 2. Manggil
ls() buat setup path3. Native method
al() dipanggil buat load dex4.
gST() dan gET() buat tracking stateNative code inilah yang kemudian melakukan:
1. Loading dex tambahan
2. Modifikasi ClassLoader
3. Injeksi dex ke runtime
Nah terus Native mana yang di panggil?
"Coba cek smal N"
Ls/h/e/l/l/N:.method public static native al(Ljava/lang/ClassLoader;Landroid/content/pm/ApplicationInfo;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/ClassLoader;
.end method
Metode
al() dideklarasi apa yang dilakukan oleh metode ini, dalam library native yang dipanggil, libexec.so atau libexecmain.so.Jadi tuh ijiami pertama manggil dari method classdex utama
Smali
iput-boolean v0, p0, Ls/h/e/l/l/A;->supportInstantiateClassLoader:Z
iput-object v1, p0, Ls/h/e/l/l/A;->acf:Landroid/app/AppComponentFactory;
return-void
.end method
Nah dari sini bisa muncul
Smali
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-virtual {v2, v3}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
invoke-virtual {v0}, Landroid/app/LoadedApk;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
.method public declared-synchronized getACF(Ljava/lang/ClassLoader;)Landroid/app/AppComponentFactory;
.registers 4Ngak perlu ku kasih banyak" nanti kepanjangan.
Terus kenapa kalo dump jadi nop?
Padahal dalam semua kelas smali ijiam ngak ada nop nya
"Jadi tuh dia manggil al() "
Nah all tuh buat load library
fungsi library itu saat mendeteksi dump. Ntah pakek frida atau yang lain dia akan langsung melempar ke dalam class duplikat yang isi nya nop tuh sampe pusing kalian liat
Method nya? Ngak ada. karena untuk detect dia pakek lib.
jadi decrypt library nya pakek IDA atau yang. Jika ingin mempelajari system Ijiami
"Makan tuh kode bejibun di lib😂"
Kenapa ngak di hapus aja bang lib nya? 😂
Mendinh lu cek fungsi lib di atas pahami kata nya!
Dah ya... Gua capek ngetik
by @Qwanwin
🔥4👏1
What is the next progress on Lua encryption? you know. this is my favorite programming language😊
🔥2
LuaEncryption[Strong].lua
151.8 KB
Lua Encryption 1.0
Change Logs:
-osfc
-Encrypt String....
-Encrypt String Offset....
-Encrpt AES
-Validasi Input
-Data Obfuscation
Powered tools by @Qwanwin
Change Logs:
-osfc
-Encrypt String....
-Encrypt String Offset....
-Encrpt AES
-Validasi Input
-Data Obfuscation
Powered tools by @Qwanwin
🔥4🗿2👍1