Developing Secure Framework For Cyber-Attack Detection: A Machine Learning Approach