flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 09 Oct 2025, 01:13
To make changes to CR0 the code needs to be running in ring-0. Running as root isn't enough, it requires a kernel mode driver to get code into ring-0.
"root" is still user code (runs in ring-3), just with more permissions. "root" code can install a kernel mode driver and then use the kernel mode driver to change CR0. |
|||
![]() |
|
duanebonas6822 09 Oct 2025, 11:36
Yeah i know that bout root, but format ELF64 executable is user code , what i read is that ring 0 code is mainly run from bios code like .bin which is a completely differant binary from my user code. Main info i need is was it possible to somehow statically link a .bin file to my user code somehow like shared libraries work. Then i would be able to change or access the ring 0 syscalls at least, ive tried from user code most time the calls dont work, i mean i could only try do it with gdb and alter stack but wanted a differant way. or wanted to know if i could somehow dynamically link a .bin file with the org setting like with ldpreload or dlopen. i dont know
|
|||
![]() |
|
duanebonas6822 09 Oct 2025, 11:53
Anyway if i execve into a remote machine and bash fg/bg can switch between my executable and escape the shell and access the remote system, how exactly is my binary which is a copy of my machine with a kernel version as same as my machine will the memory MMU be completely different tho than my executable as its executed on a differant machine but its still a copy of my computer, i was completely not thinking about that, so like wont the ring 0 be a completely differant system from my computer even tho its a reverse shell, the underlining memory mappings should be completely differant, do u know what i mean ?? quite important question
|
|||
![]() |
|
duanebonas6822 09 Oct 2025, 12:19
Another thing thats why i was trying to create a LKM or kernel driver in FASM before, So i could load it dynamically , but i tried the old code from kernel 2.6 but doesnt work nomore in newer kernels, even tho its a REL file format think it needs to be built with KBUILD and it always fails on the object file. So thats why im looking into trying to load .bin file after my user code has run, this hacking stuff is complicated . basically wanted a way to run linux kernel commands from assembley as well. that would be a huge advantage as only other way is with EBGP or LKM'S which i would have to learn C and i CBA with that. Do u know any suggestions, im trying to do process injection but the hardest part is changing Writable memory locations to RWX as to inject u need Writable memory. So i need a stable way to change to Ring 0 after ive execved into a target. There must be a way to write a linux driver in FASM. but ive searched and says FASM needs a patch but the posts were from long ago. Im going to look more into .bin files now, just all my libC calls and main tools are in format ELF64 executable. do u know what im trying to accomplish lol
|
|||
![]() |
|
duanebonas6822 09 Oct 2025, 12:24
ok, SO IS THIS POSSIBLE AND HOW ???
"root" code can install a kernel mode driver and then use the kernel mode driver to change CR0 In FASM tho not Kernel Driver in C |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.