The International Criminal Court (ICC) has detected and contained a sophisticated and targeted cyberattack.