Despite their differences, both are meant to protect data, programs, networks and other digital assets. Cyber security helps to prevent cybercrimes from happening, while computer forensics helps recover data when an attack does occur and also helps identify the culprit behind the crime.