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

Squashed 'picopass/' changes from 1b1df4916..b06f16591

b06f16591 upd picopass
c7ed35df2 upd picopass
17e059f48 update picopass
2eb143373 picopass update
82195486d Update picopass
56ed06818 New naming fixes part 1
0fa60c6d1 update picopass
1f0d6d69c update picopass
c13a51915 add new app and update readme
418a93cbf upd picopass
61ef51d2b update picopass, uhf rfid
9137b58da update ofw plugins, add new plugins
f3107fd74 move base pack here
REVERT: 1b1df4916 Picopass: bump version + changelog (#56)
REVERT: 2e0c1ef38 Picopass: Add haptics to loclass (#53)
REVERT: a493492f2 Picopass: populate key change input with first key of user dictionary (#54)
REVERT: 16986b0fd Picopass more bit formats (#47)
REVERT: d9dec5b20 Improve loclass logic for readers doing keyrolling. (#50)
REVERT: e529b669a Picopass: Remove elite user dictionary from Read Card (#48)
REVERT: 56dec78f8 Picopass: allow zero keys (#44)
REVERT: 86a26a8f5 Picopass: one more readme fix (#42)
REVERT: 8624f6378 Picopass readme fix (#41)
REVERT: 37e316f2d revamp picopass readme and add loclass (#39)
REVERT: c28bbee2d New random file name API fix (#40)
REVERT: 25a4e37b4 Optimise picopass crypto to fix timing issues with newer readers. (#34)
REVERT: 23a7ab9d3 Picopass standard key (#32)
REVERT: 170028527 picopass: clean up UI, espeicially for SR cards (#31)
REVERT: 0c3773e1b Picopass remove sentinel (#29)
REVERT: 0221e4824 Picopass, music player version bump (#28)
REVERT: 41a134ef4 Picopass: allow write immediately after read (#26)
REVERT: e6b26e45e Music player, picopass: assets integration (#23)
REVERT: 44c74e135 Picopass: Rename option (#25)
REVERT: 8d36a9958 Added fap_version field to all apps (#15)
REVERT: 3b3590e30 Add descriptions for all the faps (#13)
REVERT: 106fc1172 Fixes failure to read picopass cards immediately after emulating. (#10)
REVERT: 01b00bb65 Picopass: key change to custom elite key
REVERT: 5669ea4dd Merge pull request #7 from bettse/write_fail
REVERT: e0ff4ce82 Manifest cleanup
REVERT: 2ec5c5e34 Added app descriptions (#8)
REVERT: adf64fc99 bugfix
REVERT: ee763c12d Picopass: Properly indicate write success/failure
REVERT: 0ecdcad65 Merge pull request #3 from nvx/feature/picopass_emulation
REVERT: c90b7580a Screenshots for app catalog (#6)
REVERT: c610548d0 Add picopass emulation
REVERT: 0685939fc Move apps from flipperzero firmware into separate repository

git-subtree-dir: picopass
git-subtree-split: b06f1659148f183c1de2998f518a855a9cde7867
Willy-JL 2 лет назад
Родитель
Сommit
5b871dd5b0

+ 0 - 26
.catalog/README.md

@@ -1,26 +0,0 @@
-# Picopass
-
-
-This application allows you to read, write, save, and emulate legacy HID iClass cards and fobs (based on the picopass chipset).  Also supports saving the credential to the Flipper Zero LFRFID data format, changing the keys on the card, performing dictionary attack, and performing the 'online' part of the loclass attack.
-
-NOTE: Does not support iClass SE
-
-# Loclass
-
-The loclass attack emulates specific CSN and collects responses from the reader which can be used to calculate the elite or custom key configured for that reader.  This key is then used to read data on the cards used with that reader.
-
-## Online part
-
-1. Run _loclass_ from the picopass main menu
-2. Present the flipper to the reader.
-3. Collect responses until the progress bar is full.
-
-NOTE: If the screen says “Got std key” AND stays on 0/18, the reader is not elite or custom keyed.
-
-## Offline part
-
-1. Download the loclass log (_sdcard/apps_data/picopass/.loclass.log_) from your Flipper Zero.
-2. Use [loclass.ericbetts.dev](https://loclass.ericbetts.dev/) or a tool of your choice to calculate the key
-3. Copy the key to _iclass_elite_dict_user.txt_ and place in _sdcard/apps_data/picopass/_
-4. Run _Elite Dict. Attack_ from the picopass main menu
-5. Present card to the back of the Flipper Zero.

+ 0 - 16
.catalog/changelog.md

@@ -1,16 +0,0 @@
-## 1.6
- - Faster loclass response collection
- - Save as LF for all bit lengths
- - Removes unvalidated H10301 parsing
-## 1.5
- - New random filename API
-## 1.4
- - Optimize crypto speed to fix compatibliity with Signo and OmniKey readers
-## 1.3
- - Show standard key instead of hex bytes when detected
-## 1.2
- - Sentinel bit remove
-## 1.1
- - Key dicts moved to app assets 
-## 1.0
- - Initial release

BIN
.catalog/screenshots/1.png


BIN
.catalog/screenshots/2.png


BIN
.catalog/screenshots/3.png


+ 0 - 4
.gitignore

@@ -1,4 +0,0 @@
-dist/*
-.vscode
-.clang-format
-.editorconfig

+ 1 - 1
application.fam

@@ -1,6 +1,6 @@
 App(
 App(
     appid="picopass",
     appid="picopass",
-    name="PicoPass",
+    name="[iClass] PicoPass",
     apptype=FlipperAppType.EXTERNAL,
     apptype=FlipperAppType.EXTERNAL,
     targets=["f7"],
     targets=["f7"],
     entry_point="picopass_app",
     entry_point="picopass_app",

+ 10 - 0
picopass_device.c

@@ -420,3 +420,13 @@ ReturnCode picopass_device_parse_wiegand(uint8_t* credential, PicopassPacs* pacs
 
 
     return ERR_NONE;
     return ERR_NONE;
 }
 }
+
+bool picopass_device_hid_csn(PicopassDevice* dev) {
+    furi_assert(dev);
+    PicopassBlock* AA1 = dev->dev_data.AA1;
+    uint8_t* csn = AA1[PICOPASS_CSN_BLOCK_INDEX].data;
+    // From Proxmark3 RRG sourcecode
+    bool isHidRange = (memcmp(csn + 5, "\xFF\x12\xE0", 3) == 0) && ((csn[4] & 0xF0) == 0xF0);
+
+    return isHidRange;
+}

+ 1 - 0
picopass_device.h

@@ -149,3 +149,4 @@ void picopass_device_set_loading_callback(
 
 
 ReturnCode picopass_device_parse_credential(PicopassBlock* AA1, PicopassPacs* pacs);
 ReturnCode picopass_device_parse_credential(PicopassBlock* AA1, PicopassPacs* pacs);
 ReturnCode picopass_device_parse_wiegand(uint8_t* credential, PicopassPacs* pacs);
 ReturnCode picopass_device_parse_wiegand(uint8_t* credential, PicopassPacs* pacs);
+bool picopass_device_hid_csn(PicopassDevice* dev);

+ 3 - 0
scenes/picopass_scene_read_card_success.c

@@ -45,9 +45,12 @@ void picopass_scene_read_card_success_on_enter(void* context) {
 
 
     if(no_key) {
     if(no_key) {
         furi_string_cat_printf(wiegand_str, "Read Failed");
         furi_string_cat_printf(wiegand_str, "Read Failed");
+        bool hid_csn = picopass_device_hid_csn(picopass->dev);
 
 
         if(pacs->se_enabled) {
         if(pacs->se_enabled) {
             furi_string_cat_printf(credential_str, "SE enabled");
             furi_string_cat_printf(credential_str, "SE enabled");
+        } else if(!hid_csn) {
+            furi_string_cat_printf(credential_str, "Non-HID CSN");
         }
         }
 
 
         widget_add_button_element(
         widget_add_button_element(