Jump to content
21 posts in this topic

Recommended Posts

Hello, I am trying to fix an issue in the About This Hack app. It's the primary GH repo. 
I need Apple Silicon (not Intel) owners running this command on Terminal and posting the output, saying if it marches current SIP value.

On Intel machines the command runs fine. 
 

ioreg -l | grep csr-active-config | cut -c 38- | cut -c -8

 

It would be even better trying with SIP disabled too.

 

Thank you!

  • Like 2

@Max.1974

My last request. Please try this app on Mac Mini M4 and tell me if the tooltip when hovering over macOS version shows the correct SIP value (enabled/disabled).

Or any other user with Apple Silicon.

Thanks again.

 

Spoiler

sip.thumb.png.26649cb572f16f369b8186ae2c4d3d16.png

 

https://github.com/perez987/About-This-Hack/tree/main/test

 

Edited by miliuco
Typo
  • Like 2

@Max.1974

Different approach. I know that Intel Macs have perl preinstalled by default. But I don't know if Silicon Macs have it too although I think so. 

Can you run in Terminal perl --version or perl -v?

Thank you.

Edited by miliuco
  • Like 1

It seems that perl also exists in Silicon Macs and that it can do what I'm looking for, which is the hexadecimal value of SIP without too much complexity in the code.

Knowing that we have perl by default, the Terminal command below must return the hexadecimal value of SIP (00000000, 03080000, etc.). You can try and tell to me if it's so.

 

nvram -x csr-active-config | grep -E '\s<data>$' -A1 | tail -1 | base64 -d | hexdump | cut -c 9- | tr -d ' ' | xxd -revert -plain | LC_ALL=C rev | tr -d '\n' | xxd -plain | perl -pe 's/^(.{4})(.{4})$/\2\1/g'

 

Thanks again.

  • Like 1

My csrutil was enable but program show disable, maybe refers about my profile key that I disable gatekeeper. 

 

I will reboot system and disable csrutil 

 

 

image.thumb.png.d88648aa2d02ecc6401b1e75d0914a9f.png

Edited by Max.1974

 

image.png.d11de0b569d10a45d9e54ce0907e095d.png

image.thumb.png.d88648aa2d02ecc6401b1e75d0914a9f.png

23 hours ago, miliuco said:

@Max.1974

 

And this command?

 

nvram -x csr-active-config | grep -E '\s<data>$' -A1 | tail -1 | base64 -d | hexdump | cut -c 9- | tr -d ' '

In an Intel Mac or a Hack it returns SIP hex value.

 

imagem.polegar.png.d806338494042a4b91255bb7c83ba805.png

 

 

Sorry if I late my friend, you can send me an e-mail too if I not receive notifications from InsanelyMac 

Perhaps I need install some Home Brew instances? If yes, post the link and will installed  

I configured the topic to receive mail notifications ;) 

Edited by Max.1974

@miliuco my friend, I installed the link version that was 2.0.1, but the update version 2.0.2 show the information about SIP 

 

image.png.8f8df7af8a9bee44c816b75f5b8079ce.png

I will disable SIP to test again, ok? 

  • Like 1

I've been answered in MacRumors: "The method I am trying to use cannot work because Apple Silicon Macs don't store this configuration in NVRAM. There is no csr-active-config variable at all."

So, these commands only work on Hacks and Intel Macs.

Thanks @Max.1974 for your help.

Edited by miliuco
Typo
  • Thanks 1

@miliuco my friend, works with 2.0.1 About this Hack version of test and not work with 2.0.2 version

 

Works fine commands. I hope works fine for your project. 

 

MacBookAir 2020 intel i7 macOs Ventura 13.7.3

 

 

Last login: Mon Feb 24 20:30:44 on console
macbook@MacBook-Air-de-Christian ~ % ioreg -l | grep csr-active-config | cut -c 38- | cut -c -8
7f000000
macbook@MacBook-Air-de-Christian ~ % csrutil status
System Integrity Protection status: disabled.
macbook@MacBook-Air-de-Christian ~ % nvram -x csr-active-config | grep -E '\s<data>$' -A1 | tail -1 | base64 -d | hexdump | cut -c 9- | tr -d ' '
007f0000

macbook@MacBook-Air-de-Christian ~ % perl --version

This is perl 5, version 30, subversion 3 (v5.30.3) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2020, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

macbook@MacBook-Air-de-Christian ~ % nvram -x csr-active-config | grep -E '\s<data>$' -A1 | tail -1 | base64 -d | hexdump | cut -c 9- | tr -d ' ' | xxd -revert -plain | LC_ALL=C rev | tr -d '\n' | xxd -plain | perl -pe 's/^(.{4})(.{4})$/\2\1/g'
7f000000
macbook@MacBook-Air-de-Christian ~ % 

Version test 2.0.1 

 

CapturadeTela2025-02-24s20_35_08.thumb.png.63a2baddbe9e4aafa2683c273f0c0c86.png

 

Version 2.0.2 

 

CapturadeTela2025-02-24s20_36_15.thumb.png.63fa76eabf09053d8118fb2b46bbfef7.png

 

Edited by Max.1974

@Max.1974

 

Thank you very much. Please don't try any harder.


I've already found what I was interested in.


Hacks and Intel Macs store the SIP value in the csr-active-config variable in NVRAM. That's why it's so easy to get this value on these systems. The drawback is that SIP applies to all macOS on the machine since NVRAM is the same for all installed macOS.


But Silicon Macs store the SIP value in a different way that's harder to access. Apple changed this so that SIP is a macOS-dependent value (not NVRAM) and this way you can have different SIP values for different installed macOS. But accessing this value programmatically is much more complex since it's inside system libraries.


Thanks for your effort!

 

We will not go to bed without knowing one more thing 😂

  • Like 1
  • Haha 1
×
×
  • Create New...