redisRedis Serialization Protocol Cache & BrokerUnauthenticated Port 6379 CONFIG & Cache Commands (app <-> cache redis)
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.
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.
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.
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"}# 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.frasmAll 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 / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| get | set | cmd "<text>" | Redis command (get, set, or quoted command such as "AUTH", "PING", "DEL") | get | Sets the first bulk string element of the RESP command array. |
| key "<text>" | value "<text>" | args "<text>" | Quoted key, value, or extra arguments | key "mykey" on get/set | Populates subsequent $len
... elements in requests or payload text in server replies. |
| replytype "<ok|err|integer|bulk>" | RESP reply type selector | Omitted on client requests | Switches 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
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
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances 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) | Omitted | Appends 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 MAC | Host MAC / RFC multicast MAC | Overrides 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..1 | Untagged | Wraps 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..4095 | Untagged (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..255 | Unlabeled (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..3 | ttl 64, dscp 0, ecn 0 | Sets 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..8191 | ipid 1, flags 0, fragoffset 0 | Sets 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) | 0 | Sets 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..65535 | srcport 49152 (remembered), TCP 6379 | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rst | TCP sequence/ack numbers, window size, flags & RFC 7323 options | psh ack, win 65535, automatic TCP seq/acknum | Overrides 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
api_pod <- redis_primary redis value "OK"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.