Publicly funded organisations and firms behind national infrastructure could be fined if they pay hackers.