Skip to content

Instantly share code, notes, and snippets.

View assarbad's full-sized avatar
🤓

Oliver Schneider assarbad

🤓
View GitHub Profile
@komiga
komiga / murmur3_constexpr.cpp
Created April 28, 2012 21:20
MurmurHash3 in C++11 using constexpr!
#include <cstddef>
#include <cstdint>
#include <cstdio>
namespace util {
struct funcs;
template <typename S> struct mh3_internal;
template <typename S, S default_seed> struct mh3;
typedef mh3<uint32_t, 0> mh3_default;
@guitarrapc
guitarrapc / Get-EtwTraceProvider.ps1
Last active October 23, 2024 18:49
ETW (Event Tracing for Windows) Providers and their GUIDs for Windows 10 x64
#Requires -RunAsAdministrator
#Requires -Version 5.0
# requires Windows 10
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName
# as Markdown
<#
#Requires -RunAsAdministrator
$result = Get-EtwTraceProvider | sort SessionName
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"}
#>
@vszakats
vszakats / codesign.sh
Last active May 9, 2024 10:23
Code-signing PE executables using OpenSSL, osslsigncode (and more)
#!/bin/sh
# To the extent possible under law, Viktor Szakats
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# SPDX-License-Identifier: CC0-1.0
# shellcheck disable=SC3040,SC2039
set -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o pipefail
@firmanelhakim
firmanelhakim / download_vagrant_box.sh
Last active July 8, 2024 16:37
How to Download Vagrant Box Manually
/* this is the box (and the version) that we want to download from: https://app.vagrantup.com/debian/boxes/jessie64 */
wget https://app.vagrantup.com/debian/boxes/jessie64/versions/8.9.0/providers/virtualbox.box -O debian-jessie64-8.9.0.box
/* add the box to vagrant */
vagrant box add debian/jessie64 debian-jessie64-8.9.0.box
/* update box version */
cd ~/.vagrant.d/boxes/debian-VAGRANTSLASH-jessie64/
mv 0 8.9.0
@Edu4rdSHL
Edu4rdSHL / luks-upgrade.md
Last active August 23, 2024 06:39 — forked from kravietz/luks-upgrade.md
Ubuntu LUKS cryptsetup upgrade

If you installed your #ubuntu with full-disk #encryption a while, you may want to upgrade your #luks header version to enjoy improved #security and stronger password hashing algorithms.

Boot from USB

You can't change LUKS header from a live system - you need to boot a live Ubuntu USB to be able to access the encrypted partition. First, create a bootable USB stick using a regular Ubuntu installer image.

  • Just get the latest installer ISO available
  • You need the full installer, the mini network installer won't work
  • You may need to disable Secure Boot in BIOS temporarily to boot from USB
___ ____ ______ __
/ | / __ \/ ___/ | / /
/ /| |/ / / /\__ \| | / /
/ ___ / /_/ /___/ /| |/ /
/_/__||||||_//____/ |___/__ _____ __ _ __
/ ____/ /_ ___ _____/ /_/ ___// /_ (_) /_
/ / / __ \/ _ \/ ___/ __/\__ \/ __ \/ / __/
/ /___/ / / / __/ /__/ /_ ___/ / / / / / /_
\____/_/ /_/\___/\___/\__//____/_/ /_/_/\__/
import re
from anytree import Node, RenderTree, find
"""
Author: Alexander Hanel
Description: POC for displaying function names as a folder-like structure. Relies on function names being labled with a pdb.
Version: 0.5 - 2023/04/10
Execution: open script in IDA, run export_layout() to save to file or export_layout() to print to command line
TODO:
- review how mangled names are used in IDA. I'm seeing some strange results.
@assarbad
assarbad / VMProtect.md
Created March 27, 2024 22:52
Links to VMProtect related resources
@assarbad
assarbad / Usage.md
Last active October 22, 2024 22:15
Strictly hardened autossh systemd unit template for port-forwarding

How to "install" the above unit template (all require superuser permissions)

  1. place the [email protected] file in /etc/systemd/system
  2. enable an instance -- suppose your remote host is called frodo then you might run: systemctl enable autossh@frodo (do not use --now here!)
  3. now it is time to create an override specific to the instance, e.g. : systemctl edit [email protected] and adjust the following bunch of settings (commented out in the main unit template) like so:
    [Service]
    Environment=MONITOR_PORT=1023
    Environment=REMOTE_PORT=1022
    

Environment=TARGET_USER=username