Deployment: Invicti Platform on-demand
Install internal agent with proxy settings
Internal agents integrate with Invicti Platform, enabling scans within your environment for targets not publicly accessible from the internet or when you do not want to trustlist Invicti cloud agents.
This document shows you how to install the Invicti internal agent with proxy settings on Windows and Docker to connect to Invicti Platform.
When the site is internal, and you prefer using internal agents for the scan, you cannot create a new Login Sequence Record (LSR) or Business Logic Record. However, you can import them. For further information about recording and downloading an LSR, refer to the Standalone login sequence recorder overview.
Prerequisites
System requirements
To run scans successfully, the agent requires sufficient system resources. The agent only initiates a new scan if the following minimum resources are available:
- CPU: 2 free core CPU 64-bit processor
- Memory (RAM): 6 GB available
- Disk Space: 50 GB of free disk space
Access requirements
- Administrator privileges for command execution
- Invicti Platform Administrator role
Trustlisting requirements
Resource allocation behavior
When the agent starts, it checks the available system resources and allocates scan slots accordingly. Each scan slot requires:
- 6 GB of available RAM
- 2 CPU cores
- 50 GB of free disk space
The agent determines how many scans can run in parallel based on these requirements.
If a machine has 15 GB RAM, 5 CPU cores, and 500 GB free disk space, the agent allocates 2 scan slots. This means up to 2 scans can run simultaneously, while any additional scans remain queued until a slot becomes available.
The agent dynamically manages resources before and during scan execution. If system resources drop under the required threshold, new scans aren't going to begin until sufficient resources are available.
Install an internal agent with proxy settings on Windows
-
Select Scans > Agents from the left-side menu.
-
Click Agent Installation Instructions.
-
Select Windows.
-
Enter a name for your internal agent.
-
Create a folder where you save the internal agent.
-
Click Download Windows Agent. When the
invicti-agent.exefile is downloaded, move it to the folder created in the preceding Step 5. -
Copy the command from Step 5 in the Agent Installation Instructions.
-
Paste the command in a place where you can edit the content, for example, in Notepad.
-
Edit the command to add
-p http://username:pass@proxy_server:portat the end (after the registration token). Ensure that you replace username, pass, proxy_server, and port with your actual proxy settings..\invicti-agent.exe register --url app.invicti.com --agentname "newagent" --registration-token aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee -p http://username:pass@proxy_server:port -
As a user without administrative privileges, open Terminal and navigate to the folder where you saved the downloaded
invicti-agent.exefile. Alternatively, right-click the folder with the file and select 'Open in Terminal.' -
Copy and paste the edited command from Step 9 above to your Terminal window and execute the command.
-
Copy the command from Step 6 in the Agent Installation Instructions.
-
As a user with administrative privileges, open Terminal and navigate to the folder where you saved the downloaded
invicti-agent.exefile. Alternatively, right-click the folder with the file and select 'Open in Terminal.' -
Paste and run the command copied in Step 12 above. This installs the agent as a service so that it is ready to start executing scans.
Your internal agent is now installed. You can view your internal agents in Invicti by going to the Scans > Agents page.
You can now assign targets to the installed internal agent and commence testing your website.
Install an internal agent with proxy settings using Docker
Ensure Docker Desktop is installed on your host OS by verifying with the command docker -v in Terminal. If version information is displayed, you're all set. Otherwise, refer to the Docker support documentation for installation guidance.
-
Select Scans > Agents from the left-side menu.
-
Click Agent Installation Instructions.
-
Select Docker.
-
Enter a name for your internal agent.
-
Copy the command from Step 3 in the Agent Installation Instructions.
-
Paste the command in a place where you can edit the content, for example, in Notepad.
-
Edit the command to add
-e INVICTI_AGENT_HTTP_PROXY=http://username:pass@ip:portafter the name parameter. If the proxy doesn't have any authentication, then use-e INVICTI_AGENT_HTTP_PROXY=http://ip:portinstead.Ensure that you replace username, pass, ip, and port with your actual proxy settings.
docker run -d --name "my-agent" -e INVICTI_AGENT_HTTP_PROXY=http://username:pass@ip:port invicti/internal-agent --url platform.invicti.com --agentname "agent-name" --registration-token XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -
Copy the full text of your newly edited command.
-
Open Terminal and paste the command. Press Enter to execute the command.
Your internal agent is now installed. You can view your internal agents in Invicti by going to the Scans > Agents page.
You can now assign targets to the installed internal agent and commence testing your website.
Import a certificate within Docker
To import a certificate within Docker, follow the steps below:
-
Create a new folder. For example,
C:\users\name\my_agent -
Copy the certificate you would like to import to this new folder. For example,
C:\users\name\my_agent\my_certificate.pem -
Navigate to this folder:
C:\users\name\my_agent -
Create the following Dockerfile and name it 'Dockerfile':
FROM invicti/internal-agent
USER root
COPY my_certificate.pem /usr/local/share/ca-certificates/my_certificate.crt
RUN update-ca-certificates
USER invicti
ENTRYPOINT ["/usr/local/bin/invicti-agent","register-r] -
Run the command
docker build -t my_agent .to build the image -
Run the following command to start the agent with the new certificate and proxy. Note that '-p' is used for the agent proxy.
docker run -d --env REQUESTS_CA_BUNDLE=/etc/ssl/certs/ --name "dockeragent" my_agent --url app.invicti.com --agentname "dockeragent" --registration-token XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -p http://myproxy
Explanation of parameters
Below is a table detailing the parameters necessary to configure a Docker container for installing an internal agent.
| Parameter | Description |
|---|---|
| -d | This indicates detached mode, allowing the container to operate in the background. |
| --name | Assigns a name to the container. |
| -e | Sets the environment parameters to add the proxy. |
| --url | Specifies the Invicti URL. |
| --agentname | Defines the agent name in the Invicti UI, changeable later. If installing multiple agent instances, assign a unique agent name for each instance. (Max 50 characters) |
| --registration-token | Obtain from Invicti Agents menu > Agent Installation > Docker > Your registration token is displayed in Step 2: Get your token. |
Need help?
If you need help with this document or have questions about the installation process, please contact the Support team through the Invicti Help Center.