5.4 CVE-2021-41092

Enriched by CISA Local Execution Code Patch
 

Docker CLI is the command line interface for the docker container runtime. A bug was found in the Docker CLI where running `docker login my-private-registry.example.com` with a misconfigured configuration file (typically `~/.docker/config.json`) listing a `credsStore` or `credHelpers` that could not be executed would result in any provided credentials being sent to `registry-1.docker.io` rather than the intended private registry. This bug has been fixed in Docker CLI 20.10.9. Users should update to this version as soon as possible. For users unable to update ensure that any configured credsStore or credHelpers entries in the configuration file reference an installed credential helper that is executable and on the PATH.
https://nvd.nist.gov/vuln/detail/CVE-2021-41092

Categories

CWE-200 : Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Developers may insert sensitive information that they do not believe, or they might forget to remove the sensitive information after it has been processed Separate mistakes or weaknesses could inadvertently make the sensitive information available to an attacker, such as in a detailed error message that can be read by an unauthorized party This term is frequently used in vulnerability advisories to describe a consequence or technical impact, for any vulnerability that has a loss of confidentiality. Often, CWE-200 can be misused to represent the loss of confidentiality, even when the mistake - i.e., the weakness - is not directly related to the mishandling of the information itself, such as an out-of-bounds read that accesses sensitive memory contents; here, the out-of-bounds read is the primary weakness, not the disclosure of the memory. In addition, this phrase is also used frequently in policies and legal documents, but it does not refer to any disclosure of security-relevant information. This is a frequently used term, however the "leak" term has multiple uses within security. In some cases it deals with the accidental exposure of information from a different weakness, but in other cases (such as "memory leak"), this deals with improper tracking of resources, which can lead to exhaustion. As a result, CWE is actively avoiding usage of the "leak" term. Rust library leaks Oauth client details in application debug logs Digital Rights Management (DRM) capability for mobile platform leaks pointer information, simplifying ASLR bypass Enumeration of valid usernames based on inconsistent responses Account number enumeration via inconsistent responses. User enumeration via discrepancies in error messages. Telnet protocol allows servers to obtain sensitive environment information from clients. Script calls phpinfo(), revealing system configuration to web user Product sets a different TTL when a port is being filtered than when it is not being filtered, which allows remote attackers to identify filtered ports by comparing TTLs. Version control system allows remote attackers to determine the existence of arbitrary files and directories via the -X command for an alternate history file, which causes different error messages to be returned. Virtual machine allows malicious web site operators to determine the existence of files on the client by measuring delays in the execution of the getSystemResource method. Product immediately sends an error message when a user does not exist, which allows remote attackers to determine valid usernames via a timing attack. POP3 server reveals a password in an error message after multiple APOP commands are sent. Might be resultant from another weakness. Program reveals password in error message if attacker can trigger certain database errors. Composite: application running with high privileges (CWE-250) allows user to specify a restricted file to process, which generates a parsing error that leaks the contents of the file (CWE-209). Direct request to library file in web application triggers pathname leak in error message. Malformed regexp syntax leads to information exposure in error message. Password exposed in debug information. FTP client with debug option enabled shows password to the screen. Collaboration platform does not clear team emails in a response, allowing leak of email addresses

CWE-522 : Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.) Use an appropriate security mechanism to protect the credentials. Make appropriate use of cryptography to protect the credentials. Use industry standards to protect the credentials (e.g. LDAP, keystore, etc.). A messaging platform serializes all elements of User/Group objects, making private information available to adversaries Initialization file contains credentials that can be decoded using a "simple string transformation" Python-based RPC framework enables pickle functionality by default, allowing clients to unpickle untrusted data. Programmable Logic Controller (PLC) sends sensitive information in plaintext, including passwords and session tokens. Building Controller uses a protocol that transmits authentication credentials in plaintext. Programmable Logic Controller (PLC) sends password in plaintext. Remote Terminal Unit (RTU) uses a driver that relies on a password stored in plaintext. Web app allows remote attackers to change the passwords of arbitrary users without providing the original password, and possibly perform other unauthorized actions. Web application password change utility doesn't check the original password. product authentication succeeds if user-provided MD5 hash matches the hash in its database; this can be subjected to replay attacks. chain: product generates predictable MD5 hashes using a constant value combined with username, allowing authentication bypass.

References


 

AFFECTED (from MITRE)


Vendor Product Versions
docker cli
  • < 20.10.9 [affected]
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

CPE

cpe start end
Configuration 1
cpe:2.3:a:docker:command_line_interface:*:*:*:*:*:*:*:* < 20.10.9
Configuration 2
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*


REMEDIATION


Patch

Url
https://github.com/docker/cli/commit/893e52cf4ba4b048d72e99748e0f86b2767c6c6b
https://github.com/docker/cli/commit/893e52cf4ba4b048d72e99748e0f86b2767c6c6b


EXPLOITS


Exploit-db.com

id description date
No known exploits

POC Github

Url
No known exploits

Other Nist (github, ...)

Url
No known exploits


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
116 Excavation
Medium
13 Subverting Environment Variable Values
Very High
169 Footprinting
Very Low
22 Exploiting Trust in Client
High
224 Fingerprinting
Very Low
285 ICMP Echo Request Ping
Low
287 TCP SYN Scan
Low
290 Enumerate Mail Exchange (MX) Records
Low
291 DNS Zone Transfers
Low
292 Host Discovery
Low
293 Traceroute Route Enumeration
Low
294 ICMP Address Mask Request
Low
295 Timestamp Request
Low
296 ICMP Information Request
Low
297 TCP ACK Ping
Low
298 UDP Ping
Low
299 TCP SYN Ping
Low
300 Port Scanning
Low
301 TCP Connect Scan
Low
302 TCP FIN Scan
Low
303 TCP Xmas Scan
Low
304 TCP Null Scan
Low
305 TCP ACK Scan
Low
306 TCP Window Scan
Low
307 TCP RPC Scan
Low
308 UDP Scan
Low
309 Network Topology Mapping
Low
310 Scanning for Vulnerable Software
Low
312 Active OS Fingerprinting
Low
313 Passive OS Fingerprinting
Low
317 IP ID Sequencing Probe
Low
318 IP 'ID' Echoed Byte-Order Probe
Low
319 IP (DF) 'Don't Fragment Bit' Echoing Probe
Low
320 TCP Timestamp Probe
Low
321 TCP Sequence Number Probe
Low
322 TCP (ISN) Greatest Common Divisor Probe
Low
323 TCP (ISN) Counter Rate Probe
Low
324 TCP (ISN) Sequence Predictability Probe
Low
325 TCP Congestion Control Flag (ECN) Probe
Low
326 TCP Initial Window Size Probe
Low
327 TCP Options Probe
Low
328 TCP 'RST' Flag Checksum Probe
Low
329 ICMP Error Message Quoting Probe
Low
330 ICMP Error Message Echoing Integrity Probe
Low
472 Browser Fingerprinting
Low
497 File Discovery
Very Low
508 Shoulder Surfing
High
573 Process Footprinting
Low
574 Services Footprinting
Low
575 Account Footprinting
Low
576 Group Permission Footprinting
Low
577 Owner Footprinting
Low
59 Session Credential Falsification through Prediction
High
60 Reusing Session IDs (aka Session Replay)
High
616 Establish Rogue Location
Medium
643 Identify Shared Files/Directories on System
Medium
646 Peripheral Footprinting
Medium
651 Eavesdropping
Medium
79 Using Slashes in Alternate Encoding
High
102 Session Sidejacking
High
474 Signature Spoofing by Key Theft
High
50 Password Recovery Exploitation
High
509 Kerberoasting
High
551 Modify Existing Service
555 Remote Services with Stolen Credentials
Very High
560 Use of Known Domain Credentials
High
561 Windows Admin Shares with Stolen Credentials
600 Credential Stuffing
High
644 Use of Captured Hashes (Pass The Hash)
High
645 Use of Captured Tickets (Pass The Ticket)
High
652 Use of Known Kerberos Credentials
High
653 Use of Known Operating System Credentials
High


MITRE


Techniques

id description
T1007 System Service Discovery
T1016 System Network Configuration Discovery
T1018 Remote System Discovery
T1021 Remote Services
T1021.002 Remote Services:SMB/Windows Admin Shares
T1033 System Owner/User Discovery
T1036.005 Masquerading: Match Legitimate Name or Location
T1046 Network Service Scanning
T1049 System Network Connections Discovery
T1057 Process Discovery
T1069 Permission Groups Discovery
T1078 Valid Accounts
T1082 System Information Discovery
T1083 File and Directory Discovery
T1087 Account Discovery
T1110.004 Brute Force:Credential Stuffing
T1111 Multi-Factor Authentication Interception
T1114.002 Email Collection:Remote Email Collection
T1120 Peripheral Device Discovery
T1124 System Time Discovery
T1133 External Remote Services
T1134.001 Access Token Manipulation:Token Impersonation/Theft
T1135 Network Share Discovery
T1217 Browser Bookmark Discovery
T1543 Create or Modify System Process
T1550.002 Use Alternate Authentication Material:Pass The Hash
T1550.003 Use Alternate Authentication Material:Pass The Ticket
T1550.004 Use Alternate Authentication Material:Web Session Cookie
T1552.004 Unsecured Credentials: Private Keys
T1558 Steal or Forge Kerberos Tickets
T1558.003 Steal or Forge Kerberos Tickets:Kerberoasting
T1562.003 Impair Defenses:Impair Command History Logging
T1574.006 Hijack Execution Flow:Dynamic Linker Hijacking
T1574.007 Hijack Execution Flow:Path Interception by PATH Environment Variable
T1590 Gather Victim Network Information
T1592 Gather Victim Host Information
T1595 Active Scanning
T1615 Group Policy Discovery
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

