ProtoStackv0.1

Interactive Protocol Visualizer

Cloud & MessagingProfessional trackBeginnerOSI: Application LayerDefault Port: 6379Standard: Redis Protocol Specification (RESP2/RESP3)

RESP (Redis)

— Redis Serialization Protocol

RESP is the wire protocol that clients use to communicate with Redis servers. It balances simplicity (human-readable string format) with high parsing performance (binary safe with prefix length indicators).

Read first: TCPContent reviewed 2026-11-18

Interactive Session: How RESP (Redis) Works

Step through the packet exchange sequence between nodes.

Interactive Execution Sandbox

Interact with a live or clearly-labelled simulated instance of RESP (Redis).

Threat Model & Attack Simulation

How this protocol is attacked in practice, what defenders can see, and which control stops it.

Threat model & attack simulation

Simulated

Defensive education. Every step runs in this page; no traffic is generated or sent.

Attack library

Unauthenticated Redis access

Injection

Redis bound to a reachable interface without a password allows arbitrary commands, including writes and module loading.

Attackersimulated
RESP (Redis)target
Attack step 1 of 3
Connect to 6379

The attacker reaches the port and sends RESP commands.

What a defender can see

Connections from outside the application subnet.

Impact if unmitigated

Session forgery, data loss and host compromise.

Defences that matter
  • Bind to localhost or a private interface
  • ACLs and requirepass
  • Firewall port 6379 and disable dangerous commands

This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.

Protocol Specification & Architecture

Key characteristics, real-world deployment patterns, and trade-offs.

Core Technical Features

  • Simple type prefixes: Simple String (+), Error (-), Integer (:), Bulk String ($), Array (*)
  • Binary safe: handles arbitrary binary images, pickled objects, and compressed blobs
  • Pipelining: client can issue 10,000 commands in a single TCP socket burst without waiting for individual replies
  • RESP3 adds maps (%), sets (~), booleans (#), and streaming attributes

Real-World Use Cases

  • High-speed in-memory database caching
  • Distributed locks via Redlock
  • Sub-millisecond leaderboard ranking and rate limiting

Advantages & Strengths

  • Extremely simple to implement client parsers in any language
  • Tens of thousands of operations per second per core

Limitations & Vulnerabilities

  • Text-based prefix parsing introduces minor byte overhead compared to pure binary formats like Protobuf