CAPEC-15
Command Delimiters
An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
Abstraction
Standard
Typical severity
High
Likelihood of attack
High
Understand the attack
What is this attack pattern?
Execution flow
How does the attack proceed, step by step?
Explore
Assess Target Runtime Environment
Techniques used
- Port mapping using network connection-based software (e.g., nmap, nessus, etc.)
- Port mapping by exploring the operating system (netstat, sockstat, etc.)
- TCP/IP Fingerprinting
- Induce errors to find informative error messages
Survey the Application
Techniques used
- Spidering web sites for all available links
- Inventory all application inputs
Experiment
Attempt delimiters in inputs
Techniques used
- Inject command delimiters using network packet injection tools (netcat, nemesis, etc.)
- Inject command delimiters using web test frameworks (proxies, TamperData, custom programs, etc.)
- Enter command delimiters directly in input fields.
Exploit
Use malicious command delimiters
Requirements
What does the attack require?
Prerequisites
- Software's input validation or filtering must not detect and block presence of additional malicious command.
Skills required
- Medium: The attacker has to identify injection vector, identify the specific commands, and optionally collect the output, i.e. from an interactive session.
Resources required
- Ability to communicate synchronously or asynchronously with server. Optionally, ability to capture output directly through synchronous communication or other method such as FTP.
Impact
What does a successful attack lead to?
Affected scopes: Confidentiality, Integrity, Availability
Affected scopes: Confidentiality
Defence
How is it prevented and mitigated?
Real world