The features of the application of machine learning methods in information security tasks and development prospects and future trends are considered. The article analyzes the application of a machine learning model to detect attacks in the field of information security using the RandomForestClassifier classifier. Various aspects of data processing are considered, including balancing classes and selecting the most significant features for building a model. This approach can be useful for developing real-time monitoring and protection systems.