An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply \'riding\' the existing session cookie.
Description
Attack Execution Flow
Step 1
Explore[Explore target website] The attacker first explores the target website to determine pieces of functionality that are of interest to them (e.g. money transfers). The attacker will need a legitimate user account on the target website. It would help to have two accounts.
Use web application debugging tool such as WebScarab, Tamper Data or TamperIE to analyze the information exchanged between the client and the server
Use network sniffing tool such as Wireshark to analyze the information exchanged between the client and the server
View HTML source of web pages that contain links or buttons that perform actions of interest.
[Esplora il sito web di destinazione] L'attaccante esplora inizialmente il sito web di destinazione per determinare le funzionalità di interesse (ad esempio, trasferimenti di denaro). L'attaccante avrà bisogno di un account utente legittimo sul sito web di destinazione. Sarebbe utile disporre di due account.
Utilizza strumenti di debugging delle applicazioni web come WebScarab, Tamper Data o TamperIE per analizzare le informazioni scambiate tra il client e il server
Utilizza strumenti di sniffing di rete come Wireshark per analizzare le informazioni scambiate tra il client e il server
Visualizza il codice HTML delle pagine web che contengono link o pulsanti che eseguono azioni di interesse.
Attack Techniques
-
Use web application debugging tool such as WebScarab, Tamper Data or TamperIE to analyze the information exchanged between the client and the server
-
View HTML source of web pages that contain links or buttons that perform actions of interest.IT: Utilizza strumenti di debug delle applicazioni web come WebScarab, Tamper Data o TamperIE per analizzare le informazioni scambiate tra il client e il server
-
Use network sniffing tool such as Wireshark to analyze the information exchanged between the client and the serverIT: Utilizza strumenti di debug delle applicazioni web come WebScarab, Tamper Data o TamperIE per analizzare le informazioni scambiate tra il client e il server
Step 2
Experiment[Create a link that when clicked on, will execute the interesting functionality.] The attacker needs to create a link that will execute some interesting functionality such as transfer money, change a password, etc.
Create a GET request containing all required parameters (e.g. https://www.somebank.com/members/transfer.asp?to=012345678901&amt=10000)
Create a form that will submit a POST request (e.g. <form method='POST' action='https://www.somebank.com/members/transfer.asp'><input type='hidden' Name='to' value='012345678901'/><input type='hidden' Name='amt' value='10000'/><input type='submit' src='clickhere.jpg'/></form>
[Creare un link che, quando cliccato, esegua la funzionalità interessante.] L'attaccante deve creare un link che esegua alcune funzionalità interessanti come trasferire denaro, cambiare una password, ecc.
Creare una richiesta GET contenente tutti i parametri necessari (ad esempio https://www.somebank.com/members/transfer.asp?to=012345678901&amt=10000)
Creare un modulo che invii una richiesta POST (ad esempio <form method="POST" action="https://www.somebank.com/members/transfer.asp"><input type="hidden" Name="to" value="012345678901"/><input type="hidden" Name="amt" value="10000"/><input type="submit" src="clickhere.jpg"/></form>)
Attack Techniques
-
Create a form that will submit a POST request (e.g. <form method="POST" action="https://www.somebank.com/members/transfer.asp"><input type="hidden" Name="to" value="012345678901"/><input type="hidden" Name="amt" value="10000"/><input type="submit" src="clickhere.jpg"/></form>
-
Create a GET request containing all required parameters (e.g. https://www.somebank.com/members/transfer.asp?to=012345678901&amt=10000)IT: Crea un modulo che invii una richiesta POST (ad esempio: <form method="POST" action="https://www.somebank.com/members/transfer.asp"><input type="hidden" name="to" value="012345678901"/><input type="hidden" name="amt" value="10000"/><input type="submit" src="clickhere.jpg"/></form>)
Step 3
Exploit[Convince user to click on link] Finally, the attacker needs to convince a user that is logged into the target website to click on a link to execute the CSRF attack.
Execute a phishing attack and send the user an e-mail convincing them to click on a link.
Execute a stored XSS attack on a website to permanently embed the malicious link into the website.
Execute a stored XSS attack on a website where an XMLHTTPRequest object will automatically execute the attack as soon as a user visits the page. This removes the step of convincing a user to click on a link.
Include the malicious link on the attackers' own website where the user may have to click on the link, or where an XMLHTTPRequest object may automatically execute the attack when a user visits the site.
[Convincere l'utente a cliccare sul link] Infine, l'attaccante deve convincere un utente che è loggato nel sito target a cliccare su un link per eseguire l'attacco CSRF.
Eseguire un attacco di phishing e inviare all'utente un'email convincendolo a cliccare su un link.
Eseguire un attacco di stored XSS su un sito web per incorporare permanentemente il link dannoso nel sito.
Eseguire un attacco di stored XSS su un sito web dove un oggetto XMLHTTPRequest eseguirà automaticamente l'attacco non appena un utente visita la pagina. Questo elimina il passaggio di convincere l'utente a cliccare su un link.
Includere il link dannoso nel sito web degli attaccanti stesso, dove l'utente potrebbe dover cliccare sul link, o dove un oggetto XMLHTTPRequest potrebbe eseguire automaticamente l'attacco quando un utente visita il sito.
Attack Techniques
-
Execute a stored XSS attack on a website where an XMLHTTPRequest object will automatically execute the attack as soon as a user visits the page. This removes the step of convincing a user to click on a link.
-
Execute a phishing attack and send the user an e-mail convincing them to click on a link.IT: Esegui un attacco XSS memorizzato su un sito web in cui un oggetto XMLHTTPRequest eseguirà automaticamente l'attacco non appena un utente visita la pagina. Questo elimina la necessità di convincere l'utente a cliccare su un link.
-
Execute a stored XSS attack on a website to permanently embed the malicious link into the website.IT: Esegui un attacco XSS memorizzato su un sito web in cui un oggetto XMLHTTPRequest eseguirà automaticamente l'attacco non appena un utente visita la pagina. Questo elimina la necessità di convincere l'utente a cliccare su un link.
-
Include the malicious link on the attackers' own website where the user may have to click on the link, or where an XMLHTTPRequest object may automatically execute the attack when a user visits the site.IT: Esegui un attacco XSS memorizzato su un sito web in cui un oggetto XMLHTTPRequest eseguirà automaticamente l'attacco non appena un utente visita la pagina. Questo elimina la necessità di convincere l'utente a cliccare su un link.