Attempts to steal information through the hacking of online accounts or passwords violations are becoming more common. The human factor is involved in most cyber-attacks. A way to solve these human oversights is to start using artificial intelligence, delegating some human decisions in the machines, but these innovations also have much to improve. Human judgment is still necessary to fill the gap between the capabilities of technology and our needs. This is where conscious security habits play a differentiating role between being or not the victim of a cyber-attack. This study describes how machine learning techniques can be used to model predictions that allow the anticipation of a hacking event taking into account password entropy and security habits. Prediction models are created and trained using decision tree techniques, multilayer perceptron, and Naïve Bayes. The efficiency of these models is contrasted to determine which of the models is more efficient for the case under study.