Protection against many cyber security threats can be implemented by existing software on the system, with no need for security software. Some operating systems or program parameters can increase the security level and close any vulnerabilities if they are set properly. This project shows a way to prevent potential attacks with relatively low cost, but this method needs immediate attention. Reconfiguring a machine regularly is a moving target defense which is done by modifying the configuration regularly in the hopes of spoiling an attacker's reconnaissance efforts, the configurations are changed until they reach the fittest solution, so if the configurations are modified after a potential attacker's reconnaissance, then the gathered information is no longer effective. Improving security and utilizing the moving target defense can be implemented through the use of a genetic algorithm. Vulnerabilities can be caused by human misconfiguration or by having the improper chain of parameters, which are impossible to find manually due to the large number of configurations to search through. The genetic algorithm is therefore used to fix this problem by finding the right configuration and the proper chain of parameters until it reaches the fittest configuration possible, which is the main objective of this project. The GA has been applied successfully and it has shown flexibility in tightening the security solution by evolving the fitness of the configuration through the generations and by maintaining diversity within the generations. This resulted in high quality configurations which are important within the moving target defense strategy. Investigating the security impact on the Quality of Service (QoS) was an objective of this project. It is believed that maintaining good QoS is as important as having good security and this project shows that the security level has a significant impact on the QoS.