2. WhatisRetroscope?
It’s a tool for recreation of Android app screens from memory
images.
Tool was presented at 25th USENIX security symposium(15
August 2016).
White-hat hackers showed a video of how this tool may be
used.
3. Use-cases
Mobile phones are very involved in real-world crime
investigations.
You have the person, you want evidence of his/her actions.
Such things may turn light on someone’s activity.
It turns out that some secure apps are not that secure:
ISIS uses Telegram secure channels to broadcast some information
Telegram can be Retroscoped
Devs that want to help army can go with this tool
4. Themaindesign
Retroscope works based on that Android drawing logic is
done through single draw() function.
Every View in Android should override this call and draw
using single Canvas API
onDraw() function call should be done very fast to be
able to display robustly with no lags.
Thus, Retroscope is app agnostic - that is not only
Telegram mentioned above is vulnerable but most of apps
7. Somenotes
Memory image should be retrieved not long after device is
taken from the suspected person.
Tool for the extraction can be LiME, Linux memory
extractor.
Entry point to restoring one screen is to find draw()
function in the highest view parent. Then it will be
propagated to the whole view hierarchy.
8. Howtoprotect?
Almost no way to protect yourself.
One way to stop re-execution is to throw an Exception
during onDraw() but that can be fixed after code
analysis.
The way out is that this solution only works on Dalvik VM
and now more and more ART machines are out.
Null out all memory after every draw() - bad but true, or
better after logout.
We usually don’t log out every day.
10. Sources
Retroscope paper for USENIX Symposium -
https://www.usenix.org/system/files/conference/usenixsecu
rity16/sec16_paper_saltaformaggio.pdf
Linux Memory Extractor -
https://github.com/504ensicsLabs/LiME
JIRA ticket Retroscope Android Threat - it’s privacy
information
11. Q&A
1. Market share - який відсоток пристроїв підтримує ART, а не Dalvik. - More than 50%
2. Також наскільки принциповим є це обмеження? Чи не може бути аналогічного засобу відновлення екранів для ART? - Future
work for this tool
3. На тому ж слайді 9 є рекомендація "Null out all memory after every draw() - bad but true". має робити кожен розробник зі своїм
застосунком? Чи це мають робити розробники пристроїв чи Android? - Android design should be reworked
4. Також, якщо це можуть зробити самі розробники застосунків - було б цікаво навести приклад, як саме це робити. - createBitmap()
16MB size all black
5. Чому рекомендовано видаляти всю пам'ять? Адже для коректної роботи методу draw() потрібна вся пам'ять - отже, якщо
видалити якусь частину пам'яті, цього вже має бути достатньо, щоб метод не спрацював? - some info may be lost but it seems
that most other UI info can still be recovered
6. На слайді 6 згадано, що кількість екранів, які відтворює RetroScope, досить обмежена. Наскільки ефективним захистом може бути
часте перемальовування екрану застосунку, наприклад, використання якихось анімацій? - OK, but can create lags and over
complex UI
7. Зі слайдів випливає, що вразливість пов'язана з особливостями реалізації Android UI (метод View.onDraw() і т.д.) Наскільки
вразливими будуть застосунки, написані з використанням NDK, наприклад, на С++? - not investigated
8. Наскільки вразливими будуть застосунки, що використовують певний cross-platform framework на зразок Unity? - the same
vulnerable
9. Наскільки вразливими будуть застосунки на основі WebView, коли весь UI фактично створюється у вигляді веб сторінки, а не
специфічних Android Views? - that might help but it’s not a working solution for most apps