Project By : Abdulrahman mahdi

ESP32 Wi-Fi Penetration Tool

بواسطة : عبدالرحمن مهدي

esp32 front view
esp32 back view

يعد هذا المشروع توظيفًا لجهاز ESP32 في تنفيذ اختبارات اختراق شبكات الواي فاي ضمن بيئة تعليمية وأكاديمية، لفهم أنماط الهجوم السيبراني وتحليل الشبكات اللاسلكية، مع التركيز على الجانب الدفاعي والوقائي.

فكرة المشروع وأهدافه :

تمثلت فكرة المشروع في برمجة جهاز ESP32 باستخدام بيئة ESP-IDF ليكون أداة لاختبار اختراق شبكات Wi-Fi عبر تنفيذ عدة أنواع من الهجمات, مع مراقبة وتحليل البيانات باستخدام Wireshark وتحليل ملفات المصادقة باستخدام Aircrack-ng.

الأدوات والمكتبات المستخدمة

جهاز ESP32

بيئة التطوير ESP-IDF v4.4

Docker عبر ESP-IDF

مكتبات مثل esp_netif، esp_system، esp_event، esp_wifi

أدوات تحليل الحزم مثل Wireshark وAircrack-ng

نظام Kali Linux

أدوات مساعدة مثل grep للبحث في الكود المصدري

خطوات العمل التفصيلية

إعداد بيئة Docker وتشغيل ESP-IDF

تحميل مشروع ESP32 والتعرف عليه

تنفيذ عمليات flash و build للمشروع

الوصول إلى واجهة الإدارة وبدء الهجمات

مراقبة الشبكة باستخدام Wireshark وتحليل نتائج الهجوم

المشاكل والتحديات التي واجهتني مع حلولها

خطأ في ربط منفذ USB: الحل باستخدام المسار الصحيح

ضرورة الضغط على زر Boot أثناء الرفع

خطأ في معرفة كلمة مرور شبكة الإدارة: تم استخدام grep وحل مشكلة CMakeLists بالانتقال إلى مجلد المشروع الصحيح

تحليل ملفات PCAP باستخدام الأدوات المناسبة

تحليل نتائج الهجمات

نجاح في إبطاء وفصل الأجهزة عن الشبكة

تم اعتراض بيانات المصادقة

تم الحصول على handshake وتحليله لاحقًا

دور Wireshark في مراقبة وتحليل الشبكة

تم استخدام Wireshark لمراقبة الحزم وتحليل بروتوكولات المصادقة EAPOL أثناء تنفيذ الهجمات المختلفة.

كيفية التعامل مع ملفات PCAP وHCCAPX

تم تحويل وتحليل ملفات PCAP باستخدام Aircrack-ng، واستخدام ملفات HCCAPX مع أدوات كسر كلمات المرور.

الخلاصة والتوصيات المستقبلية

يعد المشروع تجربة عملية ناجحة في مجال الأمن السيبراني الهجومي، حيث ساهم في تعزيز مهارات تحليل الشبكات واكتشاف الثغرات اللاسلكية. يمكن توسيع نطاق المشروع ليشمل آليات الحماية والدفاع، مع تطبيق تقنيات كشف التسلل (IDS) ودمج تقنيات تعلم الآلة لتحليل البيانات.

English Version

This project utilizes the ESP32 device to perform Wi-Fi penetration testing in an educational and academic environment, aiming to understand cyber attack patterns and analyze wireless networks, with a focus on defensive and preventive aspects.

Project Idea and Objectives:

The project's concept involved programming an ESP32 device using the ESP-IDF environment to create a tool for testing Wi-Fi network penetration by executing various attack types such as: PMKID and Docker, while monitoring and analyzing data using Wireshark and analyzing authentication files using Aircrack-ng.

Tools and Libraries Used

ESP32 device

ESP-IDF v4.4 development environment

Docker via ESP-IDF

Libraries such as esp_netif, esp_system, esp_event, esp_wifi

Packet analysis tools like Wireshark and Aircrack-ng

Kali Linux system

Helper tools like grep for source code searching

Detailed Work Steps

Setting up Docker environment and running ESP-IDF

Downloading the ESP32 project and familiarizing with it

Performing flash and build operations for the project

Accessing the management interface and initiating attacks

Monitoring the network using Wireshark and analyzing attack results

Challenges Faced and Their Solutions

USB port connection error: Solved by using the correct path

Necessity to press the Boot button during upload

Error in identifying management network password: Used grep and solved CMakeLists issue by moving to the correct project folder

Analyzing PCAP files using appropriate tools

Attack Results Analysis

Success in slowing down and disconnecting devices from the network

Authentication data was intercepted

Handshake was obtained and analyzed later

Wireshark's Role in Network Monitoring and Analysis

Wireshark was used to monitor packets and analyze EAPOL authentication protocols during various attacks.

How to Handle PCAP and HCCAPX Files

PCAP files were converted and analyzed using Aircrack-ng, and HCCAPX files were used with password cracking tools.

Conclusion and Future Recommendations

The project represents a successful practical experiment in offensive cybersecurity, as it enhanced network analysis skills and wireless vulnerability discovery. The project scope could be expanded to include protection and defense mechanisms, while implementing Intrusion Detection Systems (IDS) and integrating machine learning techniques for data analysis.