CAPEC-101
Server Side Include (SSI) Injection
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.
Soyutlama
Detailed
Tipik ciddiyet
High
Saldırı ihtimali
High
Saldırıyı anla
Bu saldırı kalıbı nedir?
Uygulama akışı
Saldırı adım adım nasıl ilerler?
Explore
Determine applicability
Kullanılan teknikler
- Look for popular page file names. The attacker will look for .shtml, .shtm, .asp, .aspx, and other well-known strings in URLs to help determine whether SSI functionality is enabled.
- Fetch .htaccess file. In Apache web server installations, the .htaccess file may enable server side includes in specific locations. In those cases, the .htaccess file lives inside the directory where SSI is enabled, and is theoretically fetchable from the web server. Although most web servers deny fetching the .htaccess file, a misconfigured server will allow it. Thus, an attacker will frequently try it.
Experiment
Find Injection Point
Kullanılan teknikler
- Use a spidering tool to follow and record all links. Make special note of any links that include parameters in the URL.
- Use a proxy tool to record all links visited during a manual traversal of the web application. Make special note of any links that include parameters in the URL. Manual traversal of this type is frequently necessary to identify forms that are GET method forms rather than POST forms.
Exploit
Inject SSI
Gereksinimler
Saldırının gerçekleşmesi için ne gerekir?
Ön koşullar
- A web server that supports server side includes and has them enabled
- User controllable input that can carry include directives to the web server
Gerekli beceri
- Medium: The attacker needs to be aware of SSI technology, determine the nature of injection and be able to craft input that results in the SSI directives being executed.
Gerekli kaynak
- None: No specialized resources are required to execute this type of attack. Determining whether the server supports SSI does not require special tools, and nor does injecting directives that get executed. Spidering tools can make the task of finding and following links easier.
Etki
Başarılı saldırı neye yol açar?
Etkilenen alanlar: Confidentiality
Etkilenen alanlar: Confidentiality, Integrity, Availability
Savunma
Nasıl önlenir ve etkisi azaltılır?
Gerçek dünya