DEV Community

Discussion on: C Programming!

 
pavonz profile image
Andrea Pavoni

To be honest, I don't do kernel hacking since at least a decade or more (IIRC it was still kernel 2.4 or 2.6).
That said, a simple LKM with syscall hijacking should work even on a VM (given that you're running a non-monolitic kernel :-P)

Thread Thread
 
madsalama profile image
Mahmoud Salama

I never even thought of the possibility of "bricking" my computer, I only thought the worst I could do is wipe it clean or causing a kernel panic! Weirdly, I'm now interested to know how I can actually do that! πŸ™‰

Thread Thread
 
pavonz profile image
Andrea Pavoni • Edited

You risk to β€œbrick” your computer if you mainly touch drivers with low-level access to hardware. Re-defining high-level syscalls related to β€œreads” should not damage your hardware ;-)

Edit:
Check this advanced example, I studied/played a lot with this (well, the first versions from the original author, Stealth):

github.com/trimpsyw/adore-ng

Thread Thread
 
madsalama profile image
Mahmoud Salama

That's insightful, thanks!
Gotta get going! I'm currently reading Robert Love's 'system programming' and I have been inspired with this post to contextualize a bit. Let's see! πŸ€“βœŒοΈ

Thread Thread
 
pavonz profile image
Andrea Pavoni

In case you missed my edit to the previous content:

github.com/trimpsyw/adore-ng