I don't know if this is the right place to ask this but oh well. I wrote some proof of concept code that can do stuff to computers on my school network if the user has admin privileges. If I publish this on Github and someone finds it and uses it to do bad things, can I get into trouble?
Lawmakers have recognized that technology develops rather quickly, and do not try to prescribe the exact technical boundary between what's allowed and what's not. Even the distinction between code (software) and hardware is not made, and that's a good thing. Things like FPGA's would blur such a distinction.
Instead, we generally consider best practices. You're not the first person to write concept code for exploits, and there is some consensus about dealing with it. The general term is "responsible disclosure", and just publishing your code on Github would not classify as responsible. You are very much expected to first inform any organisation which you know is vulnerable, and give them time to fix the issue.
You know it's dangerous, or you wouldn't as. You're worried about criminals as well. At the very least you can excpect to be sued by a victim, which can cost you a lot of money even if you win, depending on where you are. With good chances that you lose. And many potential employers wony ever consider you.
Now tell us what is in your opinion the upside for you.