{"id":28951586,"url":"https://github.com/sayan690/bchunt","last_synced_at":"2025-06-23T15:06:00.609Z","repository":{"id":298350795,"uuid":"999678019","full_name":"Sayan690/bcHunt","owner":"Sayan690","description":"bcHunt - An autonomous badchar finder.","archived":false,"fork":false,"pushed_at":"2025-06-10T16:31:03.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-10T17:54:29.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Sayan690.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,"zenodo":null}},"created_at":"2025-06-10T16:06:09.000Z","updated_at":"2025-06-10T16:31:24.000Z","dependencies_parsed_at":"2025-06-10T18:05:51.360Z","dependency_job_id":null,"html_url":"https://github.com/Sayan690/bcHunt","commit_stats":null,"previous_names":["sayan690/bchunt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sayan690/bcHunt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sayan690%2FbcHunt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sayan690%2FbcHunt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sayan690%2FbcHunt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sayan690%2FbcHunt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sayan690","download_url":"https://codeload.github.com/Sayan690/bcHunt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sayan690%2FbcHunt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261500667,"owners_count":23168071,"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":[],"created_at":"2025-06-23T15:05:59.296Z","updated_at":"2025-06-23T15:06:00.599Z","avatar_url":"https://github.com/Sayan690.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bcHunt - An Autonomous Badchar Finder\n\n**bcHunt** is a Python tool that automates the process of detecting bad characters in exploit development. Given a memory dump (usually from the ESP register after a stack overflow), it compares the memory content against a standard byte sequence and flags any discrepancies. It then regenerates the payload with the bad character(s) removed, helping streamline shellcode development.\n\n---\n\n## 🚀 Features\n\n- Detects the exact byte where the payload breaks.\n- Flags the bad character causing the interruption.\n- Regenerates a new payload excluding the bad characters.\n- Supports excluding custom known bad characters with the `-b` flag.\n\n---\n\n## 🧠 How It Works\n\nAfter triggering a buffer overflow, the content of the ESP register is dumped into a binary file (e.g., `seq.bin`). This file contains the byte sequence injected into the process. `bcHunt` compares this with a complete byte sequence (`\\x01` to `\\xff`) and detects where the sequence diverges, indicating a bad character.\n\n---\n\n## 📦 Installation\n\nJust clone the repository:\n\n```bash\ngit clone https://github.com/Sayan690/bcHunt\ncd bcHunt\n```\n\nPython 3 is required to run this tool.\n\n---\n## ⚙️ Usage\n\n```bash\nbcHunt.py \u003csequence file\u003e -b [badchars]\n```\n\n- `\u003csequence file\u003e`: Binary file (e.g., `seq.bin`) containing the memory dump of the ESP register.\n    \n- `-b \u003cbadchars\u003e` _(optional)_: A string of known bad characters to exclude (e.g., `\"\\x00\\x0a\"`).\n\n---\n## 🧪 Example\n\nInput:\n```bash\npython3 bcHunt.py seq.bin\n```\n\nOutput:\n```\n[*] Badchar found: \\x0a\n[*] Removing it ...\n[+] New payload :\n\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0b\\x0c\\x0d ... \\xff\n```\n\nRun it again with the badchar excluded:\n\n```bash\npython3 bcHunt.py a.bin -b \"\\x0a\"\n```\n\nOutput:\n```\n[+] No Badchars found!!\n```\n\n---\n## 🔄 Workflow\n\n- Generate a payload of all possible combinations of characters from '\\x01' to '\\xff'.\n    \n- Inject it via buffer overflow.\n    \n- Dump the ESP register to a binary file.\n    \n- Run `bcHunt.py` on the dump.\n    \n- Get the filtered payload without bad characters.\n    \n- Repeat until no badchars are found.\n\n---\n## 🧰 Use Case\n\nIdeal for penetration testers, exploit developers, or CTF players looking to quickly and reliably identify bad characters during shellcode crafting.\n\n---\n## 📄 License\n\nThis project is licensed under the MIT License. See [LICENSE](https://github.com/Sayan690/bcHunt/blob/main/LICENSE) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayan690%2Fbchunt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayan690%2Fbchunt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayan690%2Fbchunt/lists"}