CAPEC-133: Try All Common Switches
An attacker attempts to invoke all common switches and options in the target application for the purpose of discovering weaknesses in the target. For example, in some applications, adding a --debug switch causes debugging information to be displayed, which can sometimes reveal sensitive processing or configuration information to an attacker. This attack differs from other forms of API abuse in that the attacker is indiscriminately attempting to invoke options in the hope that one of them will work rather than specifically targeting a known option. Nonetheless, even if the attacker is familiar with the published options of a targeted application this attack method may still be fruitful as it might discover unpublicized functionality.
Last updated
Overview
CAPEC-133 (Try All Common Switches) is a standard-level attack pattern catalogued by MITRE in the Common Attack Pattern Enumeration and Classification (CAPEC). It describes a recurring method attackers use to exploit software weaknesses.
How the attack works
The phases an attacker typically follows.
- Step 1Explore
[Identify application] Discover an application of interest by exploring service registry listings or by connecting on a known port or some similar means.
- Search via internet for known, published applications that allow option switches.
- Use automated tools to scan known ports to identify applications that might be accessible
- Step 2Explore
[Authenticate to application] Authenticate to the application, if required, in order to explore it.
- Use published credentials to access system.
- Find unpublished credentails to access service.
- Use other attack pattern or weakness to bypass authentication.
- Step 3Experiment
[Try all common switches] Using manual or automated means, attempt to run the application with many different known common switches. Observe the output to see if any switches seemed to put the application in a non production mode that might give more information.
- Manually execute the application with switches such as --debug, --test, --development, --verbose, etc.
- Use automated tools to run the application with common switches and observe the output
- Step 4Exploit
[Use sensitive processing or configuration information] Once extra information is observed from an application through the use of a common switch, this information is used to aid other attacks on the application
- Using application information, formulate an attack on the application
What the attacker needs
Prerequisites
- The attacker must be able to control the options or switches sent to the target.
Resources required
- None: No specialized resources are required to execute this type of attack. The only requirement is the ability to send requests to the target.
How to mitigate it
Defenses that reduce the risk of CAPEC-133.
- Design: Minimize switch and option functionality to only that necessary for correct function of the command.
- Implementation: Remove all debug and testing options from production code.
Frequently asked questions
Common questions about CAPEC-133.
- What is CAPEC-133?
- An attacker attempts to invoke all common switches and options in the target application for the purpose of discovering weaknesses in the target. For example, in some applications, adding a --debug switch causes debugging information to be displayed, which can sometimes reveal sensitive processing or configuration information to an attacker. This attack differs from other forms of API abuse in that the attacker is indiscriminately attempting to invoke options in the hope that one of them will work rather than specifically targeting a known option. Nonetheless, even if the attacker is familiar with the published options of a targeted application this attack method may still be fruitful as it might discover unpublicized functionality.
- How does a Try All Common Switches attack work?
- It typically unfolds over 4 phases. It begins with: [Identify application] Discover an application of interest by exploring service registry listings or by connecting on a known port or some similar means.
- How do you prevent CAPEC-133?
- Design: Minimize switch and option functionality to only that necessary for correct function of the command.
- What weaknesses does CAPEC-133 target?
- CAPEC-133 exploits one CWE weakness: CWE-912 (Hidden Functionality).
- How severe is CAPEC-133?
- MITRE rates CAPEC-133 as Medium severity.
References
Attack-pattern data is sourced from the MITRE CAPEC catalog (v3.9). Weakness associations link to the corresponding CWE entries on RadicalNotion.AI.
Defend against CAPEC-133
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.