Closed mhier closed 1 year ago
Thanks for your enhancement request @mhier. We have created an internal ticket for it and will raise this topic internally. Internal Tracking ID: EXPOSUREAPP-12921
Corona-Warn-App Open Source Team
@mhier
Could you give an example of an error message produced by SafetyNet? What configuration produces this?
From what I understand reading https://github.com/scottyab/rootbeer which CWA uses to flag a root warning, this does not use SafetyNet. Have I misunderstood?
Also in https://github.com/corona-warn-app/cwa-app-android/issues/2552#issuecomment-793560593 @thomasaugsten wrote:
"Without SafetyNet or a reimplementation you are not able to send analytics information in the background this will not result in an error visible for the user. You will receive an error If you try to attend at the RKI survey when you receive a red exposure notification card."
(I assume there was a typo in "baking" and this should be "banking".)
The Datenschutz-Folgenabschätzung für die Corona-Warn-App mentions SafetyNet in 5.6.10.2 Google SafetyNet in the section 5.6.10 Teilnahme an der Datenspende and it is mentioned again under 5.6.11 Einladung zu Befragungen and 5.9.3 Apple/Google
In 8.1.3 Erforderlichkeit it says:
"Die Echtheitsprüfung unter Verwendung der Drittdienste Apple DeviceCheck und Google SafetyNet ist als risikoreduzierende Maßnahme erforderlich. Sie dient dazu, zu verhindern, dass die Ergebnisse der Auswertung der im Rahmen der Datenspende oder bei den Befragungen durch das RKI erhobenen Daten durch massenhaft durch Dritte übermittelte Daten (z.B. im Rahmen konzertierter Angriffe) beeinträchtigt werden."
So according to this description, SafetyNet is only used in the context of optional Data Contribution and Surveys.
Interesting. This raises more questions than it answers:
Could you give an example of an error message produced by SafetyNet? What configuration produces this?
In #4264 you can find a screen shot at the end. I am not getting the error message any more, because my phone now passes SafetyNet checks despite using LineageOS.
From what I understand reading https://github.com/scottyab/rootbeer which CWA uses to flag a root warning, this does not use SafetyNet. Have I misunderstood?
As I said, I am not getting the error message any more since my phone passes SafetyNet - so there must be some connection. Also as mentioned in the closing ticket of #4264 and also observed by myself, the "root warning" also triggers on unrooted phones when just using a custom ROM. Finally, as pointed out by @MikeMcC399, the Datenschutz-Folgenabschätzung directly mentions the use of SafetyNet.
Also in #2552 (comment) @thomasaugsten wrote:
"Without SafetyNet or a reimplementation you are not able to send analytics information in the background this will not result in an error visible for the user. You will receive an error If you try to attend at the RKI survey when you receive a red exposure notification card."
Well, I understand some protection is needed for that case, but it does not have to be SafetyNet, nor does it has to check for "manipulations" of the operating system. Just making sure there is a human associated with the device is perfectly sufficient. Moreover, using SafetyNet for this purpose is not even so much helpful, since it is a quite common method to use a "farm" of phones for spamming etc.
(I assume there was a typo in "baking" and this should be "banking".)
Err, thanks. Corrected.
@mhier
The root information you see is not related to the SafetyNet checks.
Regarding your last point
In my opinion, this is an illegal way to obtain consent by fraud. Please fix this ASAP.
Please, open a new issue for this.
@mhier
The root information you see is not related to the SafetyNet checks.
Yes it is. It is no longer there since my phone passes SafetyNet.
@mhier
Yes it is. It is no longer there since my phone passes SafetyNet.
CWA uses rootbeer for root checks and not SafetyNet. That's also what @MikeMcC399 tried to explain above.
Source for root beer usage are the comments in https://github.com/corona-warn-app/cwa-app-android/issues/4264
There are two forms of safety checks, IIUC:
There are two forms of safety checks:
1. Rootbeer, used to detect if a device is rooted, then the corresponding information box is shown during app start up 2. SafetyNet, used to detect if the app or the device is somehow manipulated, to make donating data harder from manipulated devices/apps
Ok, maybe this is true, maybe not. Clearly the message at app start vanished after tricking SafetyNet checks to pass. In any case, all my points stay valid, maybe just some applying only to one of the two checks.
Ok, maybe this is true, maybe not. Clearly the message at app start vanished after tricking SafetyNet checks to pass.
Probably because making the changes to trick SafetyNet also tricks Rootbeer :D
In any case, all my points stay valid, maybe just some applying only to one of the two checks.
Agreed, this issue is fine to stay open!
I have updated the first comment to take into account that there are multiple checks...
Well, if these are two separate checks, the Rootbeer-based check upon app start is even more questionable. It does not only proliferate the false claim that root permissions granted to the device owner pose a security risk, also there are false positives in the sense that non-rooted custom ROMs will show the same "security note". Apart from the custom ROM effect (which doesn't seem to be intentional given the content of the message), this message simply "warns" the device owner about the device owner having root privileges on his device. Sounds a bit ridiculous, doesn't it? ;-) (Please let me know if I am missing some point here - I was w.r.t. data donation / surveys, but so far I didn't find any indication I missed a point about the startup message.)
@mhier
I suggest you review this request and decide whether you want to make it applicable to both RootBeer and SafetyNet checks as the use-cases for the two different checks are different. The request started out as a SafetyNet request and now the title is "Do not perform SafetyNet/Rootbeer/etc. checks".
Also @larswmh would need to check the Internal Tracking ID: EXPOSUREAPP-12921 to see if it is aligned with your new scope.
The SafetyNet issue is covered also in https://github.com/corona-warn-app/cwa-wishlist/issues/356, which covers the problem that it is a proprietary implementation. It may be better to add your comments there or even to open a separate enhancement request to remove SafetyNet checks.
For RootBeer there was already a lot of discussion and there was a related response from @dsarkar in https://github.com/corona-warn-app/cwa-app-android/issues/4264#issuecomment-979199666. It seems clear that users who see the "Security Note" don't like it and think that it is unnecessary. The app publisher (RKI) on the other hand feels they have the duty to protect users and to warn them. So there is disagreement here between some users and the publisher.
The main point of this ticket was actually the RootBeer test, which I falsely thought to be a SafetyNet check. I will hence reduce the ticket description to that aspect only. Sorry about the confusion (which is actually caused by misleading messages from the app!).
The app publisher (RKI) on the other hand feels they have the duty to protect users and to warn them. So there is disagreement here between some users and the publisher.
This is not about opinions. "Warning" the device owner about him having root privileges does NOT protect any user. This is a clear and obvious fact, and I think you agree with me. The RKI obviously is influenced by "alternative facts" spread by device manufacturers etc. to motivate people to buy new hardware instead of upgrading their operating system. Someone needs to stand up against the decision makers and tell them.
So to summarize, the Internal Tracking ID: EXPOSUREAPP-12921 should now reflect the changed details of this enhancement request which is to remove the RootBeer check so that the message found in the screenshot section https://www.coronawarn.app/en/screenshots/#android_security_note is never displayed.
Currently this message may be output after app installation, reset or update to a new version. It can be suppressed in version 2.16 and later until the next app update. See https://www.coronawarn.app/en/faq/results/#root_detection_android.
Let me also summarise the arguments a bit more concise:
As a consequence, RootBeer does not do the intended job. There may be no way to achieve this protection, but this is not an argument to use a tool which does not achieve the goal, especially not if it has negative side effects (see ticket description).
CCTG has replaced the root check at launch with a card that can be dismissed permanently, as a heads-up rather than a warning:
(Also, the data donation features are removed due to the SafteyNet requirements.)
Well, at least now everyone who understands what "root access" means will now understand the pointlessness of this check. The message essentially says "you can access your own sensitive personal information without limits" - congratulations, this is what I would expect from a device I am actually owning.
I still think no such check should be performed at all. I guess this is a lost cause. You may close this ticket. Thank you very much so far for the support (no irony intended, I know there are certain... constraints)!
@mhier
The screenshot which @fynngodau kindly posted is for the community developed Corona Contact Tracing Germany - CCTG app which is derived from the official Corona-Warn-App (CWA) published by the Robert Koch Institute.
There hasn't been any change to the logic or message for CWA.
You may close this ticket.
If you like to close this ticket, you should be able to find the self-service button "Close issue" at the bottom of this thread.
Ah sorry, I didn't get the acronym...
I do not consider this issue solved one way or the other, until any root check has been removed from this app. Still, I think this is a lost cause since I guess this change won't happen. In that case a developer/maintainer might want to close this ticket as "won't fix" or so...
@mhier we would like to keep this issue open as there was no feedback on the ticket yet. This does not necessarily mean it is a won't fix
Corona-Warn-App Open Source Team
this ticket relies on the assumption that the app could be useful on rooted phones, which is not true anymore currently, see https://github.com/corona-warn-app/cwa-app-android/issues/5884
@r00t-
this ticket relies on the assumption that the app could be useful on rooted phones, which is not true anymore currently
The FAQ [Google/Android]: Can I use the app on a rooted device? says:
" ... the app is not officially supported on rooted devices.
Since version 3.0 users of the Corona-Warn-App can warn others without a TAN. This will not work if you have rooted your device, as the SafetyNet check the app performs when attempting to warn others without a TAN fails.
Currently, unlocking the bootloader or similar modifications (such as installing microG) will cause the optional data donation and survey features to fail without an indication in the app. The reason for this is that these features require an integrity check via SafetyNet."
The storage of certificates is not affected. Much of the other functionality is in any case planned to be disabled during the ramp-down phase to "end-of-life" due to legal testing changes and political decisions.
quoting your comment from #5884 :
https://www.coronawarn.app/en/faq/results/#root_detection_android, does not mention the restriction that a rooted device cannot be used to Warn without TAN.
imho the ability to warn other users is the primary feature of the app, if that feature were to be removed at any time, the app could just be disabled completely.
Not planned
I removed the app from my phone.
Avoid duplicates
Current Implementation
As discussed in #4264, the app is performing RootBeer checks to detect rooted devices and display potentially confusing messages on both rooted devices and non-rooted devices with a custom ROM.
Suggested Enhancement
Remove all those checks and do not display any such message.
Expected Benefits
The check and the display of the message is based on false assumptions about security. Many Android devices have a very limited time of support (2 years from release, i.e. often a lot less after purchase). Updating these devices with a custom ROM actually increases the security of the device. Still the RootBeer check fails on those devices - unless even more hacking is done to make the device pass again. Also for rooted devices, the security is not reduced, since "rooting" gives the owner of the device more control over her/his device, and not some malicious third party.
On the other hand, running the app on a stock, non-rooted Android 6.0 (which will pass the RootBeer checks by intent) definitively poses a thread to security, since many unpacked security issues exist on such old devices.
Finally, the device owner anyway will know about her/his device being rooted resp. running a custom ROM. If a device would truly be compromised by someone who maliciously roots a device without the owner knowing, he can also hack the RootBeer check to pass again, so this warning does not even reliably help in this case. (Plus the device owner would in that case likely not even know what to do and just click the warning away, since it does not offer any guidance for people who are not aware of these technical details.)
The display of such messages is problematic for two reasons:
The RootBeer checks seem to be influenced by false information spread by device manufacturers and the maker of Android about device rooting and installation of Custom ROMs being dangerous (cf. also the SafetyNet framework, which at least has some legit cause to protect DRM content). Also it is clear that manufacturers have an interest that users are hindered from updating their devices on their own and instead are buying new devices, especially since custom ROMs usually bring also new features. It is very convenient if sensitive apps like the corona warn app or some banking apps query some "device integrity" status and either display a warning or even completely stop functioning, since this proliferates the myth that such checks would be in the interest of the device owner (while the opposite is actually true - even protecting DRM content is not in the interest of the device owner but of the copyright holder of the content).
Since this is a publicly funded app, it should not commit to this strategy. In the end, allowing device owners to update their devices with custom ROMs even helps the environment, because devices can be used longer. It is bad enough that e.g. certain banking apps will be unusable due to the same issue (again, there is nothing unsecure about using a banking app on a rooted and/or custom ROM'd device) - luckily not all banks believe in these false security claims. This app should be a positive example.
In case I still haven't convinced you about security concerns: Would you consider it insecure to store the PDF of a vaccination certificate on a Windows PC? Probably not. In many German states it was even necessary to download the certificate through a website, which most people are likely doing on their PCs. It is quite normal to have Administrator rights on PCs and similar devices, hence it should be normal to have root access to Android devices, too.
Internal Tracking ID: EXPOSUREAPP-12921