Jamf Workflow for Tenable Nessus Agent

INTRODUCTION

Tenable’s Nessus Agent software is used to identify vulnerabilities, policy-violating configurations and malware that attackers use to penetrate your or your customer’s network.

JAMF Pro is used to manage Apple Macintosh systems within the enterprise. This includes the deployment of third party software packages such as the Tenable Nessus agent.

This article describes the various elements and requirements as utilized by Jamf Pro in order to package and deploy the Nessus agent to Apple Macintosh systems within the enterprise.

NOTE 1: I originally posted this article on Jamf Nation. I am now re-posting this article here. In doing so, I have also taken the liberty to true-up the content and I have incorporated all the various additions from the original thread into this new posting.

NOTE 2: As of this article, the current version of the Nessus Agent is 7.x – Implementing this workflow may require some tweaking as I have not had the opportunity to work with the newer Nessus Agent v7.x – if you have any suggestions, please feel free to post your thoughts in the comments section.

INDEX OF TOPICS

  • Preparing for Deployment
    • Required Software
      • Acquiring the Nessus Agent
      • Creating a Custom PKG Payload
        • Overview and Purpose of Creating a Custom PKG Payload
        • Acquiring and Installing Compser
        • Enabling Hidden Files and Folders in macOS
        • Staging the Tenable Nessus Agent DMG File
        • Using Compser to Create a Custom Nessus Agent Installer PKG File
    • Configuring Jamf Pro
      • Uploading the Custom Nessus Agent Installer PKG to Jamf Pro
      • Extension Attributes
        • Nessus Agent – Installation Status
        • Nessus Agent – Service Status
        • Nessus Agent – Version and Build Information
    • JAMF Pro Computer Groups
      • Creating Smart Computer Groups for the Nessus Agent
        • Nessus Agent – Installed
        • Nessus Agent – Not Installed
        • Nessus Agent – Test Group – Installed
        • Nessus Agent – Test Group – Not Installed
        • Nessus Agent – Service Running
        • Nessus Agent – Service Stopped
      • Creating Static Computer Groups for the Nessus Agent
        • Nessus Agent – Test Group
    • JAMF Pro Computer Policies
      • Creating Computer Policies for the Nessus Agent
        • Nessus Agent – Installation
  • Testing the Deployment
  • Transitioning Into Production
    • Re-scoping for Production
  • Additional Support Workflows
    • Nessus Agent – cloud.tenable.com Link Update
    • Nessus Agent – Uninstaller

PREPARING FOR DEPLOYMENT

REQUIRED SOFTWARE

ACQUIRING THE NESSUS AGENT

The latest version of the Nessus agent for the Apple Macintosh platform can be obtained from the following URL: http://www.tenable.com/products/nessus/agent-download

An installer PKG file is contained within the downloaded DMG file. The installer PKG file has been designed by Tenable to perform an integrity check against itself. This self-check prevents the extraction and upload of a working version of the PKG within Jamf Pro.

NOTE – 2017-05-17: It seems that as of v6.10.5, the Nessus Agent may actually work as-is without all the fancy re-packaging. I have yet to fully test this out for myself.

The following work-around provides us with the necessary functionality.

CREATING A CUSTOM PKG PAYLOAD
OVERVIEW AND PURPOSE OF CREATING A CUSTOM PKG PAYLOAD
  • JAMF Pro relies on PKG files in order to install 3rd Party software
  • JAMF Pro can not deploy DMG files that have not been created with Composer
  • By creating a custom PKG file using Compser, we have the ability to:
    • Deploy the DMG without disturbing it’s integrity check as designed by Tenable Network Security
    • Facilitate the use of a post-install script that performs a custom installation with full logging abilities
ACQUIRING AND INSTALLING COMPOSER

If you do not currently have the correct version of Compser installed on your local system, please log into your Jamf Nation account by visiting the following URL: https://www.jamf.com/jamf-nation/my/products.html

If you do not have access to the Jamf assets, please contact your Jamf Administrator for further assistance.

