The growing sophistication of cyber-attacks necessitates advanced intrusion detection systems (IDS) capable of identifying both existing and emerging threats with high precision. This study proposes an innovative IDS framework that addresses class imbalance using SMOTE-ENN (Synthetic Minority Over-sampling Technique-Edited Nearest Neighbors), while leveraging the complementary strengths of Random Forest (RF) and XGBoost classifiers to enhance detection efficacy. Evaluated on the NSL-KDD dataset, the framework effectively mitigates the challenges posed by imbalanced data, ensuring improved detection of minority attack classes. Experimental analysis demonstrates significant improvements in accuracy, precision, recall, and F1-score compared to conventional methods. These findings highlight the framework's potential to strengthen cyber intrusion detection and enhance overall network defense mechanisms.