redstr
Red team string transformation library for offensive security operations, penetration testing, and evasion techniques.
A comprehensive Rust library providing 60+ string obfuscation and transformation functions for red team, blue team, and purple team security operations. Perfect for building security tools like Caido and Burp Suite extensions, phishing frameworks, WAF bypass testing, and bot detection evasion.
π― Use Cases
- Red Team: WAF bypass, XSS/SQL injection evasion, phishing domain generation, payload obfuscation
- Blue Team: Security control testing, filter validation, detection system testing
- Purple Team: Collaborative testing, baseline establishment, continuous improvement
π View Detailed Use Cases - Comprehensive security testing scenarios
π Features
- 60+ transformation functions - Encoding, obfuscation, injection testing, web security
- Zero dependencies - Core library uses only Rust's standard library
- Builder pattern API - Chain transformations with
TransformBuilder - Multi-language support - Rust, JavaScript, Python, Go via HTTP API
- CLI tool - Optional command-line interface
- Production-ready - Performance optimized, well-documented, thoroughly tested
π Performance Benchmarks | π§ API Reference
π€ Why redstr?
- For Tool Developers: Integrate into Caido, Burp Suite, or custom security tools
- For Pen Testers: Generate payload variations, bypass filters, test input validation
- For Researchers: Test detection engines, research evasion techniques
Advantages:
- Native Rust performance with type-safe API
- Zero required dependencies - easy to audit
- 60+ functions covering modern security techniques
π¦ Installation
Rust (Native)
Add this to your Cargo.toml:
[]
= "0.2.3"
With Serde Support (for web tools)
[]
= { = "0.2.3", = ["serde"] }
Other Languages & Platforms
API Server (Recommended for all languages):
# Install the HTTP API server
# Or use Docker
See API Server Documentation for usage examples in JavaScript, Python, Go, Ruby, and more.
Coming Soon:
- π Homebrew:
brew install redstr(macOS/Linux) - π npm:
npm install @redstr/core(JavaScript/TypeScript) - π PyPI:
pip install redstr(Python) - π Go Module:
go get github.com/arvid-berndtsson/redstr-go - π Raycast Extension: Quick launcher integration
Track progress in our roadmap.
Quick Start
Basic Usage
use ;
Builder Pattern
Chain multiple transformations:
use TransformBuilder;
// Complex payload generation
let payload = new
.case_swap
.base64
.build;
π View More Examples | π§ API Reference
Integration Examples
use ;
// Web security testing - randomize requests
let ua = random_user_agent;
// Phishing detection - generate domain variations
let suspicious = domain_typosquat;
// WAF bypass - chain transformations
let payload = new
.case_swap
.url_encode
.build;
π Detailed Integration Examples - Caido, Burp Suite, EvilJinx, and more
Command-Line Tool
An optional CLI is available for quick testing:
# Install with CLI feature
# Usage
π Complete CLI Reference - All transformation modes and examples
Library API
All functions accept &str and return String. Key functions include:
Encoding: base64_encode, url_encode, hex_encode, html_entity_encode
Obfuscation: leetspeak, homoglyph_substitution, case_swap, unicode_variations
Injection Testing: sql_comment_injection, xss_tag_variations, path_traversal
Web Security: random_user_agent, domain_typosquat, js_string_concat
Case Conversion: to_camel_case, to_snake_case, to_kebab_case
π Complete API Reference - All 60+ functions with examples
Dependencies
Zero required dependencies - Core library uses only Rust's standard library.
Optional: serde feature for serialization support.
Building & Testing
# Build library
# Build with CLI
# Run tests
π Integrations
Official integrations (separate repositories):
- redstr-server - HTTP API server
- redstr-burp - Burp Suite extension
- redstr-caido - Caido plugin
- redstr-eviljinx - EvilJinx integration
- redstr-owasp-zap - OWASP ZAP add-on
Building your own integration? See Integration Guidelines
π€ Contributing
Contributions are welcome! This library is designed for the security community. Whether you're adding new transformation functions, improving documentation, or reporting issues, your input helps make security testing more effective.
See CONTRIBUTING.md for development guidelines and docs/INTEGRATION_GUIDELINES.md for integration guidance.
π Documentation
- API Reference - Complete function reference
- CLI Reference - Command-line tool documentation
- Use Cases - Security testing scenarios
- Integration Examples - Tool integration patterns
- docs.rs/redstr - Full library documentation
- examples/ - Code examples
β οΈ Responsible Use
This library is intended for authorized security testing, research, and defensive security purposes only. Users are responsible for ensuring they have proper authorization before using these techniques on systems they do not own or have explicit permission to test.
License
This project is licensed under the MIT License. See the LICENSE file for details.