Skip to content

Instantly share code, notes, and snippets.

View Dviros's full-sized avatar
💭
😼 😼 😼 😼 😼 😼 😼 😼 😼 😼

Dvir S. Dviros

💭
😼 😼 😼 😼 😼 😼 😼 😼 😼 😼
View GitHub Profile
@win3zz
win3zz / CVE-2023-21939.md
Created August 27, 2023 12:33
CVE-2023-21939 - Code Exec - Proof of Concept

CVE-2023-21939 - Code Exec - Proof of Concept

Vulnerability Summary: Vulnerability in the Oracle Java SE, Oracle GraalVM Enterprise Edition product of Oracle Java SE (component: Swing). Supported versions that are affected are Oracle Java SE: 8u361, 8u361-perf, 11.0.18, 17.0.6, 20; Oracle GraalVM Enterprise Edition: 20.3.9, 21.3.5 and 22.3.1. Easily exploitable vulnerability allows unauthenticated attacker with network access via HTTP to compromise Oracle Java SE, Oracle GraalVM Enterprise Edition. Successful attacks of this vulnerability can result in unauthorized update, insert or delete access to some of Oracle Java SE, Oracle GraalVM Enterprise Edition accessible data. Note: This vulnerability applies to Java deployments, typically in clients running sandboxed Java Web Start applications or sandboxed Java applets, that load and run untrusted code (e.g., code that comes from the internet) and rely on the Java sandbox for security. This vulnerability can also be exploited by using APIs in the specifie

@alexmags
alexmags / CISA_NEV_vs_DfE.kql
Last active March 7, 2022 09:50
🛡Shields up! Compare CISA Known Exploited Vulnerabilities Catalog to Microsoft Defender for Endpoint data. Use this KQL in DfE Advanced Hunting. https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/advanced-hunting-overview
// make a table from https://www.cisa.gov/known-exploited-vulnerabilities-catalog
let CISA_NEV = (externaldata(CveId:string,vendorProject:string,product:string,vulnerabilityName:string,dateAdded:string,shortDescription:string,requiredAction:string,dueDate:datetime)
[@"https://www.cisa.gov/sites/default/files/csv/known_exploited_vulnerabilities.csv"]
with (format="csv",ignoreFirstRecord=true));
let CISA_NEV_CveIDs= CISA_NEV | project CveId; // make a list from CVEs column
DeviceTvmSoftwareVulnerabilities
| where CveId in (CISA_NEV_CveIDs) // compare DfE devices with CVEs to CISA NEV CVEs list
| join kind = inner CISA_NEV on CveId // Join table of CVEs on devices to CISA NEV table
// format results however you like. Below shows count of devices with each CISA NEV CVE, in due date order
| summarize count() by CveId,vendorProject,product,vulnerabilityName,MicrosoftRating=VulnerabilitySeverityLevel,MicrosoftRecommendedUpdate=RecommendedSecurityUpdate, dateAdded,shortDescription,requiredAction,dueDate
@qtc-de
qtc-de / DynWin32-ReverseShell.ps1
Last active March 16, 2024 10:37
PowerShell reverse shell that uses dynamically resolved Win32 API functions
<#
DynWin32-ReverseShell.ps1 is a reverse shell based on dynamically looked up Win32 API calls.
The script uses reflection to obtain access to GetModuleHandle, GetProcAddress and CreateProcess.
Afterwards it uses GetModuleHandle and GetProcAddress to resolve the required WSA functions
from ws2_32.dll.
This script should be used for educational purposes only (and maybe while playing CTF :D).
It was only tested on Windows 10 (x64) and is probably not stable or portable. It's only
purpose is to demonstrate the usage of reflective lookups of Win32 API calls. See it as
@gladiatx0r
gladiatx0r / Workstation-Takeover.md
Last active April 25, 2024 13:23
From RPC to RCE - Workstation Takeover via RBCD and MS-RPChoose-Your-Own-Adventure

Overview

In the default configuration of Active Directory, it is possible to remotely take over Workstations (Windows 7/10/11) and possibly servers (if Desktop Experience is installed) when their WebClient service is running. This is accomplished in short by;

  • Triggering machine authentication over HTTP via either MS-RPRN or MS-EFSRPC (as demonstrated by @tifkin_). This requires a set of credentials for the RPC call.
  • Relaying that machine authentication to LDAPS for configuring RBCD
  • RBCD takeover

The caveat to this is that the WebClient service does not automatically start at boot. However, if the WebClient service has been triggered to start on a workstation (for example, via some SharePoint interactions), you can remotely take over that system. In addition, there are several ways to coerce the WebClient service to start remotely which I cover in a section below.

@sethenoka
sethenoka / wireguard_pihole_install.sh
Created March 21, 2019 21:28
A script for installing a Wireguard VPN with Pi-Hole (Unbound) recursive DNS
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring Pi-Hole as a recursive local DNS server using
# Unbound to block ads a the DNS level
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y