frida missing argument 에러 어떻게 수정해야 할까요..ㅠ
삼바리
1
7856
2019.12.20 16:34
owasp.mstg.uncrackable2를 frida로 후킹 연습할려고합니다. 그런데 코드에 missing argument 발생되서 어떻게 해결해야될까요 ㅠ
밑에 자세한 내용입니다.
-----------------------------------------------------------------------------------------------------------
C:\Users\user\Desktop\a\uncrackable1>frida -U -f owasp.mstg.uncrackable2 -l UnCrackable-Level2-1.js --no-pause
____
/ _ | Frida 12.7.20 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://www.frida.re/docs/home/
Spawned `owasp.mstg.uncrackable2`. Resuming main thread!
[Samsung SM-G930L::owasp.mstg.uncrackable2]-> [*] Hooking calls to System.exit
Error: missing argument
at frida/runtime/core.js:323
at /UnCrackable-Level2-1.js:30
at frida/node_modules/frida-java-bridge/lib/vm.js:11
at E (frida/node_modules/frida-java-bridge/index.js:346)
at frida/node_modules/frida-java-bridge/index.js:332
at input:1
----------------------------------------------------------------------------------------------------------
Java.perform(function() {
console.log("[*] Hooking calls to System.exit");
var exitClass = Java.use("java.lang.System");
exitClass.exit.implementation = function() {
console.log("[*] System.exit called");
}
var strncmp = undefined;
var func = Module.enumerateImportsSync("libfoo.so");
for(var i = 0; i < func.length; i++) {
if(func[i].name == "strncmp") {
strncmp = func[i].address;
break;
}
}
Interceptor.attach(strncmp, {
onEnter: function (args) {
if(args[2].toInt32() == 23 && Memory.readUtf8String(args[0],23) == "01234567890123456789012") {
console.log("[*] Secret string at " + args[1] + ": " + Memory.readUtf8String(args[1],23));
}
}
});
console.log("[*] Intercepting strncmp");
});
-----------------------------------------------------------------------------------------------------
밑에 자세한 내용입니다.
-----------------------------------------------------------------------------------------------------------
C:\Users\user\Desktop\a\uncrackable1>frida -U -f owasp.mstg.uncrackable2 -l UnCrackable-Level2-1.js --no-pause
____
/ _ | Frida 12.7.20 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://www.frida.re/docs/home/
Spawned `owasp.mstg.uncrackable2`. Resuming main thread!
[Samsung SM-G930L::owasp.mstg.uncrackable2]-> [*] Hooking calls to System.exit
Error: missing argument
at frida/runtime/core.js:323
at /UnCrackable-Level2-1.js:30
at frida/node_modules/frida-java-bridge/lib/vm.js:11
at E (frida/node_modules/frida-java-bridge/index.js:346)
at frida/node_modules/frida-java-bridge/index.js:332
at input:1
----------------------------------------------------------------------------------------------------------
Java.perform(function() {
console.log("[*] Hooking calls to System.exit");
var exitClass = Java.use("java.lang.System");
exitClass.exit.implementation = function() {
console.log("[*] System.exit called");
}
var strncmp = undefined;
var func = Module.enumerateImportsSync("libfoo.so");
for(var i = 0; i < func.length; i++) {
if(func[i].name == "strncmp") {
strncmp = func[i].address;
break;
}
}
Interceptor.attach(strncmp, {
onEnter: function (args) {
if(args[2].toInt32() == 23 && Memory.readUtf8String(args[0],23) == "01234567890123456789012") {
console.log("[*] Secret string at " + args[1] + ": " + Memory.readUtf8String(args[1],23));
}
}
});
console.log("[*] Intercepting strncmp");
});
-----------------------------------------------------------------------------------------------------