{"id":13464684,"url":"https://github.com/EmpireProject/EmPyre","last_synced_at":"2025-03-25T11:32:04.338Z","repository":{"id":74155970,"uuid":"52812449","full_name":"EmpireProject/EmPyre","owner":"EmpireProject","description":"A post-exploitation OS X/Linux agent written in Python 2.7","archived":true,"fork":false,"pushed_at":"2017-08-24T00:08:41.000Z","size":729,"stargazers_count":870,"open_issues_count":7,"forks_count":202,"subscribers_count":82,"default_branch":"master","last_synced_at":"2025-03-25T01:42:25.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmpireProject.png","metadata":{"files":{"readme":"README.md","changelog":"changelog","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-02-29T18:12:10.000Z","updated_at":"2025-03-12T15:07:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"88da6b61-2917-41d1-92d2-a654e4e7651c","html_url":"https://github.com/EmpireProject/EmPyre","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/EmpireProject%2FEmPyre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmpireProject%2FEmPyre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmpireProject%2FEmPyre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmpireProject%2FEmPyre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmpireProject","download_url":"https://codeload.github.com/EmpireProject/EmPyre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245454121,"owners_count":20617984,"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":"2024-07-31T14:00:48.614Z","updated_at":"2025-03-25T11:31:59.323Z","avatar_url":"https://github.com/EmpireProject.png","language":"Python","readme":"#EmPyre\n\nEmPyre is a pure Python post-exploitation agent built on cryptologically-secure communications and a flexible architecture. It is based heavily on the controller and communication structure of Empire.\n\nThe Diffie Hellman implementation is from Mark Loiseau's project [here](https://github.com/lowazo/pyDHE), licensed under version 3.0 of the GNU General Public License.\n\nThe AES implementation is adapted from Richard Moore's project [here](https://github.com/ricmoo/pyaes), licensed under the MIT license.\n\nThe initial Python launcher code is inspired from MSF's Python Meterpreter launcher [here](https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/core/payload/python/reverse_http.rb), licensed under the BSD-3-clause license.\n\nThe collection/osx/keylogger module was originally written by joev [here](https://github.com/gojhonny/metasploit-framework/blob/master/modules/post/osx/capture/keylog_recorder.rb) and licensed under the MSF_LICENSE/BSD 3-clause license.\n\n\n## Key negotiation\n\n\n* KEYs = staging key, set per server (used for RC4 and initial AES comms)\n* KEYn = the DH-EKE negotiated key\n* PUBc = the client-generated DH public key\n* PUBs = the server-generated DH public key\n\nThe process is as follows:\n\n1. client runs launcher.py that GETs stager.py from /stage0\n    launcher.py implements a minimized RC4 decoding stub and negotiation key\n\n2. server returns RC4(KEYs, stager.py) (key negotiation stager)\n    stager.py contains minimized DH and AES\n\n3. client generates DH key PUBc, and POSTs HMAC(AES(KEYs, PUBc)) posts to /stage1\n    server generates a new DH key on each check in\n\n4. server returns HMAC(AES(KEYs, nonce+PUBs))\n    client calculates shared DH key KEYn\n\n5. client POSTs HMAC(AES(KEYn, [nonce+1]+sysinfo) to /stage2\n\n6. server returns HMAC(AES(KEYn, patched agent.py))\n\n7. client sleeps on interval, and then GETs /tasking.uri\n\n8. if no tasking, return standard looking page\n\n9. if tasking, server returns HMAC(AES(KEYn, tasking))\n\n10. client posts HMAC(AES(KEYn, tasking)) to /response.uri\n\nEmPyre Tracker:\nhttps://trello.com/b/NASrG4IW/empyre\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmpireProject%2FEmPyre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmpireProject%2FEmPyre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmpireProject%2FEmPyre/lists"}