FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
rcaushi_ftnt
Staff
Staff
Article Id 277733
Description This article discusses triggering dummy traffic using Windows Subsystem for Linux to analyze how the FortiGate is handling it. 
Scope

Use this method to generate unattended traffic of a certain type (TCP/UDP/ICMP), especially in situations when the issue is happening randomly and cannot trigger it on will. of a certain type.

Solution

Windows Linux Subsystem In Windows 10 and 11 and use it to run scrips:

 

Step1. Open PowerShell and run:

 

wsl --list --online<----- To see a list of available distros and run.

wsl --install -d <DistroName> <----- To install a distro.

 

rcaushi_ftnt_0-1696582520185.png

 

 

Step2. Verify the of the WSL instance:

 

$ip route | grep default

 

rcaushi_ftnt_1-1696582520188.png

 

 

$ip a <----- Find the IP associated to the dev wifi0.

 

rcaushi_ftnt_2-1696582520189.png

 

Note:

WSL shares Windows OS IP.

 

Step3. Install all the necessary packages and prepare the scripts:

 

$sudo apt update && upgrade

$sudo apt install python3 python3-pip ipython3

 

  • Download the scripts and copy them into the WLS home directory:

 

\\wsl$

 

Or alternatively


C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_<random>\LocalState\rootfs\home\ubuntu_rc

 

  • Store the files in the home directory :
 

image.png

 

  • Generating traffic:

$HTTPS_Traffic_Generator2.py

 

 

image.png

Note:

Attached is a simple Python script that runs for 24 Hrs and  triggers every 5 seconds HTTPS traffic towards predefined 'URLs'  defined on urls = ['https://www.example.com', 'https://www.fortinet.com'] 

 

Optional Scripts: 

  • If a script is necessary to show a CLI output enable debugging by changing the parameter  DEBUG = False to DEBUG = True.
  • To test with specific destinations edit the section ROOT_URLS from 'config.py'.
 

image.png

 

To tweak the script more refer to the original source that can be used under MIT Licenses: 

https://github.com/ReconInfoSec/web-traffic-generator