deboogerxyz / ah4

alienhook v4 - Free as in freedom CS:GO cheat for GNU/Linux.
GNU General Public License v3.0
37 stars 5 forks source link

Error once used in another project #17

Closed Mezo-hx closed 1 year ago

Mezo-hx commented 1 year ago

I'm making a hack another game other than csgo, and I realized you used a shell file rather than a processManager, so I decided to use it... But I keep getting this error

0xf7f84549 in __kernel_vsyscall ()
No symbol table is loaded.  Use the "file" command.
No symbol table is loaded.  Use the "file" command.
Invalid data type for function to be called.
Invalid data type for function to be called.
[Inferior 1 (process 7827) detached]

load.sh:

#!/bin/sh

pid=$(pgrep -n "RobloxPlayerBet")
lib="$(pwd)/Release/libCelestial.so"

if [ $(id -u) -ne 0 ]
then
    echo "$0 requires root privileges"
    exit 1
fi

if [ -z "$pid" ]
then
    echo "Couldn't find the target process"
    exit 1
fi

if [ ! -f "$lib" ]
then
    echo "Couldn't find the shared object"
    exit 1
fi

if grep -q "$lib" "/proc/$pid/maps"
then
    unload="call \$dlclose(\$lib)"
fi

gdb -n -q -batch \
    -ex "file $(readlink -f /proc/$pid/exe)" \
    -ex "attach $pid" \
    -ex "set \$dlopen = (void *(*)(char *, int))dlopen" \
    -ex "set \$dlclose = (int (*)(void *))dlclose" \
    -ex "set \$lib = \$dlopen(\"$lib\", 6)" \
    -ex "$unload" \
    -ex "$unload" \
    -ex "call \$dlopen(\"$lib\", 1)" \
    -ex "detach" \
    -ex "quit"
deboogerxyz commented 1 year ago

Hey! Does this script work for you for other games (e.g. CS:GO)? Secondly, does the game's executable include debug info? You can check this with file or objdump --sys.

Mezo-hx commented 1 year ago

objdump --sys

It does seem to work with csgo I haven't checked if the games executable includes a debug info yet, but one thing I forgot to point out is that it's running on Wine... So would that perhaps cause any issues?

deboogerxyz commented 1 year ago

The executable was probably compiled using MSVC and I don't think it's possible to attach GDB to it. I don't think you can even inject .so files to it. I once tried making a cross-platform TF2 cheat. I compiled the Windows version with mingw and tested it with Proton. The only way to inject it was to use a .dll injector written for Windows and run it through Wine (it's a bit more complicated than that with Proton).

image image image

Mezo-hx commented 1 year ago

The executable was probably compiled using MSVC and I don't think it's possible to attach GDB to it. I don't think you can even inject .so files to it. I once tried making a cross-platform TF2 cheat. I compiled the Windows version with mingw and tested it with Proton. The only way to inject it was to use a .dll injector written for Windows and run it through Wine (it's a bit more complicated than that with Proton).

image image image

Alright, thanks for the information!