Almost 2 billion data records around the world were lost or stolen by cyberattacks in the first half of 2017.