objective-see / LuLu

LuLu is the free macOS firewall
GNU General Public License v3.0
9.43k stars 438 forks source link

How to compile LuLu step-by-step #568

Open sam49358 opened 7 months ago

sam49358 commented 7 months ago

Notes:

Step-By-Step:

  1. Enroll in Apple Developer Program for $99 at https://developer.apple.com/programs/enroll/
  2. Wait a few hours/days to be approved
  3. Clone the LuLu repo and click Open Existing Project on Xcode and select the LuLu folder
  4. On the Menu bar, go to Xcode > Settings and login to your Apple account
  5. Click manage certificates, and click the + on the bottom, and select Developer ID Application, click Done
  6. Go to https://developer.apple.com/account/resources
  7. On the sidebar, click Identifiers, and create a new Identifier
  8. Select App IDs, click Continue
  9. Select App, click Continue
  10. For the Description, use something like LuLuApp
  11. For the Bundle ID, use something like com.lulurocks.lulu
  12. Scroll down and select the checkbox to Enable next to Network Extensions and System Extension
  13. Click Continue, then Register
  14. On the sidebar, click Identifiers, and create a new Identifier
  15. Select App IDs, click Continue
  16. Select App, click Continue
  17. For the Description, use something like LuLuExtension
  18. For the Bundle ID, use something like com.lulurocks.luluextension
  19. Scroll down and select the checkbox to Enable next to Network Extensions and System Extension
  20. Click Continue, then Register
  21. On the sidebar, click Profiles, and create a new Profile
  22. Select Developer ID and click Continue
  23. Select the dropdown and choose LuLuApp and click Continue
  24. Select your Developer ID Application and click Continue
  25. For the profile name, use something like LuLuAppProfile and click Generate, and click Download
  26. On the sidebar, click Profiles, and create a new Profile
  27. Select Developer ID and click Continue
  28. Select the dropdown and choose LuLuExtension and click Continue
  29. Select your Developer ID Application and click Continue
  30. For the profile name, use something like LuLuExtensionProfile and click Generate, and click Download
  31. In Xcode, click LuLu on the sidebar
  32. Under Targets, click Lulu
  33. On the tabs at the top, click Signing & Capabilities
  34. Make sure it is unchecked: Automatically manage signing
  35. For Bundle identifier, use the value you used earlier, such as com.lulurocks.lulu
  36. For the provisioning profile dropdown, click Import Profile, and select LuLuAppProfile that you downloaded
  37. Under Targets, click Extension
  38. On the tabs at the top, click Signing & Capabilities
  39. Make sure it is unchecked: Automatically manage signing
  40. For Bundle identifier, use the value you used earlier, such as com.lulurocks.luluextension
  41. For the provisioning profile dropdown, click Import Profile, and select LuLuExtensionProfile that you downloaded
  42. Click Uninstaller on the sidebar
  43. Under Targets, click Uninstaller
  44. On the tabs at the top, click Signing & Capabilities
  45. Make sure it is unchecked: Automatically manage signing
  46. For Team, select your name from the dropdown menu
  47. Under Targets, click helper
  48. On the tabs at the top, click Signing & Capabilities
  49. Make sure it is unchecked: Automatically manage signing
  50. For Team, select your name from the dropdown menu
  51. Download the Netiquette zip from https://github.com/objective-see/Netiquette/releases
  52. Unzip the file
  53. Place the app file here /LuLu-master/LuLu/Binaries/Netiquette.app
  54. In Xcode, in the menubar, click Product > Archive
  55. Click Distribute App
  56. Click Custom, then Next
  57. Click Developer ID, then Next
  58. Click Export, then Next
  59. For LuLu app, select the dropdown, click Import Profile, and select LuLuAppProfile that you downloaded
  60. For LuLu extension, select the dropdown, click Import Profile, and select LuLuExtensionProfile that you downloaded
  61. For Uninstaller, select None
  62. Click next, click Export
  63. Go to the folder where the app was exported, and copy the LuLu.app file to /Applications/
  64. Open LuLu.app, click next
  65. LuLu will say "Waiting for System Extension Approval", followed by an error popup that says "ERROR: activation failed" and "failed to activate system extension"

