Ransomware attacks have become one of the most severe threats in cybersecurity, causing significant financial and operational damage to organisations worldwide. The ability to accurately classify ransomware, especially in real-time, is critical to limiting the impact of these attacks, yet existing detection methods often struggle with the rapid evolution of ransomware variants. A novel approach is proposed through the integration of the Binary Transformation and Lightweight Signature (BTLS) algorithm with machine learning models, aiming to enhance the accuracy and efficiency of ransomware detection. The BTLS algorithm allows for the extraction of both static and dynamic features from ransomware samples, enabling more comprehensive analysis and classification. The experimental results demonstrate that the combined feature sets significantly improved classification accuracy, while the reduction in false positives highlights the algorithm’s practicality for real-world deployment. The proposed system offers a scalable solution capable of adapting to novel ransomware variants, addressing the limitations of traditional detection techniques and advancing the state of machine learning-driven cybersecurity solutions.