{"id":13647582,"url":"https://github.com/Lekensteyn/wireguard-dissector","last_synced_at":"2025-04-22T02:32:04.677Z","repository":{"id":147040943,"uuid":"83459711","full_name":"Lekensteyn/wireguard-dissector","owner":"Lekensteyn","description":"Wireshark dissector (written in Lua) for dissecting the WireGuard tunneling protocol.","archived":false,"fork":false,"pushed_at":"2018-08-26T16:23:50.000Z","size":1515,"stargazers_count":47,"open_issues_count":1,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T06:06:32.745Z","etag":null,"topics":["libgcrypt","lua","wireguard","wireshark","wireshark-dissector"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lekensteyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-28T17:18:29.000Z","updated_at":"2025-02-21T02:52:56.000Z","dependencies_parsed_at":"2024-01-14T10:23:01.192Z","dependency_job_id":"45ec3910-e1c4-4638-8697-f9c980d83ea8","html_url":"https://github.com/Lekensteyn/wireguard-dissector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lekensteyn%2Fwireguard-dissector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lekensteyn%2Fwireguard-dissector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lekensteyn%2Fwireguard-dissector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lekensteyn%2Fwireguard-dissector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lekensteyn","download_url":"https://codeload.github.com/Lekensteyn/wireguard-dissector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250163723,"owners_count":21385299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libgcrypt","lua","wireguard","wireshark","wireshark-dissector"],"created_at":"2024-08-02T01:03:39.626Z","updated_at":"2025-04-22T02:32:04.303Z","avatar_url":"https://github.com/Lekensteyn.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# Wireshark dissector for the WireGuard tunnel protocol\nWireshark dissector (written in Lua) for dissecting the [WireGuard][1] tunneling\nprotocol.\n\n**This dissector is obsolete, an improved version is included in Wireshark\n2.9.x.** See [this comment][5] for more further instructions.\n\n![Screenshot of Wireshark with WireGuard traffic](wireshark-wg.png)\n\nRequirements:\n\n - Wireshark 2.0.2 or newer (tested with Wireshark 2.3.x).\n - [luagcrypt][2] and Libgcrypt 1.7 for (optional) decryption support.\n\n~~The plan is to eventually rewrite this prototype into a dissector that is\nincluded with the main Wireshark sources.~~ An improved version is included with\nthe current development version (git master, 2.9.x).\n\n## Installation and usage\nInstall [wg.lua](wg.lua) in the [Wireshark plugins folder][4] (usually\n`~/.config/wireshark/plugins/` or `~/.wireshark/plugins/`).\nFor decryption support, install [luagcrypt][2] in the Lua library path\n(usually `/usr/lib/lua/5.2/luagcrypt.so`).\n\nNow try the sample packet capture [pcaps/8-trace.pcap](pcaps/8-trace.pcap)\nand its corresponding keylog file [pcaps/8-trace.keys](pcaps/8-trace.keys)\n(configure via *Protocol Preferences* → *Keylog file*).\n\nAs alternative to installing files globally, copy luagcrypt.so to the current\nworking directory and run:\n\n    wireshark -Xlua_script:wg.lua -r pcaps/8-trace.pcap -owg.keylog_file:pcaps/8-trace.keys\n\nSince WireGuard does not have a default port number, it is recommended to enable\nthe UDP protocol preference *Try heuristic sub-dissectors first* (via the menu\nEdit → Preferences, Protocols → UDP).\n\n## Obtaining handshake and traffic secrets through key-probe.sh and key-extract.py\nThe [key-probe.sh](key-probe.sh) script enables tracing WireGuard function calls\nusing [*kprobes*][3]. This raw data must be post-processed with\n[key-extract.py](key-extract.py) to produce a keylog file with handshake and\ntraffic secrets. A kernel with `CONFIG_KPROBE_EVENT=y` is required (most distros\nsatisfy this requirement).\n\nTo get started, enable the required tracepoints:\n\n    sudo ./key-probe.sh\n\nNext, obtain the trace output and extract keys from it. A one-shot approach that\ncan be executed periodically:\n\n    sudo cat /sys/kernel/debug/tracing/trace \u003e trace.txt\n    ./key-extract.py \u003c trace.txt \u003e trace.keys\n\nTo continuously update the keylog file (useful for live captures, but note that\nthis will erase traces that are read from the file):\n\n    sudo cat /sys/kernel/debug/tracing/trace_pipe | ./key-extract.py \u003e trace.keys\n\nTo stop logging more keys, disable the tracepoints with:\n\n    sudo ./key-noprobe.sh\n\n## Obtaining traffic secrets through extract-keys\nThe `extract-keys` utility included with WireGuard can extract traffic secrets\n(for active sessions only) and requires the `CONFIG_DEVKMEM=y` option (many\ndistros such as Arch Linux Linux, Debian and Ubuntu have it disabled).\nSee `contrib/examples/extract-keys` in the WireGuard sources for more details.\n\n## License\nCopyright (C) 2017 Peter Wu (peter@lekensteyn.nl)\n\nThis project is licensed under the GPLv2 (or any later version) license.\nSee [LICENSE.txt](LICENSE.txt) for more details.\n\n [1]: https://www.wireguard.io/\n [2]: https://github.com/Lekensteyn/luagcrypt\n [3]: https://www.kernel.org/doc/Documentation/trace/kprobetrace.txt\n [4]: https://www.wireshark.org/docs/wsug_html_chunked/ChAppFilesConfigurationSection.html\n [5]: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15011#c18\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLekensteyn%2Fwireguard-dissector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLekensteyn%2Fwireguard-dissector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLekensteyn%2Fwireguard-dissector/lists"}