0xricksanchez / like-dbg

Fully dockerized Linux kernel debugging environment
MIT License
730 stars 58 forks source link

Resolving issue 165. #171

Closed R3zk0n closed 8 months ago

R3zk0n commented 9 months ago

Description This pull request introduces an important enhancement to the bash script used for debugging. Previously, the script lacked any form of checks or notifications to determine if the builder process had successfully completed. This oversight could lead to a scenario where the Docker image remained untagged, rendering it impossible to debug the built kernel.

Resolved Moving to use a io/scripts/config.sh seems like a more maintainable and customisable way to use like-dbg since their maybe other tools to be installed on the kernel such as https://github.com/bata24/gef version of GEF.

R3zk0n commented 9 months ago

Chmod the config.sh file before running the start_kdb.py scriot as the file needs to be chmod due to permissions i wasnt able to get it working on the docker build with chmod.

0xricksanchez commented 8 months ago

@R3zk0n sorry for the wait. I settled now and will take a look shortly!

R3zk0n commented 8 months ago

Hi @0xricksanchez No worries! It seemed to fix the issues i was having :). There does appear to be some issues regarding the compiling of kernel modules into the kernel, if you try to add /examples/c_mod/ etc it will seemly break but ill need to look further into it.

0xricksanchez commented 8 months ago

@R3zk0n Might be that newer kernel versions behave differently. I was sure it worked like half a year ago. I'll show this some much needed love soon. Thanks for investigating and feel free to file an issue for everything you're finding!

R3zk0n commented 8 months ago

@R3zk0n Might be that newer kernel versions behave differently. I was sure it worked like half a year ago. I'll show this some much needed love soon. Thanks for investigating and feel free to file an issue for everything you're finding!

All good, ill see if i can solve it, one recommendation i found that ill PR if i get around is using a .config that has generated from make menuconfig, sometimes you want to turn on the flags via GUI and then just parse that into the kernel.

0xricksanchez commented 8 months ago

@R3zk0n Changes look reasonable to me at first glance. One minor nit. Could you rename config.sh to something for descriptive that highlights where it's being used or what it's for?

R3zk0n commented 8 months ago

@R3zk0n Changes look reasonable to me at first glance. One minor nit. Could you rename config.sh to something for descriptive that highlights where it's being used or what it's for?

Sure! do you have any preferred type of things, like like_debugger_tool_install.sh?

0xricksanchez commented 8 months ago

@R3zk0n Changes look reasonable to me at first glance. One minor nit. Could you rename config.sh to something for descriptive that highlights where it's being used or what it's for?

Sure! do you have any preferred type of things, like like_debugger_tool_install.sh?

That seems reasonable to me. Should be descriptive enough

R3zk0n commented 8 months ago

Done :) 👍