Offensive Security Techniques Repo: RustRedOps
Reading Time: 2 Minutes
RustRedOps
RustRedOps by joaoviictorti is a repository dedicated to gathering and sharing various tools, projects, advanced techniques and offensive malware related to Red Team operations, with a specific focus on the Rust programming language. It can help penetration testers who want to perform security assessments and intrusion tests.
See Also: A Practical Guide to Hacking Techniques for finding Top Bugs.
The Bug Bounty Hunting Course
Contents
The repository is organized into several projects, each with its own purpose and functionality. Here are some examples of the projects included:
- This project exploits the Asynchronous Code Injection (APC) technique to execute malicious code in target processes.
- It focuses on a variation of APC injection, executing code before the main process starts.
- This project addresses the direct execution of malicious payloads in a system’s local environment.
- Exploits the technique of masking or altering the arguments of a process to hide malicious activity.
- It focuses on injecting dynamic link libraries (DLL) into running processes to execute malicious code.
- It exploits shellcode injection directly into running processes to control or execute malicious tasks.
- This project deals with hijacking the threads of processes running on the local system to execute malicious code.
- It addresses the hijacking of threads in remote system processes to carry out malicious actions.
Local Function Stomping Injection
- It focuses on replacing locally running functions with malicious code, changing their default behavior.
Remote Function Stomping Injection
- It exploits the substitution of functions in remote systems to carry out malicious activities.
- Performing malicious code injection via memory mapping into local processes.
- Performing malicious code injection via memory mapping into remote processes.
- Dumping the lsass.exe process.
- Writing and reading shellcode to the Windows Registry.
- Demonstration on API hooking which is a programming technique that allows you to intercept and manipulate calls to Windows API functions.
- Encrypting / Decrypting a shellcode using AES.
- Encrypting / Decrypting a shellcode using RC4.
- Creating string hashes to perform hiding.
- Techniques Anti-Debugging.
Local Payload Execution (Linux)
- This project deals with the direct execution of malicious payloads in the local environment of a system in which we focus on linux.
- This project focuses on the injection attack in the local process, but using syscalls directly.
- Techniques Anti-Analysis.
- It focuses on removing the CRT (C Runtime Library) from the binary.
- Retrieving shellcode from HTTP requests using Rust.
- Enumerating processes with Rust.
- IAT obfuscation by replacing GetProcAddress and GetModuleHandle.
- It’s a project to demonstrate how to create a simple driver using rust.
- It’s a project to demonstrate how to create dll using rust.
- Running WMI (Windows Management Instrumentation) queries.
- Enabling all privilege tokens.
- Demonstrating the PPID Spoofing technique.
- Demonstration of shellcode execution via callback.
- Controlling payload execution through Mutex, Events and Semaphores.
- The code is focused on parsing the PE header of any Windows executable file.
- Avoiding the loading of DLLS not signed by Microsoft.
- Running commands with Rust.
- Storing a shellcode in the .text section and then executing it.
- Running shellcode using Fibers.
- Shellcode obfuscation using IPV4, IPV6, MAC and UUIDs.
- Running shellcode through WebAssembly.
- Extracting WIFI passwords using winapis is a customized form of the netsh command.
- Technique for deleting the running binary.
- This is just a simple demonstration in case you want to include metadata in your Rust binary or change the associated icon.
- Running NTDLL Unhooking through a suspended process.
See Also: Offensive Security Tool: Headerpwn
Resources
- Each individual project can include a features section that details the project’s main features and functionalities.
- You can view the installation instructions, usage and examples for each project in their respective directories.
Requirements
- Rust: Rust is a modern and secure programming language used to develop the tools in this repository.
- Cargo: Cargo is Rust’s package manager and compiler, essential for compiling and running projects.
Compile
Compiling the Project
To start the compilation, use the following command:
cargo build --release
Adding Destination Architectures
If you are using a different operating system or need to compile for a specific architecture, you can list all available target architectures with the following command:
rustup target list
Once you have identified the desired target architecture, add it using rustup:
rustup target add <arch>
Replace with the desired architecture, such as x86_64-pc-windows-gnu.
Compiling for a Specific Architecture
Then compile the project for the specific architecture:
cargo build --release --target <arch>
How to get started
Follow these steps to start using the projects in this repository:
- Clone this repository on your local machine:
git clone https://github.com/joaoviictorti/RustRedOps.git
2. Navigate to the directory of the project you are interested in:
cd RustRedOps/ <name-project>
3. Follow the project-specific installation and usage instructions as described in the README inside this directory.
Clone the repo from here: GitHub Link