2.0 Network Scans

Introduction

A network scan in Tutela is a security assessment performed via a Docker container to identify vulnerabilities across your infrastructure by scanning specific subnets. It provides visibility into vulnerabilities present on network-accessible assets

graph LR
    A[<b>Tutela Network Scan</b>] --> B[<b>Tutela Container</b>]
    B -- "Scans via Network" --> C[<b>Target Subnets</b>]
    C -- "Maps Vulnerabilities and Network Assets" --> B
    B -- "Uploads Results" --> D[<b>Tutela Dashboard</b>]

Requirements

Please ensure the below requirements are met beforehand:

  • Select an internal server to host docker and make sure the selected server has network connectivity to all intended targets.

  • Install Docker or Docker Desktop as outlined in Docker’s documentation and make sure it’s up and running. [Download Docker]

Installing and Running Tutela Image

  1. Make sure that docker is running by running docker version command in command prompt / terminal with elevated privileges.

  1. Run the following command docker pull dvassallocs/tutela. This should pull the latest image from Docker Hub.

  1. To verify correct operation, run the command docker run dvassallocs/tutela. It should give output similar to the below.

  1. Now, we need to generate our API Keys and configure the targets.

    1. Login to Tutela

    2. Go to Settings > Agent API Keys and Setting section.

    3. Click Add API Key

    4. Once generated, click on Add Agent Targets next to your API key and add your desired network targets

  1. Run your first Network Scan (Please execute 1 of the below commands depending on your implementation):

docker run dvassallocs/tutela -api_key API_KEY 

Trial Users only

docker run dvassallocs/tutela -api_key API_KEY -api_endpoint "https://trial-backend.tutela.cybersift.io"

  1. After the scan is complete. login to Tutela to view your results!

Automating Scans via Cron / Scheduled Tasks

Now that we got our network scanner to work, ideally, we want it to run on a weekly or a monthly basis to ensure our data is up to date.

To do this, we will be creating a cronjob or scheduled task on windows to run this command every week.

Linux (Cronjob)

Creating Cron Job

  1. Edit your crontab:

crontab -e

  1. Add the below line (replace API_KEY with your real key):

Production Users:

0 5 * * 0 docker run dvassallocs/tutela -api_key API_KEY 

⚠️ Trial Users:

0 5 * * 0 docker run dvassallocs/tutela -api_key API_KEY -api_endpoint "https://trial-backend.tutela.cybersift.io"

Permission Checklist

Make sure that the cron user can run Docker (docker group)

sudo usermod -aG docker your_user

You successfully created your Cron Job!

“0 5 * * 0” will run every Sunday at 5AM. Feel free to change this to your desired time

Windows (Scheduled Task)

Creating a scheduled task

  1. Open Task Scheduler (Privileged)

  2. Click Create Task - Not basic task

    1. Select Run whether user is logged in or not (Depending on your machine)

  3. Go to Triggers tab

    1. Press New

    2. Configure your desired schedule

    3. Click Ok

  4. Go to Actions tab

    1. Click New

    2. Select Start a Program

    3. Add the location where docker is installed ("C:\Program Files\Docker\Docker\resources\bin\docker.exe")

    4. Add the below arguments:

Production Users:

run dvassallocs/tutela -api_key API_KEY 

⚠️ Trial Users:

run dvassallocs/tutela -api_key API_KEY -api_endpoint "https://trial-backend.tutela.cybersift.io"
  1. Go to Conditions & Settings

    1. Uncheck / Check any settings which might hinder this task from running.

    2. In the settings tab, make sure to allow the task to run on demand.

  2. Make sure to test it!

You successfully set up the scheduled task


tags:

  • Setting up network scans

  • Setting up docker

  • Creating scheduled / cron job tasks

  • Agent Targets

  • Network Scans targets