본문으로 건너뛰기
cccskills
무료GitHub에 공개

remote-hunting-workflow

Set up 3 remote control modes for Claude Code CLI — local iTerm pair hacking, Discord bot for mobile control, and tmux multi-pane multi-target workflows. Includes dangerouslySkipPermissions security hardening. Based on Critical Thinking Bug Bounty Podcast Episode 166.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구DiscordYouTube
설치 방법 보기

포함된 파일(1)

  • SKILL.md10.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Remote Hunting Workflow

When to Use

  • When you need to control Claude hunting sessions from mobile or remote locations.
  • When testing multiple targets simultaneously and need organized workspace management.
  • When setting up a VPS as a persistent hunting environment that runs 24/7.
  • When configuring dangerouslySkipPermissions safely without exposing sensitive data.

Prerequisites

  • Claude Code CLI installed on local machine or VPS
  • For Discord: Discord account + bot token + server with private channels
  • For tmux: SSH access to VPS + tmux installed
  • Understanding of Claude permission model

Core Concept: 3 Modes of Hunting

The video describes 3 ways to use Claude Code CLI for hunting, each with different trade-offs for control, mobility, and parallelism. — Episode 166

ModeUsageBest For
Local Desktop (50%)iTerm / Windows TerminalInteractive pair hacking sessions
Discord BotSend commands from phone → VPS executesRemote control from anywhere
tmux Multi-Pane4 panes × 4 targetsParallel multi-target hunting

Workflow

Mode 1: Local Desktop (Primary — 50% usage)

The simplest setup. Run Claude Code CLI in your terminal alongside your browser and Burp/Kaido.

Terminal Layout:
┌─────────────────────┬─────────────────────┐
│                     │                     │
│   Claude Code CLI   │   Burp Suite /      │
│   (main session)    │   Kaido Proxy       │
│                     │                     │
├─────────────────────┴─────────────────────┤
│                                           │
│   Browser (target application)            │
│                                           │
└───────────────────────────────────────────┘

Workflow:

  1. Browse target in browser → traffic flows through proxy
  2. Spot interesting behavior → describe to Claude in CLI
  3. Claude writes scripts, tests endpoints, logs findings
  4. You review Claude's work, provide creative direction

Mode 2: Discord Bot for Remote Hunting

Set up a Discord bot on your VPS that wraps Claude Code CLI. Send hacking commands from your phone.

// discord-claude-bot/index.ts
#!/usr/bin/env npx tsx

import { Client, GatewayIntentBits, Message } from "discord.js";
import { execSync, spawn } from "child_process";

const DISCORD_TOKEN = process.env.DISCORD_BOT_TOKEN!;
const ALLOWED_USER_IDS = (process.env.ALLOWED_USERS || "").split(",");
const ALLOWED_CHANNEL_IDS = (process.env.ALLOWED_CHANNELS || "").split(",");
const MAX_OUTPUT_LENGTH = 1900; // Discord message limit

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});

client.on("messageCreate", async (message: Message) => {
  // Security: Only respond to authorized users in authorized channels
  if (message.author.bot) return;
  if (!ALLOWED_USER_IDS.includes(message.author.id)) return;
  if (!ALLOWED_CHANNEL_IDS.includes(message.channel.id)) return;

  const content = message.content.trim();
  if (!content.startsWith("!hunt")) return;

  const command = content.replace("!hunt ", "").trim();
  
  // Security: Block dangerous commands
  const BLOCKED = ["rm -rf", "mkfs", "dd if=", "> /dev/", "passwd", "sudo"];
  if (BLOCKED.some((b) => command.toLowerCase().includes(b))) {
    await message.reply("⛔ Blocked: destructive command detected.");
    return;
  }

  await message.reply(`🔄 Executing: \`${command.substring(0, 100)}\``);

  try {
    // Run Claude CLI with the command
    const output = execSync(
      `claude --print "${command.replace(/"/g, '\\"')}"`,
      { timeout: 120_000, maxBuffer: 5 * 1024 * 1024, cwd: process.env.HUNT_DIR || "/home/hunter/targets" }
    ).toString();

    // Truncate output for Discord
    const truncated = output.length > MAX_OUTPUT_LENGTH
      ? output.substring(0, MAX_OUTPUT_LENGTH) + "\n... (truncated)"
      : output;

    await message.reply(`\`\`\`\n${truncated}\n\`\`\``);
  } catch (error: any) {
    await message.reply(`❌ Error: ${error.message?.substring(0, 500) || "Unknown error"}`);
  }
});

client.login(DISCORD_TOKEN);
console.log("🤖 Discord Claude Bot running...");

Setup steps:

  1. Create Discord bot at discord.dev
  2. Create a private server with channel #hunting
  3. Set environment variables on VPS:
    export DISCORD_BOT_TOKEN="your-bot-token"
    export ALLOWED_USERS="your-discord-user-id"
    export ALLOWED_CHANNELS="hunting-channel-id"
    export HUNT_DIR="/home/hunter/targets/current-target"
    
  4. Run with: npx tsx discord-claude-bot/index.ts

