The document proposes a hybrid sampling technique combining K-Means clustering and SMOTE oversampling to address data imbalance in network intrusion detection systems. It first applies K-Means clustering to handle outliers in the data, and then uses SMOTE to generate additional samples for the minority (intrusion) class. This produces a balanced dataset for training classification models like Random Forest and CNN. The technique is evaluated on the NSL-KDD dataset and achieves accuracy above 94% with these models, outperforming an alternative approach using DBSCAN and SMOTE.