repositories

voidwalker.py

Penetration testing arsenal builder and workspace manager for macOS and Linux

clonegit clone https://git.daemon-sec.xyz/voidwalker.py.git
tmux.htmlHTML147 lines11.9 KiBraw download
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="color-scheme" content="light"><meta name="theme-color" content="#faf4ed">
  <meta name="description" content="Voidwalker tmux cockpit cheatsheet.">
  <title>Voidwalker Field Manual // tmux</title>
  <link rel="stylesheet" href="assets/style.css?v=2"><script src="assets/app.js?v=2" defer></script>
</head>
<body>
  <a class="skip-link" href="#content">Skip to content</a>
  <header class="site-header"><div class="header-inner">
    <a class="brand" href="index.html"><span class="brand-mark" aria-hidden="true">V</span><span>Voidwalker<small>offline field manual</small></span></a>
    <button class="nav-toggle" type="button" aria-expanded="false" aria-controls="site-nav">menu</button>
    <nav class="site-nav" id="site-nav" aria-label="Handbook">
      <a href="index.html">Setup</a><a href="tmux.html">tmux</a><a href="pe.html">pe</a><a href="htb-workflow.html">HTB</a><a href="zsh-terminal.html">Shell</a><a href="recon.html">Recon</a><a href="web.html">Web</a><a href="ad-windows.html">AD</a><a href="privesc.html">PrivEsc</a><a href="transfer.html">Transfer</a><a href="toolbox.html">Tools</a>
    </nav>
  </div></header>

  <div class="page-shell">
    <main id="content">
      <section class="hero">
        <p class="eyebrow">Module 01 // session control</p>
        <h1>tmux <span class="accent">cockpit.</span></h1>
        <p class="lede">One target, one named session, three predictable work surfaces. Everything is plugin-free, true-color, mouse-aware and designed not to persist secret-bearing process state.</p>
        <div class="hero-meta"><span class="tag">prefix C-b / C-a</span><span class="tag">vi copy mode</span><span class="tag">OSC52</span><span class="tag">100k history</span></div>
      </section>

      <div class="notice"><div><strong>Persistence is intentionally disabled.</strong> Tmux Resurrect and Continuum can write pane commands, arguments and scrollback to disk. Detaching keeps the live server running; restarting the server does not restore it.</div></div>

      <div class="search-box"><label for="page-search">Filter bindings and topics</label><input id="page-search" data-page-search type="search" placeholder="Try: split, copy, VPN, resize…" autocomplete="off"><span class="search-hint"><kbd>/</kbd> focus · <kbd>Esc</kbd> clear</span></div>
      <p class="filter-summary" data-filter-summary aria-live="polite"></p>

      <section id="model" data-search-item data-search="session workspace htb-session attach detach model windows">
        <h2>Session model</h2>
        <p><code>htb-session</code> reads the active target, sanitizes its name, and creates a tmux session called <code>htb-&lt;target&gt;</code>. It attaches from a normal terminal or switches clients when already inside tmux.</p>
        <pre><code>pe target use keeper
htb-session

