CR1MS0N-Operator/nightforge

GitHub: CR1MS0N-Operator/nightforge

NightForge 是一套基于 Arch Linux 的红队操作员工作站配置框架,通过 dotfiles 与 Podman 容器实现桌面环境和工具链的可复现部署。

Stars: 2 | Forks: 0

# NightForge **CR1MS0N-Operator — 操作员工作站** 由 [CR1MS0N-Operator](https://github.com/CR1MS0N-Operator) 构建和运营 | CR1MS0N-Operator [Veil](https://github.com/CR1MS0N-Operator/veil) 基础设施项目的一部分。 ## 快速开始 ``` # 1. Clone 该 repository git clone https://github.com/CR1MS0N-Operator/nightforge.git cd nightforge # 2. Review 将要安装的内容 less manifests/host-packages.txt less docs/INSTALL.md # 3. Deploy 核心 dotfiles cp -r dotfiles/niri ~/.config/ cp -r dotfiles/ghostty ~/.config/ cp -r dotfiles/zsh ~/.config/ # 4. Install 系统 packages(先 review!) # 完整流程请参见 docs/INSTALL.md # pacman -S --needed - < manifests/host-packages.txt # yay -S --needed - < manifests/aur-packages.txt # 5. Build container profiles ./modules/container/scripts/container.sh build-all # 6. 验证安装 ./scripts/benchmark/system-baseline.sh # 7. 初始化你的首次 engagement new-engagement my-client 10.10.10.0/24 ``` ## 系统架构 NightForge 是 Veil 红队基础设施中面向操作员的节点。以下是数据流和组件关系。 ``` ┌─────────────────────────────────────────────────────────────────┐ │ INTERNET / TARGET │ └─────────────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────┐ │ ┌───────────────────┐ ┌─────────────────────────────────┐ │ │ │ CERBERUS EDGE │────▶│ HERMES REDIRECTOR │ │ │ │ (C2 edge proxy) │ │ (TLS termination, auth, │ │ │ │ DNS/HTTP/HTTPS │ │ traffic deconflict, logging) │ │ │ └───────────────────┘ └──────────┬──────────────────────┘ │ │ │ │ │ │ (encrypted tunnel) │ │ ▼ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ TAIRN C2 │ │ │ │ (Mythic-based C2 framework, listener mgmt, tasking, │ │ │ │ payload generation, logging, opsec deconfliction) │ │ │ └─────────────────────┬────────────────────────────────────┘ │ │ │ │ │ │ (WireGuard mesh — 10.0.0.0/24) │ │ ▼ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ NIGHTFORGE │ │ │ │ ┌────────────────────────────────────────────────────┐ │ │ │ │ │ NIRI COMPOSITOR (Wayland, scrolling tiling) │ │ │ │ │ │ ├── DMS Bar/Launcher (taskbar, workspaces, tray) │ │ │ │ │ │ ├── Quickshell (shell widgets, popups, OSD) │ │ │ │ │ │ ├── Fuzzel (application launcher) │ │ │ │ │ │ └── Rofi (clipboard picker, window switcher) │ │ │ │ │ └────────────────────────────────────────────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────┐ │ │ │ │ │ GHOSTTY TERMINAL (GPU-accelerated, multi-config) │ │ │ │ │ │ ├── Zsh + Starship (smart prompt, context-aware) │ │ │ │ │ │ │ └── Operator Terminal Framework (14 modules) │ │ │ │ │ │ └── Tmux (session management, engagement layouts) │ │ │ │ │ └────────────────────────────────────────────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────┐ │ │ │ │ │ PODMAN CONTAINERS (rootless, per-profile) │ │ │ │ │ │ ├── toolbox (base Arch + Python runtime) │ │ │ │ │ │ ├── ad (Active Directory tooling) │ │ │ │ │ │ ├── re (Reverse engineering) │ │ │ │ │ │ └── web (Web recon) │ │ │ │ │ └────────────────────────────────────────────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────┐ │ │ │ │ │ MATUGEN THEMING (dynamic color from wallpaper) │ │ │ │ │ │ ├── Ghostty (dark/light terminal configs) │ │ │ │ │ │ ├── GTK/Qt (uniform app theming) │ │ │ │ │ │ ├── Neovim / btop / Mako / Rofi / Starship │ │ │ │ │ │ └── Quickshell widgets (real-time color sync) │ │ │ │ │ └────────────────────────────────────────────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────┐ │ │ │ │ │ SYSTEM SERVICES │ │ │ │ │ ├── Offsec Maintenance (weekly audit + cleanup) │ │ │ │ │ │ ├── Wallpaper Rotate (periodic wallpaper switch) │ │ │ │ │ │ ├── Matugen Sync (re-theme on wallpaper change) │ │ │ │ │ │ └── MPD (music player daemon) │ │ │ │ │ └────────────────────────────────────────────────────┘ │ │ │ └──────────────────────────────────────────────────────────┘ │ │ │ │ Hardware: Intel i3-10105F · 32GB RAM · GTX 1650 · 2×512GB NVMe │ └─────────────────────────────────────────────────────────────────┘ ``` **数据流摘要:** 1. 操作员通过 NightForge 终端经由 Tairn C2 (Mythic) 向 implant 下发任务 2. 任务流经 Hermes 重定向器(TLS,消除冲突)到达 Cerberus 边缘节点 3. Implant 回调路由为 Cerberus → Hermes → Tairn → NightForge 4. 容器配置文件为每个行动工作流隔离工具链 5. 操作员终端框架在每次启动 shell 时显示操作状态(VPN、C2、目标) ## 关键设计决策 ### Niri 优于 Sway (Wayland Compositor) | 因素 | Sway | Niri | |--------|------|------| | 布局模型 | 手动平铺(同级调整大小) | 滚动布局(窗口从不调整大小) | | 概览模式 | 需要外部工具 | 内置 (Super+Space) | | 工作区 | 跨所有显示器全局共享 | 每显示器独立 | | Wayland 协议 | 稳定但老旧 | 支持较新协议 | | 配置格式 | 兼容 i3 (Xorg 遗留) | KDL(原生,强类型) | **为何选择 Niri:** 在多窗口 AD 攻击期间,Sway 的同级调整大小不断干扰焦点。Niri 的滚动布局保证窗口几何形状永远不会改变,除非您明确要求。每个显示器的工作区自然映射到行动工作流(显示器 1:C2 仪表板,显示器 2:漏洞利用,显示器 3:侦查)。内置的概览模式取代了整个外部依赖,少一个活动部件意味着在行动中途少一个可能出故障的环节。 **权衡:** Niri 的社区较小,第三方集成较少。[`dms-backup/`](dotfiles/niri/.config/niri/dms-backup/) 目录保留了完整兼容 Sway 的快捷键和布局配置集,以便在需要时回滚。 ### Quickshell 优于 eww / AGS (Shell Widgets) | 因素 | eww | AGS (Aylur's GTK Shell) | Quickshell | |--------|-----|------------------------|------------| | 语言 | YAML 配置 | TypeScript/GJS | QML (Qt Quick) | | IPC 模型 | 轮询 + 信号 | GObject 信号 | Qt 信号/槽 | | 性能 | 中等 | 中等 | 通过 Qt 实现 GPU 加速 | | GPU 效果 | 有限 | 基于 GLib | 完整 Qt Quick(模糊、不透明度、动画) | | Compositor 支持 | 任意 | 任意(针对 Hyprland 优化) | 任意(经 Niri 测试) | **为何选择 Quickshell:** GPU 加速的 QML 渲染器以原生帧率提供毛玻璃效果(模糊、不透明度、平滑动画),且 CPU 开销为零。`MatugenColors.qml` 服务从 JSON 文件读取派生自壁纸的颜色,并将其作为 Qt 属性公开 —— 所有 Quickshell 组件(栏、控制中心、OSD、音乐弹窗)都会立即对颜色变化做出反应,无需重启。基于 watcher 的架构(用于音频、电池、蓝牙、键盘、网络的独立 `_fetch.sh`/`_wait.sh` 脚本)完全避免了轮询循环。 **权衡:** Quickshell 的社区比 eww 小。QML 的学习曲线比 YAML 陡峭,但比 GJS 平缓。所有自定义组件都位于 [`dotfiles/quickshell/`](dotfiles/quickshell/) 中以实现隔离。 ### 使用 Matugen 进行主题化 (Material Color Utilities) **为何选择 Matugen 而不是 pywal / wallutils / 硬编码:** - **算法提取:** Matugen 使用 Material You 色调算法(HCT 颜色空间)而非简单的像素采样。结果:从*相同*壁纸中提取出既适用于深色又适用于浅色主题的和谐色彩。 - **模板引擎:** Jinja2 风格的模板意味着更换一次壁纸即可重新生成 Ghostty、GTK、Qt、Neovim、btop、Mako、Rofi、Starship、Fastfetch 和 Quickshell 的配置。请查看 [`dotfiles/matugen/.config/matugen/templates/`](dotfiles/matugen/.config/matugen/templates/) 中的所有模板。 - **以 OPSEC 为核心:** OPSEC 深色模式(柔和、低蓝光)和 OPSEC 浅色模式(高对比度、可读性强)均从相同的基础壁纸生成,仅具有不同的色调目标。这支持在客户演示或深夜工作时即时切换主题。 - **同步循环:** `matugen-sync.service`(systemd 用户单元)通过 `matugen-sync.sh` 监控壁纸更改并重新生成所有模板,无需重启任何内容 —— 仅进行信号感知重载。 **权衡:** Matugen 需要 Python,并且在 Arch 上没有官方软件包(通过 `pipx` 安装)。随着应用程序更新其配置格式,模板维护也在持续进行。 ### Ghostty 终端 **为何选择 Ghostty 而不是 Kitty / Alacritty / WezTerm:** | 因素 | Kitty | Alacritty | WezTerm | Ghostty | |--------|-------|-----------|---------|---------| | GPU 加速 | 是 | 是 | 是 | 是 | | 分屏 | 内置 | 否 (需要 tmux) | 内置 | 否 (需要 tmux) | | 配置重载 | 基于信号 | 文件监控 | 文件监控 | 基于信号 (SIGUSR1) | | 多配置 | 否 | 否 | 否 | 是(深色/浅色切换) | | 字体渲染 | 良好 | 基本 | 良好 | 极佳 | **为何选择 Ghostty:** 多配置支持(单独的 `config`、`config-dark`、`config-light`)直接映射到 Matugen 的 OPSEC 主题切换。单一二进制文件,无 runtime 依赖。基于 SIGUSR1 的重载意味着零配置的主题切换。Linux 上的字体渲染通过 Metal/Vulkan 使用 Core Text 级别的质量。 **权衡:** 分屏需要 tmux(已是技术栈的一部分)。Ghostty 较新(社区配置较少)。[`dotfiles/ghostty/`](dotfiles/ghostty/.config/ghostty/) 中的 `config-default` 文件作为维护的 upstream 参考。 ### 其他决策 - **Starship 优于 Powerlevel10k:** P10k 的即时 prompt 为启动增加了 5-15ms。Starship 是单一二进制文件、异步且跨 shell 的。操作员终端框架处理 P10k 之前通过 prompt 片段提供的丰富上下文。 - **Fuzzel 优于 dmenu/wofi:** Fuzzel 原生 Wayland 渲染匹配 Niri 的 dpi-per-output 模型。快速启动(<10ms)。用作主要启动器;保留 Rofi 用于剪贴板历史。 - **Mako 优于 dunst/swaync:** Mako 非常精简(单一配置文件,无 daemon 开销)。通知弹出窗口通过 Quickshell 的 OSD 路由以获得更丰富的显示,而 Mako 负责处理简单的通知。 - **Rootless Podman 优于 Docker:** 无 daemon,无攻击面,原生 user namespace 映射。所有容器配置都以非 root 的 `operator` 用户运行,并带有 `--userns=keep-id`。 ## 操作员终端框架 (v{version}) 在每次终端启动时显示操作状态的上下文感知系统。启动时间:<100ms。 **显示内容:** - VPN 状态和 IP(HTB、TryHackMe、WireGuard mesh) - 活动行动上下文(从 `~/engage/` 目录自动检测) - 网络感知(接口、类型、本地 IP) - Podman 容器状态 - Git 上下文(repo、分支、dirty 状态) - 系统健康(packages、磁盘、内存、uptime) - MITRE ATT&CK 技术日志计数 **架构(启动流程):** ``` Terminal Launch → Zsh → operator-init.sh ↓ Random Banner → Fastfetch → 14 Modules (parallel) → Ready ↓ ↓ <100ms total ``` **MITRE 日志记录:** ``` mitre log T1059.004 "Executed Poseidon implant via bash" ``` 完整文档请参见 [docs/OPERATOR-TERMINAL.md](docs/OPERATOR-TERMINAL.md)。 ## 容器配置文件 (v{version}) 用于隔离攻击性工作流的 Rootless Podman 配置文件。每个配置文件都是最小化的,并由带有静态版本标签和带日期戳的快照的版本控制 manifest 构建。 ### Profile 矩阵 | Profile | 用途 | 基础镜像 | 预估大小 | 关键工具 | 网络构建 | 网络运行 | |---------|---------|------------|-------------|-------------|---------------|-------------| | `toolbox` | 基础 runtime + Python | Arch Linux (pacstrap) | ~1.1 GB | git, tmux, neovim, python 3.14, curl, jq, yq | host | bridge | | `ad` | Active Directory 行动 | localhost/offsec-toolbox | ~1.3 GB | Impacket, krb5, Samba, LDAP utils, RustHound-CE | host | bridge | | `re` | 逆向工程与漏洞研究 | localhost/offsec-toolbox | ~1.8 GB | radare2, GDB+gef, pwntools, ROPgadget, capstone, unicorn, Ghidra | host | bridge | | `web` | Web 侦查与枚举 | localhost/offsec-toolbox | ~1.1 GB | nmap, masscan, gobuster, httpx, nuclei, requests, go | host | bridge | ### Layer 架构 ``` toolbox (base layer — vanilla Arch + Python) ├── ad (adds Impacket, krb5, Samba — ~200 MB tooling) ├── re (adds radare2, GDB, pwntools — ~700 MB tooling) └── web (adds nmap, masscan, gobuster — ~100 MB tooling) ``` 每个派生 profile 均以 `localhost/offsec-toolbox:{version}` 作为基础(FROM),因此基础层工具通过 Podman 的 layer 缓存共享。一次单一的 `toolbox` 重建会使所有派生 profile 的缓存失效。 ### 构建和运行命令 ``` # Build 所有 profiles ./modules/container/scripts/container.sh build-all # Build 单个 profile ./modules/container/scripts/container.sh build ad # 运行 profile(挂载 engage/、loot/、notes/、exploitdev/、projects/) ./modules/container/scripts/container.sh run ad # 为 air-gapped 工作环境导出 ./modules/container/scripts/container.sh export ad # 产出:offsec-ad-{version}-{date}.tar ``` ### 目录契约 容器通过 `:Z`(SELinux 重新标记)自动挂载这些 host 目录: | Host 路径 | 容器挂载点 | 用途 | |-----------|----------------|---------| | `~/engage` | `/work` (或 CWD) | 活动行动数据 | | `~/loot` | `/loot` | 捕获的凭据、文件 | | `~/notes` | `/notes` | 文档、观察结果 | | `~/exploitdev` | `/exploitdev` | 漏洞利用代码、payload | | `~/projects` | `/projects` | 长期项目 | ### 网络模型 - **构建阶段:** `--network=host` — 在镜像创建期间最大化 `pacman` 的下载速度 - **运行阶段:** 使用 `--cap-add=NET_RAW,NET_ADMIN` 的 `--network=bridge` — 隔离容器流量,允许使用 raw socket 工具(nmap, masscan) ### Air-Gapped 工作流 ``` # 在连接网络的 workstation 上 ./modules/container/scripts/container.sh export ad scp offsec-ad-{version}-{date}.tar operator@target:~ # 在 air-gapped 的 NightForge 上 ./modules/container/scripts/container.sh import offsec-ad-{version}-{date}.tar ``` 请参见 [docs/CONTAINER.md](docs/CONTAINER.md) 和 [docs/CONTAINER-QUICKREF.md](docs/CONTAINER-QUICKREF.md)。 ## Niri Compositor 具有滚动平铺布局的 Wayland compositor —— 窗口从不意外调整大小,可通过无限的工作区宽度水平滚动。 **关键集成:** - **DMS (Dank Material Shell):** 统一的栏、启动器、系统托盘、壁纸管理 - **Vim 风格导航:** `Mod+H/J/K/L`,带有自定义 focus-or-spawn 脚本 - **主题切换:** OPSEC 深色/浅色模式,用于客户演示的 demo 模式 - **多显示器:** 混合 DPI/缩放(在双 1080p 上测试) **配置结构:** ``` ~/.config/niri/ ├── config.kdl # Entry point ├── includes/ │ ├── compositor.kdl # Animation, blur, opacity, gaps │ ├── input.kdl # Keyboard layout, mouse, touch │ ├── keybinds.kdl # Navigation, workspace, window ops │ ├── window-rules.kdl # Floating windows, transparency rules │ └── local.kdl # Machine-specific monitor config (gitignored) ├── scripts/ # Focus-or-spawn, screenshot, record └── dms-backup/ # Pre-DMS config for rollback ``` 从 Sway 迁移的说明请参见 [docs/NIRI-MIGRATION.md](docs/NIRI-MIGRATION.md)。 ## 性能与基准测试 ### 启动时间(通过 `systemd-analyze` 测量) | 阶段 | 时间 | 备注 | |-------|------|-------| | Firmware | ~9.97s | Gigabyte B560 DS3H AC-Y1, BIOS F11 | | Bootloader (GRUB) | ~2.06s | | | Kernel | ~5.70s | linux-zen, nvidia-drm.modeset=1 | | Userspace | ~3.60s | | | **总计** | **~21.33s** | 耗时最长项:man-db (6.9s cryptsetup (2.2s), fstrim (2.1s) | ### 内存使用(基线) | 指标 | 值 | |--------|-------| | 空闲 RAM 使用量 | ~1.8 GB (Wayland + Niri + DMS + Quickshell) | | 开启终端 + tmux + nvim 后 | ~2.4 GB | | 运行 2 个容器 profile 时 | ~4.1 GB | | 可用(总 32 GB 中) | ~28 GB | ### 容器构建时间 | Profile | 构建时间 | 镜像大小 | 缓存构建(无更改) | |---------|-----------|------------|---------------------------| | toolbox | ~3m 45s | 1.1 GB | ~30s | | ad | ~2m 10s | 1.3 GB | ~25s | | re | ~3m 30s | 1.8 GB | ~25s | | web | ~1m 45s | 1.1 GB | ~20s | *构建时间在配备旋转 NVMe 存储的 i3-10105F 上测得。由于 Podman 的 layer 缓存,后续构建时间减少约 40%。* ### 终端启动(操作员终端框架) | 组件 | 时间 | |-----------|------| | Fastfetch | ~45ms | | 14 个模块(并行) | ~32ms (~2.3ms/模块) | | Banner + Zsh 初始化 | ~10ms | | **总计** | **~87ms** | ### 网络 | 测试 | 结果 | |------|--------| | DNS (Quad9 9.9.9.9) | ~5ms | | Ping 1.1.1.1 | 平均 11.46ms, 0% 丢包 | | Ping 8.8.8.8 | 平均 16.50ms, 0% 丢包 | | 本地 WireGuard mesh | <1ms | ### 运行基准测试 ``` # 完整系统 baseline ./scripts/benchmark/system-baseline.sh # 输出:docs/benchmarks/baseline-{timestamp}.txt # 各项性能检查 systemd-analyze # Boot time free -h # Memory hyperfine './modules/container/scripts/container.sh build toolbox' # Build time time zsh -i -c exit # Shell startup ``` ## 故障排除 ### Niri Compositor **Niri 无法启动:** ``` # 检查用户 journal 中的错误 journalctl --user -u niri.service -n 50 # 验证 config 语法 niri validate # 常见修复:缺失或损坏的 local.kdl cp ~/.config/niri/includes/local.kdl.template ~/.config/niri/includes/local.kdl nvim ~/.config/niri/includes/local.kdl # 如有需要,回滚至 dms-backup cp -r ~/.config/niri/dms-backup/* ~/.config/niri/includes/ ``` **显示器检测失败:** ``` # 列出检测到的 outputs niri msg outputs # 常见修复:output 名称与 config 不匹配 # 使用上述正确的名称编辑 local.kdl ``` **缺少 DMS 栏:** ``` # 检查 DMS 是否正在运行 pgrep -a dms # 手动 restart dms & # 如果缺失则 rebuild # 参见 https://github.com/Example/dms ``` ### 容器配置文件 **构建失败 — libgcc 冲突:** ``` # 已知问题:Arch base 中的 gcc-libs → libgcc transition # 在 Containerfile 中修复: RUN pacman -Syu --overwrite='*' -y # 或者先 rebuild toolbox: ./modules/container/scripts/container.sh build toolbox ./modules/container/scripts/container.sh build ad ``` **Podman 权限错误:** ``` # 检查 rootless 状态 podman info | grep rootless # 修复 user namespaces sudo sysctl -w kernel.unprivileged_userns_clone=1 # 修复 engagement 目录权限 chmod 777 ~/engage/my-engagement ``` **找不到镜像:** ``` # 列出可用的 images podman images | grep offsec # Build 缺失的 profile ./modules/container/scripts/container.sh build ad ``` ### 操作员终端框架 **启动 > 200ms:** ``` # 对 init 进行 Profile bash -x ~/.config/operator-terminal/operator-init.sh # 检查缓慢的 modules time ~/.config/operator-terminal/modules/vpn-status.sh time ~/.config/operator-terminal/modules/git-context.sh # 通过在 operator-init.sh 中注释掉来禁用缓慢的 modules ``` **模块未运行:** ``` # 检查文件权限 ls -la ~/.config/operator-terminal/modules/ chmod +x ~/.config/operator-terminal/modules/*.sh # 单独测试 ~/.config/operator-terminal/modules/network-context.sh ``` **MITRE 日志记录不起作用:** ``` # 检查 log 文件是否存在 ls -la ~/.config/operator-terminal/mitre.log # 验证 mitre 函数已加载 type mitre # 重新 source config source ~/.zshrc ``` ### Matugen / 主题化 **颜色未更新:** ``` # 检查 matugen-sync service systemctl --user status matugen-sync.service # 手动运行 ~/Github/nightforge/scripts/matugen-sync.sh # 验证 template 输出 ls -la ~/.config/matugen/output/ # 强制重新 template matugen image ~/wallpapers/current.jpg ``` **Ghostty 主题切换不起作用:** ``` # 检查 config 文件是否存在 ls ~/.config/ghostty/config-{dark,light} # 重新加载 Ghostty killall -SIGUSR1 ghostty # 验证 theme symlink readlink ~/.config/ghostty/config ``` ### 维护 **每周审计失败:** ``` # 检查 timer 状态 systemctl status offsec-maintenance.timer # 以详细输出手动运行 sudo offsec-maintenance --non-interactive # 查看 logs journalctl -u offsec-maintenance.service -n 50 ``` **磁盘使用率警告 (>80%):** ``` # 识别大目录 du -h --max-depth=2 ~/ | sort -hr | head -20 # 清理 pacman cache sudo paccache -rk2 # 检查 container image 大小 podman system df ``` ### 网络与 VPN **WireGuard mesh 不可达:** ``` # 检查 interface 状态 ip addr show wg0 # 验证 config sudo wg show # Ping Veil mesh gateway ping -c 3 10.0.0.1 # 重启 WireGuard sudo systemctl restart wg-quick@wg0 ``` **终端未检测到 VPN:** ``` # 检查 interfaces ip link show type tun ip link show type tap # 终端框架会检查 tun/tap interfaces # 手动触发: ~/.config/operator-terminal/modules/vpn-status.sh ``` ## 仓库结构 ``` nightforge/ ├── README.md ├── install.sh ├── docs/ │ ├── INSTALL.md │ ├── OPERATOR-TERMINAL.md │ ├── CONTAINER.md │ ├── CONTAINER-QUICKREF.md │ ├── NIRI-MIGRATION.md │ ├── tools-inventory.md │ └── system-snapshot.md ├── dotfiles/ │ ├── niri/ # Niri compositor config (KDL) │ ├── quickshell/ # QML shell widgets (bar, control center, OSD, music) │ ├── ghostty/ # Terminal config (multi-profile: dark/light/default) │ ├── matugen/ # Material You theming engine (templates + config) │ ├── zsh/ # Zsh config, aliases │ ├── tmux/ # Tmux config + engagement/research/daily layouts │ ├── nvim/ # Neovim init.lua, plugin configs │ ├── btop/ # System monitor config + matugen themes │ ├── rofi/ # Launcher config │ ├── mako/ # Notification daemon config │ ├── swaylock/ # Lock screen config │ ├── swayosd/ # On-screen display config │ ├── gtklock/ # GTK lock screen style │ ├── gtk-3.0/ # GTK3 theme overrides │ ├── gtk-4.0/ # GTK4 theme overrides │ ├── qt6ct/ # Qt6 appearance config │ ├── fontconfig/ # System font configuration │ ├── fuzzel/ # Application launcher config │ ├── satty/ # Screenshot annotation tool config │ ├── starship/ # Cross-shell prompt config │ ├── ssh-agent/ # SSH agent systemd user service │ ├── systemd/ # User systemd services (matugen-sync, wallpaper, mpd) │ ├── waterfox/ # Browser user.js (privacy/security hardening) │ ├── operator-terminal/ # 14-module terminal framework │ ├── fish/ # Fish shell config (fallback) │ └── opencode/ # OpenCode AI coding agent config ├── manifests/ │ ├── host-packages.txt # Full host package list │ ├── explicit-packages.txt # User-installed (not deps) │ ├── base.pacman.txt # Base system group │ ├── container.pacman.txt # Container common packages │ ├── ad-packages.txt # AD tooling │ ├── re-packages.txt # RE tooling │ ├── web-packages.txt # Web tooling │ ├── aur-packages.txt # AUR-installed packages │ ├── solo.pacman.txt # Solo operator extras │ └── team.pacman.txt # Team infrastructure extras ├── profiles/ # Deployment profiles (local, solo, team) ├── modules/ │ └── container/ │ ├── toolbox/ # Containerfile + scripts │ ├── ad/ │ ├── re/ │ ├── web/ │ └── scripts/ │ └── container.sh # Unified container management ├── scripts/ │ ├── audit/ # Package audit, security audit, manifest sync │ ├── benchmark/ # system-baseline.sh performance measurement │ ├── engagement/ # Engagement creation and management │ ├── helpers/ # Container launcher, command cheatsheet │ ├── maintenance/ # Weekly/monthly/quarterly system upkeep │ ├── recon/ # Recon pipeline (v2, v3) │ ├── security/ # Security status check │ ├── setup/ # Directory migration │ ├── niri-outputs/ # Go binary for monitor output management │ ├── qs-watcher/ # Go binary for Quickshell process management │ ├── apply-dotfiles.sh # Stow-based dotfile deployment │ ├── clipboard-picker.sh # Clipboard history picker (Rofi) │ ├── deploy.sh # Full system deployment │ ├── focus-or-spawn.sh # Vim-like window navigation │ ├── matugen-sync.sh # Wallpaper → theme sync │ ├── open-control-center.sh # Quickshell control center toggle │ ├── quickshell-toggle-daemon.sh # QS daemon lifecycle │ ├── toggle-music-popup.sh # MPD music popup toggle │ ├── toggle-performance-mode.sh # Performance/power profile toggle │ ├── wallpaper-picker.sh # Rofi-based wallpaper selector │ └── wallpaper-rotate.sh # Periodic wallpaper rotation └── system/ └── optimizations/ # Kernel params, sysctl tuning ``` ## 更新日志 ### v{version} — 当前发布 - [当前发布说明] ### v0.5.0 — 操作员终端框架 + Niri 迁移 - 操作员终端框架(VPN/行动/Git/网络上下文) - MITRE ATT&CK 日志记录 (`mitre log`) - 行动初始化脚本 (`new-engagement`) - 从 Sway 迁移到 Niri compositor - 集成 DMS 栏/启动器 - Shell prompt:迁移至 Starship(zinit 仅保留用于插件) - 终端启动:<100ms ### v0.4.0 — 容器 Profile 架构 - Rootless Podman profile (toolbox, ad, re, web) - 包审计和清理 - 安全加固(防火墙、SSH、shell 历史记录) - 性能基线 ## 设计原则 1. **默认可复现。** 每个 config 和 manifest 都受版本控制。全新安装应产生完全相同的环境。 2. **最小攻击面。** 没有不必要的服务,没有 Docker daemon,默认不包含 AUR,使用 rootless 容器,仅限显式挂载。 3. **OPSEC 感知工作流。** 主题切换(深色/浅色/demo)、VPN 感知终端、行动隔离、MITRE 技术日志。 4. **本地优先。** 所有工具均在本地运行。容器没有外部 registry。为 air-gapped 操作提供导出/导入功能。 5. **可维护重于取巧。** 倾向于使用枯燥的技术(bash、KDL、QML 而非自定义 DSL)。明确记录权衡(参见 `docs/DECISIONS.md`)。 ## 路线图 - **v0.6.0** — 完整的容器 profile 验证、CI/CD 集成、自动化构建测试 - **v0.7.0** — 团队操作员 profile(共享 C2、协作行动目录) - **v0.8.0** — Tairn C2 集成仪表板(基于 Quickshell 的 C2 状态面板) - **v1.0.0** — Air-gapped 部署文档、密封密钥、完整审计跟踪 ## 免责声明 所有工具仅用于授权的安全研究和行动工作。敏感配置和实时操作细节被故意排除在此仓库之外。 **作者:** Darrius Grate | CR1MS0N-Operator **许可证:** MIT **最后更新:** {date}
标签:Arch Linux, Linux桌面环境, NIDS, PB级数据处理, 安全运维, 容器化, 数据展示, 系统配置, 红队, 网络信息收集