{"id":23479563,"url":"https://github.com/j4k0xb/asarfix","last_synced_at":"2025-10-31T04:30:40.148Z","repository":{"id":269248107,"uuid":"906862171","full_name":"j4k0xb/asarfix","owner":"j4k0xb","description":"Fixes/Decrypts asar archives protected by asarmor and asarbreak.","archived":false,"fork":false,"pushed_at":"2025-02-04T18:33:44.000Z","size":2615,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T19:36:38.111Z","etag":null,"topics":["asar","asarbreak","asarmor","electron"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/asarfix","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j4k0xb.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":"2024-12-22T06:00:46.000Z","updated_at":"2025-02-04T18:33:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a55f17a-011f-4e51-9f78-5ba3bf158b7b","html_url":"https://github.com/j4k0xb/asarfix","commit_stats":null,"previous_names":["j4k0xb/asarfix"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j4k0xb%2Fasarfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j4k0xb%2Fasarfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j4k0xb%2Fasarfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j4k0xb%2Fasarfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j4k0xb","download_url":"https://codeload.github.com/j4k0xb/asarfix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239103006,"owners_count":19582070,"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":["asar","asarbreak","asarmor","electron"],"created_at":"2024-12-24T19:31:38.243Z","updated_at":"2025-10-31T04:30:40.135Z","avatar_url":"https://github.com/j4k0xb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asarfix\n\nFixes/Decrypts asar archives protected by [asarmor](https://github.com/sleeyax/asarmor) and [asarbreak](https://github.com/relative/asarbreak).\n\n```sh\nnpx asarfix app.asar -o out.asar\nnpx asar extract out.asar out\n```\n\n## Decryption\n\nAsarmor uses AES-128-CBC to encrypt `.js` files in the asar archive.\nThe encryption key is stored in one of these binaries:\n\n- electron-forge: `resources/app.asar.unpacked/.vite/build/main.node`\n- electron-builder: `resources/app.asar.unpacked/dist/main.node`\n\nAsarfix will automatically search for these binaries and try to extract the key.\n\nSpecifying a custom binary path with the `-b` flag:\n\n```sh\nnpx asarfix app.asar -o out.asar -b \u003cpath to main.node\u003e\n```\n\nSpecifying a custom key with the `-k` flag:\n\n```sh\nnpx asarfix app.asar -o out.asar -k \u003ckey\u003e\n```\n\nThe key may also be available in plaintext: `node_modules/asarmor/src/encryption/key.txt`.\n\n## Bypass Debugging Protection\n\nhttps://github.com/sleeyax/asarmor/blob/2c91d08ba0a00d379d26e7dfb89aa0f1d3b8e05c/src/encryption/main.cpp#L172-L173\n\nIt checks process.argv, but this can be bypassed in one of these ways:\n\n- Set the `NODE_OPTIONS=--inspect` environment variable (only works with node, not electron)\n- Open `main.node` in a hex editor and replace the `--inspect` string with anything else of the same length\n- [Modify Fuses](https://book.hacktricks.xyz/macos-hardening/macos-security-and-privilege-escalation/macos-proces-abuse/macos-electron-applications-injection#modifying-electron-fuses)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj4k0xb%2Fasarfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj4k0xb%2Fasarfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj4k0xb%2Fasarfix/lists"}