I discovered a malicious backdoor injected into my Android project's build.gradle.kts files. The obfuscated code executes a remote script that:
- Downloads payloads from a Russian domain (
u3unurxyuya7.ru) - Uses base64 encoding and command injection
- Runs in the background during
preBuildtasks
- Malicious code keeps regenerating even after deletion
- Reappears when cloning from GitLab after a full MacBook restore
- Infects
build.gradle.ktsfiles across projects - Persists despite cleaning Gradle caches and resetting environments
- Deleting the code block from
build.gradle.kts - Restoring MacBook from backup
- Cleaning Gradle caches (
~/.gradle/caches/) - Scanning for infected files with grep
- How is this persisting despite system restores?
- Is this a known malware targeting Android developers?
- Could this be in Gradle wrapper or system-level files?
- How to completely remove this from Git history and local machine?
- What are the risks - could this have compromised my machine?
- Using Android Studio with Kotlin DSL
- Project is on GitLab
- Occurs in multiple projects after cloning
- MacBook M1 running latest macOS
Any help identifying the source and complete removal steps would be greatly appreciated!
submitted by /u/Street-Public-4438[link] [comments]