Skip to content

Instantly share code, notes, and snippets.

@james-see
Last active May 14, 2024 19:16
Show Gist options
  • Save james-see/e679b10fcb4d85b62e146851fe1d7652 to your computer and use it in GitHub Desktop.
Save james-see/e679b10fcb4d85b62e146851fe1d7652 to your computer and use it in GitHub Desktop.
mdm bypass sonoma
Remove / bypass MDM on Sonoma. Working as of November 2023.
For you being part of group one all you have to do is access recovery mode and disable SIP.
Reboot then go back in recovery mode, open a safari tab, go to https://skipmdm.com and press the button to copy the code.
Should be this: (curl https://raw.githubusercontent.com/maclifevn/bypasmdm/main/mdm.sh -o test.sh && chmod +x ./test.sh && ./test.sh)
Then exit safari, open terminal, paste it there & hit enter, follow the steps and then boom done. Restart computer and once in for added reassurance:
open terminal once logged into normal mode
Run these:
sudo launchctl disable system/com.apple.ManagedClient.enroll
sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
Then do:
sudo nano /etc/hosts


#block mdm connect
0.0.0.0 iprofiles.apple.com
0.0.0.0 mdmenrollment.apple.com
0.0.0.0 deviceenrollment.apple.com
0.0.0.0 gdmf.apple.com
0.0.0.0 acmdm.apple.com
0.0.0.0 albert.apple.com
Lastly reboot into recovery mode and renable SIP
————————————————————————————
Amazing links that might help in certain areas:
https://graffino.com/til/UmkCdmEx7v-remove-a-non-removable-mdm-profile-from-macos-without-a-complete-wipe
https://apple.stackexchange.com/questions/297293/turning-off-device-enrollment-notifications-on-macbook-pro
@chozhall1
Copy link

Do we actually need to disable sip or can these be put into the /etc/hosts file?

@james-see
Copy link
Author

The curl command with the mdm.sh cannot execute without SIP disabled. way before the /etc/hosts

@tutulepew
Copy link

tutulepew commented May 14, 2024

Hi, the website skipmdm.com is no longer be found.
and when I run the code in terminal I get the error: ./test.sh unknown
can you assist here? thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment