Skip to content

Instantly share code, notes, and snippets.

View AkechiShiro's full-sized avatar
🏝️
I'm away and have limited access to my notifications

Samy Lahfa AkechiShiro

🏝️
I'm away and have limited access to my notifications
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active July 25, 2024 09:00
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

@adulau
adulau / http2-rapid-reset-ddos-attack.md
Last active July 23, 2024 22:28
HTTP/2 Rapid Reset DDoS Attack

Introduction

This Gist aims to centralise the most relevant public sources of information related to the HTTP/2 Rapid Reset vulnerability. This vulnerability has been disclosed jointly by Google, Amazon AWS, and Cloudflare on 10 October 2023 at 12:00 UTC.

Please help us make this page as comprehensive as possible by contributing relevant references, vendor advisories and statements, mitigations, etc.

References

@kconner
kconner / macOS Internals.md
Last active July 7, 2024 19:42
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@hassanselim0
hassanselim0 / .spamming-the-scammer.md
Last active June 21, 2024 18:01
Spamming the Scammer: Sending fake credentials to a phishing page

What is this?

So a friend of mine came across an FB post that is pretending to be an official account run by Facebook, it takes you to a phishing page that asks for your FB credentials to "confirm your identity and reactivate your account". Reporting the post didn't work (aparently that doesn't go against the community guidelines?), so I decided to write a script to spam the phising page with fake credentials that are almost indestinguishable from real data.

How does it work?

I fetched a list with the most common first names and last names to generate realistic fake emails (first name + separator + last name + separator + random number + email host), and also fetched a list of the most common passwords and also made a list of some common browser UserAgent strings, and I just mimic what the phishing page was doing to send the fake data.

It wasn't that straighforward though, the scammer was using SignalR and only accepting input while the websocket session was alive (also there was an "api key" sent

@tothi
tothi / krbrelay_privesc_howto.md
Last active March 1, 2024 12:26
Privilege Escalation using KrbRelay and RBCD

KrbRelay with RBCD Privilege Escalation HOWTO

Short HOWTO about one use case of the work from Cube0x0 (KrbRelay) and others.

TL;DR

No-Fix Local Privilege Escalation from low-priviliged domain user to local system on domain-joined computers.

Prerequisites:

  • LDAP signing not required on Domain Controller (default!)
@roadkell
roadkell / acpi-call-kernel-oops.md
Last active September 12, 2023 09:35
Fixing acpi_call kernel oops on Thinkpads

Fixing acpi_call kernel oops on Thinkpads

Intro

TLP, a power management utility for Thinkpads and other laptops, uses tpacpi-bat script for battery calibration and setting charge thresholds (for Thinkpads xx20 and later), which in turn uses acpi_call Linux kernel module that enables calls to ACPI methods through /proc/acpi/call. acpi_call can also be used for hybrid graphics switching and other power management tasks.

What happened

As explained here and here, a kernel upstream commit made seek support for [procfs](https://en.wikipedia.org/wiki/

@orhun
orhun / arch_linux_installation.md
Last active July 27, 2024 04:15
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
font = "Bmono 12"
geometry = "0x0-62-62"
separator_height = 2
padding = 2
horizontal_padding = 2
frame_width = 2
markup = full
format = "<b>%s</b>\n%b"
icon_path = ""
@vegard
vegard / kernel-dev.md
Last active July 19, 2024 19:07
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@ThomasLeister
ThomasLeister / auto-start-tmux-ssh.txt
Last active July 23, 2024 07:37
Put this into your .bashrc to auto-start a tmux session after SSH login
Put these lines into your server's .bashrc:
##
## TMUX auto attach
##
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session
if which tmux >/dev/null 2>&1; then # check if tmux is installed
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux"
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session