I had this happen once.
I had been using RDP but they only way that I could get it to work between the Mac and LinuxCNC was to do it without passwords.
I _assume_ that the attacker was linked to my WiFi, as I don't think that there was any link through the router to the larger internet.
I got rid of the RDP and changed my Wifi password (and security type., I think) and haven't seen it happen since.