MiniDump a process in memory with rust

Overview

safetydump

Rust in-memory MiniDump implementation.

Features

  • ntdll!NtGetNextProcess to obtain a handle for the desired ProcessId as opposed to kernel32!OpenProcess
  • Functions dynmaically resolved
  • Strings are obfuscated in lib.rs

This was written to integrate with the link command and control framework for dumping lsass remotely in memory.

Acknowledgments

@m0rv4i for the MinidumpCallbackRoutine implementation in SafetyDump.
@TheWover for NtGetNextProcess usage idea. It is also used in ProcessHacker.

You might also like...
An attempt to implement equivalent of C++ "P1478R1: Byte-wise atomic memcpy" in Rust

atomic-memcpy Byte-wise atomic memcpy. This is an attempt to implement equivalent of C++ "P1478R1: Byte-wise atomic memcpy" in Rust. This is expected

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process.

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process. More specifically, the crate disables core dumps and tries to disable tracing on unix-like OSes.

An experimental GUI for rust-minidump
An experimental GUI for rust-minidump

minidump-debugger An experimental GUI for rust-minidump based on egui. NOTE: if building from source on linux, you may need to install the packages eg

An experimental GUI for rust-minidump
An experimental GUI for rust-minidump

minidump-debugger An experimental GUI for rust-minidump based on egui. NOTE: if building from source on linux, you may need to install the packages eg

A Rust on-site channel benchmarking helper. Inter-Process (async / busy) & Intra-Process (async single threaded / async multi threaded)

On-Site Rust Channel Benchmarking Helper Deploy on server to determine which public crates are the fastest for communicating in different architecture

A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process.

mmap-rs A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process. This crate can be

Process killer daemon for out-of-memory scenarios

bustd: Available memory or bust! bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux! Features Small memory usage! bust

bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux!

bustd: Available memory or bust! bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux! Features Small memory usage! bust

A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

Memory usage monitor for process trees

gotta-watch-em-all Executes a process with given arguments and monitors, logs when memory usage grows to a new peak. Example: cargo run -- cargo -- bu

 A process memory reader and debugger for Windows (x86_64)
A process memory reader and debugger for Windows (x86_64)

Winreader Winreader is a process memory reader and debugger for Windows, implemented and developed in the Rust language, using the official Microsoft

A simple code that will load a shellcode directly into RAM memory in a new process
A simple code that will load a shellcode directly into RAM memory in a new process

「 🔄 」About RustSCLoader RustSCLoader is a simple code that has the intention of loading a shellcode directly into RAM memory in a new process that wi

A memory-based evasion technique which makes shellcode invisible from process start to end.
A memory-based evasion technique which makes shellcode invisible from process start to end.

phantom A memory-based evasion technique which makes shellcode invisible from process start to end. Motivation ShellGhost Offensive Edition, and rust!

A library that allows for the arbitrary inspection and manipulation of the memory and code of a process on a Linux system.
A library that allows for the arbitrary inspection and manipulation of the memory and code of a process on a Linux system.

raminspect raminspect is a crate that allows for the inspection and manipulation of the memory and code of a running process on a Linux system. It pro

Shared memory - A Rust wrapper around native shared memory for Linux and Windows

shared_memory A crate that allows you to share memory between processes. This crate provides lightweight wrappers around shared memory APIs in an OS a

memory-profiler — A memory profiler for Linux
memory-profiler — A memory profiler for Linux

A memory profiler for Linux Features Can be used to analyze memory leaks, see where exactly the memory is being consumed, identify temporary allocatio

Custom memory allocator that helps discover reads from uninitialized memory

libdiffuzz: security-oriented alternative to Memory Sanitizer This is a drop-in replacement for OS memory allocator that can be used to detect uses of

Custom memory allocator that helps discover reads from uninitialized memory

libdiffuzz: security-oriented alternative to Memory Sanitizer This is a drop-in replacement for OS memory allocator that can be used to detect uses of

Task runner and process manager for Rust
Task runner and process manager for Rust

Steward Task runner and process manager for Rust. If you're not happy managing your infrastructure with a pile of bash scripts, this crate might be he

Comments
  • Unresolved Imports

    Unresolved Imports

    Seems like this does not compile as is. I believe it is an issue with the Cargo.toml file missing some enabled features for the winapi crate, but I have not been able to resolve. Hoping you could take a look. Below is the error from cargo-check:

    cargo check Checking safetydump v0.1.0 (/home/cryptic/Red Team/Rust/safetydump) error[E0433]: failed to resolve: could not find shared in winapi --> src/lib.rs:6:5 | 6 | shared::{ | ^^^^^^ could not find shared in winapi

    error[E0433]: failed to resolve: could not find um in winapi --> src/lib.rs:22:5 | 22 | um::{ | ^^ could not find um in winapi

    error[E0433]: failed to resolve: could not find windows in os --> src/lib.rs:43:9 | 43 | os::windows::ffi::OsStrExt, | ^^^^^^^ could not find windows in os

    error[E0432]: unresolved import winapi::ctypes --> src/lib.rs:5:5 | 5 | ctypes::c_void, | ^^^^^^ could not find ctypes in winapi

    error[E0412]: cannot find type HMODULE in this scope --> src/lib.rs:49:31 | 49 | fn get_dll(dll_name: &str) -> HMODULE { | ^^^^^^^ not found in this scope

    error[E0425]: cannot find function, tuple struct or tuple variant LoadLibraryW in this scope --> src/lib.rs:50:27 | 50 | let handle = unsafe { LoadLibraryW(get_wide(dll_name).as_ptr()) }; | ^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type HMODULE in this scope --> src/lib.rs:57:16 | 57 | fn get_fn(dll: HMODULE, fn_name: &str) -> FARPROC { | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:57:43 | 57 | fn get_fn(dll: HMODULE, fn_name: &str) -> FARPROC { | ^^^^^^^ not found in this scope

    error[E0425]: cannot find function, tuple struct or tuple variant GetProcAddress in this scope --> src/lib.rs:58:25 | 58 | let func = unsafe { GetProcAddress(dll, fn_name.as_ptr() as _) }; | ^^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:66:48 | 66 | fn get_process_heap() -> Option<unsafe fn() -> HANDLE> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <HANDLE>

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:69:47 | 69 | Some(unsafe { std::mem::transmute(func as FARPROC) }) | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:72:37 | 72 | fn heap_alloc() -> Option<unsafe fn(HANDLE, DWORD, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <HANDLE>

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:72:45 | 72 | fn heap_alloc() -> Option<unsafe fn(HANDLE, DWORD, SIZE_T) -> LPVOID> { | - ^^^^^ not found in this scope | | | help: you might be missing a type parameter: <DWORD>

    error[E0412]: cannot find type SIZE_T in this scope --> src/lib.rs:72:52 | 72 | fn heap_alloc() -> Option<unsafe fn(HANDLE, DWORD, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <SIZE_T>

    error[E0412]: cannot find type LPVOID in this scope --> src/lib.rs:72:63 | 72 | fn heap_alloc() -> Option<unsafe fn(HANDLE, DWORD, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <LPVOID>

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:75:47 | 75 | Some(unsafe { std::mem::transmute(func as FARPROC) }) | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:78:39 | 78 | fn heap_realloc() -> Option<unsafe fn(HANDLE, DWORD, LPVOID, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <HANDLE>

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:78:47 | 78 | fn heap_realloc() -> Option<unsafe fn(HANDLE, DWORD, LPVOID, SIZE_T) -> LPVOID> { | - ^^^^^ not found in this scope | | | help: you might be missing a type parameter: <DWORD>

    error[E0412]: cannot find type LPVOID in this scope --> src/lib.rs:78:54 | 78 | fn heap_realloc() -> Option<unsafe fn(HANDLE, DWORD, LPVOID, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <LPVOID>

    error[E0412]: cannot find type SIZE_T in this scope --> src/lib.rs:78:62 | 78 | fn heap_realloc() -> Option<unsafe fn(HANDLE, DWORD, LPVOID, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <SIZE_T>

    error[E0412]: cannot find type LPVOID in this scope --> src/lib.rs:78:73 | 78 | fn heap_realloc() -> Option<unsafe fn(HANDLE, DWORD, LPVOID, SIZE_T) -> LPVOID> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <LPVOID>

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:81:47 | 81 | Some(unsafe { std::mem::transmute(func as FARPROC) }) | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:84:36 | 84 | fn heap_free() -> Option<unsafe fn(HANDLE, DWORD, LPVOID) -> bool> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <HANDLE>

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:84:44 | 84 | fn heap_free() -> Option<unsafe fn(HANDLE, DWORD, LPVOID) -> bool> { | - ^^^^^ not found in this scope | | | help: you might be missing a type parameter: <DWORD>

    error[E0412]: cannot find type LPVOID in this scope --> src/lib.rs:84:51 | 84 | fn heap_free() -> Option<unsafe fn(HANDLE, DWORD, LPVOID) -> bool> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <LPVOID>

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:87:47 | 87 | Some(unsafe { std::mem::transmute(func as FARPROC) }) | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:90:36 | 90 | fn heap_size() -> Option<unsafe fn(HANDLE, DWORD, LPCVOID) -> SIZE_T> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <HANDLE>

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:90:44 | 90 | fn heap_size() -> Option<unsafe fn(HANDLE, DWORD, LPCVOID) -> SIZE_T> { | - ^^^^^ not found in this scope | | | help: you might be missing a type parameter: <DWORD>

    error[E0412]: cannot find type LPCVOID in this scope --> src/lib.rs:90:51 | 90 | fn heap_size() -> Option<unsafe fn(HANDLE, DWORD, LPCVOID) -> SIZE_T> { | - ^^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <LPCVOID>

    error[E0412]: cannot find type SIZE_T in this scope --> src/lib.rs:90:63 | 90 | fn heap_size() -> Option<unsafe fn(HANDLE, DWORD, LPCVOID) -> SIZE_T> { | - ^^^^^^ not found in this scope | | | help: you might be missing a type parameter: <SIZE_T>

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:93:47 | 93 | Some(unsafe { std::mem::transmute(func as FARPROC) }) | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HRESULT in this scope --> src/lib.rs:130:13 | 130 | status: HRESULT | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:210:10 | 210 | ) -> HANDLE = unsafe { std::mem::transmute(gcp_func as FARPROC) }; | ^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:210:60 | 210 | ) -> HANDLE = unsafe { std::mem::transmute(gcp_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:213:9 | 213 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:214:9 | 214 | DWORD, | ^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:215:14 | 215 | *mut HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:216:58 | 216 | ) -> bool = unsafe { std::mem::transmute(opt_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type LPCWSTR in this scope --> src/lib.rs:219:9 | 219 | LPCWSTR, | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type LPCWSTR in this scope --> src/lib.rs:220:9 | 220 | LPCWSTR, | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type LUID in this scope --> src/lib.rs:221:14 | 221 | *mut LUID, | ^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:222:59 | 222 | ) -> bool = unsafe { std::mem::transmute(lpvw_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:225:9 | 225 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type BOOL in this scope --> src/lib.rs:226:9 | 226 | BOOL, | ^^^^ help: a builtin type with a similar name exists: bool

    error[E0412]: cannot find type PTOKEN_PRIVILEGES in this scope --> src/lib.rs:227:9 | 227 | PTOKEN_PRIVILEGES, | ^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:228:9 | 228 | DWORD, | ^^^^^ not found in this scope

    error[E0412]: cannot find type PTOKEN_PRIVILEGES in this scope --> src/lib.rs:229:9 | 229 | PTOKEN_PRIVILEGES, | ^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type PDWORD in this scope --> src/lib.rs:230:9 | 230 | PDWORD, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:231:58 | 231 | ) -> bool = unsafe { std::mem::transmute(atp_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:234:10 | 234 | ) -> DWORD = unsafe { std::mem::transmute(gle_func as FARPROC) }; | ^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:234:59 | 234 | ) -> DWORD = unsafe { std::mem::transmute(gle_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:237:9 | 237 | HANDLE | ^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:238:57 | 238 | ) -> bool = unsafe { std::mem::transmute(ch_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:241:22 | 241 | let mut h_token: HANDLE = 0 as _; | ^^^^^^ not found in this scope

    error[E0425]: cannot find value TOKEN_ADJUST_PRIVILEGES in this scope --> src/lib.rs:244:9 | 244 | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value TOKEN_QUERY in this scope --> src/lib.rs:244:35 | 244 | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, | ^^^^^^^^^^^ not found in this scope

    error[E0422]: cannot find struct, variant or union type LUID_AND_ATTRIBUTES in this scope --> src/lib.rs:249:17 | 249 | let privs = LUID_AND_ATTRIBUTES { | ^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0422]: cannot find struct, variant or union type LUID in this scope --> src/lib.rs:250:15 | 250 | Luid: LUID { | ^^^^ not found in this scope

    error[E0425]: cannot find value SE_PRIVILEGE_ENABLED in this scope --> src/lib.rs:254:21 | 254 | Attributes: SE_PRIVILEGE_ENABLED, | ^^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0422]: cannot find struct, variant or union type TOKEN_PRIVILEGES in this scope --> src/lib.rs:256:18 | 256 | let mut tp = TOKEN_PRIVILEGES { | ^^^^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value SE_DEBUG_NAME in this scope --> src/lib.rs:262:18 | 262 | get_wide(SE_DEBUG_NAME).as_mut_ptr(), | ^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type TOKEN_PRIVILEGES in this scope --> src/lib.rs:272:19 | 197 | fn enable_sedebug() -> bool { | - help: you might be missing a type parameter: <TOKEN_PRIVILEGES> ... 272 | size_of::<TOKEN_PRIVILEGES>() as _, | ^^^^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value ERROR_NOT_ALL_ASSIGNED in this scope --> src/lib.rs:278:36 | 278 | if unsafe{ GetLastError() } == ERROR_NOT_ALL_ASSIGNED { | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value S_FALSE in this scope --> src/lib.rs:289:37 | 289 | callbackOutput.status = S_FALSE; | ^^^^^^^ not found in this scope

    error[E0425]: cannot find value S_OK in this scope --> src/lib.rs:293:37 | 293 | callbackOutput.status = S_OK; | ^^^^ not found in this scope

    error[E0412]: cannot find type DWORD_PTR in this scope --> src/lib.rs:322:40 | 322 | let destination = (*buf as DWORD_PTR + callbackInput.io.offset as DWORD_PTR) as LPVOID; | ^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD_PTR in this scope --> src/lib.rs:322:79 | 322 | let destination = (*buf as DWORD_PTR + callbackInput.io.offset as DWORD_PTR) as LPVOID; | ^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type LPVOID in this scope --> src/lib.rs:322:93 | 322 | let destination = (*buf as DWORD_PTR + callbackInput.io.offset as DWORD_PTR) as LPVOID; | ^^^^^^ not found in this scope

    error[E0425]: cannot find function, tuple struct or tuple variant RtlCopyMemory in this scope --> src/lib.rs:324:17 | 324 | RtlCopyMemory( | ^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value S_OK in this scope --> src/lib.rs:333:37 | 333 | callbackOutput.status = S_OK; | ^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:367:9 | 367 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:368:9 | 368 | DWORD, | ^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:369:9 | 369 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:374:59 | 374 | ) -> bool = unsafe { std::mem::transmute(mdwd_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HMODULE in this scope --> src/lib.rs:377:9 | 377 | HMODULE, | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:378:62 | 378 | ) -> bool = unsafe { std::mem::transmute(freelib_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:381:9 | 381 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type ACCESS_MASK in this scope --> src/lib.rs:382:9 | 382 | ACCESS_MASK, | ^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:385:14 | 385 | *mut HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type NTSTATUS in this scope --> src/lib.rs:386:10 | 386 | ) -> NTSTATUS = unsafe { std::mem::transmute(getnext_func as FARPROC) }; | ^^^^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:386:66 | 386 | ) -> NTSTATUS = unsafe { std::mem::transmute(getnext_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:389:9 | 389 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type HMODULE in this scope --> src/lib.rs:390:9 | 390 | HMODULE, | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:392:9 | 392 | DWORD, | ^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:393:10 | 393 | ) -> DWORD = unsafe { std::mem::transmute(getfilename_func as FARPROC) }; | ^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:393:67 | 393 | ) -> DWORD = unsafe { std::mem::transmute(getfilename_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:396:9 | 396 | HANDLE | ^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:397:10 | 397 | ) -> DWORD = unsafe { std::mem::transmute(getpid_func as FARPROC) }; | ^^^^^ not found in this scope

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:397:62 | 397 | ) -> DWORD = unsafe { std::mem::transmute(getpid_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:400:9 | 400 | HANDLE, | ^^^^^^ not found in this scope

    error[E0412]: cannot find type PPROCESS_MEMORY_COUNTERS in this scope --> src/lib.rs:401:9 | 401 | PPROCESS_MEMORY_COUNTERS, | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:402:9 | 402 | DWORD, | ^^^^^ not found in this scope

    error[E0412]: cannot find type BOOL in this scope --> src/lib.rs:403:10 | 403 | ) -> BOOL = unsafe { std::mem::transmute(getmeminfo_func as FARPROC) }; | ^^^^ help: a builtin type with a similar name exists: bool

    error[E0412]: cannot find type FARPROC in this scope --> src/lib.rs:403:65 | 403 | ) -> BOOL = unsafe { std::mem::transmute(getmeminfo_func as FARPROC) }; | ^^^^^^^ not found in this scope

    error[E0412]: cannot find type HANDLE in this scope --> src/lib.rs:406:21 | 406 | let mut handle: HANDLE = 0 as _; | ^^^^^^ not found in this scope

    error[E0425]: cannot find value MAXIMUM_ALLOWED in this scope --> src/lib.rs:410:9 | 410 | MAXIMUM_ALLOWED, | ^^^^^^^^^^^^^^^ not found in this scope

    error[E0425]: cannot find value MAX_PATH in this scope --> src/lib.rs:415:27 | 415 | let mut buf = [0; MAX_PATH]; | ^^^^^^^^ not found in this scope

    error[E0425]: cannot find value MAX_PATH in this scope --> src/lib.rs:420:13 | 420 | MAX_PATH as _, | ^^^^^^^^ not found in this scope

    error[E0425]: cannot find value MAX_PATH in this scope --> src/lib.rs:422:55 | 422 | let buf_str = String::from_utf16_lossy(&buf[..MAX_PATH]); | ^^^^^^^^ not found in this scope

    error[E0412]: cannot find type PROCESS_MEMORY_COUNTERS in this scope --> src/lib.rs:447:33 | 342 | pub fn in_memory_dump(args: Vec<&str>) -> String { | - help: you might be missing a type parameter: <PROCESS_MEMORY_COUNTERS> ... 447 | let mut pmc = MaybeUninit::<PROCESS_MEMORY_COUNTERS>::uninit(); | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

    error[E0412]: cannot find type DWORD in this scope --> src/lib.rs:451:30 | 451 | size_of_val(&pmc) as DWORD | ^^^^^ not found in this scope

    error[E0425]: cannot find value HEAP_ZERO_MEMORY in this scope --> src/lib.rs:465:9 | 465 | HEAP_ZERO_MEMORY, | ^^^^^^^^^^^^^^^^ not found in this scope

    error[E0599]: no method named encode_wide found for reference &OsStr in the current scope --> src/lib.rs:194:19 | 194 | OsStr::new(s).encode_wide().chain(std::iter::once(0)).collect() | ^^^^^^^^^^^ method not found in &OsStr

    Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0433, E0599. For more information about an error, try rustc --explain E0412. error: could not compile safetydump due to 103 previous errors

    opened by ghost 2
Owner
null
Rust library to interract with memory written in rust

memory-rs Rust library to interract with memory written in rust It comes with: Pattern scanner (Return address for a pattern given). A pattern example

Alex 1 Jan 13, 2022
Cross-platform library for reading/writing memory in other processes for Rust

vmemory Rust library for reading/writing memory in other processes for Windows, macOS, Linux, and in the future potentially, BSD variants. Rationale A

Jason Johnson 26 Nov 7, 2022
memory-mapped registers for x86_64 systems

regmap some well-known and known-to-be-good computer architectures, such as the Microchip PIC product line, or many of the AVR processor family, were

iximeow 31 Dec 6, 2022
A comprehensive memory scanning library

scanflow boasts a feature set similar to the likes of CheatEngine, with a simple command line interface. Utilizing memflow, scanflow works in a wide range of situations - from virtual machines, to dedicated DMA hardware.

memflow 38 Dec 30, 2022
In-memory, non stateful and session based code sharing application.

interviewer In-memory, non stateful and session based code sharing application. Test it here: interviewer.taras.lol Note: it's deployed to render auto

2pac 7 Aug 16, 2021
A memory efficient syntax tree for language developers

This crate provides a tree structure which always is contiguously stored and manipulated in memory. It provides similar APIs as rowan and is intended to be an efficient replacement for it (read more below).

John-John Tedro 21 Dec 15, 2022
bevy_datasize is a library for tracking memory usage in Bevy apps.

bevy_datasize bevy_datasize is a library for tracking memory usage in Bevy apps. bevy_datasize uses the DataSize trait from the datasize crate to esti

Ben Reeves 4 Mar 8, 2022
Compile-time checked Builder pattern derive macro with zero-memory overhead

Compile-time checked Builder pattern derive macro with zero-memory overhead This is very much a work-in-progress. PRs welcome to bring this to product

Esteban Kuber 214 Dec 29, 2022
Memory hacking library for windows

Memory hacking library for windows

Sara Wahib 4 Apr 11, 2022
Benchmarking manual implementation of memcpy in Rust

Manual memcpy Benchmark Benchmarks that compare copying data between two Vec<u8>s using std::slice::copy_from_slice and a loop that copies one byte at

Adam Bratschi-Kaye 0 Feb 2, 2022