CAPECattack pattern
CAPEC-17 Using Malicious Files
Very High
Official page ↗
- Abstraction
- Standard
- Status
- Draft
- Likelihood of attack
- High
- Typical severity
- Very High
- CAPEC version
- 3.9
Description
An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
Execution flow
1. [Explore] [Determine File/Directory Configuration] The adversary looks for misconfigured files or directories on a system that might give executable access to an overly broad group of users.
2. [Experiment] [Upload Malicious Files] If the adversary discovers a directory that has executable permissions, they will attempt to upload a malicious file to execute.
3. [Exploit] [Execute Malicious File] The adversary either executes the uploaded malicious file, or executes an existing file that has been misconfigured to allow executable access to the adversary.
Prerequisites
• System's configuration must allow an attacker to directly access executable files or upload files to execute. This means that any access control system that is supposed to mediate communications between the subject and the object is set incorrectly or assumes a benign environment.
Skills required
• [Low] To identify and execute against an over-privileged system interface
Consequences
• Confidentiality, Integrity, Availability: Execute Unauthorized Commands
• Integrity: Modify Data
• Confidentiality: Read Data
• Confidentiality, Access Control, Authorization: Gain Privileges
Mitigations
• Design: Enforce principle of least privilege
• Design: Run server interfaces with a non-root account and/or utilize chroot jails or other configuration techniques to constrain privileges even if attacker gains some limited access to commands.
• Implementation: Perform testing such as pen-testing and vulnerability scanning to identify directories, programs, and interfaces that grant direct access to executables.
Related
Att&ck technique · MITRE ATT&CK (2)
Can precede · CAPEC (1)
- CAPEC-233 Privilege Escalation attack pattern
Child of · CAPEC (1)
- CAPEC-122 Privilege Abuse attack pattern
Weakness · CWE (7)
- CWE-270 Privilege Context Switching Error weakness
- CWE-272 Least Privilege Violation weakness
- CWE-282 Improper Ownership Management weakness
- CWE-285 Improper Authorization weakness
- CWE-59 Improper Link Resolution Before File Access weakness
- CWE-693 Protection Mechanism Failure weakness
- CWE-732 Incorrect Permission Assignment for Critical Resource weakness
Referenced by CAPEC · can precede (2)
Referenced by CAPEC · child of (6)
- CAPEC-177 Create files with the same name as files protected with a higher classification attack pattern
- CAPEC-263 Force Use of Corrupted Files attack pattern
- CAPEC-562 Modify Shared File attack pattern
- CAPEC-563 Add Malicious File to Shared Webroot attack pattern
- CAPEC-642 Replace Binaries attack pattern
- CAPEC-650 Upload a Web Shell to a Web Server attack pattern
Referenced by CWE · attack pattern (7)
- CWE-270 Privilege Context Switching Error weakness
- CWE-272 Least Privilege Violation weakness
- CWE-282 Improper Ownership Management weakness
- CWE-285 Improper Authorization weakness
- CWE-59 Improper Link Resolution Before File Access weakness
- CWE-693 Protection Mechanism Failure weakness
- CWE-732 Incorrect Permission Assignment for Critical Resource weakness