r/FlutterDev • u/SirionRazzer • Nov 29 '22
Article How to Hack & Protect Flutter Apps — Simple and Actionable Guide (Pt. 1)
I am working on a short guide, "How to Hack & Protect Flutter Apps," aimed at junior and senior devs and reverse engineers who'd like to get acquainted with App protection for Flutter-based apps.
Part 1 (this article) ↓
Disassemble app.
Extract its secrets.
How to Hack & Protect Flutter Apps — Simple and Actionable Guide (Pt. 1/3)
The second and third guide will cover these areas. I may adjust them based on the feedback:
Part 2 (coming soon) ↓
Make a fake clone.
Check every transmitted JSON.
Inject code.
Part 3 (coming soon) ↓
Steal authentication tokens.
and attack the API.
2
u/davidb_ Nov 30 '22
A direct question that I think would make for a good follow up post - how would you go about securing an app’s notification messages? Meaning end to end encryption (not readable by google FCM, other notification services, or anyone but the intended recipient).
Asked another way - how would you hack an app that claims encrypted notifications?
PSK seems a reasonable approach to answer my first question, but your first article here would expose the PSK. Per-user PSK obtained via an authenticated API would be the next approach (ie: oauth token authd api)
Is that the best we could do? Or, is there a more secure alternative solution?
3
u/SirionRazzer Nov 30 '22
You are right about the PSK approach. You may also be interested in Capillary: https://github.com/google/capillary (not available for Flutter).
If you additionally need to guarantee the protection for individual PSK keys, you can use the mobile app and device integrity state control .I don't have much experience with FCM, I will look into it.
1
2
u/davidb_ Nov 30 '22
A final comment - great approach, the article is very engaging. Can you do more to cite sources in future posts? I think your links and explanations are great, but I feel I read an article about flutter/dart aot that covered some of this material using the same tools. If that or additional sources were used, please do cite them - takes nothing away from what you’ve added and provides additional reading.
3
u/SirionRazzer Nov 30 '22
I remember reading that flutter/dart article. Unfortunately, I didn't save it. Speaking of resources, I plan to compile recent articles and other security resources relevant to Flutter security. It should be aligned with OWASP MAS or as a contribution to https://github.com/vaib25vicky/awesome-mobile-security . I aim to popularize security knowledge amongst the Flutter community because it is way behind other platforms. Thank you for your feedback!
1
4
4
2
2
-2
u/Spiritual_Abalone322 Nov 29 '22
Interesting. Do Flutter appa get hacked?
1
5
u/MrRandomBruh Nov 29 '22
There's no safe system which has zero vulnerabilities, it's all about making the system hard to get it hacked.
4
Nov 30 '22
[removed] — view removed comment
6
u/SirionRazzer Nov 30 '22
I have already made a seminar/webinar project for the Flutter conference. It's not publicized since I like to lecture it personally. If there are enough people interested, I will be happy to organize a group lesson in the future.
4
u/iamjulianacosta Nov 29 '22
Hi, great article!
I have a question though. If you are using a BaaS like firebase, do you need to have the same level of care as if you have your own API?