Dual-Layer Intrusion Detection System