Protocol 69 of 81Layer 7FrameAssembly v3.1.2
llms-full.txt
redisRedis Serialization Protocol Cache & Broker

Unauthenticated Port 6379 CONFIG & Cache Commands (app <-> cache redis)

Default Port / Protocol
TCP 6379
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
redis || tcp.port == 6379
Standards & Specs
Redis RESP2 / RESP3
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6TCP 6379Redis (RESP)

What It Does on the Wire

An exposed Redis port 6379 on a cloud subnet gets owned in about 90 seconds — redis formats exact RESP bulk-string arrays (cmd "CONFIG" args "GET dir") to verify NDR east-west alerts.

Redis and Valkey communicate over TCP port 6379 using the Redis Serialization Protocol (RESP), where client commands are formatted as length-prefixed multibulk arrays (*3 $3 SET ...) and server replies use type prefixes (+ simple string, - error, : integer, $ bulk string). Exposed unauthenticated Redis instances (CONFIG SET dir, SLAVEOF, EVAL) are a top cloud/container attack vector.

FrameAssembly computes every *N array count and $len byte-length prefix automatically for get, set, or arbitrary cmd ("AUTH", "INFO", "CONFIG") requests, as well as typed replytype server responses.

Test IDS Rules for Unauthenticated Redis CONFIG / SLAVEOF Abuse

Generate a TCP 6379 handshake + redis cmd "CONFIG" args "GET dir" or NOAUTH error reply to verify Suricata and cloud NDR detections.

Verify Application-to-Cache VPC / Kubernetes NetworkPolicies

Confirm only backend pods can reach TCP 6379 while ingress and untrusted namespaces are blocked.

Troubleshoot Cache Latency & -ERR Replies in Wireshark

Model set -> +OK and get -> bulk value sequences with precise wait timings.

Minimal Quickstart (redis_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

redis_quickstart.frasm10 lines
Open in Playground
host api_pod { ip 10.44.1.12 }
host redis_primary { ip 10.44.2.10 }
compile {
api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms
api_pod <- redis_primary tcp syn ack wait 1ms
api_pod -> redis_primary tcp ack wait 1ms
api_pod -> redis_primary redis set key "session:4821" value "active" wait 1ms
api_pod <- redis_primary redis replytype "ok" value "OK"
}

What the Compiler Calculates So You Don't Have To

  • Defaults to TCP destination port 6379 (psh ack) and formats exact *N $<len> ... RESP multibulk wire arrays.
  • Emits +OK (replytype "ok"), -ERR ... (replytype "err"), :<num> (replytype "integer"), or $<len> <value> (replytype "bulk") on server responses.
  • Tracks TCP sequence numbers automatically across commands and replies.
Multi-Frame Lab · Ready to Compile

Blocked Unauthenticated CONFIG Probe (-NOAUTH) + Authenticated Cache Read/Write

Tests an unauthenticated command rejected with -NOAUTH Authentication required., followed by AUTH, SET, and bulk GET.

redis_security_audit.frasm18 lines
Open in Playground
host app_worker { ip 172.16.44.20 }
host cache_node { ip 172.16.44.63 }
compile {
app_worker -> cache_node tcp syn srcport 52637 dstport 6379 win 65535 mss 1460 wait 1ms
app_worker <- cache_node tcp syn ack win 65535 mss 1460 wait 1ms
app_worker -> cache_node tcp ack wait 1ms
// 1. Unauthenticated probe rejected with RESP error (-)
app_worker -> cache_node redis cmd "INFO" wait 1ms
app_worker <- cache_node redis replytype "err" value "NOAUTH Authentication required." wait 3ms
// 2. Authenticate + SET + GET
app_worker -> cache_node redis cmd "AUTH" args "LabCacheToken2026" wait 1ms
app_worker <- cache_node redis replytype "ok" value "OK" wait 1ms
app_worker -> cache_node redis set key "ratelimit:198.51.100.9" value "42" wait 1ms
app_worker <- cache_node redis replytype "ok" value "OK" wait 1ms
app_worker -> cache_node redis get key "ratelimit:198.51.100.9" wait 1ms
app_worker <- cache_node redis replytype "bulk" value "42"
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show redis_security_audit.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly redis_security_audit.frasm redis_security_audit.pcap
frameassembly redis_security_audit.frasm redis_security_audit.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse redis_security_audit.pcap redis_security_audit_edited.frasm

All redis Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after redis:

src_host -> dst_host redis [get | set | cmd "<text>"] [key "<text>"] [args "<text>"] [value "<text>"] [replytype "<ok|err|integer|bulk>"]
Keyword / OptionAccepted ValueDefaultEffect on Packet
get | set | cmd "<text>"Redis command (get, set, or quoted command such as "AUTH", "PING", "DEL")getSets the first bulk string element of the RESP command array.
key "<text>" | value "<text>" | args "<text>"Quoted key, value, or extra argumentskey "mykey" on get/setPopulates subsequent $len ... elements in requests or payload text in server replies.
replytype "<ok|err|integer|bulk>"RESP reply type selectorOmitted on client requestsSwitches the packet to a server reply using +, -, :, or $ RESP framing.

Cross-Layer Wrappers Valid with redis

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

11 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), TCP 6379Overrides source or destination port and remembers the port pair automatically on <- replies.
seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rstTCP sequence/ack numbers, window size, flags & RFC 7323 optionspsh ack, win 65535, automatic TCP seq/acknumOverrides automatic TCP sequence tracking, flags, or RFC 7323 options (mss, wscale, sackperm, tsval, tsecr).

Gotchas & Quick Fixes

Use replytype on Server Replies So Redis Does Not Emit Another Client Command

Avoid
api_pod <- redis_primary redis value "OK"
Valid v3.1.2 Syntax
api_pod <- redis_primary redis replytype "ok" value "OK"

Adding replytype ("ok", "err", "integer", or "bulk") tells FrameAssembly to format a server RESP reply rather than a client *N command array.

Field Guide 03
Poke Stateful Firewalls, Suricata, Zeek & OT Conduits