kubo / injector

Library for injecting a shared library into a Linux or Windows process
GNU General Public License v2.0
505 stars 97 forks source link

PTRACE_ATTACH error : Operation not permitted #16

Closed SlimSnow closed 1 year ago

SlimSnow commented 2 years ago

env: NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

x86_64

cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

SlimSnow commented 2 years ago

image

image

SlimSnow commented 2 years ago

On Linux via command line

SlimSnow commented 2 years ago

ptrace errno 1

kubo commented 2 years ago

@SlimSnow See https://github.com/gaffe23/linux-inject#caveat-about-ptrace. You may need to change your OS's setting. Otherwise run injector with root privilege.

If you run it on ubuntu in docker, see https://stackoverflow.com/questions/42029834/gdb-in-docker-container-returns-ptrace-operation-not-permitted.

SlimSnow commented 2 years ago

@kubo Thank you very much. but a new issuse is here: dlopen failed image image why my .so file can not open?Can you give me some suggestions about this?

kubo commented 2 years ago

There are many possible reasons for a dlopen error.