Skip to content

Commit

Permalink
update IronPython, skip obfuscation of Python Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
checkymander committed Jan 22, 2025
1 parent d6f918c commit c203619
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Payload_Type/athena/.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ENV DOTNET_ROOT="/root/.dotnet/"
RUN chmod +x ./dotnet-install.sh
RUN ./dotnet-install.sh --version 8.0.403
#For ARM64
RUN ./dotnet-install.sh --version 6.0.425
# RUN ./dotnet-install.sh --version 6.0.425
RUN dotnet tool install Obfuscar.GlobalTool -g

# Add Donut with ARM64 support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<Configurations>Debug;Release;LocalDebugGitHub;LocalDebugHttp;LocalDebugWebsocket;LocalDebugSmb;LocalDebugDiscord</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IronPython" Version="3.4.1" />
<PackageReference Include="IronPython" Version="3.4.2" />
</ItemGroup>

<!-- Obfuscation Replacement Placeholder Do Not Remove -->
<ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Agent.Models\Agent.Models.csproj" />
</ItemGroup>

Expand Down
5 changes: 4 additions & 1 deletion Payload_Type/athena/athena/agent_code/build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def create_obfuscar_xml(plugin_name, config, project_dir, rid):
in_path = get_interim_build_path(plugin_name, config, project_dir, rid)
out_path = get_obfuscated_build_path(plugin_name, config, project_dir, rid)
plugin_path = os.path.join(get_interim_build_path(plugin_name, config, project_dir, rid), plugin_name + ".dll")

obfuscar_xml_content = f'''<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value="{in_path}" />
Expand All @@ -34,6 +33,7 @@ def create_obfuscar_xml(plugin_name, config, project_dir, rid):
<Var name="SuppressIldasm" value="true" />
<Module file="{plugin_path}" />
<AssemblySearchPath path="{assembly_search_path}" />
<SkipNamespace name="Microsoft.Scripting" />
</Obfuscator>'''
obfuscar_path = get_obfuscar_xml_path(plugin_name, project_dir)
# Write obfuscar.xml to the specified path if it doesn't exist
Expand Down Expand Up @@ -128,6 +128,9 @@ def main():
else:
rid = None

if plugin_name == "Agent.Managers.Python":
return

# Create default obfuscar.xml
create_obfuscar_xml(plugin_name, configuration, project_dir, rid)

Expand Down

0 comments on commit c203619

Please sign in to comment.