Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / Investigation Path - cwe id 552
Created December 12, 2023 08:16
Investigation Path - cwe id 552
==========================================================================================================
On CentOS 7, the installation path of Apache Tomcat might vary depending on how it was installed.
Default Path: Apache Tomcat is often installed
ls /usr/share/tomcat
ls /usr/local/tomcat
use the find command to locate the Tomcat directory if you're uncertain about the installation path
@githubfoam
githubfoam / data center cheat sheet
Last active December 6, 2023 05:58
data center cheat sheet
------------------------------------------------------------------------------------------
#ChatGPT
An Automatic Transfer Switch (ATS) is a device used in electrical systems to automatically switch power sources between primary and secondary power supplies in case of a power outage or voltage drop. Its primary function is to ensure uninterrupted power supply to critical equipment or loads by seamlessly transferring power between two sources.
Functionality of ATS:
Dual Power Sources: ATS devices typically connect to two separate power sources, such as the primary utility power and a backup generator or secondary power feed.
Automatic Switching: Monitors the primary power source, and in the event of a power failure or abnormal voltage, the ATS swiftly switches the load to the secondary power source without manual intervention.
@githubfoam
githubfoam / fortigate waf cheat sheet
Last active November 1, 2023 07:22
fortigate waf cheat sheet
#=====================================================================
Enable the web application firewall
Enable the web application firewall:
Go to System > Feature Visibility.
Under Security Features, enable Web Application Firewall.
Click Apply.
#=====================================================================
The web application firewall feature is only available when the policy inspection mode is proxy-based.
@githubfoam
githubfoam / apache cheat sheet
Last active September 25, 2023 12:57
apache cheat sheet
==========================================================================================================
#apache 2.4.10 on windows server 2012 data center.
#\apache\conf\extra\httpd-ssl
#The -ALL option disables all SSL/TLS protocols initially.
#The +TLSv1.2 and +TLSv1.3 options then selectively enable the TLS 1.2 and TLS 1.3 protocols.
SSLProtocol -ALL +TLSv1.2 +TLSv1.3
#this configuration directly specifies that Apache should use TLS 1.2 and TLS 1.3 for secure communications.
#It doesn't explicitly disable any other SSL or TLS versions, but it indicates the preferred versions.
@githubfoam
githubfoam / IIS cheat sheet
Last active September 19, 2023 07:39
IIS cheat sheet
==========================================================================================================
reset IIS without having to reboot the whole server
iisreset
==========================================================================================================
To check if IIS (Internet Information Services) is running on a Windows Server 2019 Standard server, you can use several methods, including the graphical user interface (GUI) and command-line tools. Here are two common methods:
Method 1: Using the GUI (Server Manager)
Log In: Log in to the Windows Server 2019 Standard using an account with administrative privileges.
@githubfoam
githubfoam / ansible networking cheat sheet
Last active August 25, 2023 11:18
ansible networking cheat sheet
--------------------------------------------------------------------------------------------------------------------
#Bard
Ansible uses the following connection types for connecting to network devices:
Network CLI: This is the default connection type for network devices. It uses the SSH protocol to connect to the device and execute commands on the CLI. The ansible.netcommon.network_cli connection plugin is used for this type of connection.
For example, to connect to a Cisco device using the network CLI, you would use the following inventory entry:
host: cisco_device
@githubfoam
githubfoam / windows 11 cheat sheet
Last active January 31, 2024 19:03
windows 11 cheat sheet
#=====================================================================
# find out outgoing snmp traffic troubleshooting
Open Resource Monitor:
Press Win + R, type resmon, and press Enter.
In Resource Monitor, go to the Network tab and find the SNMP-related entries, which might display outgoing SNMP traffic.
Open Command Prompt or PowerShell as an administrator.
Type the command:
@githubfoam
githubfoam / dell switch S404 8cheat sheet
Last active August 10, 2023 10:33
dell switch S4048 cheat sheet
#=====================================================================
#https://www.dell.com/support/manuals/tr-tr/dell-emc-os-9/s4048-on-9.14.2.8-config-pub/view-command-history?guid=guid-c004c801-c43d-41fd-a85a-4816f78656f9&lang=en-us
#https://dl.dell.com/Manuals/all-products/esuprt_networking_int/esuprt_networking_operating_systems/dell-emc-os-9_White-Papers13_en-us.pdf
#=====================================================================
show version
show os-version
#=====================================================================
#save the configuration on a Dell S4048 switch and ensure that it's not lost after a reboot
@githubfoam
githubfoam / fortigate - HA mode cheat sheet
Last active November 27, 2023 06:53
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 / ubuntu forensics cheat sheet
Last active November 28, 2023 12:35
ubuntu forensics cheat sheet
============================================================================
#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:
Look into the /var/log/apt/history.log* files. These logs contain historical information about package installations and updates.
zgrep "clamav" /var/log/apt/history.log*