Currently blocked at this step and not sure how to move forward. Any help would be appreciated @objective-see

objective-see commented 6 months ago

Aloha, Apologies - I haven't had time yet to double check all these steps, but that error indicates that macOS is not happy with the resigned/re-bundled extension 😔

tl;dr I guessing its failing as you don't have the System Extension entitlement?

That error is thrown here: https://github.com/objective-see/LuLu/blob/4136b68d40f01e64d6d9f68f875391782c308e4d/LuLu/App/AppDelegate.m#L162C2-L162C2

The toggleExtension method can be found here: https://github.com/objective-see/LuLu/blob/4136b68d40f01e64d6d9f68f875391782c308e4d/LuLu/App/Extension.m#L22

You can see that it just calls into the OSSystemExtensionRequest / OSSystemExtensionManager APIs ...which are the macOS System Extension APIs to activate a system extension.

You can read all about this in a recent talk I gave: https://speakerdeck.com/patrickwardle/nothing-but-net-leveraging-macoss-networking-frameworks-to-heuristically-detect-malware

If I had to guess these macOS APIs are failing as you don't have the necessary "System Extension" entitlement that must be explicty granted to you by Apple:

image

On Apple developer site, you can find a link to apply for the this entitlement: https://developer.apple.com/contact/request/system-extension/

I'd suggest

  1. Turing off SIP and seeing if that fixes the issue (IIRC, when SIP is off, you won't need the entitlement)
  2. Checking the system logs - which will show you exactly why macOS is rejecting the extension activation.

Hope this helps ...and I totally feel your pain, re-compiling open-source apps for macOS is next to impossible (because of entitlements, leveraged by Apple): https://twitter.com/patrickwardle/status/1297384808872415234

sam49358 commented 6 months ago

Thank you for the details! I ended up switching to another OS firewall but will return to LuLu if I run into issues there. I will leave this 'issue' open for future devs that want to try compiling LuLu

winiciusallan commented 2 months ago

Hello o/

I'm reproducing this step-by-step and reach at the same error as @sam49358. When I was creating the identifier, I enable the System Extension, idk if is enough. Also, I tried to turn off the SIP and launch again the application, but error still appear.

Suggestions to just build and test or the only way is ask to Apple for System Entitlement?

Any help would be appreciated @objective-see :).

winiciusallan commented 2 months ago

I have faced the same problems as @sam49358 and I would like to highlight some steps that were missed.

In the LuLu App, along with both targets (LuLu and Extensions), there are some mismatches in build settings in XCode e.g. Product Name. Those values must match your bundle. But these things are not enough to build the application.

I checked the syslogs with log stream --level debug --predicate="subsystem='com.objective-see.lulu'" and see that this method

https://github.com/objective-see/LuLu/blob/4136b68d40f01e64d6d9f68f875391782c308e4d/LuLu/App/Extension.m#L22

request OSSystemExtensionRequest API with EXT_BUNDLE_ID const defined in LuLu/Shared/consts.h.

https://github.com/objective-see/LuLu/blob/4136b68d40f01e64d6d9f68f875391782c308e4d/LuLu/App/Extension.m#L40

Therefore, if you are signing the software with your own certificate and bundle, you will need to change all references in LuLu/Shared/consts.h. Additionally, if the software is not notarized by Apple, you will need to disable SIP.

Solution:

My solution to this issue is to place the hardcoded code part in a configuration file, which would simplify the process. I will be opening a pull request with the appropriate changes soon."

donaldguy commented 2 weeks ago

Sidenote: OP's directions need an update to include making an app group id and associating it with each app id, inter alia


tl;dr look to empty out rg --binary -P 'VBG97UB4TA|com.objective-see.(?!Netiquette)'

(Edit: and maybe git mv Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist …)


As to moving forward, Yeah, as above, the core reported error from sysextd is

bundle identifier and service path did not match (com.objective-see.lulu.extension !=$my_registered_app_id.lulu.extension)

(and systemextensionctl developer on is no help; I think my SIP and "boot security" stuff is already pretty permissive)

I'm frankly surprised that the notarization servers will return an artifact with that sort of mismatch but c'est la vie


