google / android-security-lints

Custom security-focused lint checks for Android development
Apache License 2.0
127 stars 6 forks source link

How to use this tool to detect whether there is an Android-DirtyStream vulnerability #2

Open 0nlyuAarOn opened 4 months ago

0nlyuAarOn commented 4 months ago

Hello, may I ask how to use this tool to detect whether there is an Android-DirtyStream vulnerability, or whether the tool can detect an Android-DirtyStream vulnerability?

iammyr commented 4 months ago

Hi 0nlyuAarOn, the Android-DirtyStream attack leverages one main vulnerability in some Play 3rd-party apps (unverified untrusted input as filename and file path) and a series of "features" that just so happened to play in its favour (the substitution of \<sharedprefefs filename>.bak with \<shareprefs filename> for recovery reasons, the loading of app modules and native libraries). AOSP changes are ongoing to reduce the impact of the latter (features facilitating attacks like this one). Also the following linters are either published or under way to cover this attack: