[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1PSYMTK43TM52N3EKEFVY":3,"skill-same:01M7F1PSYMTK43TM52N3EKEFVY":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F1PSYMTK43TM52N3EKEFVY","protocol-reverse-engineering",null,"Master network protocol reverse engineering including packet analysis, protocol dissection, and custom protocol documentation. Use when analyzing network traffic, understanding proprietary protocols, or debugging network communication.","shotcowboystyle\u002Fag-skills","shotcowboystyle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62471?v=4","01M7EZTCFCZJ6K3MYW8BPM4X6R","Curtis Blanton","01M7EZTCG1S5M04J90A931X9BX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Freverse-engineering\u002Fskills\u002Fprotocol-reverse-engineering\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: protocol-reverse-engineering\ndescription: Master network protocol reverse engineering including packet analysis, protocol dissection, and custom protocol documentation. Use when analyzing network traffic, understanding proprietary protocols, or debugging network communication.\n---\n\n# Protocol Reverse Engineering\n\nComprehensive techniques for capturing, analyzing, and documenting network protocols for security research, interoperability, and debugging.\n\n## Traffic Capture\n\n### Wireshark Capture\n\n```bash\n# Capture on specific interface\nwireshark -i eth0 -k\n\n# Capture with filter\nwireshark -i eth0 -k -f \"port 443\"\n\n# Capture to file\ntshark -i eth0 -w capture.pcap\n\n# Ring buffer capture (rotate files)\ntshark -i eth0 -b filesize:100000 -b files:10 -w capture.pcap\n```\n\n### tcpdump Capture\n\n```bash\n# Basic capture\ntcpdump -i eth0 -w capture.pcap\n\n# With filter\ntcpdump -i eth0 port 8080 -w capture.pcap\n\n# Capture specific bytes\ntcpdump -i eth0 -s 0 -w capture.pcap  # Full packet\n\n# Real-time display\ntcpdump -i eth0 -X port 80\n```\n\n### Man-in-the-Middle Capture\n\n```bash\n# mitmproxy for HTTP\u002FHTTPS\nmitmproxy --mode transparent -p 8080\n\n# SSL\u002FTLS interception\nmitmproxy --mode transparent --ssl-insecure\n\n# Dump to file\nmitmdump -w traffic.mitm\n\n# Burp Suite\n# Configure browser proxy to 127.0.0.1:8080\n```\n\n## Protocol Analysis\n\n### Wireshark Analysis\n\n```\n# Display filters\ntcp.port == 8080\nhttp.request.method == \"POST\"\nip.addr == 192.168.1.1\ntcp.flags.syn == 1 && tcp.flags.ack == 0\nframe contains \"password\"\n\n# Following streams\nRight-click > Follow > TCP Stream\nRight-click > Follow > HTTP Stream\n\n# Export objects\nFile > Export Objects > HTTP\n\n# Decryption\nEdit > Preferences > Protocols > TLS\n  - (Pre)-Master-Secret log filename\n  - RSA keys list\n```\n\n### tshark Analysis\n\n```bash\n# Extract specific fields\ntshark -r capture.pcap -T fields -e ip.src -e ip.dst -e tcp.port\n\n# Statistics\ntshark -r capture.pcap -q -z conv,tcp\ntshark -r capture.pcap -q -z endpoints,ip\n\n# Filter and extract\ntshark -r capture.pcap -Y \"http\" -T json > http_traffic.json\n\n# Protocol hierarchy\ntshark -r capture.pcap -q -z io,phs\n```\n\n### Scapy for Custom Analysis\n\n```python\nfrom scapy.all import *\n\n# Read pcap\npackets = rdpcap(\"capture.pcap\")\n\n# Analyze packets\nfor pkt in packets:\n    if pkt.haslayer(TCP):\n        print(f\"Src: {pkt[IP].src}:{pkt[TCP].sport}\")\n        print(f\"Dst: {pkt[IP].dst}:{pkt[TCP].dport}\")\n        if pkt.haslayer(Raw):\n            print(f\"Data: {pkt[Raw].load[:50]}\")\n\n# Filter packets\nhttp_packets = [p for p in packets if p.haslayer(TCP)\n                and (p[TCP].sport == 80 or p[TCP].dport == 80)]\n\n# Create custom packets\npkt = IP(dst=\"target\")\u002FTCP(dport=80)\u002FRaw(load=\"GET \u002F HTTP\u002F1.1\\r\\n\")\nsend(pkt)\n```\n\n## Protocol Identification\n\n### Common Protocol Signatures\n\n```\nHTTP        - \"HTTP\u002F1.\" or \"GET \" or \"POST \" at start\nTLS\u002FSSL     - 0x16 0x03 (record layer)\nDNS         - UDP port 53, specific header format\nSMB         - 0xFF 0x53 0x4D 0x42 (\"SMB\" signature)\nSSH         - \"SSH-2.0\" banner\nFTP         - \"220 \" response, \"USER \" command\nSMTP        - \"220 \" banner, \"EHLO\" command\nMySQL       - 0x00 length prefix, protocol version\nPostgreSQL  - 0x00 0x00 0x00 startup length\nRedis       - \"*\" RESP array prefix\nMongoDB     - BSON documents with specific header\n```\n\n### Protocol Header Patterns\n\n```\n+--------+--------+--------+--------+\n|  Magic number \u002F Signature         |\n+--------+--------+--------+--------+\n|  Version       |  Flags          |\n+--------+--------+--------+--------+\n|  Length        |  Message Type   |\n+--------+--------+--------+--------+\n|  Sequence Number \u002F Session ID     |\n+--------+--------+--------+--------+\n|  Payload...                       |\n+--------+--------+--------+--------+\n```\n\nBefore binary protocol or encryption analysis, read [parsers, structure identification, and TLS techniques](references\u002Fbinary-encryption-analysis.md).\n\nBefore documenting a protocol or writing a dissector, read [the specification template and Lua example](references\u002Fprotocol-documentation.md).\n\n## Active Testing\n\n### Fuzzing with Boofuzz\n\n```python\nfrom boofuzz import *\n\ndef main():\n    session = Session(\n        target=Target(\n            connection=TCPSocketConnection(\"target\", 8888)\n        )\n    )\n\n    # Define protocol structure\n    s_initialize(\"HELLO\")\n    s_static(b\"\\x50\\x52\\x4f\\x54\")  # Magic\n    s_word(1, name=\"version\")       # Version\n    s_word(0x01, name=\"type\")       # Type (HELLO)\n    s_size(\"payload\", length=4)     # Length field\n    s_block_start(\"payload\")\n    s_dword(0x12345678, name=\"client_id\")\n    s_word(0, name=\"flags\")\n    s_block_end()\n\n    session.connect(s_get(\"HELLO\"))\n    session.fuzz()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Replay and Modification\n\n```python\nfrom scapy.all import *\n\n# Replay captured traffic\npackets = rdpcap(\"capture.pcap\")\nfor pkt in packets:\n    if pkt.haslayer(TCP) and pkt[TCP].dport == 8888:\n        send(pkt)\n\n# Modify and replay\nfor pkt in packets:\n    if pkt.haslayer(Raw):\n        # Modify payload\n        original = pkt[Raw].load\n        modified = original.replace(b\"client\", b\"CLIENT\")\n        pkt[Raw].load = modified\n        # Recalculate checksums\n        del pkt[IP].chksum\n        del pkt[TCP].chksum\n        send(pkt)\n```\n\n## Best Practices\n\n### Analysis Workflow\n\n1. **Capture traffic**: Multiple sessions, different scenarios\n2. **Identify boundaries**: Message start\u002Fend markers\n3. **Map structure**: Fixed header, variable payload\n4. **Identify fields**: Compare multiple samples\n5. **Document format**: Create specification\n6. **Validate understanding**: Implement parser\u002Fgenerator\n7. **Test edge cases**: Fuzzing, boundary conditions\n\n### Common Patterns to Look For\n\n- Magic numbers\u002Fsignatures at message start\n- Version fields for compatibility\n- Length fields (often before variable data)\n- Type\u002Fopcode fields for message identification\n- Sequence numbers for ordering\n- Checksums\u002FCRCs for integrity\n- Timestamps for timing\n- Session\u002Fconnection identifiers\n","# Protocol Reverse Engineering\n\nComprehensive techniques for capturing, analyzing, and documenting network protocols for security research, interoperability, and debugging.\n\n## Traffic Capture\n\n### Wireshark Capture\n\n```bash\n# Capture on specific interface\nwireshark -i eth0 -k\n\n# Capture with filter\nwireshark -i eth0 -k -f \"port 443\"\n\n# Capture to file\ntshark -i eth0 -w capture.pcap\n\n# Ring buffer capture (rotate files)\ntshark -i eth0 -b filesize:100000 -b files:10 -w capture.pcap\n```\n\n### tcpdump Capture\n\n```bash\n# Basic capture\ntcpdump -i eth0 -w capture.pcap\n\n# With filter\ntcpdump -i eth0 port 8080 -w capture.pcap\n\n# Capture specific bytes\ntcpdump -i eth0 -s 0 -w capture.pcap  # Full packet\n\n# Real-time display\ntcpdump -i eth0 -X port 80\n```\n\n### Man-in-the-Middle Capture\n\n```bash\n# mitmproxy for HTTP\u002FHTTPS\nmitmproxy --mode transparent -p 8080\n\n# SSL\u002FTLS interception\nmitmproxy --mode transparent --ssl-insecure\n\n# Dump to file\nmitmdump -w traffic.mitm\n\n# Burp Suite\n# Configure browser proxy to 127.0.0.1:8080\n```\n\n## Protocol Analysis\n\n### Wireshark Analysis\n\n```\n# Display filters\ntcp.port == 8080\nhttp.request.method == \"POST\"\nip.addr == 192.168.1.1\ntcp.flags.syn == 1 && tcp.flags.ack == 0\nframe contains \"password\"\n\n# Following streams\nRight-click > Follow > TCP Stream\nRight-click > Follow > HTTP Stream\n\n# Export objects\nFile > Export Objects > HTTP\n\n# Decryption\nEdit > Preferences > Protocols > TLS\n  - (Pre)-Master-Secret log filename\n  - RSA keys list\n```\n\n### tshark Analysis\n\n```bash\n# Extract specific fields\ntshark -r capture.pcap -T fields -e ip.src -e ip.dst -e tcp.port\n\n# Statistics\ntshark -r capture.pcap -q -z conv,tcp\ntshark -r capture.pcap -q -z endpoints,ip\n\n# Filter and extract\ntshark -r capture.pcap -Y \"http\" -T json > http_traffic.json\n\n# Protocol hierarchy\ntshark -r capture.pcap -q -z io,phs\n```\n\n### Scapy for Custom Analysis\n\n```python\nfrom scapy.all import *\n\n# Read pcap\npackets = rdpcap(\"capture.pcap\")\n\n# Analyze packets\nfor pkt in packets:\n    if pkt.haslayer(TCP):\n        print(f\"Src: {pkt[IP].src}:{pkt[TCP].sport}\")\n        print(f\"Dst: {pkt[IP].dst}:{pkt[TCP].dport}\")\n        if pkt.haslayer(Raw):\n            print(f\"Data: {pkt[Raw].load[:50]}\")\n\n# Filter packets\nhttp_packets = [p for p in packets if p.haslayer(TCP)\n                and (p[TCP].sport == 80 or p[TCP].dport == 80)]\n\n# Create custom packets\npkt = IP(dst=\"target\")\u002FTCP(dport=80)\u002FRaw(load=\"GET \u002F HTTP\u002F1.1\\r\\n\")\nsend(pkt)\n```\n\n## Protocol Identification\n\n### Common Protocol Signatures\n\n```\nHTTP        - \"HTTP\u002F1.\" or \"GET \" or \"POST \" at start\nTLS\u002FSSL     - 0x16 0x03 (record layer)\nDNS         - UDP port 53, specific header format\nSMB         - 0xFF 0x53 0x4D 0x42 (\"SMB\" signature)\nSSH         - \"SSH-2.0\" banner\nFTP         - \"220 \" response, \"USER \" command\nSMTP        - \"220 \" banner, \"EHLO\" command\nMySQL       - 0x00 length prefix, protocol version\nPostgreSQL  - 0x00 0x00 0x00 startup length\nRedis       - \"*\" RESP array prefix\nMongoDB     - BSON documents with specific header\n```\n\n### Protocol Header Patterns\n\n```\n+--------+--------+--------+--------+\n|  Magic number \u002F Signature         |\n+--------+--------+--------+--------+\n|  Version       |  Flags          |\n+--------+--------+--------+--------+\n|  Length        |  Message Type   |\n+--------+--------+--------+--------+\n|  Sequence Number \u002F Session ID     |\n+--------+--------+--------+--------+\n|  Payload...                       |\n+--------+--------+--------+--------+\n```\n\nBefore binary protocol or encryption analysis, read [parsers, structure identification, and TLS techniques](references\u002Fbinary-encryption-analysis.md).\n\nBefore documenting a protocol or writing a dissector, read [the specification template and Lua example](references\u002Fprotocol-documentation.md).\n\n## Active Testing\n\n### Fuzzing with Boofuzz\n\n```python\nfrom boofuzz import *\n\ndef main():\n    session = Session(\n        target=Target(\n            connection=TCPSocketConnection(\"target\", 8888)\n        )\n    )\n\n    # Define protocol structure\n    s_initialize(\"HELLO\")\n    s_static(b\"\\x50\\x52\\x4f\\x54\")  # Magic\n    s_word(1, name=\"version\")       # Version\n    s_word(0x01, name=\"type\")       # Type (HELLO)\n    s_size(\"payload\", length=4)     # Length field\n    s_block_start(\"payload\")\n    s_dword(0x12345678, name=\"client_id\")\n    s_word(0, name=\"flags\")\n    s_block_end()\n\n    session.connect(s_get(\"HELLO\"))\n    session.fuzz()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Replay and Modification\n\n```python\nfrom scapy.all import *\n\n# Replay captured traffic\npackets = rdpcap(\"capture.pcap\")\nfor pkt in packets:\n    if pkt.haslayer(TCP) and pkt[TCP].dport == 8888:\n        send(pkt)\n\n# Modify and replay\nfor pkt in packets:\n    if pkt.haslayer(Raw):\n        # Modify payload\n        original = pkt[Raw].load\n        modified = original.replace(b\"client\", b\"CLIENT\")\n        pkt[Raw].load = modified\n        # Recalculate checksums\n        del pkt[IP].chksum\n        del pkt[TCP].chksum\n        send(pkt)\n```\n\n## Best Practices\n\n### Analysis Workflow\n\n1. **Capture traffic**: Multiple sessions, different scenarios\n2. **Identify boundaries**: Message start\u002Fend markers\n3. **Map structure**: Fixed header, variable payload\n4. **Identify fields**: Compare multiple samples\n5. **Document format**: Create specification\n6. **Validate understanding**: Implement parser\u002Fgenerator\n7. **Test edge cases**: Fuzzing, boundary conditions\n\n### Common Patterns to Look For\n\n- Magic numbers\u002Fsignatures at message start\n- Version fields for compatibility\n- Length fields (often before variable data)\n- Type\u002Fopcode fields for message identification\n- Sequence numbers for ordering\n- Checksums\u002FCRCs for integrity\n- Timestamps for timing\n- Session\u002Fconnection identifiers\n",{"name":5,"description":7},"main","f846d9a97082ff30d613b55a085cef425d822473","plugins\u002Freverse-engineering\u002Fskills\u002Fprotocol-reverse-engineering","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle","https:\u002F\u002Fshotcowboystyle.github.io","Building smarter with AI, automation & modern tools. Exploring how far one person can go without a big team using today’s AI.","2026-11-10 04:58:27",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add shotcowboystyle\u002Fag-skills --skill protocol-reverse-engineering",{"tool":38,"command":39},"bunx","bunx skills add shotcowboystyle\u002Fag-skills --skill protocol-reverse-engineering",{"tool":41,"command":42},"pnpm","pnpm dlx skills add shotcowboystyle\u002Fag-skills --skill protocol-reverse-engineering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Freverse-engineering\u002Fskills\u002Fprotocol-reverse-engineering\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fbinary-encryption-analysis.md","REFERENCE","参考文档",4822,"https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Freverse-engineering\u002Fskills\u002Fprotocol-reverse-engineering\u002Freferences\u002Fbinary-encryption-analysis.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fprotocol-documentation.md",4173,"https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Freverse-engineering\u002Fskills\u002Fprotocol-reverse-engineering\u002Freferences\u002Fprotocol-documentation.md",[57,63,70,77,84,91],{"skillNo":58,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7F1YRY5S5QRJ1V0BJS130QX","no-description","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fno-description\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7F1Y9BV2FJNQJ3NB32JS5CM","good-skill","Fixture skill that satisfies every rule.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7F1XXBQ3NQRXZSS0KAGAR9V","broken-link","Links to a reference file that does not exist.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbroken-link\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7F1XBX4R46NR9W0HXQ7XCDX","Bad_Name","Name violates the kebab-case rule and does not match the directory.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad-name\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7F1WNAF8WNEQ7S5HKT5VK0D","skill-authoring","Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-authoring\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7F1W30TC0XFNSF7YBRGETK2","weigh-bags","Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts\u002Freconcile.py.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftravel-packing-assistant\u002Fskills\u002Fweigh-bags\u002FSKILL.md",[],[]]