Haven't gotten a green light yet, but think I[^1] should be good next round [EDIT 2: in fact yes; all worked fine / as designed] with changes, as of 2cc936b1763572480db7d08a78920c080caec5a2, as:

$ git diff --stat
 LuLu/App/App.entitlements                                                |  2 +-
 LuLu/Extension/Extension.entitlements                                    |  2 +-
 LuLu/Extension/Info.plist                                                |  2 +-
 LuLu/Extension/main.m                                                    |  2 +-
 LuLu/LuLu.xcodeproj/project.pbxproj                                      | 58 +++++++++++++++++++++++++++++++++++-----------------------
 LuLu/Shared/consts.h                                                     | 20 ++++++++++----------
 Uninstaller/Helper/HelperInterface.m                                     |  4 ++--
 Uninstaller/Helper/Info.plist                                            |  4 ++--
 Uninstaller/Helper/Launchd.plist                                         |  4 ++--
 Uninstaller/Shared/consts.h                                              | 16 ++++++++--------
 Uninstaller/Uninstaller.xcodeproj/project.pbxproj                        | 46 ++++++++++++++++++++++++----------------------
 Uninstaller/Uninstaller.xcodeproj/xcshareddata/xcschemes/helper.xcscheme |  6 +++---
 Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist         |  4 ++--
 Uninstaller/Uninstaller/Info.plist                                       |  4 ++--
 Uninstaller/Uninstaller/Script/configure.sh                              |  6 +++---
 15 files changed, 97 insertions(+), 83 deletions(-)

and for completeness here is:

git commit -am "the changes" && git format-patch HEAD~1 && \<br>
sed -i'' -e "s/${REDACTED_APP_ID_PREFIX}/your.bundle.id/g;s/${REDACTED_TEAM_ID}/UR73AMID/g" ./0001-the-changes.patch <br>

# I have no idea why I'm acting like these are sensitive 
# ... but I mean, you definitely don't want mine, they won't work for you

# You probs also don't want my provisioning profile names, "Lilith Lulu App" and "Lilith Lulu Extension", 
#nor the couple "Donald Guy"s that replaced "Objective See, LLC"s but I'm too lazy to remove those

0001-the-changes.patch

^ the 632 post-stat lines of that, if you'd rather see here with syntax highlighting ```diff diff --git a/LuLu/App/App.entitlements b/LuLu/App/App.entitlements index 42fab08..06e64fd 100644 --- a/LuLu/App/App.entitlements +++ b/LuLu/App/App.entitlements @@ -10,7 +10,7 @@ com.apple.security.application-groups - $(TeamIdentifierPrefix)com.objective-see.lulu + $(TeamIdentifierPrefix)group.your.bundle.id.lulu diff --git a/LuLu/Extension/Extension.entitlements b/LuLu/Extension/Extension.entitlements index c1eb3ab..b2f090f 100644 --- a/LuLu/Extension/Extension.entitlements +++ b/LuLu/Extension/Extension.entitlements @@ -12,7 +12,7 @@ com.apple.security.application-groups - $(TeamIdentifierPrefix)com.objective-see.lulu + $(TeamIdentifierPrefix)your.bundle.id.lulu diff --git a/LuLu/Extension/Info.plist b/LuLu/Extension/Info.plist index 704a677..686634b 100644 --- a/LuLu/Extension/Info.plist +++ b/LuLu/Extension/Info.plist @@ -29,7 +29,7 @@ NetworkExtension NEMachServiceName - $(TeamIdentifierPrefix)com.objective-see.lulu + $(TeamIdentifierPrefix)your.bundle.id.lulu NEProviderClasses com.apple.networkextension.filter-data diff --git a/LuLu/Extension/main.m b/LuLu/Extension/main.m index c0c3f4a..3b45690 100644 --- a/LuLu/Extension/main.m +++ b/LuLu/Extension/main.m @@ -7,7 +7,7 @@ // //FOR LOGGING: -// % log stream --level debug --predicate="subsystem='com.objective-see.lulu'" +// % log stream --level debug --predicate="subsystem='your.bundle.id.lulu'" #import "main.h" diff --git a/LuLu/LuLu.xcodeproj/project.pbxproj b/LuLu/LuLu.xcodeproj/project.pbxproj index 9eb99c5..918c774 100644 --- a/LuLu/LuLu.xcodeproj/project.pbxproj +++ b/LuLu/LuLu.xcodeproj/project.pbxproj @@ -61,7 +61,7 @@ CDB2CC3324D61B3900D0EECE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB2CC3224D61B3900D0EECE /* NetworkExtension.framework */; }; CDB2CC3724D61B3900D0EECE /* FilterDataProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = CDB2CC3624D61B3900D0EECE /* FilterDataProvider.m */; }; CDB2CC3924D61B3900D0EECE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CDB2CC3824D61B3900D0EECE /* main.m */; }; - CDB2CC3E24D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = CDB2CC3024D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + CDB2CC3E24D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = CDB2CC3024D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; CDB2CC4424DBE48100D0EECE /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDB2CC3224D61B3900D0EECE /* NetworkExtension.framework */; }; CDB909EB2B72BC230043FEB4 /* Configure.m in Sources */ = {isa = PBXBuildFile; fileRef = CDB909EA2B72BC230043FEB4 /* Configure.m */; }; CDC378C7250C66C300314064 /* Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = CDC378C6250C66C300314064 /* Extension.m */; }; @@ -90,7 +90,7 @@ dstPath = "$(SYSTEM_EXTENSIONS_FOLDER_PATH)"; dstSubfolderSpec = 16; files = ( - CDB2CC3E24D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension in Embed System Extensions */, + CDB2CC3E24D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension in Embed System Extensions */, ); name = "Embed System Extensions"; runOnlyForDeploymentPostprocessing = 0; @@ -194,7 +194,7 @@ CDB2CC2324D61A5000D0EECE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CDB2CC2424D61A5000D0EECE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; CDB2CC2624D61A5000D0EECE /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = ""; }; - CDB2CC3024D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = "com.objective-see.lulu.extension.systemextension"; sourceTree = BUILT_PRODUCTS_DIR; }; + CDB2CC3024D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = your.bundle.id.lulu.extension.systemextension; sourceTree = BUILT_PRODUCTS_DIR; }; CDB2CC3224D61B3900D0EECE /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; CDB2CC3524D61B3900D0EECE /* FilterDataProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FilterDataProvider.h; sourceTree = ""; }; CDB2CC3624D61B3900D0EECE /* FilterDataProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FilterDataProvider.m; sourceTree = ""; }; @@ -282,7 +282,7 @@ isa = PBXGroup; children = ( CDB2CC1824D61A4E00D0EECE /* LuLu.app */, - CDB2CC3024D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension */, + CDB2CC3024D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension */, ); name = Products; sourceTree = ""; @@ -454,7 +454,7 @@ ); name = Extension; productName = Extension; - productReference = CDB2CC3024D61B3900D0EECE /* com.objective-see.lulu.extension.systemextension */; + productReference = CDB2CC3024D61B3900D0EECE /* your.bundle.id.lulu.extension.systemextension */; productType = "com.apple.product-type.system-extension"; }; /* End PBXNativeTarget section */ @@ -741,11 +741,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = App/Info.plist; @@ -756,9 +758,10 @@ MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 2.6.3; ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.app"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.app; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "LuLu Application"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lilith Lulu App"; }; name = Debug; }; @@ -767,11 +770,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = App/App.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = App/Info.plist; @@ -781,9 +786,10 @@ ); MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 2.6.3; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.app"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.app; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "LuLu Application"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lilith Lulu App"; }; name = Release; }; @@ -791,10 +797,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = Extension/Info.plist; @@ -807,9 +815,10 @@ MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 2.6.3; ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.extension"; - PRODUCT_NAME = "com.objective-see.lulu.extension"; - PROVISIONING_PROFILE_SPECIFIER = "LuLu Extension"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.extension; + PRODUCT_NAME = your.bundle.id.lulu.extension; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lilith Lulu Extension"; SKIP_INSTALL = YES; }; name = Debug; @@ -818,10 +827,12 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = Extension/Info.plist; @@ -833,9 +844,10 @@ LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.15; MARKETING_VERSION = 2.6.3; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.extension"; - PRODUCT_NAME = "com.objective-see.lulu.extension"; - PROVISIONING_PROFILE_SPECIFIER = "LuLu Extension"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.extension; + PRODUCT_NAME = your.bundle.id.lulu.extension; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lilith Lulu Extension"; SKIP_INSTALL = YES; }; name = Release; diff --git a/LuLu/Shared/consts.h b/LuLu/Shared/consts.h index fab5a0c..7a05c17 100644 --- a/LuLu/Shared/consts.h +++ b/LuLu/Shared/consts.h @@ -20,22 +20,22 @@ enum Signer{None, Apple, AppStore, DevID, AdHoc}; #define OBJECTIVE_SEE_VENDOR "com.objectiveSee" //bundle ID -#define BUNDLE_ID "com.objective-see.lulu" +#define BUNDLE_ID "your.bundle.id.lulu" //extension bundle ID -#define EXT_BUNDLE_ID @"com.objective-see.lulu.extension" +#define EXT_BUNDLE_ID @"your.bundle.id.lulu.extension" //main app bundle id -#define APP_ID @"com.objective-see.lulu.app" +#define APP_ID @"your.bundle.id.lulu.app" //signing auth -#define SIGNING_AUTH @"Developer ID Application: Objective-See, LLC (VBG97UB4TA)" +#define SIGNING_AUTH @"Developer ID Application: Donald Guy (UR73AMID)" //firewall event: new flow -#define LULU_EVENT @"com.objective-see.lulu.event" +#define LULU_EVENT @"your.bundle.id.lulu.event" //lulu service -#define LULU_SERVICE_NAME "com_objective_see_firewall" +#define LULU_SERVICE_NAME "your_bundle_id_lulu_firewall" //install directory #define INSTALL_DIRECTORY @"/Library/Objective-See/LuLu" @@ -59,7 +59,7 @@ enum Signer{None, Apple, AppStore, DevID, AdHoc}; #define STATUS_CLIENT_ENABLED 1 //daemon mach name -#define DAEMON_MACH_SERVICE @"VBG97UB4TA.com.objective-see.lulu" +#define DAEMON_MACH_SERVICE @"UR73AMID.your.bundle.id.lulu" //rule state; not found #define RULE_STATE_NOT_FOUND -1 @@ -184,10 +184,10 @@ enum Signer{None, Apple, AppStore, DevID, AdHoc}; #define KEY_ERROR_SUB_MSG @"errorSubMsg" //rules changed -#define RULES_CHANGED @"com.objective-see.lulu.rulesChanged" +#define RULES_CHANGED @"your.bundle.id.lulu.rulesChanged" //extension event -#define EXTENSION_EVENT @"com.objective-see.lulu.extensionEvent" +#define EXTENSION_EVENT @"your.bundle.id.lulu.extensionEvent" /* INSTALLER */ @@ -198,7 +198,7 @@ enum Signer{None, Apple, AppStore, DevID, AdHoc}; #define LAUNCH_DAEMON_BINARY @"LuLu" //launch daemon plist -#define LAUNCH_DAEMON_PLIST @"com.objective-see.lulu.plist" +#define LAUNCH_DAEMON_PLIST @"your.bundle.id.lulu.plist" //installed apps file #define INSTALLED_APPS @"installedApps" diff --git a/Uninstaller/Helper/HelperInterface.m b/Uninstaller/Helper/HelperInterface.m index 0461476..1ef8bd4 100644 --- a/Uninstaller/Helper/HelperInterface.m +++ b/Uninstaller/Helper/HelperInterface.m @@ -17,10 +17,10 @@ #define CONF_SCRIPT @"configure.sh" //installer (helper) ID -#define CONFIG_HELPER_ID @"com.objective-see.lulu.configHelper" +#define CONFIG_HELPER_ID @"your.bundle.id.lulu.configHelper" //signing auth -#define SIGNING_AUTH @"Developer ID Application: Objective-See, LLC (VBG97UB4TA)" +#define SIGNING_AUTH @"Developer ID Application: Donald Guy (UR73AMID)" /* GLOBALS */ diff --git a/Uninstaller/Helper/Info.plist b/Uninstaller/Helper/Info.plist index 6dadde3..c9a8458 100644 --- a/Uninstaller/Helper/Info.plist +++ b/Uninstaller/Helper/Info.plist @@ -3,7 +3,7 @@ CFBundleIdentifier - com.objective-see.lulu.configHelper + your.bundle.id.lulu.configHelper CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -16,7 +16,7 @@ Copyright (c) 2019 Objective-See. All rights reserved. SMAuthorizedClients - anchor apple generic and identifier "com.objective-see.lulu.config" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = VBG97UB4TA) + anchor apple generic and identifier "your.bundle.id.lulu.config" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = UR73AMID) diff --git a/Uninstaller/Helper/Launchd.plist b/Uninstaller/Helper/Launchd.plist index cb15525..b4bd011 100644 --- a/Uninstaller/Helper/Launchd.plist +++ b/Uninstaller/Helper/Launchd.plist @@ -3,10 +3,10 @@ Label - com.objective-see.lulu.configHelper + your.bundle.id.lulu.configHelper MachServices - com.objective-see.lulu.configHelper + your.bundle.id.lulu.configHelper EnableTransactions diff --git a/Uninstaller/Shared/consts.h b/Uninstaller/Shared/consts.h index 6d5cc87..f1d5490 100644 --- a/Uninstaller/Shared/consts.h +++ b/Uninstaller/Shared/consts.h @@ -16,28 +16,28 @@ #define CS_RUNTIME 0x00010000 //bundle ID -#define BUNDLE_ID "com.objective-see.lulu" +#define BUNDLE_ID "your.bundle.id.lulu" //main app bundle id -#define MAIN_APP_ID @"com.objective-see.lulu.app" +#define MAIN_APP_ID @"your.bundle.id.lulu.app" //helper (login item) ID -#define HELPER_ID @"com.objective-see.lulu.helper" +#define HELPER_ID @"your.bundle.id.lulu.helper" //installer (app) ID -#define CONFIG_ID @"com.objective-see.lulu.config" +#define CONFIG_ID @"your.bundle.id.lulu.config" //installer (helper) ID -#define CONFIG_HELPER_ID @"com.objective-see.lulu.configHelper" +#define CONFIG_HELPER_ID @"your.bundle.id.lulu.configHelper" //signing auth -#define SIGNING_AUTH @"Developer ID Application: Objective-See, LLC (VBG97UB4TA)" +#define SIGNING_AUTH @"Developer ID Application: Donald Guy (UR73AMID)" //install directory #define INSTALL_DIRECTORY @"/Library/Objective-See/LuLu" //daemon mach name -#define DAEMON_MACH_SERVICE @"com.objective-see.lulu" +#define DAEMON_MACH_SERVICE @"your.bundle.id.lulu" //product version url #define PRODUCT_VERSIONS_URL @"https://objective-see.com/products.json" @@ -107,7 +107,7 @@ #define LAUNCH_DAEMON_BINARY @"LuLu" //launch daemon plist -#define LAUNCH_DAEMON_PLIST @"com.objective-see.lulu.plist" +#define LAUNCH_DAEMON_PLIST @"your.bundle.id.lulu.plist" //frame shift // for status msg to avoid activity indicator diff --git a/Uninstaller/Uninstaller.xcodeproj/project.pbxproj b/Uninstaller/Uninstaller.xcodeproj/project.pbxproj index f3d7f88..73438ca 100644 --- a/Uninstaller/Uninstaller.xcodeproj/project.pbxproj +++ b/Uninstaller/Uninstaller.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 4BE4906110445E13006BE471 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE4905510445DDD006BE471 /* main.m */; }; 4BE4906410445F2F006BE471 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BE4906310445F2F006BE471 /* Security.framework */; }; 4BE4906810445F36006BE471 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BE4906710445F36006BE471 /* ServiceManagement.framework */; }; - 4BE49092104463A0006BE471 /* com.objective-see.lulu.configHelper in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BE4905D10445E0A006BE471 /* com.objective-see.lulu.configHelper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 4BE49092104463A0006BE471 /* your.bundle.id.lulu.configHelper in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BE4905D10445E0A006BE471 /* your.bundle.id.lulu.configHelper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; BF04235611C0531400431286 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BF04235511C0531400431286 /* AppDelegate.m */; }; BF65C19111B985C0007C20AB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF65C19011B985C0007C20AB /* MainMenu.xib */; }; @@ -46,7 +46,7 @@ dstPath = Contents/Library/LaunchServices; dstSubfolderSpec = 1; files = ( - 4BE49092104463A0006BE471 /* com.objective-see.lulu.configHelper in CopyFiles */, + 4BE49092104463A0006BE471 /* your.bundle.id.lulu.configHelper in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -59,7 +59,7 @@ 4BE4905310445DDD006BE471 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4BE4905410445DDD006BE471 /* Launchd.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Launchd.plist; sourceTree = ""; }; 4BE4905510445DDD006BE471 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 4BE4905D10445E0A006BE471 /* com.objective-see.lulu.configHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "com.objective-see.lulu.configHelper"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4BE4905D10445E0A006BE471 /* your.bundle.id.lulu.configHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = your.bundle.id.lulu.configHelper; sourceTree = BUILT_PRODUCTS_DIR; }; 4BE4906310445F2F006BE471 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 4BE4906710445F36006BE471 /* ServiceManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ServiceManagement.framework; path = System/Library/Frameworks/ServiceManagement.framework; sourceTree = SDKROOT; }; 8D1107320486CEB800E47090 /* LuLu Uninstaller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "LuLu Uninstaller.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -106,7 +106,7 @@ isa = PBXGroup; children = ( 8D1107320486CEB800E47090 /* LuLu Uninstaller.app */, - 4BE4905D10445E0A006BE471 /* com.objective-see.lulu.configHelper */, + 4BE4905D10445E0A006BE471 /* your.bundle.id.lulu.configHelper */, ); name = Products; sourceTree = ""; @@ -214,7 +214,7 @@ ); name = helper; productName = SMJobBlessHelper; - productReference = 4BE4905D10445E0A006BE471 /* com.objective-see.lulu.configHelper */; + productReference = 4BE4905D10445E0A006BE471 /* your.bundle.id.lulu.configHelper */; productType = "com.apple.product-type.tool"; }; 8D1107260486CEB800E47090 /* Uninstaller */ = { @@ -246,12 +246,12 @@ LastUpgradeCheck = 1000; TargetAttributes = { 4BE4905C10445E0A006BE471 = { - DevelopmentTeam = VBG97UB4TA; + DevelopmentTeam = UR73AMID; ProvisioningStyle = Manual; }; 8D1107260486CEB800E47090 = { - DevelopmentTeam = VBG97UB4TA; - ProvisioningStyle = Manual; + DevelopmentTeam = UR73AMID; + ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.HardenedRuntime = { enabled = 1; @@ -338,7 +338,8 @@ CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = UR73AMID; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; FRAMEWORK_SEARCH_PATHS = ""; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; INFOPLIST_FILE = Helper/Info.plist; @@ -357,8 +358,8 @@ Helper/launchd.plist, "-Wl,-sectcreate,__RESTRICT,__restrict,/dev/null", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.configHelper"; - PRODUCT_NAME = "com.objective-see.lulu.configHelper"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.configHelper; + PRODUCT_NAME = your.bundle.id.lulu.configHelper; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -373,7 +374,8 @@ CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = UR73AMID; + "DEVELOPMENT_TEAM[sdk=macosx*]" = UR73AMID; FRAMEWORK_SEARCH_PATHS = ""; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; INFOPLIST_FILE = Helper/Info.plist; @@ -391,8 +393,8 @@ Helper/launchd.plist, "-Wl,-sectcreate,__RESTRICT,__restrict,/dev/null", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.configHelper"; - PRODUCT_NAME = "com.objective-see.lulu.configHelper"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.configHelper; + PRODUCT_NAME = your.bundle.id.lulu.configHelper; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -406,11 +408,11 @@ ASSETCATALOG_COMPILER_STICKER_PACK_IDENTIFIER_PREFIX = ""; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; @@ -420,7 +422,7 @@ MARKETING_VERSION = 2.6.3; ONLY_ACTIVE_ARCH = NO; OTHER_CODE_SIGN_FLAGS = "-o hard,kill,library"; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.config"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.config; PRODUCT_NAME = "LuLu Uninstaller"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; @@ -436,11 +438,11 @@ ASSETCATALOG_COMPILER_STICKER_PACK_IDENTIFIER_PREFIX = ""; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 2.6.3; - DEVELOPMENT_TEAM = VBG97UB4TA; + DEVELOPMENT_TEAM = UR73AMID; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; @@ -450,7 +452,7 @@ MARKETING_VERSION = 2.6.3; ONLY_ACTIVE_ARCH = NO; OTHER_CODE_SIGN_FLAGS = "-o hard,kill,library"; - PRODUCT_BUNDLE_IDENTIFIER = "com.objective-see.lulu.config"; + PRODUCT_BUNDLE_IDENTIFIER = your.bundle.id.lulu.config; PRODUCT_NAME = "LuLu Uninstaller"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; diff --git a/Uninstaller/Uninstaller.xcodeproj/xcshareddata/xcschemes/helper.xcscheme b/Uninstaller/Uninstaller.xcodeproj/xcshareddata/xcschemes/helper.xcscheme index 9bb004c..88ae3e9 100644 --- a/Uninstaller/Uninstaller.xcodeproj/xcshareddata/xcschemes/helper.xcscheme +++ b/Uninstaller/Uninstaller.xcodeproj/xcshareddata/xcschemes/helper.xcscheme @@ -15,7 +15,7 @@ @@ -45,7 +45,7 @@ @@ -62,7 +62,7 @@ diff --git a/Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist b/Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist index 61cc7bf..b7efdfe 100644 --- a/Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist +++ b/Uninstaller/Uninstaller/ConfigFiles/com.objective-see.lulu.plist @@ -4,11 +4,11 @@ MachServices - com.objective-see.lulu + your.bundle.id.lulu Label - com.objective-see.lulu + your.bundle.id.lulu ProgramArguments /Library/Objective-See/LuLu/LuLu.bundle/Contents/MacOS/LuLu diff --git a/Uninstaller/Uninstaller/Info.plist b/Uninstaller/Uninstaller/Info.plist index 23a135c..14f48ac 100644 --- a/Uninstaller/Uninstaller/Info.plist +++ b/Uninstaller/Uninstaller/Info.plist @@ -26,8 +26,8 @@ NSApplication SMPrivilegedExecutables - com.objective-see.lulu.configHelper - anchor apple generic and identifier "com.objective-see.lulu.configHelper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = VBG97UB4TA) + your.bundle.id.lulu.configHelper + anchor apple generic and identifier "your.bundle.id.lulu.configHelper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = UR73AMID) diff --git a/Uninstaller/Uninstaller/Script/configure.sh b/Uninstaller/Uninstaller/Script/configure.sh index dc7bdfb..1da833a 100755 --- a/Uninstaller/Uninstaller/Script/configure.sh +++ b/Uninstaller/Uninstaller/Script/configure.sh @@ -44,8 +44,8 @@ if [ "${1}" == "-uninstall" ]; then killall "LuLu" 2> /dev/null #unload launch daemon & remove its plist - launchctl unload "/Library/LaunchDaemons/com.objective-see.lulu.plist" - rm "/Library/LaunchDaemons/com.objective-see.lulu.plist" + launchctl unload "/Library/LaunchDaemons/your.bundle.id.lulu.plist" + rm "/Library/LaunchDaemons/your.bundle.id.lulu.plist" printf "unloaded launch daemon\n" @@ -82,7 +82,7 @@ if [ "${1}" == "-uninstall" ]; then #kill killall LuLu 2> /dev/null - killall com.objective-see.lulu.helper 2> /dev/null + killall your.bundle.id.lulu.helper 2> /dev/null killall "LuLu Helper" 2> /dev/null #remove kext -- 2.39.3 (Apple Git-146) ```

[^1]: probs-overkill-having not just registered $(TeamIdentifierPrefix)com.objective-see.lulu but rather a whole different reverse-domain bundle ID - thinking, without evidence, apple would balk if left as is); and also chasing things that maybe aren't needed-to-make like the launchd plist names, etc. )

If you are _only_ aiming to wipe out the `VBG97UB4TA` of it all there are only 16 of those.