Skip to content

Instantly share code, notes, and snippets.

@augustgl
Last active August 2, 2020 15:20
Show Gist options
  • Save augustgl/07920f0dc429b09acde598d0fd47755c to your computer and use it in GitHub Desktop.
Save augustgl/07920f0dc429b09acde598d0fd47755c to your computer and use it in GitHub Desktop.
#COMMANDS TO DISABLED DEP (REMOTE MANAGEMENT) ON A MACBOOK
#HARD DRIVE SHOULD HAVE PREVIOUSLY BEEN FORMATTED
#MOUNT HARD DRIVE BEFORE YOU DO THIS IN DISK UTILITY
#GO INTO TERMINAL (FIGURE IT OUT)
#TURN DEVICE INTEGRITY PROTECTION OFF
csrutil disable
reboot now
#HOLD CNTRL+R
cd /Volumes/Macintosh\ HD/System/Library
mkdir LaunchDaemons.disabled LaunchAgents.disabled
mv LaunchDaemons/com.apple.ManagedClient* LaunchDaemons.disabled/
mv LaunchAgents/com.apple.ManagedClient* LaunchAgents.disabled/
#BLACKHOLE
cd ../../etc
echo "0.0.0.0 iprofiles.apple.com" >> hosts
echo "0.0.0.0 mdmenrollment.apple.com" >> hosts
echo "0.0.0.0 deviceenrollment.apple.com" >> hosts
echo "0.0.0.0 gdmf.apple.com" >> hosts
#TURN DEVICE INTEGRITY BACK ON
csrutil enable
reboot now
#WHEN SETTING UP THE MACBOOK, DO NOT ALLOW IT TO CONNECT TO THE INTERNET
#GOOD LUCK, HAPPY HACKING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment