Toggle "Kill Switch" For All Network Connections

I'm a new Keyboard Maestro user and loving it so much! I was wondering what would be the most effective way to turn off all network connections (including Wi-Fi and Ethernet, including Ethernet from a USB adapter if possible) with a macro (and toggle it back on, preferably with the same macro).

I've seen some scripts for individually turning off Wi-Fi sources but I'm looking for something simpler and more effective. I understand the best way (and perhaps the only reliable way) to cut off all network connections is to physically disconnect the hardware but I'm looking for a software-based alternative as opposed to having to manually turn off Wi-Fi and Ethernet from Network Preferences.

I understand this might not all be possible the way I would like it, but all suggestions are appreciated. Thank you very much!!