Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module.enumerateSymbolsSync works perfectly in linux but not giving any output in windows #202

Open
vishwaraj101 opened this issue Apr 3, 2022 · 0 comments

Comments

@vishwaraj101
Copy link

vishwaraj101 commented Apr 3, 2022

Trying to injection below script in a binary named yolo.exe to get the address of the function lol but unable to get any output.

js = """
// Maximum payload size
var size = 2000;

// Argument for the fuzzed function
var arg = Memory.alloc(size);
var fuzzData = [0x41];
var lolAddr = null;
var lolHandle = null;

// Find the vulnerable function in the target process
// and get a handle to it
Module.enumerateSymbolsSync("yolo").forEach(function(symbol){
switch (symbol.name) {
case "lol":
lolAddr = symbol.address;
// use the function prototype to create a handle
lolHandle = new NativeFunction(ptr(lolAddr), "void", ["pointer"]);
console.log("[i] lol() is at " + lolAddr);
}
});
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant