Last active
November 14, 2020 14:46
-
-
Save antonydevanchi/cf1b6fc0dca3f99a7b8bc23bef064f09 to your computer and use it in GitHub Desktop.
How to parse raw .mobileconfig with web clips and extract base64 encoded PNG icons from payload. Нахуя и зачем — не спрашивайте. Просто... Примите и отпустите.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strings ~/Downloads/profile_dfcab51cf5cccfd991b9065745bf71c4_signed.mobileconfig | grep -E '<plist/>|<plist.*><' | xmlstarlet sel -t -m /plist/dict/array/dict -v data -n | xargs -n1 bash -c 'echo "$@" | base64 -d > ~/Downloads/`date +%s`_`openssl rand -base64 32 | md5`.png' -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# raw — to .plist file (edit with XCode for rich UI tools) | |
strings ~/Downloads/profile_dfcab51cf5cccfd991b9065745bf71c4_signed.mobileconfig | grep -E '<plist/>|<plist.*><' > $HOME/Downloads/mobileconfig_`date +%s`.plist | |
# raw — to .mobileconfig file (edit with Apple Configurator 2 for rich UI tools) | |
strings ~/Downloads/profile_dfcab51cf5cccfd991b9065745bf71c4_signed.mobileconfig | grep -E '<plist/>|<plist.*><' > $HOME/Downloads/mobileconfig_`date +%s`.mobileconfig | |
# formatted — to terminal | |
strings ~/Downloads/profile_dfcab51cf5cccfd991b9065745bf71c4_signed.mobileconfig | grep -E '<plist/>|<plist.*><' | xmllint -format - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment