In this pattern the adversary is able to load and execute arbitrary code remotely available from the application. This is usually accomplished through an insecurely configured PHP runtime environment and an improperly sanitized \'include\' or \'require\' call, which the user can then control to point to any web-accessible file. This allows adversaries to hijack the targeted application and force it to execute their own instructions.
Description
Attack Execution Flow
Step 1
Explore[Survey application] Using a browser or an automated tool, an adversary follows all public links on a web site. They record all the links they find.
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.
Use a browser to manually explore the website and analyze how it is constructed. Many browser's plugins are available to facilitate the analysis or automate the URL discovery.
[Applicazione di sondaggio] Utilizzando un browser o uno strumento automatizzato, un adversary segue tutti i link pubblici di un sito web. Registrano tutti i link che trovano.
Utilizza uno strumento di spidering per seguire e registrare tutti i link. Prendi nota speciale di eventuali link che includono parametri nell'URL.
Utilizza uno strumento proxy per registrare tutti i link visitati durante una traversata manuale dell'applicazione web. Prendi nota speciale di eventuali link che includono parametri nell'URL. La traversata manuale di questo tipo è spesso necessaria per identificare moduli che utilizzano il metodo GET anziché POST.
Utilizza un browser per esplorare manualmente il sito web e analizzare come è strutturato. Sono disponibili molti plugin per browser che facilitano l'analisi o automatizzano la scoperta degli URL.
Attack Techniques
-
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.
-
Use a browser to manually explore the website and analyze how it is constructed. Many browser's plugins are available to facilitate the analysis or automate the URL discovery.IT: Utilizza uno strumento proxy per registrare tutti i link visitati durante una navigazione manuale dell'applicazione web. Prendi nota in modo particolare di eventuali link che includono parametri nell'URL. La navigazione manuale di questo tipo è spesso necessaria per identificare moduli che utilizzano il metodo GET anziché POST.
-
Use a spidering tool to follow and record all links. Make special note of any links that include parameters in the URL.IT: Utilizza uno strumento proxy per registrare tutti i link visitati durante una navigazione manuale dell'applicazione web. Prendi nota in modo particolare di eventuali link che includono parametri nell'URL. La navigazione manuale di questo tipo è spesso necessaria per identificare moduli che utilizzano il metodo GET anziché POST.
Step 2
Experiment[Attempt variations on input parameters] The attack variants make use of a remotely available PHP script that generates a uniquely identifiable output when executed on the target application server. Possibly using an automated tool, an adversary requests variations on the inputs they surveyed before. They send parameters that include variations of payloads which include a reference to the remote PHP script. They record all the responses from the server that include the output of the execution of remote PHP script.
Use a list of probe strings to inject in parameters of known URLs. The probe strings are variants of PHP remote file inclusion payloads which include a reference to the adversary controlled remote PHP script.
Use a proxy tool to record results of manual input of remote file inclusion probes in known URLs.
[Provare variazioni sui parametri di input] Le varianti di attacco sfruttano uno script PHP disponibile da remoto che genera un output univocamente identificabile quando eseguito sul server dell'applicazione target. Possibilmente utilizzando uno strumento automatizzato, un adversary richiede variazioni sugli input precedentemente analizzati. Inviando parametri che includono variazioni di payloads con un riferimento allo script PHP remoto. Registrano tutte le risposte dal server che includono l'output dell'esecuzione dello script PHP remoto.
Utilizzare una lista di stringhe di probe da inserire nei parametri di URL noti. Le stringhe di probe sono varianti di payload di inclusione di file remoto PHP che includono un riferimento allo script PHP remoto controllato dall'adversary.
Utilizzare uno strumento proxy per registrare i risultati dell'inserimento manuale di probe di inclusione di file remoto in URL noti.
Attack Techniques
-
Use a list of probe strings to inject in parameters of known URLs. The probe strings are variants of PHP remote file inclusion payloads which include a reference to the adversary controlled remote PHP script.
-
Use a proxy tool to record results of manual input of remote file inclusion probes in known URLs.IT: Utilizzare un elenco di stringhe di probe da inserire nei parametri di URL noti. Le stringhe di probe sono varianti di payload per l'inclusione remota di file PHP che includono un riferimento allo script PHP remoto controllato dall'attaccante.
Step 3
Exploit[Run arbitrary server-side code] As the adversary succeeds in exploiting the vulnerability, they are able to execute server-side code within the application. The malicious code has virtual access to the same resources as the targeted application. Note that the adversary might include shell code in their script and execute commands on the server under the same privileges as the PHP runtime is running with.
Develop malicious PHP script that is injected through vectors identified during the Experiment Phase and executed by the application server to execute a custom PHP script.
[Esecuzione di codice lato server arbitrario] Man mano che l'avversario riesce a sfruttare la vulnerabilità, è in grado di eseguire codice lato server all’interno dell’applicazione. Il codice dannoso ha accesso virtuale alle stesse risorse dell’applicazione target. Si noti che l’avversario potrebbe includere shell code nel proprio script ed eseguire comandi sul server con gli stessi privilegi con cui viene eseguito il runtime PHP.
Sviluppare uno script PHP dannoso che venga iniettato attraverso i vettori identificati durante la Fase di Sperimentazione e eseguito dal server dell’applicazione per eseguire uno script PHP personalizzato.
Attack Techniques
-
Develop malicious PHP script that is injected through vectors identified during the Experiment Phase and executed by the application server to execute a custom PHP script.