> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Bitdefender as a custom app on Mac

> Deploy the Bitdefender Endpoint Security Tool to Mac computers as a custom app in Iru Endpoint. Package the installer, configure PPPC, and assign to devices.

<Callout icon="apple" color="#B84A7A" iconType="regular">This guide applies to Mac computers</Callout>

<Warning>
  Please note that depending on the specific application and version you have installed, the app path, privacy access, and system extension requirements may vary. As a best practice, we recommend thoroughly testing any Custom Apps before deploying them to a Mac in a production environment.
</Warning>

### Prerequisites

* Bitdefender installer package(s) from your [Bitdefender admin portal](https://gravityzone.bitdefender.com/). Ensure that an **uninstall password** is set in the package settings
  * If you have a mixed environment of both Intel and Apple Silicon Mac computers, you will need to download both the macOS kit (Intel x86) and macOS kit (Apple Silicon) packages, but you will only need to include one of the install.xml files. The post-install script used in this guide will account for both installer types
  * If you are only deploying to one architecture, you will still need that install package and the included install.xml file
* Bitdefender PFX Certificate Generator script ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/bitdefender_cert_generator.zsh))
* Bitdefender Settings Profile ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/bitdefender_settings.mobileconfig))
  * This configuration profile enables full disk access for Notifications, [System Extensions](/en/endpoint/library/library-items-profiles/system-extensions-overview-and-guide), Bitdefender SSL CA certificate, Privacy Preferences (PPPC), and a Network content filter
* Bitdefender macOS 15+ Settings Profile ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/bitdefender_settings_macOS15.mobileconfig))
  * This configuration profile includes the NonRemovableFromUISystemExtensions field for macOS 15+ devices
* Bitdefender Service Management Profile ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/bitdefender_service_management.mobileconfig))
  * This configuration profile allows managed background items for Bitdefender
