Kevin Backhouse has disclosed a nasty vulnerability he discovered a few months back, that could be used to forcibly reboot any Mac or iOS device on a local network. He also wrote a proof-of-concept exploit that does exactly that.
Kevin has been working with Apple since last August, and they were able to address this vulnerability (CVE-2018-4407) in the releases of macOS 10.14 Mojave and iOS 12. Apple has also patched this via security updates that are now available for macOS 10.13 High Sierra and macOS 10.12 Sierra. Older versions of macOS and iOS remain vulnerable.