rasta-mouse / sharpc2 Goto Github PK
View Code? Open in Web Editor NEWCommand and Control Framework written in C#
Home Page: https://sharpc2.readthedocs.io/en/latest/
License: GNU General Public License v3.0
Command and Control Framework written in C#
Home Page: https://sharpc2.readthedocs.io/en/latest/
License: GNU General Public License v3.0
/usr/share/dotnet/sdk/7.0.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: maui-tizen [/root/SharpC2/Client/Client.csproj]
/usr/share/dotnet/sdk/7.0.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/root/SharpC2/Client/Client.csproj]
I use the command to run the teamserver on ubuntu.
sudo ./teamserver 172.16.12.13 kitty123
But run error.
./teamserver: 1: Syntax error: "(" unexpected
When the ps and ls commands are executed, a list will be displayed. When you select a word in the list with the mouse and try to copy it, the selected part will change, making it impossible to select the desired word. Please fix this bug, or give an option to copy to the clipboard when clicking a certain part. Thanks alot!
Please add exfiltration capabilities
logging hosted file download
limiting download rate
Exe and ps1 are working fine, but when I generated a payload for a DLL and try loading it with Assembly.Load
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'drone, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. This assembly was compiled for a different processor.
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, Boolean fSkipIntegrityCheck, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly)
at AssemblyLoader.Program.Main()
If target X86 with my assembly loader and recompile i get the same error, if I specify x64 I get this one:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'drone, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) ---> System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, Boolean fSkipIntegrityCheck, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly)
at AssemblyLoader.Program.Main()
Any help would be appreciated
/root/SharpC2/TeamServer/TeamServer.csproj : error NU1101: Unable to find package DonutCore. No packages exist with this id in source(s): nuget.org
Failed to restore /root/SharpC2/TeamServer/TeamServer.csproj (in 7.24 min)
TeamServer.csproj : error NU1101: Package DonutCore not found. A package with this ID does not exist in source nuget.org
Issue when ls command is tasked, and status is aborted there is an error.
result from task is: The path is not of a legal form.
so it can't be Deserialize to an object DirectoryEntry
I am attempting to use v1.2.0 of SharpC2. I installed the client app successfully on my Windows 10 VM following the additional instructions from https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/publish-cli?view=net-maui-6.0. I use a Kali VM for the Teamserver.
However I get "Unhandled exception" even before I can configure a listener for the beacon/drone. I am able to setup a SMB listener though. Not sure why it fails to allow me to setup a HTTP/HTTPs listener. Clicking on Reload and attempting again gives the same error. Screenshot and version details attached
On a side note when i start the Teamserver I get no confirmation of the certificate hash either. But I do get a prompt when i connect from the client.
Now, webhook only supports "User Authentication" and "Web Log", I would really appreciate it if you can add a webhook when a new drone adds to the server(“got a new fish”)
Hi @rasta-mouse - thanks again for this great project.
I have a strange error when using Execute-Assembly. For most assemblies it works fine, but for one in particular (https://github.com/GhostPack/Seatbelt) the code in TransactedAssembly.cs here
public Assembly Load(byte[] assemblyBytes)
{
_assemblyName = ParseArray(assemblyBytes);
returns 's15_0' for _assemblyName instead of the expected 'SeatBelt.exe' (if I build with 'Debugging Information = 'None' then the ParseArray method fails completely as the string pointer is never found and Array.Copy throws an exception on an unaligned copy).
Thinking that I was building it wrong, I tried a pre-built version from https://github.com/Flangvik/SharpCollection and had the same error (with the _assemblyName = 'alue>b__2_0')
The workaround is to avoid ParseArray in this case and overload the Load() method to take the name of assembly you upload and then it's all sweet. But I have no idea what's special about SeatBelt which produces such an assembly.
Anyway, thanks again.
Cheers, Tim
Hi @rasta-mouse ,
Do you know where we can find the latest doco on SharpC2 ? The readthedocs link points to https://sharpc2.readthedocs.io/en/latest/ which is "a Python library for cooks and food lovers that creates recipes mixing random ingredients". While that sounds interesting (and delicious!) I'd love to be able to find more detailed information about SharpC2.
Cheers, Tim
i don't know what is the issue really i tried to debug it and no luck
i create External handler with port 7878 in teamserver and run demo-controller and run demo-client and wait the drone connected to teamserver but when i send task it's marked as TASKED but the problem is when data come to drone
as shown in picture data incorrect I dont know where is problem maybe in client or controller but everything seems fine
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.