As threats mount and great power tensions deepen, Singapore, Samoa, and others are crafting a new response to cyberattacks.