{"id":30452128,"url":"https://github.com/peterdemin/reshell","last_synced_at":"2025-10-13T03:09:28.542Z","repository":{"id":57461421,"uuid":"90293254","full_name":"peterdemin/reshell","owner":"peterdemin","description":"Deployment debugging with hacker's tools.","archived":false,"fork":false,"pushed_at":"2024-07-24T04:06:18.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T18:20:52.643Z","etag":null,"topics":["continuous-deployment","debug","shell"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/peterdemin.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-04T17:57:30.000Z","updated_at":"2024-07-24T04:06:21.000Z","dependencies_parsed_at":"2025-08-23T17:18:08.419Z","dependency_job_id":"bc461932-e214-4d3c-91a7-84b2fe11e017","html_url":"https://github.com/peterdemin/reshell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peterdemin/reshell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdemin%2Freshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdemin%2Freshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdemin%2Freshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdemin%2Freshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterdemin","download_url":"https://codeload.github.com/peterdemin/reshell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdemin%2Freshell/sbom","scorecard":{"id":728780,"data":{"date":"2025-08-11","repo":{"name":"github.com/peterdemin/reshell","commit":"8d946f36e9e0f9121a5bcb3de7ba0f458d0cacb1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T13:46:30.395Z","repository_id":57461421,"created_at":"2025-08-22T13:46:30.395Z","updated_at":"2025-08-22T13:46:30.395Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014168,"owners_count":26085369,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["continuous-deployment","debug","shell"],"created_at":"2025-08-23T14:40:08.008Z","updated_at":"2025-10-13T03:09:28.526Z","avatar_url":"https://github.com/peterdemin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=================================\nreshell - Reverse shell in Python\n=================================\n\nDeployment debugging with hacker's tools.\n\nInstall\n-------\n\n.. code:: bash\n\n    pip install reshell\n\nUsage\n-----\n\nOn the host launch receiver with\n\n.. code:: bash\n\n    $ nc -lvp 12345\n\nOn destination host launch reverse shell:\n\n.. code:: bash\n\n    $ reshell 127.0.0.1:12345\n\n(or with env variable instead of argument):\n\n.. code:: bash\n\n    $ export RESHELL_TARGET=127.0.0.1:12345\n    $ reshell\n\nTeamCity Command Line Build Step:\n\n.. code:: bash\n\n    virtualenv .env\n    . .env/bin/activate\n    pip install reshell\n    reshell\n\nMake sure you add ``env.RESHELL_TARGET`` to Build Parameters.\n\n``reshell`` will try to connect to it's target every 10 seconds for 10 minutes.\nAfter 10 minutes it will exit.\n\nStart from Python\n-----------------\n\nStart reshell in a background daemon process:\n\n.. code:: python\n\n    from reshell import start_daemon\n    start_daemon('127.0.0.1:12345')\n\nTerminology\n-----------\n\nSince not all developers are familiar with hacker's technics,\nI'll briefly describe what is this all about.\n\nWhen you open terminal on your machine, it's **local** shell.\n\nWhen you run SSH to connect to remote machine, it's **remote** shell.\n\nWhen you listen on port on your machine and make remote machine to connect to you, it's **reverse** shell.\n\nEthics\n------\n\nThis tool is **not** usefull **for** actual **hacking**.\nSince you already have an ability to execute arbitrary code on remote machine,\nit won't buy anything in terms of access.\nYou just need a shell as an *arbitrary code*.\n\nReverse benefits\n----------------\n\nReverse shells have some advantages over remote shells:\n\n1. **Bypass firewall** - incoming connections are often blocked on unused ports.\n   Whereas outgoing connections are usually allowed.\n2. **More secure** - instead of inviting everyone to backdoor, reverse shell communicates with single host:port\n3. **Destination can be unknown** - even inaccessible.\n   It's the host machine that must be accessible from the destination.\n   Not the other way around.\n\nBackground (use case)\n---------------------\n\nImagine *crazy* environment.\nYou can deploy Python application to *cloudy* remote host and have it running.\nBut you don't have SSH access and can't debug it or see startup logs.\nAlso you don't know in advance what will be network address of the remote host.\n\nBut you have a dev machine in the same network, where you are free to run anything:\n\n1. So you launch server on dev machine and deploy reverse shell through regular deployment process.\n2. Once the application is deployed, it will connect to the server and turn itself into bash.\n3. ... You can poke around and figure out what's wrong ...\n4. PROFIT!\n\nBonus (Pro tips)\n----------------\n\n``nc`` is not the most convinient shell, you would want to use in day job.\nYou won't have access to shortcuts, such as up arrow, or Ctrl-P for previous command.\nIt doesn't expand tabs in-place, but does it after command is sent.\nFor example you could write:\n\n.. code:: console\n\n    $ ls /us\u003cTAB\u003eloc\u003cTAB\u003eli\n    ls /usr/local/lib\n\nSpecial caution should be taken when dealing with Keyboard Interrupt.\nIf you press ``Ctrl+C`` inside ``nc`` session, it will be caught by ``nc`` process\nitself and though will not be sent to remote machine.\nInstead you can place a signal trap for SIGINT before launching ``nc``:\n\n.. code:: console\n\n    $ trap '' INT\n    $ nc -lvp 12345\n\nTo send ``Ctrl+C`` to remote machine (to iterrupt current process)\nyou can use combination ``Ctrl+V Ctrl+C Return``. ``Ctrl+V`` says bash to send following symbol as-is,\nwithout processing it. ``Return`` is needed to actually send ``^C`` command.\n\nWhen finished, terminate remote session with:\n\n.. code:: console\n\n    $ exit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdemin%2Freshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdemin%2Freshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdemin%2Freshell/lists"}