Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / huawei switch ansible cheat sheet
Last active June 11, 2023 17:49
huawei switch ansible cheat sheet
-----------------------------------------------------------------------------------------------------
#https://cn-ansibledoc.readthedocs.io/zh_CN/latest/network/user_guide/platform_ce.html
#ansible_connection=netconf or ansible_connection=network_cli
Using CLI in Ansible
Example CLI inventory [ce:vars]
[ce:vars]
ansible_connection=network_cli
ansible_network_os=ce
@githubfoam
githubfoam / hp aruba switch ansible cheat sheet
Last active June 6, 2023 07:19
hp aruba switch ansible cheat sheet
--------------------------------------------------------------------------------------------------------------------
https://github.com/aruba/aos-switch-ansible-collection
--------------------------------------------------------------------------------------------------------------------
https://docs.ansible.com/ansible/latest/collections/community/network/aruba_config_module.html#ansible-collections-community-network-aruba-config-module
https://docs.ansible.com/ansible/latest/collections/community/network/aruba_command_module.html#ansible-collections-community-network-aruba-command-module
--------------------------------------------------------------------------------------------------------------------
# cat aruba_switches.ini
[switches]
switch1 ansible_host=192.168.1.100 ansible_user=admin ansible_password=your_password ansible_connection=network_cli ansible_network_os=aruba
@githubfoam
githubfoam / dell switch ansible cheat sheet
Last active August 25, 2023 10:50
dell switch ansible cheat sheet
--------------------------------------------------------------------------------------------------------------------
https://github.com/Dell-Networking/ansible-dellos-examples/
https://ansible-dellos-docs.readthedocs.io/en/latest/modules.html#os6-modules
--------------------------------------------------------------------------------------------------------------------
#install collections
ansible-galaxy collection install dellemc.os6
ansible-galaxy collection install dellemc.os10
ansible-galaxy collection list #check whether it is installed
ansible-galaxy collection verify dellemc.os6 #verify
@githubfoam
githubfoam / Incident response cheat sheet
Last active April 20, 2025 07:39
Incident response cheat sheet
----------------------------------------------------------------------------------------------------
SIEM stands for Security Information and Event Management. Essentially, it's a software platform that aggregates data from various security sources across your IT infrastructure, analyzes it in real-time, and helps you detect and respond to potential security threats.
Think of it as a security command center:
Gathers information: Collects logs, alerts, and events from firewalls, intrusion detection systems, antivirus software, and other security tools.
Correlates data: Analyzes the collected information to identify patterns, anomalies, and potential threats.
Alerts and reports: Notifies security teams about potential incidents and provides reports for investigation and analysis.
Streamlines response: Helps automate incident response tasks and provides tools for investigation and mitigation.
Benefits of SIEM:
@githubfoam
githubfoam / cloud security cheat sheet
Created July 6, 2023 06:08
cloud security cheat sheet
==========================================================================================================
#Bing
The Cloud Security Alliance (CSA) Security Trust Assurance and Risk (STAR) program is a publicly accessible registry that documents the security and privacy controls provided by popular cloud computing offerings. STAR encompasses the key principles of transparency, rigorous auditing, and harmonization of standards outlined in the Cloud Controls Matrix (CCM)1. By obtaining the CSA STAR Certification, Cloud Service Providers (CSPs) show to their clients that they are using best practices to protect data in cloud applications2. The CSA STAR Certification is a rigorous third-party independent assessment of the security of a cloud service provider. This technology-neutral certification leverages the requirements of the ISO/IEC 27001:2013 management system standard together with the CSA Cloud Controls Matrix3.
=============================================================================================
@githubfoam
githubfoam / threat hunting cheat sheet
Last active March 23, 2026 03:33
threat hunting cheat sheet
#===================================================================================================================================
#ChatGPT
To schedule a PowerShell script to run at regular intervals in Windows, you can use the schtasks command. The schtasks command allows you to create, modify, delete, or view scheduled tasks on the local or remote computer. Here's how you can use it to schedule a PowerShell script:
Example: Schedule PowerShell Script to Run Daily
Let's say you have a PowerShell script named MyScript.ps1 located in C:\Scripts that you want to run daily at 10:00 AM. Here's how you can schedule it using schtasks:
Open Command Prompt or PowerShell as an administrator.
@githubfoam
githubfoam / Investigation Path - command and control (C2 or C&C)
Last active July 20, 2023 19:08
Investigation Path - command and control (C2 or C&C)
==========================================================================================================
#https://attack.mitre.org/tactics/TA0011/
Tactics/Techniques
Command and Control consists of techniques that adversaries may use to communicate with systems under their control within a victim network. Adversaries commonly attempt to mimic normal, expected traffic to avoid detection. There are many ways an adversary can establish command and control with various levels of stealth depending on the victim’s network structure and defenses
==========================================================================================================
#ChatGPT
As an incident response security engineer detecting a command and control (C2/C&C) attack on a host, you can use the MITRE ATT&CK Navigator as a helpful tool to aid in your incident response efforts. The MITRE ATT&CK Navigator is a web-based tool that allows you to visualize and track adversary techniques, tactics, and procedures in real-time. Here's how you
@githubfoam
githubfoam / ubuntu forensics cheat sheet
Last active August 19, 2025 11:43
ubuntu forensics cheat sheet
============================================================================
FOR577: LINUX Incident Response and Threat Hunting
https://www.sans.org/cyber-security-courses/linux-threat-hunting-incident-response/
============================================================================
#ChatGPT
Determining the precise date and time when ClamAV was installed on an Ubuntu Linux system might require a bit of sleuthing, as Linux doesn't typically log installation timestamps by default. However, you can use system logs and package manager records to get an idea of when ClamAV was installed:
Method 1: Checking Package Installation Logs
APT Logs:
@githubfoam
githubfoam / fortigate - HA mode cheat sheet
Last active January 23, 2025 01:23
fortigate - HA mode cheat sheet
#=====================================================================
#how to power off fortigate cluster
#unplug the power cables as there is no power buttons
shut down first the secondary(backup unit)
Unit-1 # execute ha manage 1 {To switch to the backup unit}
Unit-2 $ {Now on the backup unit}
Unit-2 $ execute shutdown {To shut down the backup unit}
This operation will shutdown the system !
Do you want to continue? (y/n)y
@githubfoam
githubfoam / dell switch S404 8cheat sheet
Last active August 31, 2025 11:13
dell switch S4048 cheat sheet
#=====================================================================
https://ansible-dellos-docs.readthedocs.io/en/latest/index.html
#=====================================================================
The dellemc.os9 collection supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on OS9 in Ansible
https://docs.ansible.com/ansible/latest/network/user_guide/platform_dellos9.html
#=====================================================================
This collection includes the Ansible modules, plugins and roles needed to provision and manage Dell EMC PowerSwitch platforms running Dell EMC OS9. Sample playbooks and documentation are also included to show how the collection can be used.
https://github.com/ansible-collections/dellemc.os9/tree/main
#=====================================================================