Skip to content

Instantly share code, notes, and snippets.

View planet36's full-sized avatar

Steven Ward planet36

  • Vandelay Industries
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active June 18, 2024 23:46
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@KoneLinx
KoneLinx / rng.cpp
Created August 21, 2021 11:31
A simple compile time random number generator for C++. (uses std::rotl (C++20), but can be easily replaced if needed)
constexpr uint32_t hash(uint32_t in)
{
constexpr uint32_t r[]{
0xdf15236c, 0x16d16793, 0x3a697614, 0xe0fe08e4,
0xa3a53275, 0xccc10ff9, 0xb92fae55, 0xecf491de,
0x36e86773, 0x0ed24a6a, 0xd7153d80, 0x84adf386,
0x17110e76, 0x6d411a6a, 0xcbd41fed, 0x4b1d6b30
};
uint32_t out{ in ^ r[in & 0xF] };
out ^= std::rotl(in, 020) ^ r[(in >> 010) & 0xF];
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run: