As Ransomware encrypts user les to prevent access to infected systems its harmful impacts must be quickly identi ed and remedied. It can be challenging to identify the metrics and parameters to check, especially when using unknown ransomware variants in tests. The proposed work uses machine learning techniques to create a general model that can be used to detect the variations of ransomware families while observing the characteristics of malware. However, early detection is impeded by a dearth of data during the initial phases of an attack, which results in low detection accuracy and a high proportion of false alarms.To overcome these restrictions, our research suggests a revolutionary technique, in machine learning techniques we have proposedRandomClassi er with SMOTE optimizer based on the results received from LazyPredictAutoML and then deep learning algorithm ANN using Root Mean Square Propagation (adam) has been implemented to get the hidden patterns which were not accessible in machine learning approach. Further study focused on improving CNN's performance over RMSProp& Adam, which maintains per-parameter learning rates that are adjusted based on the average of most recent weight gradient magnitudes, using the Adam optimizer. The best option for internet and nonstationary issues is CNN with Adam (e.g. noisy). As gradients grow sparser toward the end of optimization, Adam somewhat surpasses RMSprop. Adam uses CNN and uses the average of the second moments of the gradients (the uncentered variance). The proposed model reported 5.14ms of prediction time and 99.18% accuracy.