If you do have access the Jamf assets, please download the proper version of Jamf Pro for deployment on the Macintosh.

Once you have downloaded the appropriate Jamf Pro DMG file to your local system perform the following steps:

  1. Double-Click the DMG file
  2. Drag the “Jamf Pro” icon to the “Applications” Icon
ENABLING HIDDEN FILES AND FOLDERS IN OS X

Because we are creating a special deployment PKG file, we will want to use the /tmp folder on all of the target Macintosh systems. In order for Finder, and ultimately Jamf Pro to see the /tmp folder, we need to enable hidden files and folders.

  1. Launch /Applications/Utilities/Terminal.app
  2. Type in the following commands, pressing the Enter/Return key after each line
    defaults write com.apple.finder AppleShowAllFiles YES
    killall Finder
  3. Open a Finder window and navigate to /tmp
STAGING THE NESSUS AGENT DMG FILE
  1. Copy the Nessus Agent DMG file to /tmp
USING COMPOSER TO CREATE A CUSTOM NESSUS AGENT INSTALLER PKG
  1. Launch /Applications/Jamf Pro/Composer.app
  2. If this is the first time you have launched Composer
    1. You may be presented with the “”Composer.app” is an application downloaded from the Internet” window
    2. Click the “Open” button
    3. If prompted, type in your password
    4. You will be presented with the “Choose a method to create your package:” screen
    5. Continue to Step 4
  3. If this is not your first time to launch Composer you will be taken to the main Composer screen
    1. If prompted, type in your password
    2. Click on the “New” icon
    3. You will be presented with the “Choose a method to create your package:” screen
  4. Select “Normal Snapshot” icon
  5. Click the “Next” button
  6. Provide a “Package Name” (i.e. NessusAgent-6.5.5_Casper_Installer_v1.2.pkg)
  7. Composer will begin taking a Snapshot of your system.
    1. During this time, do not make any changes to your system
  8. Once Composer has completed taking the Snapshot, click on the “Create Package Source” button
  9. Composer will begin taking the “After Snapshot” of your system
  10. Once Composer has completed taking the After Snapshot, you will be returned to the main Composer screen
  11. Your newly created source container will reside in the left-hand pane
  12. Drag the Nessus Agent DMG file from /tmp to the right-hand pane of the Composer Window
  13. This will create a tree structure depicting the path to the Nessus Agent DMG file
  14. In the left-hand sidebar, expand the Nessus Agent source
  15. Right-Click on “Scripts”
  16. Click on “Add Shell Script”
  17. Click on “Post Install”
  18. Click on “postinstall” in the left-hand pane
  19. Select all of the script contents within the right-hand pane and delete the contents
  20. Copy and paste in the following script
    #!/bin/sh
    ## postinstall
    
    # Nexus Agent Installation Script v1.2
    # Written by Caine Hörr
    # Written on Tue, Jan 26, 2016
    # Updated by Caine Hörr
    # Updated on Wed, Jan 17, 2016
    
    # UPDATE LOG
    # v1.2
    # Replaced Username="$(whoami)" with Username="$(stat -f "%Su" /dev/console)" to correct issue of identifying root as the username
    
    # v1.1
    # Added line to unlink the Nessus Agent
    # Automatically collect username and hostname to generate unique name
    # Add unique name when linking to the Nessus Agent
    
    # v1.0
    # Initial Nexus Agent Installation script
    
    # Mount the Nessus Agent DMG file
    # Latest version can be downloaded from http://www.tenable.com/products/nessus/agent-download
    echo "########## MOUNTING THE NESSUS AGENT DMG ##########" | logger
    hdiutil attach /tmp/NessusAgent-6.5.4.dmg | logger
    
    # Run the Nessus Agent installer PKG file
    echo "########## INSTALLING THE NESSUS AGENT ##########" | logger
    sudo installer -pkg /Volumes/Nessus\ Agent\ Install/Install\ Nessus\ Agent.pkg -target / | logger
    
    # Check to see if Nessus Agent is installed
    NessusAgentInstalled="$(ls /Library/NessusAgent/run/sbin/ | grep nessuscli)"
    
    if [ "$NessusAgentInstalled" = "nessuscli" ]; then
      echo "########## NESSUS AGENT INSTALLED ##########" | logger
    
      # Identify the correct mount point for the DMG file
      NessusAgentDMG="$(hdiutil info | grep "/Volumes/Nessus Agent Install" | awk '{ print $1 }')"
    
      # Detach the DMG file
      echo "########## UNMOUNTING THE NESSUS AGENT DMG ##########" | logger
      hdiutil detach $NessusAgentDMG | logger
    
      # Check to see if Nessus Agent is running
      NessusAgentRunning="$(sudo launchctl list com.tenablesecurity.nessusagent | grep "PID" | awk '{ print $1 }' | tr -d '\"')"
      if [ "$NessusAgentRunning" = "PID" ]; then
        echo "########## NESSUS AGENT IS RUNNING ##########" | logger
    
        # Unlink the Nessus agent - Needed in case of upgrade or re-link…
        echo "########## UNLINKING NESSUS AGENT ##########" | logger
        sudo /Library/NessusAgent/run/sbin/nessuscli agent unlink | logger
    
        # Acquire some personal data (currently logged in username and computer hostname)
        Username="$(stat -f "%Su" /dev/console)"
        Computername="$(hostname | sed 's/\..*$//')"
        Fullname="${Computername}_${Username}"
    
        # Link the Nessus Agent to cloud.tenable.com
        echo "########## CONFIGURING THE NESSUS AGENT ##########" | logger
        sudo /Library/NessusAgent/run/sbin/nessuscli agent link --key= --name=$Fullname --host=cloud.tenable.com --port=443 --groups="" | logger
    
        exit 0 # Success
      else
        echo "########## WARNING - NESSUS AGENT IS NOT RUNNING ##########" | logger
        exit 1 # Failure
      fi
    else
     echo "########## ERROR - NESSUS AGENT DID NOT INSTALL ##########" | logger
     exit 1 # Failure
    fi
    
  21. In the left-hand sidebar, click the Nessus Agent source icon
  22. You will be prompted to save changes – Click the “Save” button
  23. Click the “Build as PKG” icon
  24. Select a destination to save the custom PKG file (ie Desktop)
  25. Click the “Save” button

