Heterogeneous systems-on-a-chip (SoCs) are increasingly being used to meet low-power, high-performance computational requirements but are vulnerable to on-chip resource availability attacks that can take away from performance gains. We propose SoCurity, the first NoC counter-based hardware monitoring approach for enhancing SoC security for any heterogeneous design. With this monitoring approach, we develop a fast, lightweight anomalous activity detection system at the hardware level. Our system requires no prior attack knowledge for detecting anomalous activity by leveraging semi-supervised machine learning models. This design choice provides protection against existing and novel future attacks impacting on-chip resource availability. We demonstrate our technique with a case study on a real SoC implementation for a connected autonomous vehicle system.