I've had several big and behemoth worms tunnel their way into my base. They surface and destroy the buildings right at the surfacing spot just fine, but after that they do nothing. They wont attack any buildings even if they are just 5 tiles away. It almost seems that the worms don't consider any buildings to be their enemies.