CAPEC-101 Metadata
Likelihood of Attack
High
Typical Severity
High
Overview
Summary
An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
Prerequisites
A web server that supports server side includes and has them enabled User controllable input that can carry include directives to the web server
Execution Flow
Step | Phase | Description | Techniques |
---|---|---|---|
1 | Explore | [Determine applicability] The adversary determines whether server side includes are enabled on the target web server. |
|
2 | Experiment | [Find Injection Point] Look for user controllable input, including HTTP headers, that can carry server side include directives to the web server. |
|
3 | Exploit | [Inject SSI] Using the found injection point, the adversary sends arbitrary code to be inlcuded by the application on the server side. They may then need to view a particular page in order to have the server execute the include directive and run a command or open a file on behalf of the adversary. |
|
Potential Solutions / Mitigations
Set the OPTIONS IncludesNOEXEC in the global access.conf file or local .htaccess (Apache) file to deny SSI execution in directories that do not need them All user controllable input must be appropriately sanitized before use in the application. This includes omitting, or encoding, certain characters or strings that have the potential of being interpreted as part of an SSI directive Server Side Includes must be enabled only if there is a strong business reason to do so. Every additional component enabled on the web server increases the attack surface as well as administrative overhead
Related Weaknesses (CWE)
Related CAPECs
CAPEC ID | Description |
---|---|
CAPEC-253 | The attacker forces an application to load arbitrary code files from a remote location. The attacker could use this to try to load old versions of library files that have known vulnerabilities, to load malicious files that the attacker placed on the remote machine, or to otherwise change the functionality of the targeted application in unexpected ways. |
CAPEC-600 | An adversary tries known username/password combinations against different systems, applications, or services to gain additional authenticated access. Credential Stuffing attacks rely upon the fact that many users leverage the same username/password combination for multiple systems, applications, and services. |
Taxonomy Mappings
Taxonomy: WASC
Entry ID | Entry Name |
---|---|
36 | SSI Injection |
Taxonomy: OWASP Attacks
Entry ID | Entry Name |
---|---|
Link | Server-Side Includes (SSI) Injection |
Stay Ahead of Attack Patterns
Understanding CAPEC patterns helps security professionals anticipate and thwart potential attacks. Leverage these insights to enhance threat modeling, strengthen your software development lifecycle, and train your security teams effectively.