Agriculture is constantly evolving, and many processes in the countryside have been automated owing to technology, giving rise to precision agriculture, which has helped to optimize the use of natural and agricultural inputs through the data sensed in the crops. Security in precision agriculture systems is vital to protect data; therefore, it has been proposed to perform penetration testing (PENTEST) or attacks on precision agriculture systems. In the experiment, open-source tools were used to determine vulnerabilities that may occur in real environments. Penetration tests were performed with Denial of Service, Man-inthe-Middle, and DNS spoofing attacks for devices on the Edge and in the Fog. These tests made it possible to affect the integrity, availability, and authenticity of the system. It was reported that service drops of more than 80% within the first minute, sensitive information theft, and page duplication allowed us to determine the vulnerability of this technology.