Last active
October 7, 2023 18:29
-
-
Save pich4ya/6e3b1cac6218ff37e5c17b02a39e80d2 to your computer and use it in GitHub Desktop.
gdbserver: linux_ptrace_test_ret_to_nx: Cannot PTRACE_TRACEME: Operation not permitted
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem: | |
จะเอา IDA Pro มา remote debug binary ใน linux container ขึ้นว่า | |
root@c8a5bde5162d: ~# gdbserver 0.0.0.0:4444 ./main | |
gdbserver: linux_ptrace_test_ret_to_nx: Cannot PTRACE_TRACEME: Operation not permitted | |
gdbserver: linux_ptrace_test_ret_to_nx: status 256 is not WIFSTOPPED! | |
Solution: | |
$ docker ps | |
$ docker commit <container-id> linux4gdb | |
$ docker run -it \ | |
> --name linux4gdb1 \ | |
> --privileged \ | |
> --security-opt=apparmor:unconfined \ | |
> -v ~/path/to/share/:/path/to/share/ \ | |
> -p 4445:4445 \ | |
> linux4gdb | |
$ gdbserver 0.0.0.0:4445 ./main | |
Process ./main created; pid = 26 | |
Listening on port 4445 | |
Remote debugging from host 172.17.0.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment