Proxmark / proxmark3

Proxmark 3
http://www.proxmark.org/
GNU General Public License v2.0
3.15k stars 906 forks source link

/System/Library/Extensions/Proxmark3.kext/Contents: Read-only file system #922

Open ghost opened 4 years ago

ghost commented 4 years ago

While I try to use sudo make install_kext There is an error.

MacOS 10.15.3

mkdir -p /System/Library/Extensions/Proxmark3.kext/Contents
mkdir: /System/Library/Extensions/Proxmark3.kext/Contents: Read-only file system
make: *** [Makefile:39: install_kext] Error 1

image

pwpiwi commented 4 years ago

You are walking on ancient grounds :smiley:. I don't own or know much about MacOS. If this compares to Linux then probably the respective filesystem needs to be remounted read/write before make install_kext. However, I would assume that there is a more standard way to add Extensions...

pwpiwi commented 4 years ago

Please try Pull Request #923 which should do the remount when running 'sudo make kext_install'

iceman1001 commented 4 years ago

...like Piwi said, why are you using the hid-flasher ? We are talking pre-2013 now.

ghost commented 4 years ago

while, the firmware of my proxmark3 is quite old.... I just follow the instructions to upgrade.... image

Please try Pull Request #923 which should do the remount when running 'sudo make kext_install'

Thanks, Let me try.

ghost commented 4 years ago

...like Piwi said, why are you using the hid-flasher ? We are talking pre-2013 now.

It seems like it still can't work. Maybe to make /system unchangeable is the new feature of Catalina to protect the MacOS ? image

ghost commented 4 years ago

oh, I solved this problem by switching system. Thanks

pwpiwi commented 4 years ago

Switching the system is not really a fix. 😃

I have added the root directory to the mount command. If you don't mind, can you please sudo make install_kext again. Some users may benefit in the future.

alfonsrv commented 4 years ago

Still does not work, same error. Upgrade wiki for macOS seems outdated.
Using the CDC Flasher works, however I still get an error when trying to use pm3-flash-all

After upgrade, nothing seems to have changed.

alfons@NullX client % system_profiler SPUSBDataType

        proxmark3:

          Product ID: 0x4b8f
          Vendor ID: 0x9ac4
          Version: 0.01
          Speed: Up to 12 Mb/s
          Manufacturer: proxmark.org
          Location ID: 0x14400000 / 40
          Current Available (mA): 500
          Current Required (mA): 150
          Extra Operating Current (mA): 0

pm3-flash-all output:

alfons@NullX client % pm3-flash-all
[=] Session log /Users/alfons/.proxmark3/logs/log_20200615.txt
[+] About to use the following files:
[+]    /usr/local/Cellar/proxmark3/HEAD-d750735/bin/../share/proxmark3/firmware/bootrom.elf
[+]    /usr/local/Cellar/proxmark3/HEAD-d750735/bin/../share/proxmark3/firmware/fullimage.elf
[+] Waiting for Proxmark3 to appear on /dev/tty.usbmodem14401
 🕑  59 found
[+] Entering bootloader...
[+] (Press and release the button only to abort)
[+] Waiting for Proxmark3 to appear on /dev/tty.usbmodem14401
 🕘  54 found
[!!] 🚨 ====================== OBS ! ===========================================
[!!] 🚨 Note: Your bootloader does not understand the new CMD_BL_VERSION command
[!!] 🚨 It is recommended that you first update your bootloader alone,
[!!] 🚨 reboot the Proxmark3 then only update the main firmware

[=] Available memory on this board: UNKNOWN

[!!] 🚨 ====================== OBS ! ======================================
[!!] 🚨 Note: Your bootloader does not understand the new CHIP_INFO command
[!!] 🚨 It is recommended that you first update your bootloader alone,
[!!] 🚨 reboot the Proxmark3 then only update the main firmware

[=] Permitted flash range: 0x00100000-0x00140000
[+] Loading ELF file /usr/local/Cellar/proxmark3/HEAD-d750735/bin/../share/proxmark3/firmware/bootrom.elf
[+] Loading usable ELF segments:
[+]    0: V 0x00100000 P 0x00100000 (0x00000200->0x00000200) [R X] @0x94
[+]    1: V 0x00200000 P 0x00100200 (0x00000d50->0x00000d50) [R X] @0x298

[+] Loading ELF file /usr/local/Cellar/proxmark3/HEAD-d750735/bin/../share/proxmark3/firmware/fullimage.elf
[+] Loading usable ELF segments:
[+]    0: V 0x00102000 P 0x00102000 (0x0003ca58->0x0003ca58) [R X] @0x94
[+]    1: V 0x00200000 P 0x0013ea58 (0x00001968->0x00001968) [RW ] @0x3caec
[!!] 🚨 Error: PHDR is not contained in Flash
[+] All done
pwpiwi commented 4 years ago

You are obviously using the RRG repository and therefore should report issues there: https://github.com/RfidResearchGroup/proxmark3/issues

alfonsrv commented 4 years ago

No. I tried using the RRG repository before using the pm3-flash-all command and – after I got the error my board would not support the commands yet, I thought I would have to update the bootloader manually before I could use the more "automatic" update process.
So I resorted to the Proxmark/proxmark3 repo and followed the macOS steps, which puts me in the position to confirm the kext issue is still very much present under macOS 10.15.5. Ignoring the HID flasher and the connected kext, and instead using the client/flasher worked though.

Afterwards I ran into an issue where the proxmark3 cli client would no longer talk to my Proxmark, before I read somewhere that the clients are not intercompatible with the firmwares of the individual repos or even subversions anymore. So this issue was ultimately resolved by manually compiling the firmware of the RRG repository instead (which only works for the RDV3 if you edit some Makefile.sample) and manually flashing their image instead.
Besides the discrepancies with macOS Catalina clearly not being supported properly in the process outlined in the wiki of this repository, I must say it is somewhat confusing to have no note anywhere how much RRG and this repo have formed a defacto two-world system, other than on some nested sub-pages and forum posts.

iceman1001 commented 4 years ago

.... if you get that message.... you should flash bootrom first like the instructions says.

./pm3-flash-bootrom
./pm3-flash-fullimage

Its the normal way to switch to RRG/Iceman repo.

pwpiwi commented 4 years ago

which puts me in the position to confirm the kext issue is still very much present under macOS 10.15.5

Did you apply the changes in https://github.com/Proxmark/proxmark3/pull/923/files before running sudo make install_kext?

alfonsrv commented 4 years ago

Did you apply the changes in https://github.com/Proxmark/proxmark3/pull/923/files before running sudo make install_kext?

Sorry, thought it was already merged. I did not.

pwpiwi commented 4 years ago

No it isn't merged. I don't have access to a MacOS machine and I don't like to merge untested changes.

alfonsrv commented 4 years ago

Probably a setup Virtualbox image out there. But I'll try the code on a lab Hackintosh on Wednesday and will report back.

mattop4d commented 4 years ago

Came here to confirm that the fix in the PR is not working. I got this error:

$ sudo make install_kext

spctl --master-disable
mount -uw /
mount_apfs: volume could not be mounted: Operation not permitted
mount: / failed with 77
make: *** [install_kext] Error 77

Tested on a Macbook Pro with MacOS Catalina 10.15.6

pwpiwi commented 3 years ago

See https://www.tonymacx86.com/threads/macos-10-15-catalina-how-to-mount-root-partition-read-write-for-post-installation.283749/page-2#post-2018467 for some hint