{"id":13825930,"url":"https://github.com/nettitude/sharpsocks","last_synced_at":"2025-12-25T07:52:14.096Z","repository":{"id":38804079,"uuid":"110250003","full_name":"nettitude/SharpSocks","owner":"nettitude","description":"Tunnellable HTTP/HTTPS socks4a proxy written in C# and deployable via PowerShell","archived":false,"fork":false,"pushed_at":"2023-03-15T19:19:30.000Z","size":1156,"stargazers_count":472,"open_issues_count":2,"forks_count":85,"subscribers_count":62,"default_branch":"master","last_synced_at":"2024-10-26T13:22:47.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/nettitude.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}},"created_at":"2017-11-10T13:29:08.000Z","updated_at":"2024-10-18T09:31:22.000Z","dependencies_parsed_at":"2024-01-07T22:49:01.210Z","dependency_job_id":"e8b76e9c-8ffb-44fb-8e51-5c63f84dc29f","html_url":"https://github.com/nettitude/SharpSocks","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/nettitude%2FSharpSocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nettitude%2FSharpSocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nettitude%2FSharpSocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nettitude%2FSharpSocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nettitude","download_url":"https://codeload.github.com/nettitude/SharpSocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225470631,"owners_count":17479366,"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-08-04T09:01:29.361Z","updated_at":"2025-12-25T07:52:14.042Z","avatar_url":"https://github.com/nettitude.png","language":"C#","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"# SharpSocks\n\n![SharpSocksServer](https://github.com/nettitude/SharpSocks/actions/workflows/sharpsocks-server.yml/badge.svg)\n\nTunnellable HTTP/HTTPS socks4a proxy written in C#.\n\n## Usage\n\n### Server\n\n.NET Core Project with builds for Windows, Linux, and Docker support.\nOnce the implant side connects and establishes the tunnel, the SOCKS server open on the socks port (43334 by default.)\n\n```\nUsage:  [options]\n\nOptions:\n  -?|-h|--help         Show help information.\n  -s|--socksserveruri  IP:Port for SOCKS to listen on, default is *:43334\n  -c|--cmdid           Command Channel Identifier, needs to be shared with the server\n  -l|--httpserveruri   Uri to listen on, default is http://127.0.0.1:8081\n  -k|--encryptionkey   The encryption key used to secure comms\n  -sc|--sessioncookie  The name of the cookie to pass the session identifier\n  -pc|--payloadcookie  The name of the cookie to pass smaller requests through\n  -st|--socketTimeout  How long should SOCKS sockets be held open for, default is 30s\n  -v|--verbose         Verbose error logging\n  -p|--pfxpassword     Password to the PFX certificate if using HTTPS\n```\n\n### TLS\n\nIf using HTTPS you will want to replace SharpSocks.pfx with a new certificate, you do this manually or using `New-Cert.ps1`.\nThis will prompt you for a password for the PFX file which will need to be passed to SharpSocks with the `-p` option.\n\n### Client (Implant side)\n\n.NET 4.0 project for running on the target (such as in memory in a PoshC2 implant) which tunnels the traffic to the server.\n\n```\nSharpSocks Proxy Client\n=======================\n\n      --use-proxy            Use proxy server (for system proxy set this and\n                               leave -m blank)\n  -m, --proxy=VALUE          Proxy Url in format http://\u003cserver\u003e:\u003cport\u003e (use-\n                               proxy is implied)\n  -u, --username=VALUE       Web proxy username\n  -d, --domain=VALUE         Web proxy domain\n  -p, --password=VALUE       Web proxy password\n  -k, --encryption-key=VALUE The encryption key, leave blank to be asked\n  -c, --cmd-id=VALUE         Command Channel Id (required)\n  -b, --beacon=VALUE         Beacon time in (ms)\n  -s, --server-uri=VALUE     Uri of the server, default is http://127.0.-\n                               0.1:8081\n      --url1=VALUE           pages/2019/stats.php\n      --url2=VALUE           web/v10/2/admin.asp\n      --session-cookie=VALUE The name of the cookie to pass the session\n                               identifier\n      --payload-cookie=VALUE The name of the cookie to pass smaller requests\n                               through\n      --user-agent=VALUE     The User Agent to be sent in any web request\n      --df=VALUE             The actual Host header to be sent if using\n                               domain fronting\n  -h, -?, --help\n  -v, --verbose\n  -r, --read-time=VALUE      The time between SOCKS proxy reads, default 500ms\n  -a, --standalone           Standalone mode, do not return on the main thread\n```\n\n### Apache Rewrite Rule (C2 proxy)\n\nIf using a C2 proxy you can achieve TLS termination and route the traffic for the SOCKS URLs to the server running locally.\n```\nDefine SharpSocks 127.0.0.1:49031\nRewriteRule ^/sharpsocks1/(.*) http://${SharpSocks} [NC,L,P]\nRewriteRule ^/sharpsocks2/(.*) http://${SharpSocks} [NC,L,P]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnettitude%2Fsharpsocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnettitude%2Fsharpsocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnettitude%2Fsharpsocks/lists"}