An adversary creates a file with scripting content but where the specified MIME type of the file is such that scripting is not expected. The adversary tricks the victim into accessing a URL that responds with the script file. Some browsers will detect that the specified MIME type of the file does not match the actual type of its content and will automatically switch to using an interpreter for the real content type. If the browser does not invoke script filters before doing this, the adversary's script may run on the target unsanitized, possibly revealing the victim's cookies or executing arbitrary script in their browser.
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 areas that allow a user to upload content through an HTTP POST request. This is typically found in blogs or forums.
Use a spidering tool to follow and record all links and analyze the web pages to file upload features
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.
[Indaga sull'applicazione per 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 tutte le aree che consentono a un utente di caricare contenuti tramite una richiesta HTTP POST. Questo si trova tipicamente in blog o forum.
Utilizza uno strumento di spidering per seguire e registrare tutti i link e analizzare le pagine web per le funzionalità di caricamento dei file
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 web e analizzare come è strutturato. Sono disponibili molte estensioni per browser che facilitano l'analisi o automatizzano la scoperta.
Attack Techniques
-
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.
-
Use a spidering tool to follow and record all links and analyze the web pages to file upload featuresIT: Utilizza un browser per esplorare manualmente il sito web e analizzare come è strutturato. Sono disponibili numerosi plugin per browser che facilitano l'analisi o automatizzano la scoperta.
-
Use a proxy tool to record all links visited during a manual traversal of the web application.IT: Utilizza un browser per esplorare manualmente il sito web e analizzare come è strutturato. Sono disponibili numerosi plugin per browser che facilitano l'analisi o automatizzano la scoperta.
Step 2
Experiment[Probe identified potential entry points for MIME type mismatch] The adversary uses the entry points gathered in the 'Explore' phase as a target list and uploads files with scripting content, but whose MIME type is specified as a file type that cannot execute scripting content. If the application only checks the MIME type of the file, it may let the file through, causing the script to be executed by any user who accesses the file.
Upload a script file with a MIME type of text/plain to a forum and then access the uploaded file to see if the script is executed. If possible, the script displays a unique identifier so the adversary knows for certain it was executed when testing.
Sperimentazione
[Probe identificato potenziali punti di ingresso per mismatch del MIME type] L'attore malevolo utilizza i punti di ingresso raccolti nella fase "Explore" come lista di target e carica file con contenuto di scripting, ma il cui MIME type è specificato come un tipo di file che non può eseguire contenuto di scripting. Se l'applicazione verifica solo il MIME type del file, potrebbe consentire il caricamento del file, causando l'esecuzione dello script da parte di qualsiasi utente che accede al file.
Carica un file di script con un MIME type di text/plain su un forum e poi accedi al file caricato per verificare se lo script viene eseguito. Se possibile, lo script visualizza un identificatore unico in modo che l'attore malevolo possa essere certo che sia stato eseguito durante il test.
Attack Techniques
-
Upload a script file with a MIME type of text/plain to a forum and then access the uploaded file to see if the script is executed. If possible, the script displays a unique identifier so the adversary knows for certain it was executed when testing.
Step 3
Experiment[Store malicious XSS content] Once the adversary has determined which file upload locations are vulnerable to MIME type mismatch, they will upload a malicious script disguised as a non scripting file. The adversary can have many goals, from stealing session IDs, cookies, credentials, and page content from a 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’attaccante ha determinato quali posizioni di caricamento file sono vulnerabili a mismatch di MIME type, caricherà uno script dannoso mascherato da un file non scriptabile. L’attaccante può avere molteplici obiettivi, dal sottrarre session ID, cookie, credenziali e contenuti della pagina da una vittima.
Utilizza uno strumento come BeEF per memorizzare un hook nell’applicazione web. Questo avviserà l’attaccante quando la vittima avrà accesso al contenuto e darà 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.
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
-
Simply wait for a victim to view the content. This is viable in situations where content is posted to a popular public forum.
-
Send a phishing email to the victim containing a URL that will direct them to the malicious stored content.IT: Basta attendere che una vittima visualizzi il contenuto. Ciò è fattibile in situazioni in cui il contenuto viene pubblicato su un forum pubblico popolare.
Consequences
Consequence Information
{'impacts': [], 'impacts_translate': [], 'scopes': [], 'scopes_translate': []}