# equivalent: select while launching
pe session keeper</code></pre>
        <div class="grid">
          <article class="panel"><h3>Window 1 · recon</h3><p>A three-pane layout rooted in the target directory. Use it for a main scan, service follow-up and lightweight monitoring.</p></article>
          <article class="panel"><h3>Window 2 · shell</h3><p>A clean interactive Zsh window in the same target root for enumeration and tool work.</p></article>
          <article class="panel"><h3>Window 3 · notes</h3><p>Opens <code>notes/notes.md</code> in <code>$EDITOR</code>. The file remains local to the target workspace.</p></article>
          <article class="panel"><h3>Target tree</h3><p><code>nmap/</code>, <code>scans/</code>, <code>loot/</code>, <code>web/</code>, <code>exploit/</code> and <code>notes/</code> are created with a private root.</p></article>
        </div>
      </section>

      <section id="prefix" data-search-item data-search="prefix control b control a send prefix reload config">
        <h2>Prefix and config</h2>
        <div class="table-wrap"><table>
          <thead><tr><th>Keys</th><th>Action</th><th>Note</th></tr></thead>
          <tbody>
            <tr><td><kbd>Ctrl-b</kbd></td><td>Primary prefix</td><td>The tmux default remains available.</td></tr>
            <tr><td><kbd>Ctrl-a</kbd></td><td>Secondary prefix</td><td>Screen-style alternative; follow it with the binding key.</td></tr>
            <tr><td>prefix <kbd>Ctrl-a</kbd></td><td>Send literal secondary prefix</td><td>Useful when a nested program consumes it.</td></tr>
            <tr><td>prefix <kbd>r</kbd></td><td>Reload <code>~/.tmux.conf</code></td><td>Displays a confirmation message.</td></tr>
            <tr><td>prefix <kbd>?</kbd></td><td>Show all tmux key bindings</td><td>Built-in tmux help; press <kbd>q</kbd> to leave.</td></tr>
          </tbody>
        </table></div>
      </section>

      <section id="panes" data-search-item data-search="panes split horizontal vertical move resize sync synchronize mouse zoom">
        <h2>Panes</h2>
        <div class="table-wrap"><table>
          <thead><tr><th>Keys</th><th>Action</th><th>Detail</th></tr></thead>
          <tbody>
            <tr><td>prefix <kbd>|</kbd></td><td>Split side by side</td><td>New pane inherits the current working directory.</td></tr>
            <tr><td>prefix <kbd>-</kbd></td><td>Split top and bottom</td><td>New pane inherits the current working directory.</td></tr>
            <tr><td>prefix <kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd></td><td>Move left, down, up, right</td><td>Vim-style pane movement.</td></tr>
            <tr><td><kbd>Alt-←</kbd> <kbd>Alt-↓</kbd> <kbd>Alt-↑</kbd> <kbd>Alt-→</kbd></td><td>Move without prefix</td><td>Fast navigation from a normal shell prompt.</td></tr>
            <tr><td>prefix <kbd>H</kbd> <kbd>J</kbd> <kbd>K</kbd> <kbd>L</kbd></td><td>Resize by five cells</td><td>Repeatable while the key table remains active.</td></tr>
            <tr><td>prefix <kbd>Ctrl-s</kbd></td><td>Toggle synchronized panes</td><td>Every keystroke goes to every pane in the window. The status message shows on/off.</td></tr>
            <tr><td>prefix <kbd>z</kbd></td><td>Zoom current pane</td><td>Built-in binding; press again to restore the layout.</td></tr>
            <tr><td>prefix <kbd>x</kbd></td><td>Kill current pane</td><td>Built-in confirmation. Check for foreground jobs first.</td></tr>
          </tbody>
        </table></div>
        <div class="notice"><div><strong>Sync-pane caution:</strong> disable synchronization before typing passwords or destructive commands. Confirm the status message after pressing prefix + <kbd>Ctrl-s</kbd>.</div></div>
      </section>

      <section id="windows" data-search-item data-search="windows create rename next previous select close list session detach">
        <h2>Windows and sessions</h2>
        <div class="table-wrap"><table>
          <thead><tr><th>Keys / command</th><th>Action</th><th>Detail</th></tr></thead>
          <tbody>
            <tr><td>prefix <kbd>c</kbd></td><td>New window</td><td>Starts in the current pane path.</td></tr>
            <tr><td>prefix <kbd>,</kbd></td><td>Rename window</td><td>Useful for service-specific work such as <code>smb</code> or <code>web</code>.</td></tr>
            <tr><td>prefix <kbd>n</kbd> / <kbd>p</kbd></td><td>Next / previous window</td><td>Built-in cycle.</td></tr>
            <tr><td>prefix <kbd>1</kbd>…<kbd>9</kbd></td><td>Select window number</td><td>Window and pane indexes start at 1.</td></tr>
            <tr><td>prefix <kbd>w</kbd></td><td>Interactive tree</td><td>Browse sessions, windows and panes.</td></tr>
            <tr><td>prefix <kbd>d</kbd></td><td>Detach</td><td>The tmux server and its processes keep running in memory.</td></tr>
            <tr><td><code>tmux ls</code></td><td>List sessions</td><td>Use before attaching to avoid duplicate workspaces.</td></tr>
            <tr><td><code>tmux attach -t htb-keeper</code></td><td>Attach by name</td><td><code>htb-session</code> is normally easier and safer.</td></tr>
          </tbody>
        </table></div>
      </section>

      <section id="htb-bindings" data-search-item data-search="HTB P workspace V VPN status line target session">
        <h2>HTB bindings</h2>
        <div class="grid">
          <article class="panel"><h3>prefix + P · active workspace</h3><p>Runs <code>~/.local/bin/htb-session</code>. It switches to or creates the session for the currently active <code>pe</code> target.</p></article>
          <article class="panel"><h3>prefix + V · VPN window</h3><p>Creates a window named <code>vpn</code> and runs <code>pe vpn up</code> in the foreground. Stop it with <kbd>Ctrl</kbd>+<kbd>C</kbd>.</p></article>
        </div>
        <p>The right side of the status bar shows a VPN indicator when a <code>tun</code>, <code>tap</code> or <code>wg</code> interface exists, plus the active target and clock. An indicator proves an interface exists—not that a specific target is routed through it. Verify with <code>pe vpn route "$IP"</code>.</p>
      </section>

      <section id="copy" data-search-item data-search="copy mode vi scrollback selection clipboard OSC52 mouse search">
        <h2>Copy mode and scrollback</h2>
        <div class="table-wrap"><table>
          <thead><tr><th>Keys</th><th>Action</th></tr></thead>
          <tbody>
            <tr><td>prefix <kbd>[</kbd></td><td>Enter vi copy mode.</td></tr>
            <tr><td><kbd>h</kbd> <kbd>j</kbd> <kbd>k</kbd> <kbd>l</kbd></td><td>Move inside copy mode; <kbd>Ctrl-u</kbd>/<kbd>Ctrl-d</kbd> move by half pages.</td></tr>
            <tr><td><kbd>/</kbd> then text</td><td>Search backward through pane history; <kbd>n</kbd> repeats.</td></tr>
            <tr><td><kbd>v</kbd></td><td>Begin selection.</td></tr>
            <tr><td><kbd>y</kbd> or <kbd>Enter</kbd></td><td>Copy selection and exit through tmux/OSC52.</td></tr>
            <tr><td><kbd>q</kbd></td><td>Exit without copying.</td></tr>
          </tbody>
        </table></div>
        <p>Tmux keeps up to 100,000 lines per pane in memory. Copy mode deliberately controls the external clipboard; pane applications cannot silently set it through tmux. Clear copied credentials after use.</p>
      </section>

      <section id="recovery" data-search-item data-search="recover frozen nested tmux kill server persistence troubleshooting terminal colors">
        <h2>Recovery and troubleshooting</h2>
        <ul class="checklist">
          <li>If keystrokes appear in several panes, toggle prefix + <kbd>Ctrl-s</kbd>; synchronized panes are probably on.</li>
          <li>If a pane is zoomed, press prefix + <kbd>z</kbd>.</li>
          <li>If a session already exists, run <code>htb-session</code> instead of creating another one manually.</li>
          <li>Inspect config messages with <code>tmux show-messages</code>; validate the active terminal with <code>tmux display -p '#{client_termname}'</code>.</li>
          <li>Use <code>tmux kill-session -t htb-name</code> only after saving work. Avoid <code>tmux kill-server</code> unless you intend to terminate every session.</li>
          <li>Put personal settings in <code>~/.config/tmux/local.conf</code>; it is loaded quietly after the managed config.</li>
        </ul>
      </section>

      <p class="empty-state" data-empty-state hidden>No binding or section matches that filter. Press <kbd>Esc</kbd> to reset.</p>
      <nav class="page-nav" aria-label="Adjacent pages"><a href="index.html">← Setup guide</a><a href="pe.html">pe command center →</a></nav>
    </main>

    <aside class="toc" aria-label="On this page"><strong>On this page</strong>
      <ul><li><a href="#model">Session model</a></li><li><a href="#prefix">Prefix</a></li><li><a href="#panes">Panes</a></li><li><a href="#windows">Windows</a></li><li><a href="#htb-bindings">HTB bindings</a></li><li><a href="#copy">Copy mode</a></li><li><a href="#recovery">Recovery</a></li></ul>
    </aside>
  </div>
  <footer class="site-footer"><strong>VOIDWALKER // TMUX</strong><br>Detach preserves memory · persistence to disk is deliberately off</footer>
</body>
</html>