This work consists of malware detection using opcodes and machine learning. So for this work, we have done both static and dynamic analysis. We only analyzed the executable binary file for the dynamic. We have to run the binary in order to get the features. As the dataset, we have created a dataset from malware from the viewer share website and from the Ubuntu distribution we've got the penning files. So our proposed model is a combination of different layers. First of all, we have a word embedding layer. This converts all the opcodes to vectors which are the correct format for the next layer, which is the LSTM layer, which works really great for sequential data, really useful for both static and dynamic analysis of opcodes. And after all, we have a dense layer to have this binary classification model. Our results are pretty good for static analysis, which is 98% accuracy. And for dynamic analysis, we got up to 97, we can see in this confusion matrix that we got pretty good results.