Skip to content

Commit

Permalink
Merge new-features branch into main (#82)
Browse files Browse the repository at this point in the history
* All the changes
  • Loading branch information
checkymander authored Dec 11, 2024
1 parent 8bae981 commit c01f866
Show file tree
Hide file tree
Showing 409 changed files with 11,098 additions and 7,590 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/.vs
/Payload_Type/athena/mythic/agent_functions/.idea
/documentation-payload/Athena/.idea

.venv/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
Expand Down Expand Up @@ -410,4 +410,8 @@ FodyWeavers.xsd
*.sln.iml

# Automated obfuscar files
obfuscar.xml
obfuscar.xml

# COFF
*.o
*.bin
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022, Dwight Hohnstein
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 changes: 15 additions & 7 deletions Payload_Type/athena/.docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM python:3.11-slim-bookworm
FROM ubuntu:24.04

ARG DONUT_URL=https://github.com/MEhrn00/donut/releases/download/v2.0.0/donut_shellcode-2.0.0.tar.gz
#ARG DONUT_URL=https://github.com/MEhrn00/donut/releases/download/v2.0.0/donut_shellcode-2.0.0.tar.gz
ARG DOTNET_URL=https://dot.net/v1/dotnet-install.sh

RUN mkdir /Mythic/
WORKDIR /Mythic/

RUN apt-get -y update && apt-get -y upgrade
Expand All @@ -23,23 +23,30 @@ RUN apt-get install --no-install-recommends -y \
libssl-dev \
make \
protobuf-compiler \
python3.12-dev \
python3-pip \
software-properties-common \
tk-dev \
wget \
xz-utils \
tar \
zlib1g-dev
WORKDIR /Mythic/

# Install requirements for the project
RUN python3 -m pip install pycryptodome mythic-container pefile py2app

RUN python3 -m pip install pycryptodome mythic-container pefile py2app --break-system-packages
#COPY dotnet-sdk-8.0.112-ubuntu.24.04-x64.tar.gz /dotnet-sdk-8.0.112-ubuntu.24.04-x64.tar.gz
#RUN wget https://github.com/checkymander/dotnet/releases/download/v8.0.11/dotnet-sdk-8.0.112-ubuntu.24.04-x64.tar.gz -O /dotnet-sdk-8.0.112-ubuntu.24.04-x64.tar.gz
#RUN mkdir /root/.dotnet/
#RUN tar zxf /dotnet-sdk-8.0.112-ubuntu.24.04-x64.tar.gz -C /root/.dotnet/
# RUN python3 -m pip install --no-cache /wheels/*
RUN wget ${DOTNET_URL} -O dotnet-install.sh
ENV PATH="${PATH}:/root/.dotnet/"
ENV PATH="${PATH}:/root/.dotnet/tools"
ENV DOTNET_ROOT="/root/.dotnet/"

RUN chmod +x ./dotnet-install.sh
RUN ./dotnet-install.sh --version 7.0.115
RUN ./dotnet-install.sh --version 8.0.403
#For ARM64
RUN ./dotnet-install.sh --version 6.0.425
RUN dotnet tool install Obfuscar.GlobalTool -g
Expand All @@ -49,7 +56,8 @@ RUN dotnet tool install Obfuscar.GlobalTool -g
# RUN wget -qO- ${DONUT_URL} | tar xvz -C /tmp/donut/
# RUN cd /tmp/donut/donut_shellcode-2.0.0/ && make && cp donut /
# RUN rm -rf /tmp/donut
RUN python3 -m pip install git+https://github.com/MEhrn00/[email protected]
RUN python3 -m pip install git+https://github.com/MEhrn00/[email protected] --break-system-packages
COPY [".", "."]


CMD ["python3", "/Mythic/main.py"]
7 changes: 7 additions & 0 deletions Payload_Type/athena/agent.obfs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Target Name="Obfuscate" AfterTargets="AfterCompile" Condition="'$(Obfuscate)' == 'True' And '$(Configuration)' == 'Release'">
<Message Text="============Obfuscating Plugin===============" Importance="high" />
<Exec Command="python ../build_utils.py $(ProjectName) '$(SolutionDir)' $(Configuration) $(RuntimeIdentifier)" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(ProjectDir)$(IntermediateOutputPath)" Condition="'$(PluginsOnly)' == 'False' or '$(PluginsOnly)' == ''" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(SolutionDir)bin\" Condition="'$(PluginsOnly)' == 'True'" />
<Message Text="============Completed Obfuscating Plugin===============" Importance="high" />
</Target>
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;LocalDebug;LocalDebugHttp;LocalDebugWebsocket;LocalDebugDiscord</Configurations>
<Configurations>Debug;Release;LocalDebugGitHub;LocalDebugHttp;LocalDebugWebsocket;LocalDebugSmb;LocalDebugDiscord</Configurations>
</PropertyGroup>
<Target Name="Obfuscate" AfterTargets="AfterCompile" Condition="'$(Obfuscate)' == 'True' And '$(Configuration)' == 'Release'">
<Message Text="============Obfuscating Plugin===============" Importance="high" />
<Exec Command="python ../build_utils.py $(ProjectName) '$(SolutionDir)' $(Configuration)" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(ProjectDir)$(IntermediateOutputPath)" Condition="'$(PluginsOnly)' == 'False' or '$(PluginsOnly)' == ''" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(SolutionDir)bin\" Condition="'$(PluginsOnly)' == 'True'" />
<Message Text="============Completed Obfuscating Plugin===============" Importance="high" />
</Target>
<!-- Obfuscation Replacement Placeholder Do Not Remove -->
<ItemGroup>
<ProjectReference Include="..\Agent.Models\Agent.Models.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;LocalDebug;LocalDebugHttp;LocalDebugWebsocket;LocalDebugDiscord</Configurations>
<Configurations>Debug;Release;LocalDebug;LocalDebugHttp;LocalDebugWebsocket;LocalDebugDiscord;LocalDebugGithub;LocalDebugSmb</Configurations>
</PropertyGroup>
<!-- ToDo: These are unable to be obfuscated at the moment. -->
<Target Name="Obfuscate" AfterTargets="AfterCompile" Condition="'$(Obfuscate)' == 'True' And '$(Configuration)' == 'Release'">
<Message Text="============Obfuscating Plugin===============" Importance="high" />
<Exec Command="python ../build_utils.py $(ProjectName) '$(SolutionDir)' $(Configuration)" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(ProjectDir)$(IntermediateOutputPath)" Condition="'$(PluginsOnly)' == 'False' or '$(PluginsOnly)' == ''" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(SolutionDir)bin\" Condition="'$(PluginsOnly)' == 'True'" />
<Message Text="============Completed Obfuscating Plugin===============" Importance="high" />
</Target>
<!-- Obfuscation Replacement Placeholder Do Not Remove -->
<ItemGroup>
<ProjectReference Include="..\Agent.Models\Agent.Models.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;LocalDebug;LocalDebugHttp;LocalDebugWebsocket;LocalDebugDiscord</Configurations>
<Configurations>Debug;Release;LocalDebugGitHub;LocalDebugHttp;LocalDebugWebsocket;LocalDebugSmb;LocalDebugDiscord</Configurations>
</PropertyGroup>
<Target Name="Obfuscate" AfterTargets="AfterCompile" Condition="'$(Obfuscate)' == 'True' And '$(Configuration)' == 'Release'">
<Message Text="============Obfuscating Plugin===============" Importance="high" />
<Exec Command="python ../build_utils.py $(ProjectName) '$(SolutionDir)' $(Configuration)" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(ProjectDir)$(IntermediateOutputPath)" Condition="'$(PluginsOnly)' == 'False' or '$(PluginsOnly)' == ''" />
<Copy SourceFiles="$(ProjectDir)$(IntermediateOutputPath)Obfuscated\$(TargetFileName)" DestinationFolder="$(SolutionDir)bin\" Condition="'$(PluginsOnly)' == 'True'" />
<Message Text="============Completed Obfuscating Plugin===============" Importance="high" />
</Target>
<!-- Obfuscation Replacement Placeholder Do Not Remove -->
<ItemGroup>
<ProjectReference Include="..\Agent.Models\Agent.Models.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Agent.Models;
using Agent.Utilities;

namespace Agent.Utlities
namespace Agent.Utilities
{
public class ProcessSpawner : ISpawner
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;LocalDebugSmb</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IronPython" Version="3.4.1" />
</ItemGroup>
<!-- Obfuscation Replacement Placeholder Do Not Remove -->
<ItemGroup>
<ProjectReference Include="..\Agent.Models\Agent.Models.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit c01f866

Please sign in to comment.