Skip to content

Guardsquare/strandhogg-detection

Repository files navigation

Protecting Against StrandHogg

A set of techniques to protect against StrandHogg on Android

Important

Be aware that StrandHogg is old and the techniques demonstrated in this sample application are not necessary in many cases: see the flow chart in the accompanying blog post to see if you need to take action.

What is StrandHogg?

Protecting Against Strandhogg

StrandHogg exploits an oversight in Android’s task management that allows a malicious application to insert a malicious activity at the top of the task stack for a targeted application. In other words, it lets applications impersonate other applications and e.g. steal sensitive information.

Two variants of StrandHogg have been identified. The first variant (v1) involves setting the android:taskAffinity attribute to the task affinity of the targeted application. This is easy to detect, which means that Google Play will reject such applications. The second variant (v2) uses somewhat more complex code to inject the malicious activity, and so is more difficult to detect automatically.

Further details can be found in the accompanying blog post.


✨ Building the application

The application can be built from the command line or within Android Studio:

$ ./gradlew assembleRelease

❓ How to use the application?

The application demonstrates techniques to protect protect against Strandhogg that you can apply to your own application. To get the most out of the example application, the code is best read together with the companion blog post.

These are the components of interest in the application source code:


🤝 Contributing

Contributions, issues and feature requests are welcome. Feel free to check the issues page if you would like to contribute.

📝 License

Copyright (c) 2002-2023 Guardsquare NV. This project is released under the Apache 2 license.

About

A POC for detecting StrandHogg attacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages