The following is advice on digging yourself out of the hole you're in (because you are in one even if you don't think so) from the "getting along at work" POV. No code content.
I would, were I you, first make sure that you are up-front about your script taking down the entire department. If you just hope that no one will find out - well, maybe they won't this time, or maybe they will and there will be a Explanation Needed. You absolutely do not want to wait for an Explanation Needed moment; you want to go straight to the most closely involved - the system admin, if that's not you, and your supervisor.
The system admin needs to know because when the network goes down, it's his or her job to find out what happened; you will score a few Honest points for not making him or her spend weeks trying to find the source of the problem. (You have already scored a lot of Idiot points for taking down a production network, but that can't be helped now.) If your sysadmin is sharp, it's possible the ARP spoof will be traced back to you - and if someone else finds out who caused the problem before you own up, it could be a career-limiting event, and possibly a job-terminating one.
Your boss needs to know because he or she is responsible for your actions, and having you run wild on the network and finding this out from someone else could be a black mark on his or her record - and it is never a good idea to be the person responsible for making your boss look bad (or underinformed).
You should, right now, or as soon as possible, go and confess - your boss first, and the sysadmin next, possibly with your boss present - the order depends on who you judge to be the most sympathetic. If your boss is likely to stick up for you, see your boss first. If the sysadmin is someone who just wants to know what happened and isn't going to be too angry about it, go to the sysadmin first. You want to make sure that you have the more-supportinve person in your corner when you go to talk to the less-suportive one.
Tell both of them the truth - that you thought you'd seen a security hole, and wanted to test it, but your test unfortunately actually caused a problem which you hadn't intended or expected (in that the production network went down).
You are going to have to apologize, and very probably grovel. You are going to have to make it pretty convincing that you really didn't intend to do any damage - and I get the feeling that you didn't, but this did a lot more than you expected - if you want to keep the job you currently have. It's very likely that you're going to lose some privileges; if you don't make it really clear that you realize that this was a dumb thing to do and that you really, really promise never to do anything like it ever again on the work network, you might lose your job.
If you are the sysadmin responsible for this network, then you need to go to your boss and let him/her know you were testing something and misjudged the impact; you'll set up an isolated test network if you need to try anything like this again (showing that both you know this was dumb and that you won't let it happen again).
Now speaking to you personally:
In reply to Being ethical after screwing up
by pemungkah
in thread ARP spoofing attack ---- Advice Needed
by sagarkha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |