Data written to device system logs can be accessed through several attack vectors. An attacker who is able to access the charging port may be able to access this data if the user acknowledges the trust relationship. Attackers can also access this data via another app if that app is able to view the device system logs. This vulnerability is common on various OEM devices.
In NowSecure's testing, a probe identifies which log writing methods are observed during static binary analysis.
Business Impact
The app is insecurely storing sensitive data on the device which can lead to unauthorized access to the user's account and data by anyone with access to the device. Reuse of passwords can lead to further compromise of a user's accounts and additional exposure to risk for the organization.
The 3rd party tool Swifty Beaver can help remove logging code. Ensure that any 3rd party tools or libraries meet the organization's development and security standards prior to use. NowSecure's testing can evaluate the 3rd party tools or libraries as a part of our automated app testing processes. https://github.com/SwiftyBeaver/SwiftyBeaver
Finding Description
Password has been found within Apple System Logs.
Data written to device system logs can be accessed through several attack vectors. An attacker who is able to access the charging port may be able to access this data if the user acknowledges the trust relationship. Attackers can also access this data via another app if that app is able to view the device system logs. This vulnerability is common on various OEM devices.
Steps to Reproduce
Examine iOS device logs associated with the app by using Xcode's console log reader. https://developer.apple.com/documentation/os/logging/viewing_log_messages
In NowSecure's testing, a probe identifies which log writing methods are observed during static binary analysis.
Business Impact
The app is insecurely storing sensitive data on the device which can lead to unauthorized access to the user's account and data by anyone with access to the device. Reuse of passwords can lead to further compromise of a user's accounts and additional exposure to risk for the organization.
Remediation Resources
Recommended Fix
Applications in production should not output logging information. If logs must be generated, they should not include sensitive information. More details and code snippets can be found at https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code
The evidence table identifies the logging messages that were observed containing the data specified.
Please note that certain hybrid frameworks may have custom log functionality that needs to be disabled before app compilation.
Code Samples
Bad Code Sample (.swift)
Good Code Sample (.swift)
Additional Guidance
Risk and Regulatory Information
Severity: medium CVSS: 5.5
Application
See more detail in the NowSecure Report