The article examines theoretical and applied aspects of preventing cyberattacks conducted by foreign intelligence services against critical information infrastructure of Ukraine under conditions of ongoing armed aggression. It is substantiated that modern cyberattacks against critical information infrastructure are of a complex nature and should be understood not only as technical incidents, but also as a component of intelligence and subversive activities of foreign states in cyberspace. It is determined that effective counteraction to such threats requires a combination of technical cybersecurity measures and counterintelligence mechanisms aimed at prevention, detection, documentation, and neutralization of threat sources. The activity of APT groups associated with foreign intelligence services is analyzed, and their role in the implementation of strategic cyber operations against Ukraine is revealed. A comparative analysis of critical infrastructure protection models in the United States, Israel, and the Republic of Estonia is carried out, which made it possible to establish the system-forming role of intelligence and counterintelligence agencies in ensuring cybersecurity. It is proved that effective national models are based on institutionalized intelligence sharing, public-private partnerships, and integration of civilian, military, and intelligence capabilities. The current regulatory framework of Ukraine in the field of critical information infrastructure protection is analyzed, and its key shortcomings are identified, in particular the lack of proper institutional integration of counterintelligence activities into the cybersecurity system, insufficient effectiveness of mandatory cyber incident reporting mechanisms, and the absence of a legally established cyber reserve. The directions for improving legislation are proposed, including the introduction of mandatory intelligence-sharing mechanisms, strengthening counterintelligence powers in the field of critical infrastructure protection, development of a cyber reserve, and formation of legal frameworks for cyberattack attribution. It is concluded that there is a need to transition from a reactive to a proactive model of counterintelligence support for cybersecurity in Ukraine. The obtained results have practical significance for improving state policy in the field of protection of critical information infrastructure and enhancing the effectiveness of the activities of the subjects of the national cybersecurity system of Ukraine.