pub enum WraithError {
Show 52 variants
UnsupportedWindowsVersion {
major: u32,
minor: u32,
build: u32,
},
UnsupportedArchitecture,
InvalidPebAccess,
InvalidTebAccess,
CorruptedStructure {
name: &'static str,
reason: &'static str,
},
NullPointer {
context: &'static str,
},
ModuleNotFound {
name: String,
},
AddressNotInModule {
address: u64,
},
ThreadNotFound {
tid: u32,
},
UnlinkFailed {
module: String,
reason: String,
},
RelinkFailed {
module: String,
reason: String,
},
ListCorrupted {
list_type: ModuleListType,
},
InvalidPeFormat {
reason: String,
},
AllocationFailed {
size: usize,
protection: u32,
},
MappingFailed {
section: String,
reason: String,
},
RelocationFailed {
rva: u32,
reason: String,
},
ImportResolutionFailed {
dll: String,
function: String,
},
ForwardedExport {
forwarder: String,
},
TlsCallbackFailed {
index: usize,
},
EntryPointFailed {
status: i32,
},
SyscallEnumerationFailed {
reason: String,
},
SyscallNotFound {
name: String,
},
SyscallFailed {
name: String,
status: i32,
},
NtdllNotFound,
HookDetectionFailed {
function: String,
reason: String,
},
UnhookFailed {
function: String,
reason: String,
},
IntegrityCheckFailed {
function: String,
},
CleanCopyUnavailable,
HookInstallFailed {
target: u64,
reason: String,
},
HookRestoreFailed {
target: u64,
reason: String,
},
InstructionDecodeFailed {
address: u64,
reason: String,
},
TrampolineAllocationFailed {
near: u64,
size: usize,
},
HookConflict {
target: u64,
existing_type: String,
},
InsufficientHookSpace {
target: u64,
available: usize,
required: usize,
},
ReadFailed {
address: u64,
size: usize,
},
WriteFailed {
address: u64,
size: usize,
},
ProtectionChangeFailed {
address: u64,
size: usize,
},
PatternParseFailed {
reason: String,
},
ProcessOpenFailed {
pid: u32,
reason: String,
},
ProcessNotFound {
pid: u32,
},
RemoteThreadFailed {
reason: String,
},
InjectionFailed {
method: String,
reason: String,
},
RemoteModuleEnumFailed {
reason: String,
},
HandleDuplicateFailed {
reason: String,
},
SectionMappingFailed {
reason: String,
},
ApcQueueFailed {
reason: String,
},
ThreadContextFailed {
reason: String,
},
ThreadSuspendResumeFailed {
reason: String,
},
GadgetNotFound {
gadget_type: &'static str,
},
SpoofTrampolineFailed {
reason: String,
},
StackSynthesisFailed {
reason: String,
},
Win32Error {
code: u32,
context: &'static str,
},
}Expand description
all errors that can occur in wraith-rs
Variants§
UnsupportedWindowsVersion
windows version not supported by this library
UnsupportedArchitecture
architecture not supported (e.g., ARM)
InvalidPebAccess
failed to access PEB
InvalidTebAccess
failed to access TEB
CorruptedStructure
structure data appears corrupted
NullPointer
null pointer where non-null expected
ModuleNotFound
module with given name not found
AddressNotInModule
address does not belong to any loaded module
ThreadNotFound
thread with given ID not found
UnlinkFailed
failed to unlink module from PEB lists
RelinkFailed
failed to restore module links
ListCorrupted
PEB module list appears corrupted
Fields
list_type: ModuleListTypeInvalidPeFormat
PE file format invalid or unsupported
AllocationFailed
memory allocation failed
MappingFailed
failed to map PE section
RelocationFailed
failed to process relocation entry
ImportResolutionFailed
failed to resolve import
ForwardedExport
export is forwarded to another module
TlsCallbackFailed
TLS callback execution failed
EntryPointFailed
DllMain returned FALSE
SyscallEnumerationFailed
failed to enumerate syscalls from ntdll
SyscallNotFound
syscall with given name/hash not found
SyscallFailed
syscall returned error status
NtdllNotFound
ntdll.dll not found in loaded modules
HookDetectionFailed
failed to detect hooks in function
UnhookFailed
failed to remove hook
IntegrityCheckFailed
function integrity check failed
clean copy of module not available
HookInstallFailed
failed to install inline hook
HookRestoreFailed
failed to restore hook
InstructionDecodeFailed
instruction decoding failed
TrampolineAllocationFailed
trampoline allocation failed
HookConflict
hook conflict detected (target already hooked)
InsufficientHookSpace
insufficient space for hook at target
ReadFailed
memory read operation failed
WriteFailed
memory write operation failed
ProtectionChangeFailed
failed to change memory protection
PatternParseFailed
failed to parse pattern string
ProcessOpenFailed
failed to open remote process
ProcessNotFound
process with given ID not found
RemoteThreadFailed
failed to create remote thread
InjectionFailed
failed to inject into remote process
RemoteModuleEnumFailed
failed to enumerate remote modules
HandleDuplicateFailed
failed to duplicate handle
SectionMappingFailed
section mapping failed
ApcQueueFailed
APC queue operation failed
ThreadContextFailed
thread context operation failed
ThreadSuspendResumeFailed
thread suspend/resume failed
GadgetNotFound
no suitable gadget found for spoofing
SpoofTrampolineFailed
failed to build spoof trampoline
StackSynthesisFailed
stack frame synthesis failed
Win32Error
underlying Win32 API returned error
Implementations§
Source§impl WraithError
impl WraithError
Sourcepub fn from_last_error(context: &'static str) -> Self
pub fn from_last_error(context: &'static str) -> Self
create Win32Error from GetLastError
Trait Implementations§
Source§impl Debug for WraithError
impl Debug for WraithError
Source§impl Display for WraithError
impl Display for WraithError
Source§impl Error for WraithError
Available on crate feature std only.
impl Error for WraithError
std only.