For example, the US has the FISA courts with all that entails (eg National Security Letters, pen registers). There is a legal framework for this whether you like it or not. My personal view is that the whole FISA system is overreach open to abuse that lacks transparency. But at least Federal judges are still involved in the process.
Or are you talking about something else? Something extrajudicial perhaps?
For example, countries (including the US) use allied intelligence agencies as an end run around their own laws. The NSA has certain restrictions on spying on US citizens that, say, Germany or Israel do not. So the NSA can get counterparts to do their dirty work and in turn the NSA does their dirty work.
Is that what you mean? If so, what's the relevance here? If not, then what?
In any case, we do have examples of exactly what the gp is talking about.
For instance, this one, which subsequently backfired:
https://www.bloomberg.com/news/features/2021-09-02/juniper-m...
The Snowden revelations made it clear that those regulations are toothless, unenforced, and effectively just propaganda.