packetsnitch 1.5.604 → 1.5.605

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.
Files changed (70) hide show
  1. package/.github/FUNDING.yml +15 -0
  2. package/.webpack/main/index.js +1697 -0
  3. package/.webpack/main/index.js.map +1 -0
  4. package/.webpack/renderer/main_window/index.html +1036 -0
  5. package/.webpack/renderer/main_window/index.js +4736 -0
  6. package/.webpack/renderer/main_window/preload.js +1418 -0
  7. package/docs/Backend.md +278 -0
  8. package/docs/Filters.md +735 -0
  9. package/docs/Frontend.md +494 -0
  10. package/docs/README.md +43 -0
  11. package/docs/bitcoin-qr.png +0 -0
  12. package/docs/paypal-qr.png +0 -0
  13. package/docs/screenshots/PacketSnitch_ss10.png +0 -0
  14. package/docs/screenshots/PacketSnitch_ss9-2.jpg +0 -0
  15. package/docs/screenshots/comparison-operator-packetsnitch-ss21.png +0 -0
  16. package/docs/screenshots/packetSnitch_ss13.png +0 -0
  17. package/docs/screenshots/packetSnitch_ss20.png +0 -0
  18. package/docs/screenshots/packetsnitch-ss16.png +0 -0
  19. package/docs/screenshots/packetsnitch_32.png +0 -0
  20. package/docs/screenshots/packetsnitch_ss11.png +0 -0
  21. package/docs/screenshots/packetsnitch_ss12.png +0 -0
  22. package/docs/screenshots/packetsnitch_ss19.png +0 -0
  23. package/docs/screenshots/packetsnitch_ss23.png +0 -0
  24. package/docs/screenshots/packetsnitch_ss24.png +0 -0
  25. package/docs/screenshots/packetsnitch_ss25.png +0 -0
  26. package/docs/screenshots/packetsnitch_win_ss14.png +0 -0
  27. package/docs/screenshots/packetsntich_ss26.png +0 -0
  28. package/docs/screenshots/ps-views.gif +0 -0
  29. package/docs/screenshots/screenshot_7.png +0 -0
  30. package/docs/venmo-qr.png +0 -0
  31. package/forge.config.js +21 -33
  32. package/ideas/Dark-mode UI mockup for packetsnitch.png +0 -0
  33. package/ideas/Dark-packetsnitch-UI-mockup-5.png +0 -0
  34. package/ideas/PacketSnitch-timeline-landscape-mockup.png +0 -0
  35. package/ideas/Screenshot 2026-03-05 at 22-09-09 Packet Decoder Frontend /342/200/223 Figma Make.png +0 -0
  36. package/ideas/Screenshot 2026-03-07 at 12-31-05 Grok _ X.png +0 -0
  37. package/ideas/ideas.txt +340 -0
  38. package/logo/LidakzOne_PERSONAL_USE_ONLY.otf +0 -0
  39. package/logo/byline-packetsnitch.xcf +0 -0
  40. package/logo/logo-packetsnitch-2.png +0 -0
  41. package/logo/logo-packetsnitch-3.png +0 -0
  42. package/logo/logo-packetsnitch-4.png +0 -0
  43. package/logo/logo-packetsnitch-5.png +0 -0
  44. package/logo/logo-packetsnitch.png +0 -0
  45. package/logo/logo-packetsnitch.webp +0 -0
  46. package/logo/logo-packetsnitch.xcf +0 -0
  47. package/logo/packet-snitch-tag-transp-whitetext.png +0 -0
  48. package/logo/packet-snitch-tag-transp.png +0 -0
  49. package/logo/ps-icon.ico +0 -0
  50. package/logo/ps-installer-icon.ico +0 -0
  51. package/logo/qr-code(1).png +0 -0
  52. package/logo/qr-code.png +0 -0
  53. package/logo/rat-standing.png +0 -0
  54. package/package.json +1 -2
  55. package/samples/hosts.json +15112 -0
  56. package/samples/hustoj_capture.pcapng +0 -0
  57. package/.eslintrc.json +0 -28
  58. package/.webpack/x64/main/index.js +0 -2
  59. package/.webpack/x64/main/index.js.map +0 -1
  60. package/.webpack/x64/renderer/main_window/index.html +0 -3
  61. package/.webpack/x64/renderer/main_window/index.js +0 -3
  62. package/.webpack/x64/renderer/main_window/index.js.LICENSE.txt +0 -36
  63. package/.webpack/x64/renderer/main_window/index.js.map +0 -1
  64. package/.webpack/x64/renderer/main_window/preload.js +0 -2
  65. package/.webpack/x64/renderer/main_window/preload.js.map +0 -1
  66. /package/.webpack/{x64/renderer → renderer}/assets/css/rubikglitch.woff2 +0 -0
  67. /package/.webpack/{x64/renderer → renderer}/assets/css/style.css +0 -0
  68. /package/.webpack/{x64/renderer → renderer}/assets/images/loading.gif +0 -0
  69. /package/.webpack/{x64/renderer → renderer}/assets/images/logo.webp +0 -0
  70. /package/.webpack/{x64/renderer → renderer}/assets/images/packet-snitch-tag.webp +0 -0
@@ -0,0 +1,278 @@
1
+ ![PacketSnitch by oxasploits](https://raw.githubusercontent.com/oxasploits/PacketSnitch/main/Logo/packet-snitch-tag-transp-whitetext.png)
2
+
3
+ # Backend Documentation
4
+
5
+ ## Overview
6
+
7
+ PacketSnitch is a Python tool for extracting payloads and rich metadata from network packet capture (`.pcap`) files. It generates testcases for fuzzing, protocol analysis, and research by saving raw packet data and detailed information about each packet, including protocol, entropy, geoip, banners, and more. The tool optionally performs active reconnaissance to enrich output with server banners, SSL certificate info, and web page titles.
8
+
9
+ ## Features
10
+
11
+ - Extracts TCP, UDP, and ICMP payloads from `.pcap` files and saves them as binary testcase files.
12
+ - Generates JSON info files for each testcase, containing:
13
+ - Packet metadata (timestamps, MAC/IP addresses, ports, flags, checksums)
14
+ - MIME type and magic description
15
+ - Shannon entropy and character statistics
16
+ - GeoIP lookup for source/destination IPs
17
+ - Port descriptions (ICANN database)
18
+ - MAC vendor lookup
19
+ - Protocol-specific fields for DNS, HTTP, SNMP, DHCP, NTP, SIP, and ICMP
20
+ - Active recon: server banners, SSL certificate info, web page titles (optional)
21
+ - Consolidates all testcase info into `hosts.json`.
22
+ - Supports filtering by source/destination port.
23
+ - Handles compressed payloads (gzip/zlib).
24
+ - LLM-powered summaries via Ollama integration.
25
+ - Verbose/debug output modes.
26
+
27
+ ## Requirements
28
+
29
+ - Python 3.7+
30
+ - Dependencies:
31
+ - scapy
32
+ - numpy
33
+ - requests
34
+ - pyyaml
35
+ - python-magic
36
+ - chardet
37
+ - geoip2
38
+ - beautifulsoup4
39
+ - scipy
40
+ - ollama
41
+ - Databases:
42
+ - GeoIP database (MaxMind `.mmdb`)
43
+ - MAC vendor CSV
44
+ - ICANN port description CSV
45
+
46
+ ## Usage
47
+
48
+ ```bash
49
+ python3 snitch.py traffic.pcap -o output_dir [-s SRC_PORT] [-d DST_PORT] [-T TIMEOUT] [-a] [-c conf.yaml] [-v]
50
+ ```
51
+
52
+ ### Arguments
53
+
54
+ | Argument | Description |
55
+ | --------------------- | ------------------------------------------------------------- |
56
+ | `traffic.pcap` | Path to the `.pcap` file to parse. |
57
+ | `-o, --output` | Output directory for testcases (default: `testcases`) |
58
+ | `-s, --source-port` | Only generate testcases from this source port. |
59
+ | `-d, --dest-port` | Only generate testcases for this destination port. |
60
+ | `-T, --timeout` | Timeout for network requests (default: 3 seconds) |
61
+ | `-a, --active-recon` | Perform active recon (banners, SSL, titles) |
62
+ | `-c, --conf` | Path to YAML config file (default: `conf.yaml`) |
63
+ | `-v, --verbose` | Increase verbosity (repeat for more detail) |
64
+
65
+ ### Example
66
+
67
+ ```bash
68
+ python3 snitch.py traffic.pcap -o output_dir -T 5 -a -v
69
+ ```
70
+
71
+ ## Output Structure
72
+
73
+ - `output_dir/<dest_port>/pcap.data_packet.<index>.dat`: Raw payloads
74
+ - `output_dir/<dest_port>/pcap.info_packet.<index>.json`: Metadata for each testcase
75
+ - `hosts.json`: Consolidated info for all testcases
76
+
77
+ ## Searchable Attributes
78
+
79
+ Each testcase JSON contains the following dot-notation keys as leaf nodes, which can be used to search, filter, or query testcase data in the frontend or via `hosts.json`. The filter syntax uses `key:value` notation with optional comparison operators (`==`, `!=`, `>`, `>=`, `<`, `<=`) and boolean combinators (`&&`, `||`) with parentheses for grouping.
80
+
81
+ ### Core Packet Fields
82
+
83
+ | Attribute | Type | Description |
84
+ | ------------------ | ------- | ------------------------------------------------------------------------------ |
85
+ | `packet.timestamp` | string | Timestamp of the captured packet (`YYYY-MM-DD HH:MM:SS.ffffff`) |
86
+ | `packet.hex` | string | Full raw packet bytes as a hex string |
87
+ | `packet.proto` | string | Transport protocol key (e.g. `tcp`, `udp`, `icmp`) |
88
+
89
+ ### Ethernet Fields
90
+
91
+ | Attribute | Type | Description |
92
+ | ---------------------- | ------ | -------------------------------------------- |
93
+ | `ether.src.mac.addr` | string | Source MAC address |
94
+ | `ether.dst.mac.addr` | string | Destination MAC address |
95
+ | `ether.src.mac.vendor` | string | Vendor name for the source MAC address |
96
+ | `ether.dst.mac.vendor` | string | Vendor name for the destination MAC address |
97
+
98
+ > **Note:** Ethernet frame attributes (`ether.*`) are only populated when both source and destination IPs resolve to the local network.
99
+
100
+ ### IP Fields
101
+
102
+ | Attribute | Type | Description |
103
+ | -------------- | ------- | --------------------------------------------------------------- |
104
+ | `ip.src.addr` | string | Source IP address |
105
+ | `ip.dst.addr` | string | Destination IP address |
106
+ | `ip.chksum` | string | IP header checksum (hex) |
107
+ | `ip.len` | integer | IP layer length in bytes |
108
+ | `ip.src.class` | string | Network class of the source IP (e.g. `Localnet`, `A`, `B`, `C`) |
109
+ | `ip.dst.class` | string | Network class of the destination IP |
110
+
111
+ ### TCP Fields
112
+
113
+ | Attribute | Type | Description |
114
+ | -------------- | ------- | --------------------------------------------------------------- |
115
+ | `tcp.src.port` | integer | TCP source port number |
116
+ | `tcp.dst.port` | integer | TCP destination port number |
117
+ | `tcp.chksum` | string | TCP checksum (hex) |
118
+ | `tcp.urgptr` | boolean | Whether the TCP urgent pointer is set |
119
+ | `tcp.flags` | string | Active TCP flags (e.g. `SYN\|ACK`) |
120
+ | `tcp.options` | list | TCP options list |
121
+ | `tcp.len` | integer | TCP header length in bytes |
122
+ | `tcp.proto` | string | Service/protocol name for the destination port |
123
+ | `tcp.desc` | string | ICANN port description for the destination port |
124
+
125
+ ### UDP Fields
126
+
127
+ | Attribute | Type | Description |
128
+ | -------------- | ------- | --------------------------------- |
129
+ | `udp.src.port` | integer | UDP source port number |
130
+ | `udp.dst.port` | integer | UDP destination port number |
131
+ | `udp.chksum` | string | UDP checksum (hex) |
132
+ | `udp.len` | integer | UDP datagram length in bytes |
133
+
134
+ ### ICMP Fields
135
+
136
+ | Attribute | Type | Description |
137
+ | ------------ | ------- | ------------------------------------------------------------------------ |
138
+ | `icmp.type` | string | ICMP message type string (e.g. `Echo Request`, `Destination Unreachable`) |
139
+ | `icmp.code` | integer | ICMP code value |
140
+ | `icmp.id` | integer | ICMP identifier field |
141
+ | `icmp.seq` | integer | ICMP sequence number |
142
+ | `icmp.chksum`| string | ICMP checksum (hex) |
143
+
144
+ ### Wire / Payload Fields
145
+
146
+ | Attribute | Type | Description |
147
+ | ---------------------------- | ------- | ------------------------------------------------------------------------------ |
148
+ | `wire.len` | integer | Total wire length of the segment in bytes |
149
+ | `payload.hex` | string | Raw payload as a hex string |
150
+ | `payload.ascii` | string | Raw payload decoded as ASCII (lossy) |
151
+ | `payload.len` | integer | Length of the payload in bytes |
152
+ | `payload.mime` | string | MIME type of the payload (e.g. `text/html`, `application/octet-stream`) |
153
+ | `payload.entropy` | float | Shannon entropy of the payload (bits per byte) |
154
+ | `payload.charset` | string | `ascii` if all bytes are printable ASCII, otherwise `binary` |
155
+ | `payload.encoding` | string | Detected character encoding (e.g. `utf-8`, `iso-8859-1`) |
156
+ | `payload.chars.used` | integer | Number of distinct byte values present in the payload |
157
+ | `payload.decompressed.hex` | string | Decompressed payload as a hex string (only present if payload was compressed) |
158
+ | `payload.decompressed.ascii` | string | Decompressed payload decoded as ASCII (only present if payload was compressed) |
159
+
160
+ ### GeoIP / Location Fields
161
+
162
+ | Attribute | Type | Description |
163
+ | ------------------ | ------ | ------------------------------------------------------------ |
164
+ | `loc.src.country` | string | Country of the source IP (GeoIP lookup) |
165
+ | `loc.src.city` | string | City of the source IP (GeoIP lookup) |
166
+ | `loc.src.postal` | string | Postal code of the source IP (GeoIP lookup) |
167
+ | `loc.src.tz` | string | Time zone of the source IP — alias for `loc.src.timezone` |
168
+ | `loc.src.timezone` | string | Time zone of the source IP (GeoIP lookup) |
169
+ | `loc.dst.country` | string | Country of the destination IP (GeoIP lookup) |
170
+ | `loc.dst.city` | string | City of the destination IP (GeoIP lookup) |
171
+ | `loc.dst.postal` | string | Postal code of the destination IP (GeoIP lookup) |
172
+ | `loc.dst.tz` | string | Time zone of the destination IP — alias for `loc.dst.timezone` |
173
+ | `loc.dst.timezone` | string | Time zone of the destination IP (GeoIP lookup) |
174
+
175
+ > **Note:** GeoIP attributes (`loc.*`) are only populated for non-private/routable IP addresses.
176
+
177
+ ### Active Recon Fields
178
+
179
+ | Attribute | Type | Description |
180
+ | ------------- | ------ | ---------------------------------------------------------------- |
181
+ | `host.banner` | string | Server banner retrieved via active recon (requires `-a`) |
182
+
183
+ > **Note:** `host.banner` is only populated when the `-a` (active recon) flag is used.
184
+
185
+ ### DNS Fields (UDP/TCP port 53)
186
+
187
+ | Attribute | Type | Description |
188
+ | ---------------- | ------- | ------------------------------------------------------ |
189
+ | `dns.id` | integer | DNS transaction ID |
190
+ | `dns.qr` | boolean | `true` if this is a response, `false` if a query |
191
+ | `dns.qname` | string | First queried domain name |
192
+ | `dns.qnames` | list | All queried domain names |
193
+ | `dns.aname` | string | First answer name from DNS response |
194
+ | `dns.anames` | list | All answer names from DNS response |
195
+ | `dns.aip` | string | First resolved IP address from DNS response |
196
+ | `dns.aips` | list | All resolved IP addresses from DNS response |
197
+ | `dns.qdcount` | integer | Number of questions in the DNS message |
198
+ | `dns.ancount` | integer | Number of answer records in the DNS message |
199
+ | `dns.hostnames` | object | Resolved hostnames from reverse DNS lookup |
200
+
201
+ ### HTTP Fields (TCP port 80/443/8080/8443)
202
+
203
+ | Attribute | Type | Description |
204
+ | ------------------------ | ------ | ------------------------------------------------------ |
205
+ | `http.type` | string | Message type: `Request` or `Response` |
206
+ | `http.method` | string | HTTP request method (e.g. `GET`, `POST`) — requests only |
207
+ | `http.url` | string | Request URL path — requests only |
208
+ | `http.version` | string | HTTP version (e.g. `HTTP/1.1`) |
209
+ | `http.host` | string | `Host` header value — requests only |
210
+ | `http.user_agent` | string | `User-Agent` header value — requests only |
211
+ | `http.content_type` | string | `Content-Type` header value |
212
+ | `http.content_length` | string | `Content-Length` header value |
213
+ | `http.referer` | string | `Referer` header value — requests only |
214
+ | `http.accept` | string | `Accept` header value — requests only |
215
+ | `http.accept_encoding` | string | `Accept-Encoding` header value — requests only |
216
+ | `http.connection` | string | `Connection` header value |
217
+ | `http.status_code` | string | HTTP status code (e.g. `200`) — responses only |
218
+ | `http.status_msg` | string | HTTP status message (e.g. `OK`) — responses only |
219
+ | `http.server` | string | `Server` header value — responses only |
220
+ | `http.content_encoding` | string | `Content-Encoding` header value — responses only |
221
+ | `http.transfer_encoding` | string | `Transfer-Encoding` header value — responses only |
222
+ | `http.location` | string | `Location` redirect header — responses only |
223
+
224
+ ### SNMP Fields (UDP/TCP port 161/162)
225
+
226
+ | Attribute | Type | Description |
227
+ | ---------------- | ------ | ------------------------------------------------------- |
228
+ | `snmp.version` | string | SNMP version string (e.g. `v1`, `v2c`, `v3`) |
229
+ | `snmp.community` | string | SNMP community string |
230
+ | `snmp.pdu_type` | string | SNMP PDU type (e.g. `GetRequest`, `GetResponse`, `Trap`) |
231
+
232
+ ### DHCP Fields (UDP port 67/68)
233
+
234
+ | Attribute | Type | Description |
235
+ | --------------- | ------ | ------------------------------------------------------------- |
236
+ | `dhcp.msg_type` | string | DHCP message type (e.g. `DISCOVER`, `OFFER`, `REQUEST`, `ACK`) |
237
+ | `dhcp.xid` | string | Transaction ID (hex) |
238
+ | `dhcp.ciaddr` | string | Client IP address |
239
+ | `dhcp.yiaddr` | string | Your (offered) IP address |
240
+ | `dhcp.siaddr` | string | Server IP address |
241
+
242
+ ### NTP Fields (UDP port 123)
243
+
244
+ | Attribute | Type | Description |
245
+ | ------------ | ------- | ----------------------------------------------------------------- |
246
+ | `ntp.leap` | string | Leap indicator status (e.g. `no warning`, `last minute has 61s`) |
247
+ | `ntp.version`| integer | NTP version number |
248
+ | `ntp.mode` | string | NTP mode string (e.g. `client`, `server`, `broadcast`) |
249
+ | `ntp.stratum`| integer | Stratum level (0 = unspecified, 1 = primary, 2+ = secondary) |
250
+ | `ntp.ref_id` | string | Reference ID (IP address or 4-character ASCII string) |
251
+
252
+ ### SIP Fields (UDP/TCP port 5060/5061)
253
+
254
+ | Attribute | Type | Description |
255
+ | ----------------- | ------ | ------------------------------------------------------------ |
256
+ | `sip.type` | string | Message type: `Request` or `Response` |
257
+ | `sip.method` | string | SIP request method (e.g. `INVITE`, `REGISTER`) — requests only |
258
+ | `sip.uri` | string | Request URI — requests only |
259
+ | `sip.from` | string | `From` header value |
260
+ | `sip.to` | string | `To` header value |
261
+ | `sip.call_id` | string | `Call-ID` header value |
262
+ | `sip.status_code` | string | SIP status code (e.g. `200`) — responses only |
263
+ | `sip.status_msg` | string | SIP status message (e.g. `OK`) — responses only |
264
+
265
+ ## Notes
266
+
267
+ - Active recon (`-a`) may take longer and requires network access.
268
+ - Ensure database files are present and paths are correct in `conf.yaml`.
269
+ - The tool will prompt before overwriting output directories.
270
+ - LLM summaries require a running Ollama server (`minimax-m2.5:cloud` model by default).
271
+
272
+ ## License
273
+
274
+ GPL v3
275
+
276
+ ## Author
277
+
278
+ Marshall Whittaker