Mitigations

id description
M1018 Limit the accounts that may use remote services. Limit the permissions for accounts that are at higher risk of compromise; for example, configure SSH so users can only run specific programs.
M1026 Deny remote use of local admin credentials to log into systems. Do not allow domain user accounts to be in the local Administrators group multiple systems.
M1022 Use file system access controls to protect folders such as C:WindowsSystem32.
M1030 Ensure proper network segmentation is followed to protect critical servers and devices.
M1017 Applications may send push notifications to verify a login as a form of multi-factor authentication (MFA). Train users to only accept valid push notifications and to report suspicious push notifications.
M1018 Manage the creation, modification, use, and permissions associated to user accounts.
M1018 Proactively reset accounts that are known to be part of breached credentials either immediately, or after detecting bruteforce attempts.
M1017 Remove smart cards when not in use.
M1060 Use secure out-of-band authentication methods to verify the authenticity of critical actions initiated via email, such as password resets, financial transactions, or access requests. For highly sensitive information, utilize out-of-band communication channels instead of relying solely on email. This reduces the risk of sensitive data being collected through compromised email accounts. Set up out-of-band alerts to notify security teams of unusual email activities, such as mass forwarding or large attachments being sent, which could indicate email collection attempts. Create plans for leveraging a secure out-of-band communications channel, rather than an existing in-network email server, in case of a security incident.
M1030 Deny direct remote access to internal systems through the use of network proxies, gateways, and firewalls.
M1018 An adversary must already have administrator level access on the local system to make full use of this technique; be sure to restrict users and accounts to the least privileges they require.
M1028 Enable Windows Group Policy “Do Not Allow Anonymous Enumeration of SAM Accounts and Shares” security setting to limit users who can enumerate network shares.
M1018 Limit privileges of user accounts and groups so that only authorized administrators can interact with system-level process changes and service configurations.
M1018 Do not allow a domain user to be in the local administrator group on multiple systems.
M1018 Do not allow a user to be a local administrator for multiple systems.
M1054 Configure browsers or tasks to regularly delete persistent cookies.
M1022 Ensure permissions are properly set on folders containing sensitive private keys to prevent unintended access. Additionally, on Cisco devices, set the `nonexportable` flag during RSA key pair generation.
M1026 Limit domain admin account permissions to domain controllers and limited servers. Delegate other admin functions to separate accounts. Limit service accounts to minimal required privileges, including membership in privileged groups such as Domain Administrators.
M1026 Limit service accounts to minimal required privileges, including membership in privileged groups such as Domain Administrators.
M1028 Make sure that the <code>HISTCONTROL</code> environment variable is set to “ignoredups” instead of “ignoreboth” or “ignorespace”.
M1028 When System Integrity Protection (SIP) is enabled in macOS, the aforementioned environment variables are ignored when executing protected binaries. Third-party applications can also leverage Apple’s Hardened Runtime, ensuring these environment variables are subject to imposed restrictions. Admins can add restrictions to applications by setting the setuid and/or setgid bits, use entitlements, or have a __RESTRICT segment in the Mach-O binary.
M1022 Ensure that proper permissions and directory access control are set to deny users the ability to write files to the top-level directory <code>C:</code> and system directories, such as <code>C:Windows</code>, to reduce places where malicious files could be placed for execution. Require that all executables be placed in write-protected directories.
M1056 This technique cannot be easily mitigated with preventive controls since it is based on behaviors performed outside of the scope of enterprise defenses and controls. Efforts should focus on minimizing the amount and sensitivity of data available to external parties.
M1056 This technique cannot be easily mitigated with preventive controls since it is based on behaviors performed outside of the scope of enterprise defenses and controls. Efforts should focus on minimizing the amount and sensitivity of data available to external parties.
M1056 This technique cannot be easily mitigated with preventive controls since it is based on behaviors performed outside of the scope of enterprise defenses and controls. Efforts should focus on minimizing the amount and sensitivity of data available to external parties.
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation.