Skip to content

feat(native): add anti-timing attack and DumpArtMethod hook detection#8

Open
ZnDong wants to merge 1 commit into1193776794:mainfrom
ZnDong:add-new-hook-detections
Open

feat(native): add anti-timing attack and DumpArtMethod hook detection#8
ZnDong wants to merge 1 commit into1193776794:mainfrom
ZnDong:add-new-hook-detections

Conversation

@ZnDong
Copy link

@ZnDong ZnDong commented Feb 19, 2026

Detection method derived from a real-world Chinese banking app, which kills the process immediately upon detection.

  • Add DebugDetector::checkInitTimingAttack() to detect debugger breakpoints by measuring initialization elapsed time (>= 2s threshold)

  • Add HookDetector::checkDumpArtMethodHookNative/Syscall() to scan /proc/self/maps for dumpArtMethod symbol and related ART dumping tools (FDex2, DexDump, DexHunter, etc.)

  • Add JNI bindings: captureInitStartTime(), checkInitTimingAttack(), checkDumpArtMethodHookNative(), checkDumpArtMethodHookSyscall()

  • Add Java native declarations in NativeDetector.java

  • Sanitize all comments to remove reverse-engineering source references

- Add DebugDetector::checkInitTimingAttack() to detect debugger breakpoints by measuring initialization elapsed time (>= 2s threshold)

- Add HookDetector::checkDumpArtMethodHookNative/Syscall() to scan /proc/self/maps for dumpArtMethod symbol and related ART dumping tools (FDex2, DexDump, DexHunter, etc.)

- Add JNI bindings: captureInitStartTime(), checkInitTimingAttack(), checkDumpArtMethodHookNative(), checkDumpArtMethodHookSyscall()

- Add Java native declarations in NativeDetector.java

- Sanitize all comments to remove reverse-engineering source references
@secure-code-warrior-for-github

Micro-Learning Topic: Timing attack (Detected by phrase)

Matched on "timing attack"

What is this? (2min video)

This vulnerability manifests when the difference in response times from a given process can expose sensitive information or change the flow of a given process. For example, in a semi-controlled environment (where response times should be even under regular circumstances) this could be used to identify whether or not certain data is present in a given data storage.

Try a challenge in Secure Code Warrior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant