r/rootkit • • Jun 21 '13

Linux rootkit tutorial

http://beneathclevel.blogspot.co.uk/
13 Upvotes

15 comments sorted by

View all comments

Show parent comment

3

u/nnewson Jun 22 '13

I think you're right - after a bit of digging, I think a better way for me to do this would be to lookup the symbols when the module is loaded using the kallsyms_lookup_name function in linux/kallsyms.h.

This certainly appears to work for all the symbols I use and should work without a rebuild.

2

u/stormehh Jun 22 '13

That should definitely help!

If you want to be super hardcore (just kidding), check out spender's latest update to the Enlightenment framework. If you can muster looking at the absolute mess of the code, the get_kallsyms_lookup_name() function demonstrates one implementation to resolve kernel symbols manually. It's usually better to grab symbols directly from the active runtime of the kernel (like how we grabbed readdir), but for everything else, use, abuse, and love the hell out of that function. :)