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

frida inject can't properly handle a program that is in the STOP state, even if the program resumes after injection. #493

Open
nj00001 opened this issue Nov 16, 2023 · 0 comments

Comments

@nj00001
Copy link

nj00001 commented Nov 16, 2023

Check out the code example below

#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <errno.h>

int main(){

    

    pid_t pid = getpid();

    printf("entry %d\n", pid);

    kill(pid, SIGSTOP);

    printf("leave\n");

}

When a process receives a SIGSTOP signal, it enters a suspended state, and if you use frida to inject into the process, the js code injected into the process does not seem to be executed.
If you add a sleep function to the end of the above code, then you will receive
Unexpectedly timed out while waiting for signal from process with PID 23551

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