This document is a master's thesis submitted by Milan Tepić to the University of Stuttgart exploring host-based intrusion detection to enhance cybersecurity in real-time automotive systems. The thesis was supervised by Dr.-Ing. Mohamed Abdelaal and examined by Prof. Dr. Kurt Rothermel. It explores using timing elements of control unit functions to detect anomalies and intrusions. The goal is to develop a host-based intrusion detection system called AutoSec that can detect anomalies while keeping false alarms close to zero, in compliance with the AUTOSAR automotive software standard.