Hacking was not a problem in the early days of computing as there was no internet and computers talked to each other over dedicated telephone lines. - Grandfather
Some of the mainframes we servicced were also connected to ARPANET which provided networked access to university and various government agencies. I know there was an ARPANET worm around 1980. Not sure if there was hacking prior to that.