Cybersecurity for Critical Infrastructure and IoT under 5G and 6G