Azure Scan Engines
You can deploy a Scan Engine in the form of an Azure VM from Microsoft's Azure marketplace. This article guides you through the deployment and configuration process.
Setting up your scan engine
- Log in to your Azure portal.
- Click the Marketplace tile.
- Search for "Rapid7 VM Scan Engine" within the Marketplace search and select the Rapid7 VM Scan Engine.
- Click Create.
- Give your new VM a name (without any spaces) and some information about who will be managing the engine. This is also where you will select the authentication method.
- Click OK.
- Choose a D2_V2 or larger VM.
- No changes are needed on the Settings screen, but check your Network security group (firewall) to make sure it is configured correctly based on your pairing method.
- For console-to-engine pairing, you must allow inbound access from your console's IP on port 40814. Navigate to the Network Security Group section in your settings, select Create New, and provide a name. Select Add an inbound rule and allow inbound access on port 40814 for Any Source and Custom Service.
- If you need a public IP address, select Public IP address on the left side panel. Then, select an existing public IP address or click Create New and enter a name.
- For engine-to-console pairing, you don’t need to add any new rules.
- Click OK > Purchase to launch the instance.
After a few minutes, you’ll see the Scan Engine available under Virtual Machines. The public IP address (if added) will be on the overview tab.
Connecting the Scan Engine to the Security Console
Choose how you want to connect the engine to the console, console-to-engine or engine-to-console communication.
Console-to-engine communication
Log in to the Security Console via the web browser, and to the Azure instance via SSH. For help, see https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-ssh-from-windows/.
Follow the normal instructions for pairing a console.
Engine-to-console communication
- Log in to the Security Console.
- Get a pre-shared key.
- On the Administration page, in the Scans > Scan Engines section, click Manage Scan Engines.
- Click Generate.
- Make sure the console’s firewall accepts incoming connections from the engine on port 40815.
- SSH to the scan engine.
- Stop the Scan Engine service with the following command:
1sudo service nexposeengine stop
- Create an
/opt/rapid7/nexpose/nse/conf/consoles.xml
file that looks like this:
1<?xml version='1.0' encoding='utf-8'?>2<Consoles>3<console id="1" enabled="1" connectTo="1" name="UNAVAILABLE" lastAddress="CONSOLE_IP" port="40815" plaintext_sharedSecret="CONSOLE_SHARED_SECRET">4<cert></cert>5</console>6</Consoles>
- Replace
CONSOLE_IP
andCONSOLE_SHARED_SECRET
above with the corresponding values from the console. - Restart the engine service with the following command:
1sudo service nexposeengine start
- Wait approximately 20 minutes for the engine to start and pair with the Security Console.
Set up scan engines outside of the Azure environment to scan inside the environment
You should completely open the firewall of scan targets so that the scan engine can scan all ports.
- In the Azure portal, go to Virtual Machines.
- Select a Virtual Machine scan engine.
- Select Network interfaces.
- Select the attached network interface.
- Select Network security group.
- Select the security group.
- Click Create port rule to add an inbound security rule.
- Fill in the necessary information then click Add.
- Add your selected scan engine's IP address to the form.