CAPEC-205 - Lifting credential(s)/key material embedded in client distributions (thick or thin)

An attacker examines a target application's code or configuration files to find credential or key material that has been embedded within the application or its files. Many services require authentication with their users for the various purposes including billing, access control or attribution. Some client applications store the user's authentication credentials or keys to accelerate the login process. Some clients may have built-in keys or credentials (in which case the server is authenticating with the client, rather than the user). If the attacker is able to locate where this information is stored, they may be able to retrieve these credentials. The attacker could then use these stolen credentials to impersonate the user or client, respectively, in interactions with the service or use stolen keys to eavesdrop on nominally secure communications between the client and server.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 1
  • Analysis
  • Purposes 2
  • Reconnaissance
  • Exploitation
  • Scopes 7
  • Modify files or directories
  • Integrity
  • Read files or directories
  • Confidentiality
  • Modify application data
  • Integrity
  • Read application data
  • Confidentiality
  • Execute unauthorized code or commands
  • Authorization
  • Gain privileges / assume identity
  • Non-Repudiation
  • Authorization
  • Authentication
  • Accountability
  • Bypass protection mechanism
  • Authorization
  • Access_Control

Low level: To extract sensitive data from configuration files, system registry, local databases, etc.

High level: To reverse engineer an application flow to retrieve credentials

The target application must save keys or credential information. Many applications allow users to store authentication information as an option.

The attacker must be able to reach the target application's code or configuration files. This may require prior access to the machine on which the target application runs. Authentication information is often encoded or encrypted, but this might not require significant attacker resources to compromise.

Step 1 - Identify Target

Attacker identifies client components to extract information from. These may be configuration files, local databases, binary executables, class files, shared libraries (e.g., DLLs), or other machine code..

Tecnique ID: 1 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

Binary file extraction. The attacker extracts binary files from zips, jars, wars, PDFs or other composite formats.

Tecnique ID: 2 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

Package listing. The attacker uses a package manifest provided with the software installer, or the file system itself, to identify component files suitable for attack.

Indicator ID: 1 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

Type: Positive

Proprietary or sensitive data is stored in a location ultimately distributed to end users.

Indicator ID: 2 - Environment(s) env-Web env-ClientServer env-Peer2Peer env-CommProtocol

Type: Inconclusive

No sensitive data seems to be stored in the user's client. The storage could be done after the first authentication or execution of the thick client.

Indicator ID: 3 - Environment(s) env-Web env-ClientServer env-Peer2Peer env-CommProtocol

Type: Negative

Access to binary code is not realistic. For example, in a client-server environment, binary code on the server is presumed to be inscrutable to an attacker unless another vulnerability exposes it.


Security Control ID: 1

Type: Preventative

Obfuscation, anti-debugging, packing can make the observation and reverse engineering more difficult. It is only capable of delaying an attacker, however, not preventing a sufficiently motivated and resourced one.


Outcome ID: 1

Type: Success

The attacker identifies one or more files or data in the software that might store credentials information.



Step 1 - Apply mining techniques

The attacker then uses a variety of techniques, such as monitoring, sniffing, reverse-engineering, cryptanalysis to extract the sensitive information and its associated use by the application..

Tecnique ID: 1 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

API Profiling. The attacker monitors the software's use of registry keys or other storage locations that can contain sensitive information.

Tecnique ID: 2 - Environment(s) env-Local env-Embedded

Execution in debugger. The attacker attaches a debugger to the application to monitor authentication process and retrieve important application steps (reverse algorithms) along system calls, network communication, etc.

Tecnique ID: 3 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

Cryptanalysis. The attacker performs cryptanalysis to identify data in the client component which may be cryptographically significant. (Key material frequently stands out as very high entropy data when compared to other mundane data). Given cryptographically significant data, other analyses are performed (e.g., length, internal structure, etc.) to determine potential algorithms (RSA, ECC, AES, etc.). This process proceeds until the attacker reaches a conclusion about the significance and use of the data.

Indicator ID: 1 - Environment(s) env-Local env-Embedded env-ClientServer env-Peer2Peer

Type: Positive

Sensitive credentials data are used and embedded inside the client-accessible artifacts.


Outcome ID: 1

Type: Success

The attacker extracts credentials related information.



Design: When possible, don't store credentials information on the client side

Implementation: Don't store clear text or obfuscated credential information (or cryptographic keys) on the client side; use strong encryption to store any credentials related information