An adversary exploits web applications that generate web content, such as links in a HTML page, based on unvalidated or improperly validated data submitted by other actors. XSS in HTTP Headers attacks target the HTTP headers which are hidden from most users and may not be validated by web applications.
Description
Attack Execution Flow
Step 1
Explore[Survey the application for public links] Using a browser or an automated tool, an adversary follows all public links on a web site. They record all the entry points (input) that becomes part of generated HTTP header (not only GET/POST/COOKIE, but also Content-Type, etc.)
Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make special note of any links that include parameters used in the HTTP headers.
Look for HTML meta tags that could be injectable
Use a proxy tool to record all links visited during a manual traversal of the web application.
Use a browser to manually explore the website and analyze how it is constructed. Many browsers' plugins are available to facilitate the analysis or automate the discovery.
[Survey the application for public links] Utilizzando un browser o uno strumento automatizzato, un adversary segue tutti i link pubblici di un sito web. Registrano tutti i punti di ingresso (input) che diventano parte dell'header HTTP generato (non solo GET/POST/COOKIE, ma anche Content-Type, ecc.)
Utilizza uno strumento di spidering per seguire e registrare tutti i link e analizzare le pagine web per individuare i punti di ingresso. Prendi nota di eventuali link che includono parametri utilizzati negli header HTTP.
Cerca tag meta HTML che potrebbero essere iniettabili
Utilizza uno strumento proxy per registrare tutti i link visitati durante una navigazione manuale dell'applicazione web.
Usa un browser per esplorare manualmente il sito e analizzare come è strutturato. Sono disponibili numerosi plugin per browser che facilitano l'analisi o automatizzano la scoperta.
Attack Techniques
-
Look for HTML meta tags that could be injectable
-
Use a browser to manually explore the website and analyze how it is constructed. Many browsers' plugins are available to facilitate the analysis or automate the discovery.IT: Cerca tag meta HTML che potrebbero essere suscettibili a injection
-
Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make special note of any links that include parameters used in the HTTP headers.IT: Cerca tag meta HTML che potrebbero essere suscettibili a injection
-
Use a proxy tool to record all links visited during a manual traversal of the web application.IT: Cerca tag meta HTML che potrebbero essere suscettibili a injection
Step 2
Experiment[Probe identified potential entry points for XSS vulnerability]The adversary uses the entry points gathered in the 'Explore' phase as a target list and injects various common script payloads to determine if an entry point actually represents a vulnerability and to characterize the extent to which the vulnerability can be exploited. They record all the responses from the server that include unmodified versions of their script.
The adversary tries also to inject extra-parameter to the HTTP request to see if they are reflected back in the web page or in the HTTP response.
Manually inject various script payloads into each identified entry point using a list of common script injection probes and observe system behavior to determine if script was executed.
Use an automated injection attack tool to inject various script payloads into each identified entry point using a list of common script injection probes and observe system behavior to determine if script was executed.
Use a proxy tool to record results of manual input of XSS probes in known URLs.
Sperimentazione
[Probe identificata potenziali punti di ingresso per vulnerabilità XSS] L'attaccante utilizza i punti di ingresso raccolti nella fase "Explore" come lista di target e inietta vari payload di script comuni per determinare se un punto di ingresso rappresenta effettivamente una vulnerabilità e per caratterizzare l'estensione con cui la vulnerabilità può essere sfruttata. Registrano tutte le risposte dal server che includono versioni non modificate del loro script.
L'attaccante tenta anche di iniettare parametri extra nella richiesta HTTP per verificare se vengono riflessi nella pagina web o nella risposta HTTP.
Inietta manualmente vari payload di script in ogni punto di ingresso identificato utilizzando una lista di probe di iniezione di script comuni e osserva il comportamento del sistema per determinare se lo script è stato eseguito.
Utilizza uno strumento di attacco di iniezione automatizzata per iniettare vari payload di script in ogni punto di ingresso identificato usando una lista di probe di iniezione di script comuni e osserva il comportamento del sistema per determinare se lo script è stato eseguito.
Utilizza uno strumento proxy per registrare i risultati dell'inserimento manuale di probe XSS in URL noti.
Attack Techniques
-
Manually inject various script payloads into each identified entry point using a list of common script injection probes and observe system behavior to determine if script was executed.
-
Use an automated injection attack tool to inject various script payloads into each identified entry point using a list of common script injection probes and observe system behavior to determine if script was executed.IT: Inietta manualmente vari payload di script in ciascun punto di ingresso identificato utilizzando un elenco di probe di injection di script comuni e osserva il comportamento del sistema per determinare se lo script è stato eseguito.
-
Use a proxy tool to record results of manual input of XSS probes in known URLs.IT: Inietta manualmente vari payload di script in ciascun punto di ingresso identificato utilizzando un elenco di probe di injection di script comuni e osserva il comportamento del sistema per determinare se lo script è stato eseguito.
Step 3
Experiment[Craft malicious XSS URL] Once the adversary has determined which parameters are vulnerable to XSS, they will craft a malicious URL containing the XSS exploit. The adversary can have many goals, from stealing session IDs, cookies, credentials, and page content from the victim.
Change a URL parameter which is used in an HTTP header to include a malicious script tag. Because it is in the header it may bypass validation.
Send information gathered from the malicious script to a remote endpoint.
[Creare URL XSS dannoso] Una volta che l'attore malevolo ha determinato quali parametri sono vulnerabili a XSS, creerà un URL dannoso contenente l'exploit XSS. L'attaccante può avere molti obiettivi, come rubare session ID, cookie, credenziali e contenuto della pagina dalla vittima.
Modificare un parametro URL utilizzato in un'intestazione HTTP per includere un tag script dannoso. Poiché si trova nell'intestazione, potrebbe bypassare la validazione.
Inviare le informazioni raccolte dallo script dannoso a un endpoint remoto.
Attack Techniques
-
Change a URL parameter which is used in an HTTP header to include a malicious script tag. Because it is in the header it may bypass validation.
-
Send information gathered from the malicious script to a remote endpoint.IT: Modificare un parametro URL utilizzato in un'intestazione HTTP per includere un tag di script dannoso. Poiché si trova nell'intestazione, potrebbe bypassare le verifiche di validazione.
Step 4
Exploit[Get victim to click URL] In order for the attack to be successful, the victim needs to access the malicious URL.
Send a phishing email to the victim containing the malicious URL. This can be hidden in a hyperlink as to not show the full URL, which might draw suspicion.
Put the malicious URL on a public forum, where many victims might accidentally click the link.
[Indurre la vittima a cliccare sull'URL] Perché l'attacco abbia successo, la vittima deve accedere all'URL dannoso.
Invia un'email di phishing alla vittima contenente l'URL dannoso. Questo può essere nascosto in un collegamento ipertestuale per non mostrare l'URL completo, il che potrebbe suscitare sospetti.
Pubblica l'URL dannoso su un forum pubblico, dove molte vittime potrebbero cliccare accidentalmente sul link.
Attack Techniques
-
Send a phishing email to the victim containing the malicious URL. This can be hidden in a hyperlink as to not show the full URL, which might draw suspicion.
-
Put the malicious URL on a public forum, where many victims might accidentally click the link.IT: Invia un'email di phishing alla vittima contenente l'URL dannoso. Questo può essere nascosto all'interno di un collegamento ipertestuale per non mostrare l'URL completo, che potrebbe destare sospetti.