Enhancing Security, Safety, and Reliability of Modern Cyber-physical Systems