Skip to content

Instantly share code, notes, and snippets.

@rizalp
rizalp / disable_spectre.md
Last active May 22, 2023 22:07
Disable Spectre/Meltdown Mitigation

In /etc/default/grub, modify:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off"

Then sudo update-grub

@gnif
gnif / qemu-pcie-nasty.patch
Created October 7, 2018 00:11
Nasty/hacky QEMU patch to enable PCIe x 16 Gen 3.0 for Qemu VFIO
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 6c91bd44a0..f3c7b9d328 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -39,6 +39,166 @@
#define PCIE_DEV_PRINTF(dev, fmt, ...) \
PCIE_DPRINTF("%s:%x "fmt, (dev)->name, (dev)->devfn, ## __VA_ARGS__)
+static uint16_t pcie_link_max_width(PCIDevice *dev)
+{

Trying to deploy WPA3 on my home network

Introduction

Recently, news broke about a new possible offline attack on WPA2 using PMKID. To summarize the attack, WPA2 protected APs can end up broadcasting PMKID values which can then be used to offline-brute-force the password.

These PMKID values are computed this way:

PMKID = HMAC-SHA1-128(PMK, "PMK Name" | MAC_AP | MAC_STA)
@csamsel
csamsel / gist:37e14e2280b6c48bc8e4486b50b3a61c
Last active October 21, 2023 12:25
Revert Ubiquiti NanoStation Loco M2 XW/XM to not signed
Need the following tools: binwalk, squashfs-tools
The tutorial will probably work with similar devices, but i havent tested it.
Adjust the firmware files.
1. Have AirOS 5.6.15 signed installed (mind the XM vs. XW, the device type is shown in the webinterface)
Get it from:
XM: https://dl.ubnt.com/firmwares/XN-fw/v5.6.15/XM.v5.6.15-sign.31612.170908.1458.bin
XW: https://dl.ubnt.com/firmwares/XW-fw/v5.6.15/XW.v5.6.15-sign.31612.170908.1440.bin
@picchietti
picchietti / _wireless.md
Last active March 21, 2024 17:37
Making a wireless router with an ASUS PCE-AC88 and Linux (Ubuntu 18.04 LTS)

Introduction

This project makes a wifi router out of an ASUS PCE-AC88 wireless adapter and your Ubuntu Linux computer that can exceed top of the line routers.

Instead of buying a gaming grade router or another computer that you install openWRT on, follow this project and put the savings towards upgrading your main computer or modem.

Add Adapter

The adapter needs to be added to a PCI slot and the wireless antenna needs to be connected to the adapter. If your computer does not detect it, you may need to re-seat the adapter in the slot. If you can't detect wireless networks after installing the firmware below then this is probably why.

Install Firmware for Adapter

For your computer to use the wifi adapter you need to add the missing firmware that Asus won't provide.

@BrinkerVII
BrinkerVII / ARCH_INSTALLATION_GUIDE.md
Last active March 12, 2024 23:11
Arch Linux Installation Guide

Note

This guide is out of date! Following this guide will leave you with a non-functioning system. You can still use this guide for inspiration, but please still do use the Official installation guide

Arch Linux installation guide

Hi there, this is a guide to install Arch Linux on your computer. I decided to write a guide because I find most other guides to be either too minimalistic or they have you set up some parts of the system in strange ways.

This guide is reference material for myself, as well as for other people who would like to install Arch for the first time.

General notes

@rdnetto
rdnetto / Writeup.md
Last active April 30, 2018 23:37
Multiseat PCIe Passthrough Writeup

A few people expressed interest in finding out how this went, so I thought I'd do a writeup of my experiences getting PCIe passthrough working with multiseat.

One of the more interesting things to note is that hot-plugging aside, it works fine with Vega, despite the card not being shown as resettable by the Arch wiki script.

I've mostly followed the Arch wiki, with additional sources linked throughout.

Why would you want to do this?

Multiseat enables multiple people to use the same computer simultaneously. This can reduce setup costs (you only need one motherboard, CPU, etc.) and improve resource utilization (if one seat is idle, the other can make full use of the CPU + memory). The only parts needed per seat are the screen, peripherals, graphics card and a USB soundcard (opt.)

PCIe passthrough allows you to connect on

@extremecoders-re
extremecoders-re / qemu-networking.md
Last active May 4, 2024 05:55
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@oblitum
oblitum / .tmux.conf
Last active April 13, 2024 21:07
Configuration for 24bit true colors terminal with italic
set -g default-terminal 'tmux-256color'
# Enable 24 bit true colors
set -ga terminal-overrides ',*:Tc'