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

null handle returned for libSDL3.so.0 #4360

Open
Trololp opened this issue Nov 2, 2024 · 2 comments
Open

null handle returned for libSDL3.so.0 #4360

Trololp opened this issue Nov 2, 2024 · 2 comments

Comments

@Trololp
Copy link

Trololp commented Nov 2, 2024

System: linux, Ubuntu 22.04
cs2: launched with -insecure
I build libOsiris, then injected library
with ptrace and dlmopen(LM_ID_NEWLM, lib_path, RTLD_NOW);
, and nothing happen.
I wrote just simple library to test that getModuleHandle not working with cs2 libraries
I tried libSDL3.so.0 (with full path, just name of library not work for me idk why)
to get handle in my dynamic library using dlopen(libraryName, RTLD_NOLOAD | RTLD_LAZY);
it return 0, and dlerror not say anything(returns nullptr).
Then I tried libm.so.6 and everything just works fine.

Seems like VAC protection? Ways to bypass?

@danielkrupinski
Copy link
Owner

danielkrupinski commented Nov 2, 2024

Please show the output of cat /proc/$(pidof cs2)/maps | grep SDL
The problem might be with LM_ID_NEWLM parameter, try to use LM_ID_BASE instead. Also why do you use dlmopen() instead of dlopen()?

@Trololp
Copy link
Author

Trololp commented Nov 2, 2024

7f048d915000-7f048d946000 r--p 00000000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0
7f048d946000-7f048dae7000 r-xp 00031000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0
7f048dae7000-7f048db80000 r--p 001d2000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0
7f048db80000-7f048db81000 ---p 0026b000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0
7f048db81000-7f048db8b000 r--p 0026b000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0
7f048db8b000-7f048db96000 rw-p 00275000 08:01 16796237                   /media/trololp/data/SteamLibrary/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64/libSDL3.so.0

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

2 participants