redblue-cli 0.1.0-next.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,723 @@
1
+ <div align="center">
2
+
3
+ # redblue
4
+
5
+ **The Ultimate Security Arsenal in a Single Binary**
6
+
7
+ [![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://www.rust-lang.org)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+ [![CI](https://github.com/forattini-dev/redblue/workflows/CI/badge.svg)](https://github.com/forattini-dev/redblue/actions/workflows/ci.yml)
10
+ [![GitHub release](https://img.shields.io/github/v/release/forattini-dev/redblue?include_prereleases&label=latest)](https://github.com/forattini-dev/redblue/releases)
11
+
12
+ *90+ security commands. 40+ protocols from scratch. Zero dependencies. 100% Rust.*
13
+
14
+ ```bash
15
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash
16
+ ```
17
+
18
+ [**Documentation**](https://forattini-dev.github.io/redblue/) |
19
+ [Quick Start](#quick-start) |
20
+ [Install](#installation)
21
+
22
+ </div>
23
+
24
+ ---
25
+
26
+ ## What is redblue?
27
+
28
+ **redblue** replaces your entire security toolkit with a single, self-contained binary.
29
+
30
+ No installation scripts. No dependency chains. No version conflicts. Just download and execute.
31
+
32
+ Need JavaScript integration? The optional `redblue-cli` npm package wraps the same `rb` binary, supports `npx` and `npm exec`, and exposes a programmatic SDK for Node.js consumers.
33
+
34
+ Every network protocol is implemented **from scratch** using only Rust's standard library. DNS, HTTP/1.1, HTTP/2, TLS 1.2, TLS 1.3, Kerberos, SSH, LDAP, SMB, and 30+ more -- all built from first principles with only `libc` as a dependency.
35
+
36
+ ### At a Glance
37
+
38
+ | Metric | Value |
39
+ |--------|-------|
40
+ | Lines of Rust | 479,000+ |
41
+ | CLI commands | 90+ |
42
+ | Protocols from scratch | 40+ |
43
+ | Secret detection patterns | 180+ |
44
+ | Crypto primitives | 18+ |
45
+ | Runtime dependencies | 1 (`libc`) |
46
+
47
+ ---
48
+
49
+ ## Features
50
+
51
+ | Category | Capabilities |
52
+ |----------|-------------|
53
+ | **Network** | SYN/UDP/Stealth scanning, OS fingerprinting, service detection, traceroute, netcat, ping, health monitoring |
54
+ | **DNS** | Record lookup, zone transfer, DNS server with hijacking, DNS-over-HTTPS, DNS fingerprinting |
55
+ | **Recon** | Subdomain bruteforce/passive, WHOIS, RDAP, CT logs, Wayback, email/username OSINT, breach detection, IP intel, Google dorking |
56
+ | **Web** | Fuzzing (dir/vhost/param), CMS fingerprinting, crawling, DOM parsing, CSS selectors, HAR recording, .git scanner |
57
+ | **TLS** | Cipher enumeration, certificate audit, Heartbleed detection, OCSP check, CT log verification, JA3/JA3S fingerprinting |
58
+ | **Auth** | Credential testing (Basic/Digest/Form/SSH/FTP/SMTP), brute-force with rate limiting and lockout detection |
59
+ | **Exploit** | Privesc enumeration, lateral movement, persistence, reverse shells, browser exploitation, payload generation, CVE database |
60
+ | **Binary** | ELF/PE parsing, checksec, ROP gadget finder, shellcode generation, format string analysis, packing detection |
61
+ | **Password** | Hash cracking (dictionary/mask/hybrid), bcrypt, auto format detection, mutation rules |
62
+ | **Evasion** | Sandbox/VM detection, string obfuscation, anti-debugging, memory encryption, AMSI bypass, process injection, track covering |
63
+ | **Secrets** | 180+ patterns across cloud, DevOps, databases, AI/ML, payment, social media, private keys, generic tokens |
64
+ | **Vuln Intel** | CVE search (NVD/OSV), CISA KEV, Exploit-DB, MITRE ATT&CK mapping, IOC extraction, TAXII 2.1 client |
65
+ | **Proxy** | HTTP CONNECT, SOCKS5, transparent proxy, MITM TLS interception, interactive shell (k9s-style TUI) |
66
+ | **Agent** | C2 server/client with encrypted transports (HTTP/DNS/WebSocket), forward secrecy ratcheting, multi-agent crew |
67
+ | **Crypto** | File vault (AES-256-GCM), encoding/decoding, classical ciphers, CyberChef-style recipes, crypto analysis |
68
+ | **Storage** | RedDB: B-tree + graph + vector engine with SQL/Gremlin/Cypher/SPARQL queries, ACID transactions, WAL |
69
+ | **Memory** | Process memory scanner (Cheat Engine-style), value/pattern/AOB scanning, hex editor (Linux) |
70
+ | **Playbooks** | Automated pentest workflows with MITRE ATT&CK mapping, APT emulation, variable substitution |
71
+ | **Graph** | Attack path analysis, blast radius, lateral movement mapping, Mermaid diagram export |
72
+ | **MCP** | Model Context Protocol server for Claude AI integration with 18 tool modules and intelligent orchestration |
73
+ | **Code** | Static analysis, secrets scanning, dependency analysis, SARIF export |
74
+ | **Cloud** | Subdomain takeover detection, S3 bucket scanning, cloud service enumeration |
75
+ | **Scripting** | Built-in scripting engine for custom automation |
76
+ | **Report** | Pentest report generation from loot, findings, and attack graphs |
77
+
78
+ ---
79
+
80
+ ## Quick Start
81
+
82
+ ```bash
83
+ # Install (one command)
84
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash
85
+
86
+ # Network reconnaissance
87
+ rb network ports scan 192.168.1.1 --preset common
88
+ rb network host discover 10.0.0.0/24
89
+ rb ping 8.8.8.8
90
+ rb nc 192.168.1.1 80
91
+
92
+ # DNS
93
+ rb dns record lookup example.com --type MX
94
+ rb dns-server start --hijack "*.evil.com=10.0.0.1"
95
+
96
+ # Subdomain enumeration
97
+ rb recon domain subdomains example.com --passive
98
+ rb recon domain bruteforce example.com -w wordlists/subdomains.txt
99
+
100
+ # Web fuzzing & security
101
+ rb web fuzz http://example.com/FUZZ -w common.txt -fc 404
102
+ rb web asset security http://example.com
103
+ rb web asset crawl http://example.com --har crawl.har
104
+
105
+ # TLS audit
106
+ rb tls audit security example.com
107
+
108
+ # Vulnerability intelligence
109
+ rb intel vuln search nginx 1.18.0
110
+ rb intel vuln cve CVE-2021-44228
111
+ rb intel vuln kev --stats
112
+ rb intel mitre technique T1059
113
+
114
+ # Credential testing
115
+ rb auth test http://example.com/login -u users.txt -p pass.txt --type form
116
+
117
+ # Password cracking
118
+ rb password crack hashes.txt -w rockyou.txt --rules
119
+
120
+ # Secrets detection
121
+ rb code secrets scan . --git
122
+
123
+ # Exploitation (AUTHORIZED USE ONLY)
124
+ rb exploit privesc enumerate
125
+ rb exploit payload shell bash 10.0.0.1 4444
126
+
127
+ # Binary analysis
128
+ rb binary elf analyze /usr/bin/target
129
+ rb binary rop gadgets ./vulnerable_binary
130
+
131
+ # MITM proxy
132
+ rb proxy mitm --port 8080 --intercept
133
+
134
+ # Crypto vault
135
+ rb crypto vault encrypt secrets.txt
136
+ rb crypto recipe "base64_encode | hex_encode" "hello"
137
+
138
+ # Process memory (Linux)
139
+ rb memory scan --pid 1234 --value 42
140
+
141
+ # Playbooks
142
+ rb playbook run web-pentest --target example.com
143
+
144
+ # MCP server (for Claude AI)
145
+ rb mcp serve
146
+ ```
147
+
148
+ ### JavaScript / npm Quick Start
149
+
150
+ ```bash
151
+ # Run the wrapper without installing it globally
152
+ npx redblue-cli dns record lookup example.com --type MX
153
+ npm exec --package redblue-cli rb -- tls security audit github.com
154
+
155
+ # Install the wrapper in a project
156
+ npm install redblue-cli
157
+ npx rb network ports scan 192.168.1.1 --preset common
158
+ ```
159
+
160
+ ```js
161
+ const { createClient } = require('redblue-cli');
162
+
163
+ (async () => {
164
+ const rb = await createClient({
165
+ autoDownload: true,
166
+ targetDir: '.redblue/bin'
167
+ });
168
+
169
+ const records = await rb.dns.record.lookup({
170
+ target: 'example.com',
171
+ type: 'MX'
172
+ });
173
+
174
+ console.log(records);
175
+ })();
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Protocols from Scratch
181
+
182
+ Every protocol is implemented from first principles -- no external crates, no wrappers.
183
+
184
+ | Category | Protocols |
185
+ |----------|-----------|
186
+ | **Web** | HTTP/1.1 (RFC 2616), HTTP/2 (RFC 7540) with HPACK/Huffman, HTTPS |
187
+ | **Security** | TLS 1.2 (RFC 5246) with ECDHE + AES-GCM + X.509 verification, TLS 1.3 key schedule |
188
+ | **Name Resolution** | DNS (RFC 1035), DoH (RFC 8484), WHOIS (RFC 3912), RDAP (RFC 7480) |
189
+ | **Authentication** | Kerberos 5 (RFC 4120) with PKINIT + S4U, SSH (RFC 4253) |
190
+ | **Directory** | LDAP (RFC 4511), SNMP (RFC 1157) |
191
+ | **File Transfer** | FTP (RFC 959), SMB/CIFS |
192
+ | **Mail** | SMTP (RFC 5321) |
193
+ | **Remote Access** | Telnet (RFC 854) |
194
+ | **Databases** | MySQL, PostgreSQL, MSSQL (TDS), MongoDB, Redis |
195
+ | **Network** | TCP, UDP, ICMP (RFC 792), raw sockets, packet crafting |
196
+ | **Encoding** | ASN.1/DER (RFC 2459), X.509 certificates, HAR 1.2, CSS selectors |
197
+
198
+ ### Cryptography (Pure Rust)
199
+
200
+ | Type | Implementations |
201
+ |------|----------------|
202
+ | **Hash** | SHA-256, SHA-384, SHA-512, SHA-1, MD5 |
203
+ | **Symmetric** | AES-128, AES-256-GCM, ChaCha20-Poly1305 |
204
+ | **Asymmetric** | RSA, ECDH, P-256 (NIST), X25519 |
205
+ | **Key Derivation** | PBKDF2, HKDF (RFC 5869), TLS PRF (1.0/1.1/1.2), TLS 1.3 key schedule |
206
+ | **MAC** | HMAC-SHA256, HMAC-SHA384, HMAC-SHA1, HMAC-MD5 |
207
+ | **Utility** | CSPRNG (OS-backed), UUID, Base64, Hex, BigInt arithmetic |
208
+
209
+ ---
210
+
211
+ ## Exploitation Framework
212
+
213
+ > **AUTHORIZED USE ONLY** -- pentesting, CTF, bug bounty, education, your own audits.
214
+
215
+ ```bash
216
+ # Privilege escalation enumeration
217
+ rb exploit privesc enumerate
218
+ rb exploit privesc suggest
219
+
220
+ # Reverse shells (encrypted, ICMP, HTTP, DNS, WebSocket)
221
+ rb exploit payload shell bash 10.0.0.1 4444
222
+ rb exploit payload shell python 10.0.0.1 4444 --encrypted
223
+
224
+ # Lateral movement
225
+ rb exploit lateral ssh-keys --target 10.0.0.0/24
226
+ rb exploit lateral pass-the-hash --hash NTLM_HASH
227
+
228
+ # Post-exploitation
229
+ rb exploit post-exploit enumerate
230
+ rb exploit persistence cron --command "rb agent connect"
231
+
232
+ # Browser exploitation
233
+ rb exploit-browser serve --port 8080
234
+ rb exploit-browser exec --id ZOMBIE_ID --script "document.cookie"
235
+
236
+ # CVE database
237
+ rb intel vuln cve CVE-2021-44228
238
+ ```
239
+
240
+ ---
241
+
242
+ ## MITM Proxy & Interactive Shell
243
+
244
+ Full man-in-the-middle proxy with a k9s-style TUI for real-time traffic inspection.
245
+
246
+ ```bash
247
+ # Start MITM proxy with TLS interception
248
+ rb proxy mitm --port 8080 --intercept
249
+
250
+ # SOCKS5 proxy
251
+ rb proxy socks5 --port 1080
252
+
253
+ # Transparent proxy (Linux, requires iptables)
254
+ rb proxy transparent --port 8080
255
+
256
+ # Interactive proxy shell
257
+ rb proxy shell --port 8080
258
+ ```
259
+
260
+ **Interactive shell features:**
261
+ - Real-time request/response streaming
262
+ - Intercept and modify requests on-the-fly
263
+ - History browsing, filtering, and replay
264
+ - Security header stripping for testing
265
+ - WebSocket upgrade support
266
+
267
+ ---
268
+
269
+ ## C2 Agent Framework
270
+
271
+ > **AUTHORIZED USE ONLY**
272
+
273
+ Lightweight C2 framework with encrypted communications and forward secrecy.
274
+
275
+ ```bash
276
+ # Start C2 server
277
+ rb agent server --port 4444
278
+
279
+ # Connect agent to server
280
+ rb agent connect --server 10.0.0.1:4444
281
+
282
+ # Interactive agent shell
283
+ rb agent shell
284
+ ```
285
+
286
+ **Features:**
287
+ - Multiple transports: HTTP/HTTPS, DNS covert channel, WebSocket
288
+ - Forward secrecy with key ratcheting
289
+ - Multi-agent crew coordination
290
+ - Custom encrypted protocol
291
+
292
+ ---
293
+
294
+ ## Binary Analysis
295
+
296
+ ```bash
297
+ # ELF analysis
298
+ rb binary elf analyze ./target_binary
299
+ rb binary elf checksec ./target_binary
300
+
301
+ # PE analysis
302
+ rb binary pe analyze ./target.exe
303
+
304
+ # ROP gadgets
305
+ rb binary rop gadgets ./vulnerable_binary
306
+
307
+ # Shellcode generation
308
+ rb binary shellcode generate --arch x86_64 --type reverse_shell
309
+ ```
310
+
311
+ ---
312
+
313
+ ## Evasion Suite
314
+
315
+ > **AUTHORIZED USE ONLY** -- for testing defenses and security controls.
316
+
317
+ 16 evasion techniques for testing security products:
318
+
319
+ ```bash
320
+ # Sandbox/VM detection
321
+ rb evasion sandbox detect
322
+
323
+ # String obfuscation
324
+ rb evasion obfuscate --input payload.bin
325
+
326
+ # Anti-debugging
327
+ rb evasion antidebug check
328
+
329
+ # Memory encryption
330
+ rb evasion memory encrypt --pid 1234
331
+
332
+ # Track covering
333
+ rb evasion tracks clear --logs --history
334
+ ```
335
+
336
+ ---
337
+
338
+ ## Password Cracking
339
+
340
+ ```bash
341
+ # Dictionary attack
342
+ rb password crack hashes.txt -w rockyou.txt
343
+
344
+ # Mask attack (hashcat-style)
345
+ rb password crack hashes.txt --mask "?u?l?l?l?d?d?d?d"
346
+
347
+ # Hybrid (dictionary + mask)
348
+ rb password crack hashes.txt -w words.txt --mask "?d?d?d"
349
+
350
+ # Auto-detect hash format
351
+ rb password crack auto hashes.txt
352
+ ```
353
+
354
+ Supports: MD5, SHA-1, SHA-256, SHA-512, bcrypt, NTLM, and more.
355
+
356
+ ---
357
+
358
+ ## Process Memory Scanner
359
+
360
+ Linux-only, Cheat Engine-style memory inspection:
361
+
362
+ ```bash
363
+ # Scan for a value
364
+ rb memory scan --pid 1234 --value 100
365
+
366
+ # Pattern/AOB scan
367
+ rb memory scan --pid 1234 --pattern "48 8B ?? ?? 89"
368
+
369
+ # Hex editor
370
+ rb hex view /path/to/binary
371
+ rb hex edit /path/to/file --offset 0x100
372
+ ```
373
+
374
+ ---
375
+
376
+ ## Vulnerability Intelligence
377
+
378
+ Aggregates data from multiple authoritative sources:
379
+
380
+ | Source | Description |
381
+ |--------|-------------|
382
+ | **NVD** | NIST National Vulnerability Database -- CVE details, CVSS scores, CPE matches |
383
+ | **OSV** | Open Source Vulnerabilities -- Package-specific vulns (npm, PyPI, Cargo) |
384
+ | **CISA KEV** | Known Exploited Vulnerabilities -- Actively exploited CVEs with deadlines |
385
+ | **Exploit-DB** | Public exploits, PoCs, Metasploit modules |
386
+ | **MITRE ATT&CK** | Tactics, techniques, and procedures mapping |
387
+
388
+ ```bash
389
+ rb intel vuln search nginx 1.18.0
390
+ rb intel vuln cve CVE-2021-44228
391
+ rb intel vuln kev --stats
392
+ rb intel vuln exploit "Apache Struts"
393
+ rb intel mitre technique T1059
394
+ rb intel ioc extract report.txt
395
+ rb intel taxii discover https://taxii.example.com
396
+ ```
397
+
398
+ ### Risk Score
399
+
400
+ ```
401
+ Risk = (CVSS x 10) + Exploit Bonus (+25) + KEV Bonus (+30) + Age Factor + Impact Modifier
402
+ ```
403
+
404
+ ---
405
+
406
+ ## Pentest Playbooks
407
+
408
+ Automated security assessment workflows with MITRE ATT&CK mapping:
409
+
410
+ ```bash
411
+ # List available playbooks
412
+ rb playbook list
413
+
414
+ # Run a web pentest playbook
415
+ rb playbook run web-pentest --target example.com
416
+
417
+ # Run APT emulation
418
+ rb playbook run apt29 --target 10.0.0.0/24
419
+
420
+ # Dry run
421
+ rb playbook run network-audit --target 10.0.0.1 --dry-run
422
+ ```
423
+
424
+ Playbooks support variable substitution, conditional execution, and action recording.
425
+
426
+ ---
427
+
428
+ ## MCP Server (Claude AI Integration)
429
+
430
+ redblue includes a full Model Context Protocol server enabling Claude to use all security tools:
431
+
432
+ ```bash
433
+ # Start MCP server
434
+ rb mcp serve
435
+ ```
436
+
437
+ **18 tool modules:** network, DNS, web, recon, TLS, crypto, binary, code, password, evasion, vulnerability, intelligence, file, wordlist, vector search, and auto-exploitation.
438
+
439
+ **10 prompt generators:** API security, attack planning, cloud security, compliance, container security, defense, mobile security, network security, recon guidance, threat modeling.
440
+
441
+ ---
442
+
443
+ ## Crypto Toolkit
444
+
445
+ Beyond the vault, redblue includes a full crypto toolkit:
446
+
447
+ ```bash
448
+ # File encryption vault (AES-256-GCM)
449
+ rb crypto vault encrypt secrets.txt
450
+ rb crypto vault decrypt secrets.vault
451
+
452
+ # Encoding/decoding
453
+ rb crypto codec base64 encode "hello world"
454
+ rb crypto codec hex decode "48656c6c6f"
455
+
456
+ # CyberChef-style recipes
457
+ rb crypto recipe "base64_encode | rot13 | hex_encode" "secret"
458
+
459
+ # Crypto analysis
460
+ rb crypto analysis entropy suspicious_file.bin
461
+
462
+ # Classical ciphers
463
+ rb crypto cipher caesar "hello" --shift 13
464
+ rb crypto cipher vigenere "hello" --key "secret"
465
+ ```
466
+
467
+ ---
468
+
469
+ ## RedDB: Unified Storage Engine
470
+
471
+ Multi-modal storage engine unifying relational tables, property graphs, and vector embeddings.
472
+
473
+ ### Architecture
474
+
475
+ ```
476
+ ┌─────────────────────────────────────────────────────────────┐
477
+ │ Query Layer │
478
+ │ SQL | Gremlin | Cypher | SPARQL | Natural Language │
479
+ ├─────────────────────────────────────────────────────────────┤
480
+ │ Security Queries | Multi-Mode Executor | RAG Engine │
481
+ ├─────────────────────────────────────────────────────────────┤
482
+ │ Result Cache | Materialized Views | Query Plan Cache │
483
+ ├─────────────────────────────────────────────────────────────┤
484
+ │ SIEVE Page Cache + Aggregation Cache │
485
+ ├─────────────────────────────────────────────────────────────┤
486
+ │ Tables (B-Tree) | Graphs (Adjacency) | Vectors (HNSW) │
487
+ ├─────────────────────────────────────────────────────────────┤
488
+ │ Page-Based Storage (4KB) + WAL + Encryption │
489
+ └─────────────────────────────────────────────────────────────┘
490
+ ```
491
+
492
+ ### Features
493
+
494
+ | Feature | Description |
495
+ |---------|-------------|
496
+ | **Storage modes** | B-Tree tables, adjacency graph, HNSW vectors |
497
+ | **Query languages** | SQL, Gremlin, Cypher, SPARQL, natural language |
498
+ | **Transactions** | ACID with MVCC snapshot isolation |
499
+ | **Durability** | Write-ahead logging |
500
+ | **Encryption** | At-rest encryption with keyring |
501
+ | **Caching** | SIEVE page cache, result cache, plan cache, aggregation cache |
502
+ | **Vector search** | HNSW + tiered quantization (binary + int8) |
503
+ | **Graph algorithms** | PageRank, betweenness centrality, Dijkstra, Louvain, cycle detection |
504
+ | **Import** | JSONL streaming, Parquet columnar |
505
+ | **SIMD** | Runtime-detected SSE/AVX/FMA for vector distance (26M+ ops/sec) |
506
+
507
+ ### Cross-Modal Queries
508
+
509
+ ```sql
510
+ -- Find hosts with critical CVEs reachable in 3 hops
511
+ SELECT h.hostname, c.cve_id, v.similarity_score
512
+ FROM hosts h
513
+ JOIN vulnerabilities v ON h.id = v.host_id
514
+ WHERE h.criticality > 8
515
+ AND VECTOR_SIMILARITY(e.embedding, $query) > 0.85
516
+ AND EXISTS (
517
+ SELECT 1 FROM attack_paths p WHERE p.target = h.id AND p.hops <= 3
518
+ )
519
+ ```
520
+
521
+ ---
522
+
523
+ ## CLI Architecture
524
+
525
+ ```
526
+ rb [domain] [resource] [verb] [target] [flags]
527
+ rb help
528
+ rb [domain] help
529
+ rb [target] # Magic scan -- auto-detect
530
+ rb shell [target] # Interactive TUI
531
+ ```
532
+
533
+ ### Domains
534
+
535
+ | Domain | Description | Example |
536
+ |--------|-------------|---------|
537
+ | `network` | Port scanning, host discovery, traceroute | `rb network ports scan 10.0.0.1` |
538
+ | `dns` | DNS queries, server, hijacking | `rb dns record lookup example.com` |
539
+ | `recon` | Subdomain enum, WHOIS, OSINT | `rb recon domain subdomains example.com` |
540
+ | `web` | Fuzzing, crawling, scraping, security | `rb web fuzz http://target/FUZZ` |
541
+ | `tls` | TLS audit, cipher analysis | `rb tls audit security example.com` |
542
+ | `auth` | Credential testing | `rb auth test http://target --type basic` |
543
+ | `exploit` | Privesc, lateral, persistence, payloads | `rb exploit privesc enumerate` |
544
+ | `binary` | ELF/PE analysis, ROP, shellcode | `rb binary elf checksec ./target` |
545
+ | `password` | Hash cracking | `rb password crack hashes.txt -w dict.txt` |
546
+ | `evasion` | Anti-analysis, obfuscation | `rb evasion sandbox detect` |
547
+ | `intel` | Vuln search, MITRE, IOC, TAXII | `rb intel vuln search nginx` |
548
+ | `proxy` | MITM, SOCKS5, transparent | `rb proxy mitm --port 8080` |
549
+ | `agent` | C2 server/client | `rb agent server --port 4444` |
550
+ | `crypto` | Vault, codecs, ciphers, recipes | `rb crypto vault encrypt file.txt` |
551
+ | `code` | Secrets scanning, analysis | `rb code secrets scan .` |
552
+ | `cloud` | Takeover detection, S3 scanning | `rb cloud takeover example.com` |
553
+ | `memory` | Process memory scanning | `rb memory scan --pid 1234` |
554
+ | `playbook` | Automated pentest workflows | `rb playbook run web-pentest` |
555
+ | `database` | RedDB operations | `rb database query "SELECT * FROM hosts"` |
556
+ | `mcp` | MCP server for Claude AI | `rb mcp serve` |
557
+ | `report` | Pentest report generation | `rb report generate --format pdf` |
558
+ | `loot` | Findings and credential management | `rb loot list` |
559
+ | `hex` | Hex editor | `rb hex view binary_file` |
560
+ | `nc` | Netcat | `rb nc 10.0.0.1 80` |
561
+ | `ping` | ICMP ping | `rb ping 8.8.8.8` |
562
+
563
+ ### Global Flags
564
+
565
+ ```bash
566
+ -h, --help # Context-aware help
567
+ --version # Show version
568
+ -o, --output # Format: text|json
569
+ --no-color # Disable colors
570
+ ```
571
+
572
+ ---
573
+
574
+ ## Installation
575
+
576
+ ### Quick Install
577
+
578
+ ```bash
579
+ # Latest stable release
580
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash
581
+
582
+ # Pre-release (next channel)
583
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash -s -- --channel next
584
+
585
+ # Specific version
586
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash -s -- --version v0.1.0
587
+
588
+ # Custom directory
589
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash -s -- --install-dir /usr/local/bin
590
+
591
+ # Static build (Alpine/Docker)
592
+ curl -fsSL https://raw.githubusercontent.com/forattini-dev/redblue/main/install.sh | bash -s -- --static
593
+ ```
594
+
595
+ **Supported Platforms:**
596
+ - Linux x86_64, aarch64 (ARM64), armv7
597
+ - macOS x86_64 (Intel), aarch64 (Apple Silicon)
598
+ - Windows x86_64
599
+
600
+ ### JavaScript / npm
601
+
602
+ The npm package is a wrapper and SDK. It does not bundle the release binary inside the package.
603
+
604
+ ```bash
605
+ # Add the wrapper to your project
606
+ npm install redblue-cli
607
+
608
+ # Run the CLI through the package name
609
+ npx redblue-cli dns record lookup example.com --type MX
610
+
611
+ # Run the rb bin exposed by the package without installing it globally
612
+ npm exec --package redblue-cli rb -- network ports scan 192.168.1.1 --preset common
613
+
614
+ # After local install, the package also exposes rb
615
+ npx rb dns record lookup example.com --type A
616
+ ```
617
+
618
+ ```js
619
+ const { createClient } = require('redblue-cli');
620
+
621
+ (async () => {
622
+ const rb = await createClient({
623
+ binaryPath: '/custom/path/rb'
624
+ });
625
+
626
+ const audit = await rb.tls.security.audit({
627
+ target: 'github.com',
628
+ ports: '443'
629
+ });
630
+
631
+ console.log(audit);
632
+ })();
633
+ ```
634
+
635
+ If you want the wrapper to manage the binary for you, use `autoDownload: true` with a `targetDir`.
636
+
637
+ > **Note:** the exact command `npx rb` works after `redblue-cli` is installed in the project or globally. For zero-install usage, prefer `npx redblue-cli ...` or `npm exec --package redblue-cli rb -- ...`.
638
+
639
+ ### Build from Source
640
+
641
+ ```bash
642
+ git clone https://github.com/forattini-dev/redblue
643
+ cd redblue && cargo build --release
644
+ ```
645
+
646
+ ---
647
+
648
+ ## Project Structure
649
+
650
+ ```
651
+ src/
652
+ cli/commands/ # 90+ CLI command implementations
653
+ protocols/ # 40+ protocols from scratch (DNS, HTTP, TLS, Kerberos, SSH, ...)
654
+ crypto/ # Pure Rust crypto (AES, ChaCha20, RSA, X25519, P-256, SHA, ...)
655
+ storage/ # RedDB: B-tree + graph + vector engine with SQL/Gremlin/Cypher
656
+ modules/
657
+ network/ # Port scanning, host discovery, traceroute, netcat
658
+ dns/ # DNS operations + DNS server with hijacking
659
+ recon/ # 24+ reconnaissance modules (subdomains, OSINT, breach, ...)
660
+ web/ # Fuzzing, CMS fingerprinting, crawling, DOM parsing
661
+ tls/ # TLS audit, Heartbleed, OCSP, cipher analysis
662
+ exploit/ # Privesc, lateral movement, persistence, payloads, browser exploit
663
+ binary/ # ELF/PE parsing, checksec, ROP gadgets, shellcode
664
+ password/ # Hash cracking (dictionary, mask, hybrid, bcrypt)
665
+ evasion/ # 16 anti-analysis techniques
666
+ proxy/ # MITM, SOCKS5, transparent proxy, interactive shell
667
+ collection/ # Browser credentials, screenshots
668
+ code/secrets/ # 180+ secret detection patterns
669
+ graph/ # Attack path analysis (ShadowGraph)
670
+ memory/ # Process memory scanner + hex editor
671
+ cloud/ # Subdomain takeover, S3 scanning
672
+ auth/ # Multi-protocol credential testing
673
+ monitor/ # Port/service health monitoring
674
+ scripting/ # Built-in scripting engine
675
+ report/ # Pentest report generation
676
+ ctf/ # CTF challenge generation
677
+ agent/ # C2 framework with encrypted transports
678
+ mcp/ # MCP server (18 tool modules, 10 prompt generators)
679
+ playbooks/ # Automated pentest workflows
680
+ intelligence/ # Assessment engine
681
+ ui/ # Terminal graphics (braille canvas, charts)
682
+ ```
683
+
684
+ ---
685
+
686
+ ## Security & Ethics
687
+
688
+ > **AUTHORIZED USE ONLY**
689
+
690
+ redblue is designed for:
691
+ - Authorized penetration testing
692
+ - CTF competitions
693
+ - Bug bounty programs (with scope approval)
694
+ - Your own security audits
695
+ - Education and research
696
+
697
+ **Always obtain written authorization before testing systems you don't own.**
698
+
699
+ ---
700
+
701
+ ## Documentation
702
+
703
+ Full documentation available at:
704
+
705
+ **[forattini-dev.github.io/redblue](https://forattini-dev.github.io/redblue/)**
706
+
707
+ - JS SDK guide: [docs/guides/javascript-sdk.md](docs/guides/javascript-sdk.md)
708
+
709
+ ```bash
710
+ cd docs && npx docsify-cli serve
711
+ ```
712
+
713
+ ---
714
+
715
+ <div align="center">
716
+
717
+ **[Documentation](https://forattini-dev.github.io/redblue/)** |
718
+ **[GitHub](https://github.com/forattini-dev/redblue)** |
719
+ **[Releases](https://github.com/forattini-dev/redblue/releases)**
720
+
721
+ *Made with Rust by security engineers, for security engineers*
722
+
723
+ </div>