Usage from phone:

!hunt check findings/ for any new files in the last hour
!hunt test /api/v2/users/999 for IDOR — compare response with user 1
!hunt what's the status of overnight scan?
!hunt summarize all leads discovered today

Mode 3: tmux Multi-Target Hunting

#!/bin/bash
# scripts/tmux-hunting-setup.sh
# Creates a 4-pane tmux session, each pane targeting a different program

SESSION="hunting"
tmux new-session -d -s $SESSION

# Pane 1: Target A
tmux send-keys -t $SESSION "cd ~/targets/target-a && claude" Enter

# Pane 2: Target B
tmux split-window -h -t $SESSION
tmux send-keys -t $SESSION "cd ~/targets/target-b && claude" Enter

# Pane 3: Target C
tmux split-window -v -t $SESSION
tmux send-keys -t $SESSION "cd ~/targets/target-c && claude" Enter

# Pane 4: Target D
tmux select-pane -t 0
tmux split-window -v -t $SESSION
tmux send-keys -t $SESSION "cd ~/targets/target-d && claude" Enter

# Even layout
tmux select-layout -t $SESSION tiled

# Attach
tmux attach -t $SESSION

Result:

┌──────────────────┬──────────────────┐
│  Target A        │  Target B        │
│  (Claude CLI)    │  (Claude CLI)    │
│  .claudemd ✅    │  .claudemd ✅    │
├──────────────────┼──────────────────┤
│  Target C        │  Target D        │
│  (Claude CLI)    │  (Claude CLI)    │
│  .claudemd ✅    │  .claudemd ✅    │
└──────────────────┴──────────────────┘

Each pane has its own .claudemd with scope. Claude instances are independent.

Security: dangerouslySkipPermissions

"We use dangerouslySkipPermissions so Claude doesn't ask for permission every time. But we NEVER give Claude access to 1Password or personal email." — Episode 166

# Enable (use with caution):
claude --dangerously-skip-permissions

# Or set in config:
# ~/.claude/settings.json
{
  "permissions": {
    "dangerouslySkipPermissions": true
  }
}

Security hardening when using this flag:

RuleWhy
❌ No 1Password / credential manager accessClaude could read ALL passwords
❌ No personal email accessClaude could send/read emails
❌ No SSH key access to production systemsPrevent lateral movement
❌ No cloud provider CLI with admin credentialsPrevent infrastructure damage
✅ Sandbox in dedicated VPS user accountLimit blast radius
✅ Network-only access to in-scope targetsFirewall outbound to scope only
✅ Read-only access to source code directoriesPrevent modification
✅ Write access ONLY to findings/notes/leadsControlled output

Recommended VPS user setup:

# Create a sandboxed user for Claude hunting
useradd -m -s /bin/bash hunter
# Restrict network access (iptables example)
iptables -A OUTPUT -m owner --uid-owner hunter -d <target-ip-range> -j ACCEPT
iptables -A OUTPUT -m owner --uid-owner hunter -j DROP  # block everything else

Decision Point 🔀

flowchart TD
    A{Where are you?} -->|At desk| B[Mode 1: Local Desktop]
    A -->|On phone / traveling| C[Mode 2: Discord Bot]
    A -->|At desk, multiple targets| D[Mode 3: tmux Multi-Pane]
    B --> E[Interactive pair hacking]
    C --> F[Remote commands via Discord]
    D --> G[4 parallel Claude sessions]
    E --> H{Need overnight?}
    F --> H
    G --> H
    H -->|Yes| I[Set overnight prompt + dangerouslySkipPermissions]
    H -->|No| J[Continue interactive session]

Creativity Directive

IMPORTANT: Build additional remote control interfaces — Slack bot, Telegram bot, web dashboard. Create alerting that pings you on Discord when a critical finding is logged. Automate target rotation in tmux. Think like an attacker. Adapt. Improvise.

🔵 Blue Team

  • Deploy robust WAF rules to detect anomalies.
  • Monitor logs for unusual access patterns.

🛡️ Remediation & Mitigation Strategy

  • Input Validation: Sanitize and strictly type-check all inputs.
  • Least Privilege: Constrain component execution bounds.

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Exploit pervasive logical flaws in Multi-Factor Authentication (MFA/2FA) implementations to bypass the secondary authentication challenge entirely. Techniques include response manipulation, referal spoofing, token reuse, and predictable backup codes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Complete PortSwigger deep-dive with exact payloads for every lab variant including zero-day techniques

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

Execute AS-REP Roasting to extract and crack the NTLM hashes of Active Directory user accounts that have the "Do not require Kerberos preauthentication" flag explicitly enabled. This attack generates a recoverable Ticket Granting Ticket (TGT) without requiring the attacker to authenticate first.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ShulkwiSEC/bb-huge232026년 7월 11일 업데이트

ShulkwiSEC의 스킬 모두 보기

이 스킬의 문제 신고