Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / web app security cheat sheet
Last active March 23, 2026 03:33
web app security cheat sheet
------------------------------------------------------------------------------------------
chromedriver
https://chromedriver.chromium.org/downloads/version-selection
https://chromedriver.chromium.org/downloads
https://googlechromelabs.github.io/chrome-for-testing/
------------------------------------------------------------------------------------------
#ChatGPT
@githubfoam
githubfoam / fortigate debug flow cheat sheet
Last active August 18, 2026 16:28
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 - apply Palo alto firewall CIS benchmark to fortigate firewall
Created March 13, 2023 06:50
Threat Modelling - apply Palo alto firewall CIS benchmark to fortigate firewall
#===================================================================================================================================
#ChatGPT
Explain how to apply Palo alto firewall CIS benchmark to fortigate firewall
The Center for Internet Security (CIS) provides a set of security benchmarks for various IT systems, including firewall systems. The CIS benchmarks for firewall systems are designed to help organizations implement best practices for securing their firewall infrastructure.
Although the CIS benchmarks are specific to Palo Alto firewalls, they can be used as a guide for securing other firewall systems such as FortiGate. The following steps can be taken to apply the Palo Alto firewall CIS benchmark to a FortiGate firewall:
Review the CIS benchmark: Review the CIS benchmark for Palo Alto firewalls and identify the relevant security controls that can be applied to the FortiGate firewall. The CIS benchmark can be downloaded from the CIS website.
@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 / Threat Modelling - Proxy logs indicate a host on your network made a few HTTP requests with no User Agent string (field is empty).
Created March 13, 2023 06:43
Threat Modelling - Proxy logs indicate a host on your network made a few HTTP requests with no User Agent string (field is empty).
#===================================================================================================================================
#ChatGPT
Threat modeling is a structured approach to identifying and mitigating potential threats to a system or application. In the case of Proxy logs indicating a host on your network made HTTP requests with no User Agent string, the following steps can be taken to perform threat modeling:
Define the system or application: The first step is to define the system or application that is being modeled. This can include identifying the components, services, and data flows that are involved.
Identify the assets: The next step is to identify the assets that are being protected. This can include data, applications, systems, and infrastructure.
Define the threats: Threats should be identified and defined based on the identified assets. In this case, threats can include attacks that exploit vulnerabilities in the system, such as SQL injection attacks, cross-site scripti
@githubfoam
githubfoam / Threat Hunting - a host made a few HTTP requests with no User Agent string (field is empty)
Created March 13, 2023 06:35
Threat Hunting - a host made a few HTTP requests with no User Agent string (field is empty)
#===================================================================================================================================
#ChatGPT https://twitter.com/chrissanders88/status/1630581503506935811
Explain how to do threat hunting whether an incident occurred when Proxy logs indicate a host on your network made a few HTTP requests with no User Agent string (field is empty)
Threat hunting is the process of proactively searching for malicious activity or threats within an organization's IT infrastructure. In the case of an incident where proxy logs indicate a host on your network made HTTP requests with no User Agent string, the following steps can be taken to perform threat hunting:
Identify the host: The first step is to identify the host that made the HTTP requests. This can be done by reviewing the proxy logs and identifying the IP address of the host.
Analyze the requests: The next step is to analyze the HTTP requests made by the host. This can include analyzing the target URLs, the reque
@githubfoam
githubfoam / Threat Hunting - web server hosted in the Amazon cloud launched a new process named sqlserver.exe
Last active July 7, 2023 05:59
Threat Hunting - web server hosted in the Amazon cloud launched a new process named sqlserver.exe
#===================================================================================================================================
#ChatGPT https://twitter.com/chrissanders88/status/1628050893315899393
Explain how to do threat hunting whether an incident occurred when One of your web servers hosted in the Amazon cloud launched a new process named sqlserver.exe.
Threat hunting is the process of proactively searching for malicious activity or threats within an organization's IT infrastructure. In the case of an incident where a new process named sqlserver.exe was launched on a web server hosted in the Amazon cloud, the following steps can be taken to perform threat hunting:
Gather information: The first step is to gather information about the process and its associated files. This can include the location of the file, the file size, the file hash, and any other relevant information.
Analyze the process behavior: The next step is to analyze the behavior of the process. This can include determining
@githubfoam
githubfoam / Threat Hunting - investigate whether an incident occurred in O365 logs - threat hunting
Last active July 7, 2023 05:58
Threat Hunting - investigate whether an incident occurred in O365 logs
#===================================================================================================================================
#ChatGPT https://twitter.com/chrissanders88/status/1633121837336121345
What do you look for to investigate whether an incident occurred in O365 logs as a security engineer where the user is on vacation for a week and unreachable.
As a security engineer investigating whether an incident occurred in O365 logs where the user is on vacation for a week and unreachable, here are some key things to look for:
Login activity: Check the login activity of the user in question during the period of their absence. Look for any suspicious login attempts or successful logins from unfamiliar locations or devices.
Email activity: Look for any unusual email activity such as mass email forwarding, sending emails to unfamiliar contacts, or accessing sensitive emails.
@githubfoam
githubfoam / Investigation Path - recently created file named 1.wad on a system the attacker accessed
Last active July 7, 2023 06:11
Investigation Path - recently created file named 1.wad on a system the attacker accessed
#===================================================================================================================================
confirm if the file is encrypted first and if so, look for the evidence of another file that decrypts it
if it’s not encrypted static + dynamic analysis
Assuming EDR telemetry is available, figure out which process created the file
there might be a full command line involving that file that explains what it is and how it was created.
Get the md5 and sha256 hash of the file and check VT and Google
Use Velociraptor to search for similar files in org with a query
@githubfoam
githubfoam / Investigation Path - a serverless compute is sending malicious traffic on Amazon Cloud Services
Created March 13, 2023 06:03
Investigation Path - a serverless compute is sending malicious traffic on Amazon Cloud Services
#===================================================================================================================================
#ChatGPT
Explain how to investigate an incident as a cloud security engineer where a serverless compute sends malicious traffic on amazon cloud services.
As a cloud security engineer investigating an incident where a serverless compute is sending malicious traffic on Amazon Cloud Services, here are the steps you should take:
Collect information: Start by collecting information about the incident. This includes the time and date when the incident occurred, the serverless compute function that was involved, the type of malicious traffic that was being sent, the target of the traffic, and any other relevant details. You can collect this information from logs, monitoring tools, and other sources.
Isolate the serverless compute function: Once you have collected the necessary information, isolate the serverless compute function by disabling its access to the internet. This