The best thing is to get a licensed and unlicensed gun.
I hope it doesn't go this way but you can definitely shoot the trespasser with your licensed gun especially if theres threat around. On the otherhand, obtaining an unlicensed gun can avoid legalities and paper works. You can simply tell the authorities that you grabbed the gun from the trespasser/assailant.
This might not be the best solution for this situation but at least you have protection for your family.