CONFIGURING JAMF PRO

UPLOADING THE CUSTOM NESSUS AGENT INSTALLER PKG TO THE JSS SERVER
  1. Connect to https://jss.yourdomain.net:8443/
  2. Log in with your credentials
  3. Click on the “Settings” (gear) icon in the upper right corner
  4. Click on “Computer Management” within the left-hand pane
  5. Click on the “Packages” icon within the “Computer Management” group
  6. Click on the “Plus” button
  7. Type in a “Display Name” (ie NessusAgent-6.5.5_Casper_Installer_v1.2.pkg)
  8. Select “Security” from the “Category” drop down menu
  9. Click on the “Upload Package File” button
  10. Click on the “Choose File” button
  11. Navigate to the location of your custom Nessus Agent PKG file
  12. Select your custom Nessus Agent PKG file
  13. Click the “Open” button
  14. Click the “Upload” button
  15. Add any additional Info or Notes to the relevant fields
  16. Click the “Save” button
EXTENSION ATTRIBUTES

Extension attributes are used to augment the functionality of Jamf Pro.

Because the Nessus Agent is not a typical Macintosh application that resides in /Applications, we need to build a set of custom controls to gather the necessary information about the status of the Nessus Agent on the client systems that are deployed within the enterprise.

With custom designed Extension attributes, we can gather the following information:

  • Nessus Agent – Installation Status: Installed | Not Installed
  • Nessus Agent – Service Status: Running | Stopped
  • Nessus Agent – Version and Build Information
NESSUS AGENT – INSTALLATION STATUS
  1. Connect to https://jss.yourdomain.net:8443/
  2. Log in with your credentials
  3. Click on the “Settings” (gear) icon in the upper right corner
  4. Click on “Computer Management” within the left-hand pane
  5. Click on “Extension Attributes” icon within the “Computer Management – Management Framework” group
  6. Click on the “Plus” button
  7. In the “Display Name” field, type in the following: Nessus Agent – Installation Status
  8. In the “Description” field, type in the following: Check to determine if the Nessus Agent is installed.
  9. In the “Data Type” drop down, select “String”
  10. In the “Inventory Display” drop down, select “Extension Attributes”
  11. In the “Input Type” drop down, select “Script”
  12. Click on the “OS X” button
  13. In the “Script” text field, copy and paste in the following script:
    #!/bin/sh
    
    # Check to see if Nessus Agent is installed
    NessusAgentInstalled="$(ls /Library/NessusAgent/run/sbin/ | grep nessuscli)"
    
    if [ "$NessusAgentInstalled" != "nessuscli" ]; then
      echo "<result>Not Installed</result>"
    else
      echo "<result>Installed</result>"
    fi
    
  14. Click the “Save” button
NESSUS AGENT – SERVICE STATUS
  1. Connect to https://jss.yourdomain.net:8443/
  2. Log in with your credentials
  3. Click on the “Settings” (gear) icon in the upper right corner
  4. Click on “Computer Management” within the left-hand pane
  5. Click on “Extension Attributes” icon within the “Computer Management – Management Framework” group
  6. Click on the “Plus” button
  7. In the “Display Name” field, type in the following: Nessus Agent – Service Status
  8. In the “Description” field, type in the following: Check to determine if the Nessus Agent Service is running.
  9. In the “Data Type” drop down, select “String”
  10. In the “Inventory Display” drop down, select “Extension Attributes”
  11. In the “Input Type” drop down, select “Script”
  12. Click on the “OS X” button
  13. In the “Script” text field, copy and paste in the following script:
    #!/bin/sh
    
    # Check to see if Nessus Agent is running
    NessusAgentRunning="$(sudo launchctl list com.tenablesecurity.nessusagent | grep "PID" | awk '{ print $1 }' | tr -d '\"')"
    if [ "$NessusAgentRunning" = "PID" ]; then
      echo "<result>Running</result>"
    else
      echo "<result>Stopped</result>"
    fi
    
  14. Click the “Save” button
NESSUS AGENT – VERSION AND BUILD INFORMATION
  1. Connect to https://jss.yourdomain.net:8443/
  2. Log in with your credentials
  3. Click on the “Settings” (gear) icon in the upper right corner
  4. Click on “Computer Management” within the left-hand pane
  5. Click on “Extension Attributes” icon within the “Computer Management – Management Framework” group
  6. Click on the “Plus” button
  7. In the “Display Name” field, type in the following: Nessus Agent – Version and Build Information
  8. In the “Description” field, type in the following: Determine the version of the Nessus Agent that is currently installed.
  9. In the “Data Type” drop down, select “String”
  10. In the “Inventory Display” drop down, select “Extension Attributes”
  11. In the “Input Type” drop down, select “Script”
  12. Click on the “OS X” button
  13. In the “Script” text field, copy and paste in the following script:
    #!/bin/sh
    
    # Check to see if Nessus Agent is installed
    NessusAgentInstalled="$(ls /Library/NessusAgent/run/sbin/ | grep nessuscli)"
    if [ "$NessusAgentInstalled" != "nessuscli" ]; then
      echo "<result>N/A</result>"
    else
      NessusAgentVersion="$(/Library/NessusAgent/run/sbin/nessuscli -v | awk 'NR==1{print $3 " " $4 " " $5}')"
      echo "<result>$NessusAgentVersion</result>"
    fi
    
  14. Click the “Save” button

JAMF PRO COMPUTER GROUPS

The JAMF Pro provides two kinds of Computer Groups.

  • Smart Computer Groups
    • Includes logic statements that determine how Policies, Configuration Profiles, Extension Attributes and other resources are applied
    • Provides a mechanism by which the JSS can determine which actions to take and when
  • Static Computer Group
    • Manually assigned systems without any form of logic work flow
    • Static Computer Groups are perfect for deploying systems within small, isolated test and lab groups thereby reducing any major impact on a production environment
CREATING SMART COMPUTER GROUPS FOR THE NESSUS AGENT
NESSUS AGENT – INSTALLED
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Nam”e field, type in the following: Nessus Agent – Installed
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Installation Status”
  9. Change the “Operator” drop down to “is”
  10. In the “Value” field, type in “Installed”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent – Installation Status” Extension Attribute
  11. Click the “Save” button
NESSUS AGENT – NOT INSTALLED
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Not Installed
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Installation Status”
  9. Change the “Operator” drop down to “is not”
  10. In the “Value” field, type in “Installed”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent – Installation Status” Extension Attribute
  11. Click the “Save” button
NESSUS AGENT – TEST GROUP – INSTALLED
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Test Group – Installed
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Installation Status”
  9. Change the “Operator” drop down to “is”
  10. In the “Value” field, type in “Installed”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent – Installation Status” Extension Attribute
  11. Click the “Save” button
NESSUS AGENT – TEST GROUP – NOT INSTALLED
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Test Group – Not Installed
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Installation Status”
  9. Change the “Operator” drop down to “is not”
  10. In the “Value” field, type in “Installed”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent Installation Status” Extension Attribute
  11. Click the “Save” button
NESSUS AGENT – SERVICE RUNNING
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Service Running
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Service Status”
  9. Change the “Operator” drop down to “is”
  10. In the “Value” field, type in “Running”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent – Service Status” Extension Attribute
  11. Click the “Save” button
NESSUS AGENT – SERVICE STOPPED
  1. Click on the “Computers” icon
  2. Click on “Smart Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Service Stopped
  5. Click on the “Criteria” tab
  6. Click on the “Plus” button
  7. Click the “Choose” button for “All Criteria”
  8. Click the “Choose” button for “Nessus Agent – Service Status”
  9. Change the “Operator” drop down to “is not”
  10. In the “Value” field, type in “Running”
    1. This value corresponds with the value as defined in the script associated with the “Nessus Agent – Service Status” Extension Attribute
  11. Click the “Save” button
CREATING STATIC COMPUTER GROUPS FOR THE NESSUS AGENT
NESSUS AGENT TEST GROUP
  1. Click on the “Computers” icon
  2. Click on “Static Computer Groups”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Test Group
  5. Click on the “Assignments” tab
  6. Select each individual system to be included within the group
  7. Click the “Save” button

JAMF PRO COMPUTER POLICIES

CREATING COMPUTER POLICIES FOR THE NESSUS AGENT
NESSUS AGENT – INSTALLATION
  1. Click on the “Computers” icon
  2. Click on “Policies”
  3. Click on the “Plus” button
  4. In the “Display Name” field, type in the following: Nessus Agent – Installation
  5. Select the “Enabled” checkbox
    1. Selecting “Enabled” commits the policy once the “Save” button has been clicked. By not enabling the policy, the policy will not run.
  6. Change the “Category” drop down to “Security”
  7. Select the “Enrollment Complete” checkbox
  8. Select the “Recurring Check-In” checkbox
  9. Change the “Execution Frequency” drop down to “Once per computer”
  10. Click on the “Packages” icon
  11. Click on the “Configure” button
  12. Click the “Add” button that corresponds to the Nessus Agent Installer PKG file
  13. Click on the “Maintenance” icon
  14. Click on the “Configure” button
  15. Click on the “Scope” tab
  16. Click on the “Plus” button
  17. Click on the “Computer Groups” button
  18. Click the “Add” button that corresponds to “Nessus Agent – Test Group – Not Installed”
  19. Click the “Done” button
  20. Click the “Save” button
    1. Clicking the “Save” button commits the policy if the policy is “Enabled”.

TESTING THE DEPLOYMENT

Once the policy has been enabled and saved, all systems that have been assigned to the Nessus Agent Test Group Static Computer Group will download and run the policy during their next check in period.

You can expedite this process by running the following commands on the command line (/Applications/Utilities/Terminal.app) of a target system:

sudo jamf manage
sudo jamf policy

TRANSITIONING TO PRODUCTION

To transition to a final production run for all target systems within the enterprise, you only need to re-scope the Computer Policy entitled “Nessus Agent – Installation”.

RE-SCOPING FOR PRODUCTION

  1. Click on the “Computers” icon
  2. Click on “Policies”
  3. Click on the “Nessus Agent – Installation” policy link
  4. Click on the “Scope” tab
  5. Click on the “Edit” button
  6. Click on the “Remove” button that corresponds with the “Nessus Agent – Not Installed – Test Group Smart Computer Group”
  7. Click on the “Plus” button
  8. Click on the “Computer Groups” button
  9. Click on the “Add” button associated with the “Nessus Agent – Not Installed” Smart Computer Group
  10. Click the “Done” button
  11. Click the “Save” button
    1. Clicking the “Save” button commits the policy if the policy is “Enabled”.

ADDITIONAL SUPPORT WORKFLOWS

In addition to the base-line workflow, here are a couple of support scripts and workflows.

NESSUS AGENT – CLOUD.TENABLE.COM LINK UPDATE

I created the following script to quickly update the Nessus Agent’s link to cloud.tenable.com.

The purpose for the additional script is to auto-correct the link without the need to redeploy the custom Nessus Agent package.

I configured the script to run as a policy.

I’ve configured my environment to trigger as a recurring check-in on a weekly basis.

The scope is set to the “Nessus Agent – Installed” Smart Computer Group.

#!/bin/sh

# Nessus_Agent_Link_Update.sh v1.0
# Written by Caine Hörr
# Written on Wed, Jan 17, 2016
# Updated by Caine Hörr
# Updated on Wed, Jan 17, 2016

# UPDATE LOG
# v1.0
# Initial Nexus Agent Link Update script

# Unlink the Nessus agent - Needed in case of upgrade or re-link…
echo "########## UNLINKING NESSUS AGENT ##########" | logger
sudo /Library/NessusAgent/run/sbin/nessuscli agent unlink | logger

# Acquire some personal data (currently logged in username and computer hostname)
Username="$(stat -f "%Su" /dev/console)"
Computername="$(hostname | sed 's/\..*$//')"
Fullname="${Computername}_${Username}"

# Link the Nessus Agent to cloud.tenable.com
echo "########## CONFIGURING THE NESSUS AGENT ##########" | logger
sudo /Library/NessusAgent/run/sbin/nessuscli agent link --key= --name=$Fullname --host=cloud.tenable.com --port=443 --groups="" | logger

exit 0

NESSUS AGENT – UNINSTALLER

The following script can be configured within an inactive policy that you can use to target any number of machines at a moment’s notice should you have the need to do so.

The uninstallation process is based on instructions provided by Tenable.

#!/bin/sh

echo "UNINSTALLING THE NESSUS AGENT" | logger

# This script follows the Mac Agent Removal process as outlined by Tenable
# http://www.tenable.com/documentation/nessus/#_New_Topics/Mac_Agent_Uninstall.htm%3FTocPath%3DInstall%7CRemove%7CAgent%7C_____1

# Unlink the Nessus Agent
sudo /Library/NessusAgent/run/sbin/nessuscli agent unlink | logger

# Disable the Nessus Agent service
sudo launchctl remove com.tenablesecurity.nessusagent | logger

# Remove the Nessus Agent directories and files
sudo rm -rf /Library/NessusAgent/ | logger
sudo rm -f /Library/LaunchDaemons/com.tenablesecurity.nessusagent.plist | logger
sudo rm -rf /Library/PreferencePanes/Nessus\ Agent\ Preferences.prefPane/ | logger

exit 0

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: