Warning: This guide contains system-level modifications. Some steps are irreversible or can render your system unbootable. Read every section fully before executing any command. Know what you are doing, or do not proceed.
All examples are written for runit. Adapt service commands for OpenRC or s6 as needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Detect PAM backdoors created by linux-pam-backdoor: | |
| # https://github.com/zephrax/linux-pam-backdoor | |
| # | |
| # Note: this will likely only work with PAM version 1.3.0. | |
| # --- | |
| # $ ./backdoor.sh -v 1.3.0 -p some_s3cr3t_p455word | |
| # Automatic PAM Backdoor | |
| # PAM Version: 1.3.0 | |
| # Password: some_s3cr3t_p455word |
- Docker inserts iptables rules when it's started by default
- buster uses nftables by default
- let's make Docker use nftables instead
- PROFIT
Install Docker CE and nftables:
Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.
Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)
▶ gpg --full-generate-key --expert
gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| apt-get install -y libpcre3 libpcre3-dev libssl-dev unzip make \ | |
| libgoogle-perftools-dev google-perftools jq gcc zlib1g-dev | |
| mkdir /tmp/ngxbuild | |
| cd /tmp/ngxbuild | |
| ng_cookies=$(curl -s http://hg.nginx.org/nginx/tags|grep cookie|cut -f 2 -d '"'|tr -d '\n') | |
| latestNginx=$(curl --cookie ${ng_cookies} -s http://hg.nginx.org/nginx/tags|grep "^ *release-" | head -1 | cut -c 9-) | |
| echo "found: ${latestNginx}" | |
| latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import requests | |
| def download(url, filename): | |
| with open(filename, 'wb') as f: | |
| response = requests.get(url, stream=True) | |
| total = response.headers.get('content-length') | |
| if total is None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Arch Linux with full encrypted btrfs subvolume inside luks | |
| # Hardware: BIOS system, Intel GPU, Nvidia Optimus, Toshiba SSD, Wifi | |
| # Please adjust for your needs. | |
| # filename: install-arch-linux-on-btrfs-subvolume-inside-luks.txt | |
| # The official guide: https://wiki.archlinux.org/index.php/Installation_Guide | |
| # Download the archiso image from https://www.archlinux.org/download/ | |
| # Copy to a usb-drive | |
| dd bs=4M if=archlinux.iso of=/dev/sdx status=progress oflag=sync # on linux |