The article addresses the pressing issue of ensuring cyber security for critical information infrastructure, which is associated with the development of modern information technologies and the increased potential for cyber attacks from criminal groups and potential adversary state entities. An analysis of the scientific literature indicates the necessity of preventive measures and scientific research, which involve monitoring the cyberspace. The application of sentiment analysis is proposed to detect the emotional sentiment towards critical information infrastructure objects. Following a defined algorithm, a sentiment analysis model is constructed based on an artificial neural network using open-source Python programming language libraries. The model's distinguishing feature is the consideration of emoticons to determine the intensification of emotional attitudes towards conducting cyber attacks on critical information infrastructure objects. A dataset related to cyber attacks from social media platforms such as Twitter and Instagram is collected to train the neural network. The results of training and testing the neural network provide grounds to assert that the network's accuracy of 0.7852 is relatively high, enabling its application by cyber reconnaissance units for early detection of cyber threats to critical infrastructure objects in combination with other tools.