Skip to content
Secure example of an XPC helper written in Swift
Swift Objective-C
Branch: master
Clone or download

Latest commit

Latest commit 973f127 Mar 16, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Shared 🚀 Mar 16, 2020
SimpleXPCApp.xcodeproj 🚀 Mar 16, 2020
SimpleXPCApp 🚀 Mar 16, 2020
SimpleXPCService 🚀 Mar 16, 2020
.gitignore
LICENSE Initial commit Mar 16, 2020
README.md link update Mar 16, 2020

README.md

Secure Privileged XPC Helper

Building secure privileged XPC services is not trivial. During my talk "Abusing & Securing XPC in macOS apps" on Objective By The Sea conference, I promised to share an example of a secure one. So, here it is!

Learn XPC exploitation

This tool is not only mentioned to help to secure vulnerable XPC apps but also may help you learning XPC exploitation. Go to the ConnectionVerifier.swift file and comment the if statements.

Installation

1. Please remember that you need to update the Info.plist files with a SecRequirement string basing on your developer certificate, since the Helper uses SMJobless API. More info here

Note, that in order to be secure, the SecRequirement string at least has to include:

  • bundle identifiers (of the installer and the service)
  • your dev certificate's team ID
  • 'anchor trusted' prefix
  • minimum version (of the installer and the service)

2. Updates also need to be performed in Shared/Constants.swift.

You can’t perform that action at this time.