{"id":20261369,"url":"https://github.com/parsiya/evil-electron","last_synced_at":"2025-04-11T01:45:19.046Z","repository":{"id":49636743,"uuid":"277379196","full_name":"parsiya/evil-electron","owner":"parsiya","description":"Backdoored Electron app.asar","archived":false,"fork":false,"pushed_at":"2021-06-11T17:23:23.000Z","size":30,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T22:51:24.278Z","etag":null,"topics":["electron","security"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/parsiya.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}},"created_at":"2020-07-05T20:35:27.000Z","updated_at":"2024-09-09T06:26:17.000Z","dependencies_parsed_at":"2022-09-04T22:14:13.413Z","dependency_job_id":null,"html_url":"https://github.com/parsiya/evil-electron","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parsiya%2Fevil-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parsiya%2Fevil-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parsiya%2Fevil-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parsiya%2Fevil-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parsiya","download_url":"https://codeload.github.com/parsiya/evil-electron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248327863,"owners_count":21085258,"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":["electron","security"],"created_at":"2024-11-14T11:25:24.966Z","updated_at":"2025-04-11T01:45:19.028Z","avatar_url":"https://github.com/parsiya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Evil Electron a Backdoored Electron app.asar\nThis is a fork of the Electron Quick Start application at\nhttps://github.com/electron/electron-quick-start.\n\nIt spawns a command prompt. To change it, change [preload.js](preload.js).\n\n## Usecase\nIf you have a bundled Electron app you can replace the original `app.asar` with\nthis app to get a command prompt.\n\n## Quickstart\n\n1. Make a copy of the original `/path/to/electron/app/resources/app.asar` file.\n2. Copy `release/app.asar` into the path above.\n3. Run the Electron app to see `cmd` pop.\n\n## Building\nThis repository creates an `app.asar` file and not a complete Electron app. Note\nwe are not running `npm install` because the original Electron app already has\nthe dependency.\n\n```\n# Clone this repository\ngit clone https://github.com/parsiya/evil-electron\n# Go into the repository\ncd evil-electron\n# Install asar globally if it's not already installed\nnpm install -g asar\n# Package the app into app.asar (modify for non-Windows OS)\nasar pack . release/app.asar --unpack-dir \"{**/.git,**/release,**/node_modules}\" \u0026\u0026 rd \"release/app.asar.unpacked\" /s /q\n# Copy release/app.asar to the place you want.\n```\n\n## Testing\nTo test your `app.asar` you need to install Electron.\n\n```\n# Clone this repository\ngit clone https://github.com/parsiya/evil-electron\n# Go into the repository\ncd evil-electron\n# Install dependencies\nnpm install\n# Run the app to test it, you should see the command prompt\nnpm start\n# Install asar globally if it's not already installed\nnpm install -g asar\n# Package the app into app.asar (modify for non-Windows OS)\nasar pack . release/app.asar --unpack-dir \"{**/.git,**/release,**/node_modules}\" \u0026\u0026 rd \"release/app.asar.unpacked\" /s /q\n# Copy release/app.asar to `resources/app.asar` for your target application\n```\n\n## Troubleshooting\nSee the original repository at https://github.com/electron/electron-quick-start\nand the [Writing Your First Electron App][first-electron] article.\n\n[first-electron]: https://www.electronjs.org/docs/tutorial/first-app\n\n### My app.asar is Too Big\n\n1. Did you exclude `node_modules` from the `asar pack` command?\n2. Did you delete the old `app.asar` file? The asar command will append data to existing files.\n\n### Only Works on Windows\nYes. [issue #1](https://github.com/parsiya/evil-electron/issues/1) fixes some of\nthis problem. I do not have a Mac so I have not tested that part. The Linux\nversion just calls `gnome-terminal` which is problematic but\n[issue #2](https://github.com/parsiya/evil-electron/issues/2) is looking for a\nuniversal command.\n\n### \"The SUID sandbox helper binary was found, but is not configured correctly\"\nThis happens after `npm start`. Run these commands:\n\n```\nsudo chown root /path/to/evil-electron/node_modules/electron/dist/chrome-sandbox\nsudo chmod 4755 /path/to/evil-electron/node_modules/electron/dist/chrome-sandbox\n```\n\nSource: https://github.com/electron/electron/issues/17972#issuecomment-487369441\n\n### I Cannot `asar extract` the Release File\nYes, `asar` for some reason likes to reference the excluded files and keeps them\nin the `app.asar.unpacked` directory. We delete this directory with our\n`asar pack` command but `asar extract` needs this directory to extract things\nproperly. If you know how to fix this please let me know.\n\n### Should I Also Copy the `app.asar.unpacked` Directory?\nNo. These are excluded files that are not needed for the application. If you run\nthe commands above it should have been deleted.\n\n### I Want to Package and Make a Standalone Electron Application\nSee https://www.electronjs.org/docs/tutorial/application-distribution.\n\n### Do I Need `nodeIntegration`?\nNo. We are doing our spawn in `preload.js`. This file has almost complete access\nto the Node APIs.\n\n## License\nMIT, see [LICENSE](LICENSE) for details. The original project is licensed under\n`CC0 1.0 (Public Domain)`. I felt like the hamburglar after changing the\nlicense.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparsiya%2Fevil-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparsiya%2Fevil-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparsiya%2Fevil-electron/lists"}