An adversary utilizes a form of Cross-site Scripting (XSS) where a malicious script is persistently \'stored\' within the data storage of a vulnerable web application as valid input.
Description
Attack Execution Flow
Step 1
Explore[Survey the application for stored user-controllable inputs] Using a browser or an automated tool, an adversary follows all public links and actions on a web site. They record all the links, the forms, the resources accessed and all other potential entry-points for the web application. The adversary is looking for areas where user input is stored, such as user profiles, shopping carts, file managers, forums, blogs, and logs.
Use a spidering tool to follow and record all links and analyze the web pages to find entry points.
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.
[Esamina l'applicazione alla ricerca di input memorizzati controllabili dall'utente] Utilizzando un browser o uno strumento automatizzato, un adversary segue tutti i link pubblici e le azioni su un sito web. Registrano tutti i link, i moduli, le risorse accessate e tutti gli altri potenziali punti di ingresso per l'applicazione web. L'adversary cerca aree in cui sono memorizzati input dell'utente, come profili utente, carrelli della spesa, gestori di file, forum, blog e log.
Utilizza uno strumento di spidering per seguire e registrare tutti i link e analizzare le pagine web per trovare punti di ingresso.
Utilizza uno strumento proxy per registrare tutti i link visitati durante una navigazione manuale dell'applicazione web.
Utilizza un browser per esplorare manualmente il sito e analizzare come è costruito. Sono disponibili molte estensioni per browser che facilitano l'analisi o automatizzano la scoperta.
Attack Techniques
-
Use a spidering tool to follow and record all links and analyze the web pages to find entry points.
-
Use a proxy tool to record all links visited during a manual traversal of the web application.IT: Utilizza uno strumento di spidering per seguire e registrare tutti i link e analizzare le pagine web per individuare punti di ingresso.
-
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: Utilizza uno strumento di spidering per seguire e registrare tutti i link e analizzare le pagine web per individuare punti di ingresso.
Step 2
Experiment[Probe identified potential entry points for stored XSS vulnerability] The adversary uses the entry points gathered in the 'Explore' phase as a target list and injects various common script payloads and special characters to determine if an entry point actually represents a vulnerability and to characterize the extent to which the vulnerability can be exploited.
Use a list of XSS probe strings to submit script in input fields that could be stored by the web application. If possible, the probe strings contain a unique identifier so they can be queried for after submitting to see if they are stored.
Use a list of HTML special characters to submit in input fields that could be stored by the web application and check if they were properly encoded, replaced, or filtered out.
Sperimentazione
[Probe identificata potenziali punti di ingresso per vulnerabilità XSS memorizzata] L'adversary utilizza i punti di ingresso raccolti nella fase "Explore" come lista di obiettivi e inietta vari payload di script comuni e caratteri speciali per determinare se un punto di ingresso rappresenta effettivamente una vulnerabilità e per caratterizzare l'estensione con cui la vulnerabilità può essere sfruttata.
Utilizzare una lista di stringhe di probe XSS per inviare script nei campi di input che potrebbero essere memorizzati dall'applicazione web. Se possibile, le stringhe di probe contengono un identificatore univoco in modo che possano essere interrogate dopo l'invio per verificare se sono state memorizzate.
Utilizzare una lista di caratteri speciali HTML da inviare nei campi di input che potrebbero essere memorizzati dall'applicazione web e verificare se sono stati correttamente codificati, sostituiti o filtrati.
Attack Techniques
-
Use a list of XSS probe strings to submit script in input fields that could be stored by the web application. If possible, the probe strings contain a unique identifier so they can be queried for after submitting to see if they are stored.
-
Use a list of HTML special characters to submit in input fields that could be stored by the web application and check if they were properly encoded, replaced, or filtered out.IT: Utilizza una lista di stringhe di probe XSS per inviare script nei campi di input che potrebbero essere memorizzati dall'applicazione web. Se possibile, le stringhe di probe contengono un identificatore univoco in modo da poterli interrogare successivamente per verificare se sono stati memorizzati.
Step 3
Experiment[Store malicious XSS content] Once the adversary has determined which stored locations are vulnerable to XSS, they will interact with the web application to store the malicious content. The adversary can have many goals, from stealing session IDs, cookies, credentials, and page content from a victim.
Store a malicious script on a page that will execute when viewed by the victim.
Use a tool such as BeEF to store a hook into the web application. This will alert the adversary when the victim has accessed the content and will give the adversary control over the victim's browser, allowing them access to cookies, user screenshot, user clipboard, and more complex XSS attacks.
[Memorizzare contenuto XSS dannoso] Una volta che l'avversario ha determinato quali posizioni memorizzate sono vulnerabili a XSS, interagirà con l'applicazione web per memorizzare il contenuto dannoso. L'avversario può avere molteplici obiettivi, come rubare session ID, cookie, credenziali e contenuti della pagina da una vittima.
Memorizzare uno script dannoso su una pagina che verrà eseguito quando visualizzato dalla vittima.
Utilizzare uno strumento come BeEF per memorizzare un hook nell'applicazione web. Questo avviserà l'avversario quando la vittima ha accessato al contenuto e conferirà all'attaccante il controllo sul browser della vittima, consentendogli di accedere a cookie, screenshot dell'utente, clipboard dell'utente e di eseguire attacchi XSS più complessi.
Attack Techniques
-
Use a tool such as BeEF to store a hook into the web application. This will alert the adversary when the victim has accessed the content and will give the adversary control over the victim's browser, allowing them access to cookies, user screenshot, user clipboard, and more complex XSS attacks.
-
Store a malicious script on a page that will execute when viewed by the victim.IT: Utilizza uno strumento come BeEF per memorizzare un hook all'interno dell'applicazione web. Questo avviserà l'avversario quando la vittima avrà accesso al contenuto e conferirà all'avversario il controllo sul browser della vittima, consentendogli di accedere ai cookie, agli screenshot dell'utente, agli appunti dell'utente e di eseguire attacchi XSS più complessi.
Step 4
Exploit[Get victim to view stored content] In order for the attack to be successful, the victim needs to view the stored malicious content on the webpage.
Send a phishing email to the victim containing a URL that will direct them to the malicious stored content.
Simply wait for a victim to view the content. This is viable in situations where content is posted to a popular public forum.
[Indurre la vittima a visualizzare contenuti memorizzati] Perché l'attacco abbia successo, la vittima deve visualizzare il contenuto malevolo memorizzato sulla pagina web.
Invia un'email di phishing alla vittima contenente un URL che la indirizzerà al contenuto memorizzato malevolo.
Semplicemente attendi che la vittima visualizzi il contenuto. Questo metodo è praticabile in situazioni in cui i contenuti vengono pubblicati su un forum pubblico molto frequentato.
Attack Techniques
-
Send a phishing email to the victim containing a URL that will direct them to the malicious stored content.
-
Simply wait for a victim to view the content. This is viable in situations where content is posted to a popular public forum.IT: Invia un'email di phishing alla vittima contenente un URL che la indirizzerà al contenuto memorizzato dannoso.