Просмотр исходного кода

Revert "Merge mifare_nested from https://github.com/xMasterX/all-the-plugins"

This reverts commit 4d8ed392a5df091ba3ff1d46808de454ae5e5dc5, reversing
changes made to bcb254bb805695cb1f0c0b874dd263ad0b4c0cd7.
Willy-JL 2 лет назад
Родитель
Сommit
60395dc6c3

BIN
mifare_nested/.flipcorg/gallery/1.png


BIN
mifare_nested/.flipcorg/gallery/2.png


BIN
mifare_nested/.flipcorg/gallery/3.png


BIN
mifare_nested/.flipcorg/gallery/4.png


BIN
mifare_nested/.flipcorg/gallery/5.png


BIN
mifare_nested/.flipcorg/gallery/6.png


BIN
mifare_nested/.flipcorg/gallery/7.png


+ 120 - 0
mifare_nested/CHANGELOG.md

@@ -0,0 +1,120 @@
+# Changelog
+
+## 1.5.1
+
+Fix wrong invalid/skipped keys count
+
+## 1.5.0 
+
+Changes:
+
+ - Added new scene with information about why nonces aren't collected (skipped/invalid)
+
+ - Removed some old code, breaking compability with old firmware
+
+ - App renamed from "Flipper (Mifare) Nested" to "Flipper Nested"
+
+
+## 1.4.6
+
+Fix fallback to hardnested 
+
+
+## 1.4.5 
+
+Fix .nested folder if running Hard Nested 
+
+
+## 1.4.4
+
+Fix skipped = false
+
+
+## 1.4.3
+
+Fix invalid free count
+
+
+## 1.4.2
+
+Minor code refactor
+
+
+## 1.4.1
+
+Fix invalid nonces after skipping 
+
+
+## 1.4.0
+
+Changes:
+
+ - Changed scenes, now they are more informative and beautiful (closes #6)
+ 
+ - Check if sector is alive in Nested attacks (closes #5)
+ 
+ - Now tag PRNG detected at sector, where key is available (fix not working with dead 0 sector, closes #4)
+ 
+ - Detect hard PRNG from start, hardnested doesn't require calibration now
+ 
+ - Settings menu: ability to always run Hard Nested (regardless of PRNG)
+ 
+ - Minor code refactoring, a lot of bug fixes (memory leaks, stability improvements)
+ 
+ - Fallback to Hard Nested now after 25 failed tries (was 10)
+
+
+## 1.3.0
+
+Check first_byte_sum (no more invalid ones) 
+
+
+## 1.2.5
+
+Add missing file
+
+
+## 1.2.4
+
+Missing free() on crypto1
+
+
+## 1.2.3
+
+Missing free()
+
+
+## 1.2.2
+
+Migrate to file_stream
+
+
+## 1.2.1
+
+Fix memory leaks 
+
+
+## 1.2.0
+
+Hard Nested attack 
+
+
+## 1.1.1
+
+Improve calibration cycle
+
+
+## 1.1.0
+
+Changes:
+
+ - Change nested folder name to .nested
+ 
+ - Remove .keys file after search
+ 
+ - Bug fixes
+
+
+## 1.0.0
+
+Public release 

+ 29 - 0
mifare_nested/README.CATALOG.md

@@ -0,0 +1,29 @@
+# Mifare Nested Attacks for Flipper Zero
+
+Ported Nested attacks from Proxmark3 (Iceman fork)
+
+## Currently supported attacks
+
+ - nested attack
+ - static nested attack
+ - hard nested attack
+
+## Warning
+
+App is still in early development, so there may be bugs. Your Flipper Zero may randomly crash/froze. Please create issue if you find any bugs (one bug = one issue).
+
+## Disclaimer
+
+The app provided for personal use only. Developer does not take responsibility for any loss or damage caused by the misuse of this app. In addition, the app developer does not guarantee the performance or compatibility of the app with all tags, and cannot be held liable for any damage caused to your tags/Flipper Zero as a result of using the app. By using this app you confirm that the tag belongs to you, you have permission to preform the attack and you agree to hold the app developer harmless from any and all claims, damages, or losses that may arise from its use.
+
+## How to use it?
+
+Detailed guide: https://github.com/AloneLiberty/FlipperNested/wiki/Usage-guide, RU: https://github.com/AloneLiberty/FlipperNested/wiki/%D0%93%D0%B0%D0%B9%D0%B4-%D0%BF%D0%BE-%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8E
+
+## FAQ
+
+For frequently asked questions, please refer to the FAQ: https://github.com/AloneLiberty/FlipperNested/wiki/FAQ, RU: https://github.com/AloneLiberty/FlipperNested/wiki/%D0%A7%D0%90%D0%92%D0%9E
+
+## Contacts
+
+Telegram: https://t.me/libertydev

+ 5 - 4
mifare_nested/README.md

@@ -2,8 +2,9 @@
 
 Ported Nested attacks from Proxmark3 (Iceman fork)
 
-This is not original Repo of this app! Please follow this link to find latest original source and support the author!
-[Flipper (Mifare) Nested (by AloneLiberty)](https://github.com/AloneLiberty/FlipperNested)
+## Download
+
+[![FlipC.org](https://flipc.org/AloneLiberty/FlipperNested/badge?branch=dev)](https://flipc.org/AloneLiberty/FlipperNested?branch=dev)
 
 ## Currently supported attacks
 
@@ -13,7 +14,7 @@ This is not original Repo of this app! Please follow this link to find latest or
 
 ## Warning
 
-App is still in early development, so there may be bugs. Your Flipper Zero may randomly crash/froze. Please create issue if you find any bugs (one bug = one issue). In original repo! - https://github.com/AloneLiberty/FlipperNested
+App is still in early development, so there may be bugs. Your Flipper Zero may randomly crash/froze. Please create issue if you find any bugs (one bug = one issue).
 
 ## Disclaimer
 
@@ -35,4 +36,4 @@ For frequently asked questions, please refer to the FAQ: [EN](https://github.com
 
 ## Contacts
 
-Find here: https://github.com/AloneLiberty/FlipperNested
+Telegram: [@libertydev](https://t.me/libertydev)

+ 58 - 58
mifare_nested/scenes/mifare_nested_scene_static_encrypted_nonce.c

@@ -1,58 +1,58 @@
-#include "../mifare_nested_i.h"
-
-void mifare_nested_scene_static_encrypted_nonce_widget_callback(
-    GuiButtonType result,
-    InputType type,
-    void* context) {
-    MifareNested* mifare_nested = context;
-    if(type == InputTypeShort) {
-        view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result);
-    }
-}
-
-void mifare_nested_scene_static_encrypted_nonce_on_enter(void* context) {
-    MifareNested* mifare_nested = context;
-    Widget* widget = mifare_nested->widget;
-
-    notification_message(mifare_nested->notifications, &sequence_error);
-
-    widget_add_icon_element(widget, 73, 12, &I_DolphinCry);
-    widget_add_string_element(
-        widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Static encrypted nonce");
-    widget_add_string_element(widget, 0, 12, AlignLeft, AlignTop, FontSecondary, "This tag isn't");
-    widget_add_string_element(widget, 0, 22, AlignLeft, AlignTop, FontSecondary, "vulnerable to");
-    widget_add_string_element(widget, 0, 32, AlignLeft, AlignTop, FontSecondary, "Nested attack");
-
-    widget_add_button_element(
-        widget,
-        GuiButtonTypeLeft,
-        "Back",
-        mifare_nested_scene_static_encrypted_nonce_widget_callback,
-        mifare_nested);
-
-    // Setup and start worker
-    view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget);
-}
-
-bool mifare_nested_scene_static_encrypted_nonce_on_event(void* context, SceneManagerEvent event) {
-    MifareNested* mifare_nested = context;
-    bool consumed = false;
-
-    if(event.type == SceneManagerEventTypeCustom) {
-        if(event.event == GuiButtonTypeCenter || event.event == GuiButtonTypeLeft) {
-            scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
-            consumed = true;
-        }
-    } else if(event.type == SceneManagerEventTypeBack) {
-        scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
-        consumed = true;
-    }
-
-    return consumed;
-}
-
-void mifare_nested_scene_static_encrypted_nonce_on_exit(void* context) {
-    MifareNested* mifare_nested = context;
-
-    widget_reset(mifare_nested->widget);
-}
+#include "../mifare_nested_i.h"
+
+void mifare_nested_scene_static_encrypted_nonce_widget_callback(
+    GuiButtonType result,
+    InputType type,
+    void* context) {
+    MifareNested* mifare_nested = context;
+    if(type == InputTypeShort) {
+        view_dispatcher_send_custom_event(mifare_nested->view_dispatcher, result);
+    }
+}
+
+void mifare_nested_scene_static_encrypted_nonce_on_enter(void* context) {
+    MifareNested* mifare_nested = context;
+    Widget* widget = mifare_nested->widget;
+
+    notification_message(mifare_nested->notifications, &sequence_error);
+
+    widget_add_icon_element(widget, 73, 12, &I_DolphinCry);
+    widget_add_string_element(
+        widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Static encrypted nonce");
+    widget_add_string_element(widget, 0, 12, AlignLeft, AlignTop, FontSecondary, "This tag isn't");
+    widget_add_string_element(widget, 0, 22, AlignLeft, AlignTop, FontSecondary, "vulnerable to");
+    widget_add_string_element(widget, 0, 32, AlignLeft, AlignTop, FontSecondary, "Nested attack");
+
+    widget_add_button_element(
+        widget,
+        GuiButtonTypeLeft,
+        "Back",
+        mifare_nested_scene_static_encrypted_nonce_widget_callback,
+        mifare_nested);
+
+    // Setup and start worker
+    view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewWidget);
+}
+
+bool mifare_nested_scene_static_encrypted_nonce_on_event(void* context, SceneManagerEvent event) {
+    MifareNested* mifare_nested = context;
+    bool consumed = false;
+
+    if(event.type == SceneManagerEventTypeCustom) {
+        if(event.event == GuiButtonTypeCenter || event.event == GuiButtonTypeLeft) {
+            scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
+            consumed = true;
+        }
+    } else if(event.type == SceneManagerEventTypeBack) {
+        scene_manager_search_and_switch_to_previous_scene(mifare_nested->scene_manager, 0);
+        consumed = true;
+    }
+
+    return consumed;
+}
+
+void mifare_nested_scene_static_encrypted_nonce_on_exit(void* context) {
+    MifareNested* mifare_nested = context;
+
+    widget_reset(mifare_nested->widget);
+}