-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alyx Ferrari
committed
Aug 5, 2020
1 parent
64513d9
commit 8009c03
Showing
5 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>keychain-access-groups</key> | ||
<array> | ||
<string>*</string> | ||
</array> | ||
<key>platform-application</key> <true/> | ||
<key>com.apple.private.security.no-container</key> <true/> | ||
</dict> | ||
</plist> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
#Original keychain_dumper by Patrick Toomey | ||
#Scrpt by @ReverseThatApp and @vocaeq | ||
|
||
KEYCHAIN_DUMPER_FOLDER=/usr/bin | ||
if [ ! -d "$KEYCHAIN_DUMPER_FOLDER" ] ; then | ||
mkdir "$KEYCHAIN_DUMPER_FOLDER" ; | ||
fi | ||
|
||
# set -e ; | ||
|
||
ENTITLEMENT_PATH=$KEYCHAIN_DUMPER_FOLDER/ent.xml | ||
dbKeychainArray=() | ||
declare -a invalidKeychainArray=("com.apple.bluetooth" | ||
"com.apple.cfnetwork" | ||
"com.apple.cloudd" | ||
"com.apple.continuity.encryption" | ||
"com.apple.continuity.unlock" | ||
"com.apple.icloud.searchpartyd" | ||
"com.apple.ind" | ||
"com.apple.mobilesafari" | ||
"com.apple.rapport" | ||
"com.apple.sbd" | ||
"com.apple.security.sos" | ||
"com.apple.siri.osprey" | ||
"com.apple.telephonyutilities.callservicesd" | ||
"ichat" | ||
"wifianalyticsd" | ||
) | ||
|
||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $ENTITLEMENT_PATH | ||
echo "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> $ENTITLEMENT_PATH | ||
echo "<plist version=\"1.0\">" >> ENTITLEMENT_PATH | ||
echo " <dict>" >> $ENTITLEMENT_PATH | ||
echo " <key>keychain-access-groups</key>" >> $ENTITLEMENT_PATH | ||
echo " <array>" >> $ENTITLEMENT_PATH | ||
|
||
sqlite3 /var/Keychains/keychain-2.db "SELECT DISTINCT agrp FROM genp" > ./allgroups.txt | ||
sqlite3 /var/Keychains/keychain-2.db "SELECT DISTINCT agrp FROM cert" >> ./allgroups.txt | ||
sqlite3 /var/Keychains/keychain-2.db "SELECT DISTINCT agrp FROM inet" >> ./allgroups.txt | ||
sqlite3 /var/Keychains/keychain-2.db "SELECT DISTINCT agrp FROM keys" >> ./allgroups.txt | ||
|
||
while IFS= read -r line; do | ||
dbKeychainArray+=("$line") | ||
if [[ ! " ${invalidKeychainArray[@]} " =~ " ${line} " ]]; then | ||
echo " <string>${line}</string>">> $ENTITLEMENT_PATH | ||
else | ||
echo "Skipping ${line}" | ||
fi | ||
done < ./allgroups.txt | ||
|
||
# cat ./allgroups.txt | sed 's/.*/\ \ \ \ \ \ \ \ \<string\>&\<\/string\>/' >> $ENTITLEMENT_PATH | ||
rm ./allgroups.txt | ||
|
||
echo " </array>">> $ENTITLEMENT_PATH | ||
echo " <key>platform-application</key> <true/>">> $ENTITLEMENT_PATH | ||
echo " <key>com.apple.private.security.no-container</key> <true/>">> $ENTITLEMENT_PATH | ||
echo " </dict>">> $ENTITLEMENT_PATH | ||
echo "</plist>">> $ENTITLEMENT_PATH | ||
|
||
cd $KEYCHAIN_DUMPER_FOLDER | ||
ldid -Sent.xml keychain_dumper | ||
rm ent.xml | ||
echo "Entitlements updated" |