Sensitive Information in Auto-Generated Screenshots

Sensitive Information in Auto-Generated Screenshots

Description

A screenshot of the current activity is taken when an app goes into background and displayed for aesthetic purposes when the app returns to the foreground. However, this may leak sensitive information.

Impact

- Leak sensitive information.

Recommendation

Be sure to configure the FLAG_SECURE option in the WindowsManager for android apps. For IOS apps include a default background image each time the application is in the background, overriding the current view.

Threat

Attacker with access to the unlocked physical device.

Expected Remediation Time

⌚ 3600 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the src.

Base

  • Attack vector: P
  • Attack complexity: L
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: H
  • Integrity: N
  • Availability: N

Temporal

  • Exploit code maturity: P
  • Remediation level: O
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N/E:P/RL:O/RC:C
  • Score:
    • Base: 4.3
    • Temporal: 3.9
  • Severity:
    • Base: Medium
    • Temporal: Low

Score 4.0

Default score using CVSS 4.0. It may change depending on the context of the src.

Base 4.0

  • Attack vector: P
  • Attack complexity: L
  • Attack Requirements: N
  • Privileges required: L
  • User interaction: P
  • Confidentiality (VC): H
  • Integrity (VI): N
  • Availability (VA): N
  • Confidentiality (SC): N
  • Integrity (SI): N
  • Availability (SA): N

Threat 4.0

  • Exploit maturity: P

Result 4.0

  • Vector string: CVSS:4.0/AV:P/AC:L/AT:N/PR:L/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
  • Score:
    • CVSS-BT: 3.2
  • Severity:
    • CVSS-BT: Low

Compliant code

                getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
          WindowManager.LayoutParams.FLAG_SECURE);
setContentView(R.layout.activity_main);

            
                private var backgroundImage: UIImageView?

func applicationDidEnterBackground(_ application: UIApplication) { let myBanner = UIImageView(image: #imageLiteral(resourceName: "overlayImage")) myBanner.frame = UIScreen.main.bounds backgroundImage = myBanner window?.addSubview(myBanner) }

func applicationWillEnterForeground(_ application: UIApplication) { backgroundImage?.removeFromSuperView() }

Non compliant code



Requirements

Fixes

Free trial message
Free trial
Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.