Closed BillBrousalis closed 1 year ago
Really wonder why it would take 25 minutes to complete... Are you able to share the kernel image?
It comes from a ctf challenge I was attempting, from hxp ctf 2020, called kernel-rop. You can find the challenge containing the image here: https://ctftime.org/task/14383 I attempted to use the tool on this with 2 (quite capable) machines, and was left thinking the tool was hanging on me both times. To be honest any other image I've tried is quite fast, 10 seconds to a minute, but the progress bar is nice nontheless.
Thanks. I immediately see why this is slow. An O(n*m) algorithm is used for calculating which section a symbol is placed in. For some reason, this kernel image has 36140 sections where normally it's around 100. This of course makes it very slow. I'll try optimizing it a little bit, so that loop doesn't take more than 10-15 seconds :)
Hello,
Thanks for your proposal and reporting the issue. I'm closing though as pull request #47 addressed the issue another way.
Regards,
Although this runs fast on most kernel images, I came across a few that took almost 25 minutes to complete, and had me wondering whether the script was stuck somewhere. I added a progress bar when iterating through "kallsyms_finder.symbols", which sometimes takes a while.