Skip to content

Instantly share code, notes, and snippets.

@smx-smx
smx-smx / XZ Backdoor Analysis
Last active May 1, 2024 18:04
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress

MD5 Collision with CRC32 Preimage

Here's the scenario: We want to craft two different messages with the same MD5 hash, and a specific CRC32 checksum, simultaneously.

In other words, we want an MD5 collision attack and a CRC32 preimage attack.

This might seem like a contrived scenario, but it's exactly the one I faced while producing my PNG hashquine (Yes OK maybe that's also a contrived scenario, cut me some slack).

On its own, a CRC32 preimage attack is trivial. You can craft a 4-byte suffix that gives any message a specific checksum, calculated using a closed-form expression (which I am too lazy to derive, not even with assistance from Z3). It's not an attack per-se, since CRC32 was never meant to be cryptograpically secure in the first place.

@Sweets
Sweets / unicode.diff
Last active June 5, 2020 00:03
st unicode patch
From 5d624a8d424dc62f881fe91793c2eaef4879fd9a Mon Sep 17 00:00:00 2001
From: Sweets <redacted>
Date: Tue, 27 Mar 2018 20:14:41 -0500
Subject: [PATCH] Unicode input support (TERMMOD+u, ctrl+shift+u by default)
---
config.def.h | 27 +++++++-------
st.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
st.h | 1 +
3 files changed, 117 insertions(+), 30 deletions(-)

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

@csherratt
csherratt / ui.md
Last active March 12, 2023 03:32
Flora's Rust UI ramblings

Rust UI Difficulties

I wanted to give a little bit of a discussion on all my thinking about why UI's are a tricky to get right in Rust. I want to try and differentiate this discussion because there are a number of decent UI frameworks that have been bound to Rust. This is great! I do not want to discourage any of their work, they are wonderful members of our community.

What this is about is how it would be possible to write a good UI framework

anonymous
anonymous / _xdg-mime
Created February 20, 2018 11:32
#compdef xdg-mime
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for xdg-mime.
#
# ------------------------------------------------------------------------------
# Authors
# -------
anonymous
anonymous / arch-mirror
Created February 20, 2018 04:25
#!/bin/bash
# This is a simple mirroring script. To save bandwidth it first checks a
# timestamp via HTTP and only runs rsync when the timestamp differs from the
# local copy. As of 2016, a single rsync run without changes transfers roughly
# 6MiB of data which adds up to roughly 250GiB of traffic per month when rsync
# is run every minute. Performing a simple check via HTTP first can thus save a
# lot of traffic.
home="/mnt/md0/archlinux"
@ISSOtm
ISSOtm / to_c_or_not_to_c.md
Last active June 22, 2021 12:02
Writeup discussing programming toolchains, coding practices, and languages, for GB and GBC dev.

This document is now at https://gbdev.io/guides/tools.html, please go there instead. It's kept here to avoid breaking links and to preserve history.

Previous versions can be checked out by selecting the "Revisions" tab, and selecting "View file" in the three-dot drop-down menu.

@merryhime
merryhime / text.md
Last active February 19, 2024 13:05
Playing with segment registers fs and gs on x64

GSBASE and FSBASE

When you're running out of registers while writing a JIT, you might resort to more unconventional methods for memory access. You might choose to resort to segment registers if you need a fixed register for memory offsets.

Instructions such as:

lea    rax,gs:[rcx+rdx*8]
mov    rax,gs:[rcx+rdx*8]

would then be available for your use.

@Francesco149
Francesco149 / osu_on_linux_overhaul.md
Last active April 12, 2024 21:56
Ultimate guide to low-latency osu on linux