Skip to content

About

Journal Article: Telematics and Informatics Reports

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enhancing Security in Software-Defined Networks: A Dynamic Approach to Efficient ARP Spoofing Attacks Mitigation

Reducing the impact of ARP spoofing attacks in a Software-Defined Network (SDN) is a complex task, as it involves interacting with SDN controllers, switches, and network components.

Authors

Vanlalruata Hnamte and Jamal Hussain

Journal

Telematics and Informatics Reports

Date of Submission

21st September 2023 | 24th October 2023

Date of First Return for Revision

20th October 2023

Date of Second Return for Revision

4th Feb 2024

Date of Acceptance

2nd March 2024

Please cite this article as: V. Hnamte and J. Hussain, Enhancing security in software-defined networks: An approach to efficient ARP spoofing attacks detection and mitigation, Telematics and Informatics Reports (2024), doi: https://doi.org/10.1016/j.teler.2024.100129.

Code

Note that this code is for educational purposes. In a real-world scenario, you would need to carefully design and test your ARP spoofing detection and mitigation logic and consider the impact of blocking MAC addresses on legitimate traffic.

You would need to use SDN libraries such as Ryu, Floodlight, or POX. The simplified code snippet using Ryu and Mininet to demonstrate ARP spoofing detection and mitigation is "arp_spoofing_detection.py". Please note that this code provides a basic structure for ARP packet handling within an SDN environment and is not a complete solution. You would need to implement ARP spoofing detection and mitigation logic inside the handle_arp method. Additionally, you'll need to set up the SDN network using Ryu or a similar controller, including the topology, switches, and hosts.

To block the offending MAC address if ARP spoofing is detected in an SDN environment using Ryu, you can extend the code provided earlier. A simple mechanism to block the MAC address of the attacker by installing a flow entry that drops packets from that MAC address is "block_MAC.py". In code, we've added the 'handle_arp' method to check for ARP spoofing and the block_mac method to install a flow entry that drops packets from the offending MAC address. The 'is_arp_spoofing' method is a placeholder where you should implement your ARP spoofing detection logic based on your requirements. Remember to customize the 'is_arp_spoofing' method to detect ARP spoofing based on your specific criteria, as ARP spoofing detection can vary depending on your network setup and security policies.

Notifying an admin via email when ARP spoofing is detected in an SDN environment is a useful security practice. To accomplish this, you'll need to integrate an email notification mechanism into your existing Ryu SDN controller application. A simplified code is "notify_admin.py". Please note that you'll need to configure your email server and credentials for this to work. In the code, replace 'your_email@gmail.com', 'admin_email@example.com', 'your_email_password', 'smtp.gmail.com', and 587 with your email credentials and SMTP server details. The code includes a 'send_email_notification' method that sends an email to the specified admin address when ARP spoofing is detected. Make sure to implement the 'detect_arp_spoofing' method with your custom logic to detect ARP spoofing based on your network requirements. Please be cautious when handling email credentials in your code, as they should be stored securely and not hardcoded in your source code for production use.

Logging events when ARP spoofing is detected is crucial for monitoring and analyzing security incidents in your SDN network. To log events using the built-in logging module in Python, when ARP spoofing is detected in a Ryu SDN controller application, you can use the code "loggin_event_list.py". In the code, we use the logging module to configure event logging. Detected ARP spoofing events are logged as warning messages with a timestamp in the specified log file ("arp_spoofing.log"). You can customize the log file name, log level, and log format according to your requirements. Ensure that you implement the 'detect_arp_spoofing' method with your custom logic to detect ARP spoofing events based on your network's security policies. Remember to handle log rotation and management appropriately in a production environment to avoid filling up disk space with log files.

In the comprehensive set of code examples, we've addressed the critical issue of mitigating ARP spoofing attacks within a Software-Defined Network (SDN). ARP spoofing attacks can compromise network security and disrupt operations, making it essential to implement effective countermeasures. Below is a summary of the key components covered:

Detection of ARP Spoofing:

We provided a code snippet that detects ARP spoofing by comparing incoming ARP packets against known MAC-IP mappings. When a spoofed ARP packet is identified, appropriate actions are taken.

Blocking the Offending MAC Address:

To prevent further malicious activity, we supplied code that blocks the MAC address responsible for ARP spoofing. This helps isolate the attacker and maintains network integrity.

Notifying Network Administrators:

We demonstrated how to notify network administrators via email when ARP spoofing is detected. Prompt alerts enable swift responses to security threats and provide crucial information for incident resolution.

Logging Events:

Event logging is a fundamental practice for security monitoring. We shared code for logging ARP spoofing events, recording essential information such as MAC addresses, IP addresses, and timestamps.

Evaluation and Monitoring:

Additionally, we introduced code for measuring network performance, including throughput and CPU utilization, to assess the effectiveness of the proposed ARP spoofing mitigation techniques. These code examples collectively contribute to a robust defense strategy against ARP spoofing attacks in SDNs. By detecting, blocking, notifying, and logging malicious activities, network administrators can proactively safeguard their SDN infrastructure.

It's essential to note that these code snippets serve as foundational elements. In practice, they should be integrated into a comprehensive SDN security solution, complemented by continuous monitoring, threat analysis, and updates to adapt to evolving security challenges. By implementing these measures and continuously improving them, organizations can maintain the security and reliability of their Software-Defined Networks, ensuring uninterrupted service and data protection.

About

Journal Article: Telematics and Informatics Reports

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages