Analyzing Network Traffic to Detect Advanced Persistent Threats