* Bitdefender Audit and Enforce Script ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/bitdefender_ae_script.zsh))
* Bitdefender Postinstall Script ([GitHub Link](https://github.com/kandji-inc/support/blob/main/custom-apps/bitdefender/post-install.sh))

### Creating a PFX Certificate

This section steps through the creation of a PFX certificate for Bitdefender that can be uploaded to Iru Endpoint in a Certificate Library Item.

<Note>
  Bitdefender requires that a PFX certificate be created and deployed to macOS. This section is based on [BitDefender's guide](https://www.bitdefender.com/business/support/en/77209-157498-install-security-agents---use-cases.html#UUID-00e93090-1040-8119-d7cf-c48320a8d6b7), which you can refer to for more information.
</Note>

<Steps>
  <Step title="Open Certificate Generator Script">
    Open the **PFX Certificate Generator script** in a text editor or IDE such as VScode or BBEdit.
  </Step>

  <Step title="Configure Certificate Information">
    Fill in the certificate information section of the script:

    ```bash lines theme={null}
    VARIABLES
    # Cert info
    COUNTRY=""                               # US - 2 letter country code
    STATE=""                                 # Georgia - state or province
    LOCAL=""                                 # Atlanta - locality name
    ORG_NAME="Endpoint"                      # Leave as default
    CERT_NAME=" BitDefender CA SSL"   # Leave as default
    ```
  </Step>

  <Step title="Save Script">
    Save the updated script to your Desktop.
  </Step>

  <Step title="Open Terminal">
    Open **Terminal.app**.
  </Step>

  <Step title="Run Certificate Generator">
    Run the following command in Terminal:

    ```bash theme={null}
    zsh '/Users/<username>/Desktop/bitdefender/bitdefender_cert_generator.zsh'
    ```
  </Step>

  <Step title="Enter Password">
    When prompted, enter and verify the password used in the Bitdefender installer settings you defined in your Bitdefender portal.
  </Step>

  <Step title="Copy Password Hash">
    When the script is finished, you should see the password hash used to generate the certificate. Copy the generated hash and paste it in the password field when creating the Certificate Library Item in Iru Endpoint:

    ```bash theme={null}
    Password hash: 626cacdec63355c2680dbd6747c8d755
    ```
  </Step>

  <Step title="Locate Certificate File">
    A Finder.app window should open on your Desktop, showing the **certificate.pfx** file.
  </Step>

  <Step title="Upload Certificate">
    Upload this certificate to Iru Endpoint in a [Certificate Library Item](/en/endpoint/library/library-items-profiles/configure-the-certificate-library-item).

    <Frame>
      <img src="https://mintcdn.com/iru/NKSnzq9fKEdl088H/assets/media/images/Kandji-Support-KB-1240PM@2x.png?fit=max&auto=format&n=NKSnzq9fKEdl088H&q=85&s=0c5755ae9e1c3f82ef7dd2bf7be8c9e5" alt="Certificate Library Item configuration showing PFX certificate upload" width="2974" height="2104" data-path="assets/media/images/Kandji-Support-KB-1240PM@2x.png" />
    </Frame>
  </Step>
</Steps>

### Add a Custom Profile Library Item

To add this Library Item to your Iru Endpoint Library, follow the steps outlined in the [Library Overview](/en/endpoint/library/library-items-profiles/library-overview) article.

### Configure the Bitdefender Profiles

<Steps>
  <Step title="Create Profile">
    Give the profile a Name.
  </Step>

  <Step title="Select Platform">
    For **Install on**, select Mac.
  </Step>

  <Step title="Assign to Blueprint">
    Assign your Custom Profile to a Blueprint.
  </Step>

  <Step title="Upload Configuration File">
    Upload the `bitdefender_settings.mobileconfig` file you downloaded previously.
  </Step>

  <Step title="Save Profile">
    Click **Save**.
  </Step>

  <Step title="Create Additional Profiles">
    Repeat the previous steps for the `bitdefender_settings_macOS15.mobileconfig` and the `bitdefender_service_management.mobileconfig` files you downloaded in the [prerequisites](/en/endpoint/library/deployment-guides/apple/deploy-bitdefender-endpoint-security-tool-as-a-custom-app#prerequisites) section.

    <Frame>
      <img src="https://mintcdn.com/iru/-j5Xd3hg6nX9V7df/assets/media/images/Kandji-Support-KB-0126PM@2x.png?fit=max&auto=format&n=-j5Xd3hg6nX9V7df&q=85&s=6087bd412b3eab72d898c5b2e333cf1c" alt="Custom Profile configuration showing Bitdefender settings profile upload" width="3066" height="3474" data-path="assets/media/images/Kandji-Support-KB-0126PM@2x.png" />
    </Frame>
  </Step>
</Steps>

### Zipping the Installer Files

Before uploading the installer files to Iru Endpoint, you will need to zip them up together first.

<Steps>
  <Step title="Locate Installer Files">
    Go to the Bitdefender installer files that you downloaded from the Bitdefender console earlier. If you downloaded the Intel and Apple ARM DMG files, you might need to mount them first and then pull the installer files out.
  </Step>

  <Step title="Organize Files">
    Put the installer package(s), **installer.xml** file, and **certificate.pfx** file in the same location, such as your Desktop. Only one **installer.xml** file is needed; either the one from the Intel download or the ARM download will work.
  </Step>

  <Step title="Select All Files">
    Select all of the files at one time.
  </Step>

  <Step title="Compress Files">
    Hold the Control(⌃) key and click on the selected files. Then, in the menu, click **Compress**. You should see a dialog showing the compression progress.
  </Step>

  <Step title="Rename Archive">
    An **Archive.zip** file should be created in the same directory. Feel free to rename the file to something like **bitdefender\_install.zip**. This is the file that will be uploaded to Iru Endpoint in the next section.
  </Step>
</Steps>

### Custom App

To add this Library Item to your Iru Endpoint Library, follow the steps outlined in the [Library Overview](/en/endpoint/library/library-items-profiles/library-overview) article.

<Steps>
  <Step title="Name the Custom App">
    Give the Custom App a name. Optionally, add a custom icon.
  </Step>

  <Step title="Assign to Blueprint">
    Assign to your desired blueprint.
  </Step>

  <Step title="Set Installation Type">
    Change the installation type to **Audit and enforce**.
  </Step>

  <Step title="Configure Audit Script">
    Copy the bitdefender\_ae\_script.zsh script you downloaded in the [prerequisites](/en/endpoint/library/deployment-guides/apple/deploy-bitdefender-endpoint-security-tool-as-a-custom-app#prerequisites) section and paste into the **Audit & Enforce** text box. No modification needed.
    The script looks for two profile identifiers and the name of the installed Bitdefender app before attempting an install. Additionally, the script looks for two Launch Daemons on computers where the app is already installed to ensure that the app is running as expected. If you would like to use this script with another profile, update the profile identifier prefix information to match what is in your profile:

    ```bash lines theme={null}
    Settings Profile prefix: io.kandji.bitdefender.D0DF2C14
    Background Service Management Profile prefix: io.kandji.bitdefender.service-management
    App name: "Endpoint Security for Mac.app"
    Processes: "com.bitdefender.epsecurity.BDLDaemonApp", "com.epsecurity.bdldaemon"
    ```

    <Frame>
      <img src="https://mintcdn.com/iru/NKSnzq9fKEdl088H/assets/media/images/Kandji-Support-KB-1216PM@2x.png?fit=max&auto=format&n=NKSnzq9fKEdl088H&q=85&s=14f00bc01f5254d840a81d153bac22e8" alt="Custom App audit and enforce script configuration" width="3100" height="2948" data-path="assets/media/images/Kandji-Support-KB-1216PM@2x.png" />
    </Frame>
  </Step>

  <Step title="Set Deployment Type">
    Select **ZIP File (unzip contents into specified directory)** as the deployment type.
  </Step>

  <Step title="Configure Unzip Location">
    Set the **Unzip Location** to **/var/tmp**.
  </Step>

  <Step title="Upload Installer">
    Upload the installer zip file downloaded earlier.
  </Step>

  <Step title="Add Postinstall Script">
    Click **Add Postinstall Script**.
  </Step>

  <Step title="Configure Postinstall Script">
    Copy the post-install script you downloaded in the [prerequisites](/en/endpoint/library/deployment-guides/apple/deploy-bitdefender-endpoint-security-tool-as-a-custom-app#prerequisites) section and paste it into the post-installer text field. Be sure to copy all text, including the #!/bin/sh (shebang) line at the top.

    * Ensure that the package names match the names downloaded from Bitdefender
    * Ensure that the certificate file name matches the cert file you created using the Bitdefender KB
  </Step>

  <Step title="Save Custom App">
    Click **Save**.

    <Frame>
      <img src="https://mintcdn.com/iru/NKSnzq9fKEdl088H/assets/media/images/Kandji-Support-KB-1226PM@2x.png?fit=max&auto=format&n=NKSnzq9fKEdl088H&q=85&s=8b6d76701077b207b7b22c55f294105a" alt="Custom App postinstall script configuration" width="3148" height="2718" data-path="assets/media/images/Kandji-Support-KB-1226PM@2x.png" />
    </Frame>
  </Step>
</Steps>

### Deploying with Assignment Maps

Two of the Bitdefender Custom Profiles need conditional logic to ensure they are deployed to the correct devices. An Assignment Map provides an easy solution for all of your devices in one convenient view.
Please review our [Creating a Blueprint](/en/endpoint/getting-started/blueprints-and-library/configuring-blueprints) and [Using Conditional Logic in Blueprints](/en/endpoint/blueprints/assignment-maps/using-conditional-logic-in-blueprints) articles.

<Steps>
  <Step title="Create Base Conditional Block">
    Start with the **For All devices on this Blueprint** conditional block.
  </Step>

  <Step title="Assign Custom App">
    Assign the **Bitdefender** **Custom App** to the block.
    If multiple Custom Apps are needed, create a conditional block with conditions for the different versions of the installer.
  </Step>

  <Step title="Assign Certificate">
    Assign the **Bitdefender Certificate Library Item** to the conditional block.
  </Step>

  <Step title="Assign Settings Profile">
    Assign the **bitdefender\_settings** Custom Profile to the conditional block.
  </Step>

  <Step title="Set macOS 13+ Condition">
    Set the top of the conditional block to **If macOS is greater than or equal to 13.0**.
  </Step>

  <Step title="Assign Service Management Profile">
    Assign the **bitdefender\_service\_management** Custom Profile to the conditional block.
  </Step>

  <Step title="Set macOS 15+ Condition">
    Set the top of the conditional block to **If** **macOS is greater than or equal to 15.0**.
  </Step>

  <Step title="Assign macOS 15+ Settings Profile">
    Assign the **bitdefender\_settings\_macOS15** Custom Profile to the conditional block.

    <Frame>
      <img src="https://mintcdn.com/iru/-j5Xd3hg6nX9V7df/assets/media/images/Kandji-Support-KB-0149PM.png?fit=max&auto=format&n=-j5Xd3hg6nX9V7df&q=85&s=d2d08c0ed78e643f33aba18ae8a35f54" alt="Assignment Map configuration showing Bitdefender deployment with conditional logic" width="4434" height="1088" data-path="assets/media/images/Kandji-Support-KB-0149PM.png" />
    </Frame>
  </Step>
</Steps>
