Gone a long way from trying to implement a socket bindshell
using the standard C-Libraries (which obv. doesn't work in LKM!),
then implementing an ASM-Solution only to find out there are problems
with the x86/x32 bit and knowing that I have no clue of how to write ASM,
I thought of looking into sockets on linux kernel modules - AAAND
found one. So the files:
* src/50ck3t.c
* src/headers/50ck3t.h
are basically from
https://github.com/abysamross/simple-linux-kernel-tcp-client-server.git
Thanks for sharing! There will prob. be some additions and modifications.
Makefile:
* Some Stuff had to be renamed in the Makefile due to
Renaming src/create_sysgen.sh -> src/cr3473_5y563n.sh &
Added src/headers/50ck3t.h, src/50ck3t.c
Including src/headers/50ck3t.h in 8008135.c
Changing Module License to GPL, somehow GPLv3 was a problem to the compiler
because of do_exit
Added an 'src' dir with subfolders headers, include, libs
Extending Makefile, so that all the Files get included for
the build.
Also adding the "load" option for make, which loads the module
(has to be built before) as well as the "unload" option which unloads
the module.
The "all" option now automatically builds the sysgen.h from the script,
it doesn't have to be executed in forehand anymore.
Also, some Variables got added for better readability and changeability.
After the socket bindshell didnt work so far, I added some DEBUG Kernel prints
to debug the issue that sometimes the files to be hidden get displayed
as "?"
Also, a few Functions for debugging have been added - but I was too tired
to add them to the collection and use them instead of ```printk```