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

error: failed to attach to pid, Operation not permitted #393

Open
OmiceyO opened this issue Nov 23, 2020 · 5 comments
Open

error: failed to attach to pid, Operation not permitted #393

OmiceyO opened this issue Nov 23, 2020 · 5 comments
Labels

Comments

@OmiceyO
Copy link

OmiceyO commented Nov 23, 2020

sudo scanmem -p 17508
scanmem version 0.17
libscanmem version 0.17

Copyright (C) 2006-2017 Scanmem authors
See https://github.com/scanmem/scanmem/blob/master/AUTHORS for a full author list

scanmem comes with ABSOLUTELY NO WARRANTY; for details type show warranty'. This is free software, and you are welcome to redistribute it under certain conditions; type show copying' for details.

info: maps file located at /proc/17508/maps opened.
info: 209 suitable regions found.
Please enter current value, or "help" for other commands.

8000
error: failed to attach to 17508, Operation not permitted
error: failed to search target address space.
Please enter current value, or "help" for other commands.

Why exactly is it not permitted? I sudoed scanmem

@12345ieee
Copy link
Member

Uhm, this might be a little late, are you still having issues?

@OmiceyO
Copy link
Author

OmiceyO commented Oct 12, 2021

Hello, Yep it still doesnt work for me. I just tried it.

Edit : Adding some details.

OS used : Fedora 34
Game : Total war three kingdoms (Steam - Linux native)
Result : Failed to attack to (Game ID), Operation not permitted.

Also tested on GTA V ( Steam - Proton 6.13)
Result :
1st attempt - Using scanmem through the terminal leads me down a rabbit hole where the value cant be found. It shows 0 result for that value after a while.

2nd attempt - I used the GUI version (Game conqueror) , This time after trimming down the result to around 15, the game always crashes at this spot.

I also want to ask are you successful using scanmem with steam games?

@sriemer
Copy link
Member

sriemer commented Oct 30, 2021

Look at man 2 ptrace. Some games use the setgid bit. In that case, ptrace is not allowed. Changing file permissions usually resolves this issue.
Some commercial games come with ptrace detection PTRACE_TRACEME. The workaround against this is overwriting ptrace with an LD_PRELOAD library and faking that the game is not ptraced. I call this anti-anti-ptrace.

@OmiceyO
Copy link
Author

OmiceyO commented Oct 31, 2021

Do you have a link which goes into more detail and how to implement what you are saying?

@sriemer
Copy link
Member

sriemer commented Oct 31, 2021

http://index-of.es/Varios/Securite/Anti-anti-ptrace.pdf if you have some basic French knowledge.

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

No branches or pull requests

3 participants