I'm going to answer from my own experience, which may or may not fit your situation at all (you're kind of vague about it, so there's no way to judge). This is also in part inspired by the comment of humanarity (
https://news.ycombinator.com/item?id=9360218)
Several years ago in The Netherlands we had a website blockade of The PirateBay. Most ISPs had to block it, it was stupid, and it did not work at all. The ISPs were challenging it legally. The question got asked: "How effective is this blockade anyway? Can we measure it?".
I did not realise it at the time, but this was somewhat an identity inflexion point for me, and very much changed my career.
As a scientist in computer networking, with some knowledge of Bittorrent, I thought to myself, how hard can it be? I could take some torrents off TPB, record IP addresses passing by and checking which ISP they come from.
I finished the bittorrent measurements, wrote a report, and tried to publish it. Only the dean and the faculty lawyer got wind of it, and they were not amused, and saw a risk of getting sued by the entertainment industry.
I challenged them on this, and noted that I would publish this, even without their support. Fortunately I also got full support of my professor, and we did get to publish it. It was used in the court case, and it helped show the ineffectiveness of the website blockade, so it got lifted.
This little weekend project changed my research interests, has made me focus on ethics in computer science research, and especially security research. This has changed much of how I initially planned my career, and it has gotten me to where I am now. I have enjoyed every minute of it, and months later also realised I was not happy with the way my career was going.
I took some risk in doing this, but it was something I believed in. The change was possible because I was a researcher at a university, so that made it somewhat easier.