Skip to main content
This document is for:
Invicti Enterprise on-demand, Invicti Enterprise on-premises

Install scan agents on Linux - RedHat Distribution

If you want to scan a website in a demilitarized zone (DMZ), internal networks that are not publicly accessible, you can install Invicti scan agents in your network. The agent is going to conduct the actual scan job and then report the results back to Invicti Enterprise.

In addition to the scanning agent, you can install an authentication verifier agent in your network that is going to verify the form authentication on your website. For further information, refer to Install Authentication Verifier Agents.

You can install the agent on a Linux operating system. If you choose this installation, you must install some dependencies on the system, such as .NET.

This topic explains how to install an Invicti Enterprise scan agent on Linux (RedHat distribution) operating systems. To install the agent in Debian distributions, please see Install a Scan Agent on Linux (Debian Distribution).

info

The instructions below were tested on RHEL 9.5.

These are the stages to this process:

  1. Download the Invicti Enterprise agent file
  2. Install the Invicti agent
  3. Set the Invicti agent as a Linux service

Prerequisites

Ensure you meet all of these prerequisites.

Hardware requirements

  • Processor: 1.4 GHz minimum (2.0 GHz or faster recommended)
  • Memory: 4 GB or higher recommended
  • Storage: 10 GB free disk space per internal agent
  • If NTLM is used as the authentication method, Ubuntu version 24.04 or its equivalent must be used at a minimum.

Network requirements

  • The agent must access your internal website via HTTP/HTTPS.
  • The agent must connect to the Invicti Enterprise Authentication Verifier Server over HTTP(S) (port 443).

Trustlist requirements

Required access

  • Users must have root privileges to execute the required commands. If root privileges are unavailable, use the Docker-based scan agent instead. For instructions, refer to Installing a Docker Scan Agent.

Download the agent

To install the scan agent, download the installation files to a machine on your internal network. These are the steps to download a Scan Agent in Invicti Enterprise on-demand:

  1. In Invicti Enterprise, select Agents  > Manage Agents from the left-side menu.
  2. Click Configure New Agent.
  3. From the Agent - Direct Download section, select Linux to download the required files to install the verifier agent.

Install the agent

To install the Invicti Agent follow these instructions:

warning

Disable SELinux before starting the installation. For further information about disabling SELinux, see Changing SELinux states and modes.

  1. Open a terminal window.
  2. Install the epel-release repository (ignore this step for Fedora distribution):
    sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
    sudo dnf update
    dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
    sudo dnf update
  3. Install dependent packages:
    sudo dnf install -y nano tar mono-complete libgdiplus p7zip p7zip-plugins
warning

RHEL 9 has removed support for NTLM authentication and no longer includes the gssntlmssp package. As a result, Invicti Enterprise agents installed on RHEL 9 are not going to be capable of handling NTLM authentication.

Please ensure your systems and configurations account for this limitation when using Invicti Enterprise with RHEL 9.

Previous versions of RHEL (and other RedHat/Fedora based distributions) may still support NTLM authentication, but it is best to consider this as a security concern; to add support for this:

sudo dnf install -y gssntlmssp
  1. Install the Headless Chrome browser dependencies:
    sudo dnf install -y pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic libX11-xcb.so.1 libnss3.so xorg-x11-fonts-Type1 xorg-x11-fonts-misc
  2. Next, extract the TAR file: To extract the scan agent, run the following commands:
    cd /home/[YOUR_USER]
    tar -xvf <Invicti_Enterprise_Linux_Scanner_Agent_{Version}> --one-top-level
note
  • [YOUR_USER] in step 5 must be the same as [YOUR_USER] in the unit file described later in this article
  • replace the filename in the tar command to reflect the filename of the downloaded agent; the tar command is going to extract into a folder with the same name as the downloaded agent file (without the .tar extension)
  1. Open appsettings.json file via any text editor you prefer:
    cd /home/[YOUR_USER]/<Invicti_Enterprise_Linux_Scanner_Agent_{Version}>
    nano appsettings.json
    These settings are going to be used by the scan agent:
    • AgentName: This can be anything you want. This text is going to be displayed when you are starting a new scan. (If you are going to install more than one instance of the agent, you must set a unique agentName value for each instance, something you are going to use later.)
    • AgentType: This can be Standard or Cloud. If you want to use Cloud Provider for scanning, AgentType must be Cloud.
    • ApiToken: In Invicti Enterprise, the Agent Token is displayed in the Configure New Agent window. Copy the value into the apiToken.
    • ApiRootUrl: This is the URL of Invicti Enterprise or the Invicti Enterprise on-premises.

Change the default data folder for the scanner Agent

To change the default data folder, add the following attribute under AgentInfo in the appsettings.json file: "ScanDataFolderPath": "FullPath"

For example, you can set the path like this: /home/[YOUR_USER]/[data folder]/

  • If you modify an existing agent's appsettings.json file, you must restart the service after making the change.
  • If you are adding this line to a new agent, you can continue with the installation process as usual.

Set the Invicti agent as a Linux service

An internal scanning agent should be configured as a Linux service so that it can poll the Invicti Enterprise servers regularly and can take the scan initiation command from the server.

Additionally, you can update the scan agent or enable it to auto-update itself. For further information about the agent update, see Auto-Update Support for Scanner Agents.

You can complete this process as follows:

Add a unit file for an Invicti Agent

Follow these steps to add a unit file for the Invicti Agent:

  1. Open a terminal
  2. cd /etc/systemd/system
  3. sudo touch [YOUR_AGENT_NAME].service
  4. sudo nano [YOUR_AGENT_NAME].service
note

The AgentName specified in the appsettings.json file must match the unit file name of the agent. Consistency between these names is required for proper operation.

  1. Add the following script into [YOUR_AGENT_NAME].service
    # For internal agents version 2.0.2.157 or newer
    [Unit]
    Description=netsparker.service description
    [Service]
    Type=notify
    KillMode=process
    Restart=always
    RestartSec=30
    SyslogIdentifier=[YOUR_USER]
    KillSignal=SIGINT
    User=[YOUR_USER]
    WorkingDirectory=[YOUR_AGENT_DIRECTORY_PATH]
    ExecStart=[Your Agent Directory path]/Netsparker.Cloud.Agent
    ExecStop=/usr/bin/pkill -f "[YOUR_AGENT_DIRECTORY_PATH]/Nhs/NetsparkerHelperService.exe"
    [Install]
    WantedBy=multi-user.target
  2. Save and close the document.

Configure Sudoers for an Invicti Agent

To configure Sudoers for the Invicti agent, follow these steps:

  1. Create a new sudoers file:
    sudo touch /etc/sudoers.d/[YOUR_AGENT_NAME]-systemctl
  2. Edit the file with visudo:
    sudo visudo -f /etc/sudoers.d/[YOUR_AGENT_NAME]-systemctl
  3. Add the following script to grant the necessary permissions:
    [YOUR_USER] ALL=(ALL:ALL) NOPASSWD: /usr/bin/systemctl start [YOUR_AGENT_NAME].service  
    [YOUR_USER] ALL=(ALL:ALL) NOPASSWD: /usr/bin/systemctl stop [YOUR_AGENT_NAME].service
  4. Save and close the file.

Start Invicti Enterprise agent as a Linux service

  1. Reload the system daemon to recognize the new service:
    sudo systemctl daemon-reload
  2. Start the agent service:
    sudo systemctl start [YOUR_AGENT_NAME].service

You can now check the status of the connection between Invicti Enterprise and the scan agent. From the Agents menu, click Manage Agents. The Agents window is displayed.

note

Any changes in the appsetting.json file, such as setting proxy and changing API Token, require restarting the service so that the changes can take effect.

You can set a proxy for the scanning agent in Invicti Enterprise. For further information about the proxy, see Setting Proxy in Scanner Agents. Using Proxy Auto-Configuration? For further information, see Using Proxy Auto-Configuration file.

Define and scan an internal website in Invicti Enterprise

Now that you have installed a scanning agent into your infrastructure, you should configure Invicti Enterprise to let it know which websites should be scanned with an internal agent rather than with the built-in agents.

  1. Log in to Invicti Enterprise.
  2. Select Websites  > New Website from the left-side menu.
  3. Enter your internal website details. Refer to Add a target in Invicti Enterprise.
  4. From the Agent mode field, select Internal.
  5. Select Save.

Scan an internal website with agent

  1. In Invicti Enterprise, select Scans  > New Scan from the left-side menu.
  2. From the Target URL field, select your Internal Website (if the field is not already populated).
  3. The Preferred Agent field is already selected by default. Your newly installed scanning Agent is displayed as an option. If you installed more than one instance, select the one which can access your Internal Website. If any of them can access your Internal Website, select the default option Any of the available agents. By selecting this, one of the idle agents is going to scan your website.
  4. Select Launch. (For simplicity, optimization and other settings are ignored in this procedure.)

Your scan has been started in the Queued state. Shortly, you are going to see that its status changes to Scanning. Once it is completed, you are going to be able to explore the vulnerabilities found on your website.

Install multiple agents on the same operating system

You can install more than one scan agent in Linux. Follow these steps:

  1. Open a terminal window.
  2. Create a new folder for the new agent.
  3. Copy the TAR file into the new folder, and extract the TAR file
  4. Follow the instructions in Install the agent and Set the Invicti Agent as a Linux Service.
  5. Make sure that you enter a different name for the new agent.

For further information about managing agents, see Manage agent groups.


Need help?

Invicti Support team is ready to provide you with technical help. Go to Help Center

Was this page useful?