{"id":17287430,"url":"https://github.com/ivannardi/pl7m","last_synced_at":"2025-04-14T11:06:36.665Z","repository":{"id":215951093,"uuid":"697951360","full_name":"IvanNardi/pl7m","owner":"IvanNardi","description":"Pcap L7 Mutator ","archived":false,"fork":false,"pushed_at":"2025-02-24T15:41:33.000Z","size":568,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T11:06:31.477Z","etag":null,"topics":["deep-packet-inspection","fuzzing","mutator","structure-aware-fuzzing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IvanNardi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-28T20:15:29.000Z","updated_at":"2025-02-24T15:41:36.000Z","dependencies_parsed_at":"2024-06-15T10:28:36.219Z","dependency_job_id":"c3f1154b-6a00-4053-9082-b5ca5f9cc81f","html_url":"https://github.com/IvanNardi/pl7m","commit_stats":null,"previous_names":["ivannardi/pl7m"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanNardi%2Fpl7m","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanNardi%2Fpl7m/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanNardi%2Fpl7m/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanNardi%2Fpl7m/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IvanNardi","download_url":"https://codeload.github.com/IvanNardi/pl7m/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868768,"owners_count":21174757,"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":["deep-packet-inspection","fuzzing","mutator","structure-aware-fuzzing"],"created_at":"2024-10-15T10:02:27.536Z","updated_at":"2025-04-14T11:06:36.646Z","avatar_url":"https://github.com/IvanNardi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pcap L7 Mutator\n\nPl7m is a custom mutator (used for [structure aware fuzzing](https://github.com/google/fuzzing/blob/master/docs/structure-aware-fuzzing.md)) for network traffic packet captures (i.e. pcap files).\n\nThe output of the mutator is always a valid pcap file, containing the same flows/sessions of the input file.\nThat's it: the mutator only changes the packet payload after the TCP/UDP header, keeping all the original L2/L3/L4 information (IP addresses and L4 ports).\n\nThis might be useful if you are dealing with pcap files and you want to fuzz some applications at the protocol layer, for example in the deep packet inspection engines or for protocol analysis.\n\nMutations happens at two different levels:\n* packet level: each packet might be dropped, duplicated, swapped or its own direction might be swapped (i.e. from client-\u003eserver to server-\u003eclient)\n* payload level: only the packet payload (i.e. Layer 7 data, i.e. data after TCP/UDP header) is changed\n\nThere are some configuration options for some fine tuning: take a look at the beginning of `pl7m.c`\n\n## How to use\n\nIntegrating pl7m mutator into your own code is very easy:\n1) Copy the two files `pl7m.h` and `pl7m.c` into your own source code directory\n2) Add a custum mutator into your own fuzzer, calling directly `pl7m_mutator()`\n\n```\nsize_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size,\n                               size_t MaxSize, unsigned int Seed)\n{\n    return pl7m_mutator(Data, Size, MaxSize, Seed);\n}\n\n```\n\n3) Compile your own fuzzer, linking to libpcap\n\nFor a complete example, see `fuzz/fuzzer_example.c`\n\nNote that, even if the documentation/code only cites libfuzzer, you can easily use any other fuzzing library.\n\n## Known limitations\n\n* Better support for TCP flows: we might need to update sequence/ack numbers in the TCP header\n\n## Used by\n\n* [nDPI](https://github.com/ntop/nDPI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivannardi%2Fpl7m","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivannardi%2Fpl7m","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivannardi%2Fpl7m/lists"}