Skip to content

Instantly share code, notes, and snippets.

View tvilo's full-sized avatar

Tyler Vilo tvilo

  • Verma Systems
  • Baton Rouge, LA
View GitHub Profile
@githubfoam
githubfoam / fortigate - security fabric - external connectors cheat sheet
Created March 20, 2023 07:44
fortigate - security fabric - external connectors cheat sheet
#=====================================================================
#ChatGPT
Explain SDN connector in fortigate.
An SDN (Software Defined Networking) connector in FortiGate is a feature that allows for the integration of FortiGate with SDN controllers in a network environment. The SDN connector supports integration with OpenStack, Microsoft Azure, and VMware NSX controllers.
With the SDN connector, FortiGate can receive information from the SDN controller about virtual machine (VM) and network changes, and can use this information to dynamically update its security policies. This enables FortiGate to adapt to changes in the network environment in real-time, without the need for manual configuration.
For example, when a new VM is created or moved in an OpenStack environment, the SDN connector can inform FortiGate of this change. FortiGate can then automatically create or modify its security policy to allow traffic from this new VM, without the need for manual configuration.
@githubfoam
githubfoam / fortigate - application control cheat sheet
Last active January 23, 2025 01:24
fortigate - application control cheat sheet
#=====================================================================
What is the limitation of using a URL list and application control on the same firewall policy, in NGFW policy-based mode?
A. It limits the scanning of application traffic to the browser-based technology category only.
B. It limits the scanning of application traffic to the DNS protocol only.
C. It limits the scanning of application traffic to use parent signatures only.
D. It limits the scanning of application traffic to the application category only.
@githubfoam
githubfoam / fortigate debug flow cheat sheet
Last active March 9, 2026 15:19
fortigate debug flow cheat sheet
#=====================================================================
#ChatGPT
#=====================================================================
#Debug the packet flow when network traffic is not entering and leaving the FortiGate as expected.
#https://docs.fortinet.com/document/fortigate/7.2.3/administration-guide/054688/debugging-the-packet-flow
# GUI https://docs.fortinet.com/document/fortigate/7.2.3/administration-guide/038044/using-the-debug-flow-tool
#=====================================================================
#If you encounter a different protocol number, you can refer to the IANA Protocol Numbers registry
Assigned Internet Protocol Numbers
@githubfoam
githubfoam / Threat Modelling - fortigate firewall
Created March 13, 2023 06:46
Threat Modelling - fortigate firewall
#===================================================================================================================================
#ChatGPT
Explain how to perform threat modelling when identifying and mitigating potential threats to fortigate firewall.
Performing threat modeling for FortiGate firewall involves a structured approach to identifying and mitigating potential threats to the system. The following steps can be taken to perform threat modeling for FortiGate firewall:
Define the system: The first step is to define the FortiGate firewall system that is being modeled, including its components, services, and data flows.
Identify the assets: The next step is to identify the assets that are being protected by the FortiGate firewall. This can include the network infrastructure, servers, endpoints, applications, and data.
@githubfoam
githubfoam / fortianalyzer - fortiSoc cheat sheet
Last active January 23, 2025 01:25
fortianalyzer - fortiSoc cheat sheet
#=====================================================================#=====================================================================
make this dataset query on fortianalyzer more structured and readable:select appcat, sum(bandwidth) as bandwidth from ###(select app, appcat, user_src, sum(traffic_in) as traffic_in, sum(traffic_out) as traffic_out, sum(bandwidth) as bandwidth, sum(sessions) as sessions from ###base(/*tag:rpt_base_t_top_app*/select $flex_timestamp as timestamp, dvid, srcip, dstip, epid, euid, coalesce(nullifna(`user`), nullifna(`unauthuser`), ipstr(`srcip`)) as user_src, service, appid, app, appcat, apprisk, hostname, sum(coalesce(rcvddelta, rcvdbyte, 0)) as traffic_in, sum(coalesce(sentdelta, sentbyte, 0)) as traffic_out, sum(coalesce(sentdelta, sentbyte, 0)+coalesce(rcvddelta, rcvdbyte, 0)) as bandwidth, sum(CASE WHEN (logflag&1>0) THEN 1 ELSE 0 END) as sessions from $log-traffic where $filter and (logflag&(1|32)>0) and nullifna(app) is not null group by timestamp, dvid, srcip, dstip,
@githubfoam
githubfoam / fortianalyzer cheat sheet
Last active November 21, 2025 20:00
fortianalyzer cheat sheet
#=====================================================================#=====================================================================
get sys status
Get general information: firmware version, serial number, ADOMs enabled or not, time and time zone, general license status (Valid or not).
get sys performance
Detailed performance statistics: CPU load, memory usage, hard disk/flash disk used space and input/output (iostat) statistics.
@githubfoam
githubfoam / fortigate cheat sheet
Last active February 4, 2026 03:18
fortigate cheat sheet
#=====================================================================
#CIS benchmark
https://www.cisecurity.org/benchmark/fortinet
#=====================================================================
Packet flow ingress and egress: FortiGates without network processor offloading
https://docs.fortinet.com/document/fortigate/6.4.0/parallel-path-processing-life-of-a-packet/86811/packet-flow-ingress-and-egress-fortigates-without-network-processor-offloading
#=====================================================================
CLI
the control key sequences shown in the following table:
<#
.SYNOPSIS
To import registry (.reg) file using pure PowerShell.
.DESCRIPTION
Intended Use
This script was produced to assist with importing registry (.reg) files where the registry
handlers, such as reg.exe or regedit.exe, are blocked from executing.
@andypiper
andypiper / ish-apks.txt
Last active December 12, 2024 12:53
Setup iSH / Alpine Linux on iPad
# edit the login message
vi /etc/motd
# switch to usable repos - iSH defaults often failed with EOF errors
echo https://dl-cdn.alpinelinux.org/alpine/v3.13/main > /etc/apk/repositories
echo https://dl-cdn.alpinelinux.org/alpine/v3.13/community >> /etc/apk/repositories
# install some basics
apk add zsh bash
apk add sed attr dialog dialog-doc bash bash-doc bash-completion grep grep-doc
@svarukala
svarukala / Get-AzureADAppsInfo.ps1
Last active May 10, 2023 19:38
Outputs list of all Azure AD Apps along with their expiration date, display name, owner email, credentials (passwordcredentials or keycredentials), start date, key id and usage. Useful to know the apps that are expiring and take action (renew). Since Azure AD PowerShell is being deprecated in favor of Microsoft Graph PowerShell SDK, I created a …
# Requires Azure AD PowerShell Module
#Prompts user to login using Azure Credentials
Connect-AzureAD
$results = @()
Get-AzureADApplication -All $true | %{
$app = $_
$owner = Get-AzureADApplicationOwner -ObjectId $_.ObjectID -Top 1