With the transition to the information society, all areas of our lives are rapidly shifting to the digital environment. From education to health, from citizenship procedures to social life, all areas of our lives are interacting in the digital cyber environment. In this process, smart cities, smart networks, and smart factories, especially critical infrastructures required for social life, have become open to the intranet and then to the internet for reasons such as efficient efficiency, speed, remote maintenance, and maintenance. Along with this process, these systems have faced new threat surfaces. One of the components that play an essential role in the operation of these systems is embedded systems. These systems contribute significantly to the effective operation of essential infrastructures. However, any interruption in these systems can lead to significant negative consequences, including economic damage and human life. Although there are many studies on the functioning of embedded systems, there are not enough studies on the cyber security analysis of these systems. For this reason, in this study, attack and detection analyses for embedded systems have been carried out on the test environment created using real systems. The study aims to detect passive attack, which is more difficult to detect than active attacks on the system, by using artificial intelligence algorithms. The analysis results have shown that the attack has been detected in a high ratio. It has been evaluated that the study will significantly contribute to other studies on the security of embedded systems.