Creating a Linux kernel panic CTF

Hi everyone! I was tasked to create few challenges for a CTF at my university as part of my bachelor thesis. The last challenge I should create is essentially about crashing a system, while another "monitoring" system is detecting if the other one is running, and if not it gives you a flag. The tasks are meant for 4th year high-school students, so nothing insane, but this one still should be at an "extreme" difficulty in regard to the experience high-school students could have.

Issue is, I have no prior experience in such exploitation, and I don't necessarily know where to start with this one. My idea was creating a custom vulnerable module/driver in the linux kernel, that the players would be tasked to somehow exploit (some kind of overflow I guess, so that it would trigger kernel panic). I suppose it could be something similar to this: https://nofilqasim.info/Making%20a%20Kernel%20CTF%20%28PUCon%2724%20pwn%20CTF%29/ , except I believe the author of this CTF made it as a privilege escalation task, which is not exactly what I desire.

I was wondering if anyone could give me some pointers or ideas on where to start with this, and if what I have described above might be too difficult for the students to exploit, and consequently for me to implement.

Thank you for any answers!

21 points · 7 comments · view on lemmy.world

7 Comments

ryannathans@aussie.zone · 7 pts · 2d (3 replies)

Try the magic SysRq crash command

Brownie@lemmy.zip · 1 pts · 1d (2 replies)

Could it be considered an exploit/vulnerability tho? And if it would, would you say the difficulty of finding it being enabled could be hard enough for the audience I am creating it for?

ryannathans@aussie.zone · 3 pts · 1d (1 reply)

That sounds like your job :)

Brownie@lemmy.zip · 1 pts · 19h

You're right haha. I think I will go with something similar to this. Ran it through others working on this, and it seems like a viable method! Thank you very much

hexdream@lemmy.world · 2 pts · 1d

Halt and catch fire 🔥 🤣

WolfLink@sh.itjust.works · 2 pts · 1d

Here’s a class assignment from UC Berkeley that is somewhat similar. They provide a VM image of a vulnerable computer and you have to break it. I believe all the (student side) resources are publicly accessible:

https://sp25.cs161.org/proj1/

ToxicWaste@lemmy.cafe · 1 pts · 6h

if the only task is to make a system crash, what do you do to stop a bash bomb (:(){ :|:& };:)?

it will make the system crash. so if the monitoring system only checks whether system A is alive and gives the flag if not - that defeats the challenge. nerdier high schoolers surely know something like that, bc it is fun to crash your friends computer...