Base class for all memory alterations that can be performed through the Injector<TMemoryAlterationSetID, TCodeCave, TVariable> class.
More...
Inherits RAMvader.NotifyPropertyChangedAdapter.
Inherited by RAMvader.CodeInjection.MemoryAlterationNOP, RAMvader.CodeInjection.MemoryAlterationPoke, and RAMvader.CodeInjection.MemoryAlterationX86BranchInstruction.
|
| MemoryAlterationBase (Target targetIORef, MemoryAddress targetAddress, int targetSize) |
| Constructor. The constructor will read the bytes of the target process' memory space and keep a "snapshot" of it at the moment the constructor is called. When a memory alteration gets disabled, this "snapshot" will be used to restore the original bytes of the instruction or value that was in the target process' memory space before it was activated. More...
|
|
void | SendPropertyChangedNotification ([CallerMemberName] string propertyName="") |
| This method should be called inside PROPERTY SETTER METHODS to notify listeners of the "property changed" event that the property has been updated. More...
|
|
|
byte [] | TargetOriginalBytes [get, protected set] |
| Keeps the bytes that represent the original instruction or value that was in memory before the memory alteration got activated. More...
|
|
MemoryAddress | TargetAddress [get, protected set] |
| The address (in the target process' memory space) where the memory alteration will occur. More...
|
|
|
PropertyChangedEventHandler | PropertyChanged |
| Used for implementing the INotifyPropertyChanged interface. More...
|
|
Base class for all memory alterations that can be performed through the Injector<TMemoryAlterationSetID, TCodeCave, TVariable> class.
◆ MemoryAlterationBase()
RAMvader.CodeInjection.MemoryAlterationBase.MemoryAlterationBase |
( |
Target |
targetIORef, |
|
|
MemoryAddress |
targetAddress, |
|
|
int |
targetSize |
|
) |
| |
|
protected |
Constructor. The constructor will read the bytes of the target process' memory space and keep a "snapshot" of it at the moment the constructor is called. When a memory alteration gets disabled, this "snapshot" will be used to restore the original bytes of the instruction or value that was in the target process' memory space before it was activated.
- Parameters
-
targetIORef | A reference to the Target object that will be used to read the target process' memory space. |
targetAddress | The address (in the target process' memory space) where the memory alteration will take place. |
targetSize | The size - given in bytes - of the instruction or value that the memory alteration will affect. |
- Exceptions
-
InstanceNotAttachedException | Thrown when the method is called while the given Target is not attached to a process. |
RequiredReadException | Thrown when the method cannot successfully read the target process' memory space to retrieve the original bytes that the Memory Alteration will be replacing, once it is activated. |
◆ SetEnabled< TMemoryAlterationID, TCodeCave, TVariable >()
abstract bool RAMvader.CodeInjection.MemoryAlterationBase.SetEnabled< TMemoryAlterationID, TCodeCave, TVariable > |
( |
Injector< TMemoryAlterationID, TCodeCave, TVariable > |
injectorRef, |
|
|
bool |
bEnable |
|
) |
| |
|
pure virtual |
Called to activate or deactivate a memory alteration into the target process' memory space.
- Template Parameters
-
TMemoryAlterationID | The enumeration of Memory Alteration Sets used for the Injector<TMemoryAlterationSetID, TCodeCave, TVariable>. |
TCodeCave | The enumeration of Code Caves used for the Injector<TMemoryAlterationSetID, TCodeCave, TVariable>. |
TVariable | The enumeration of Injection Variables used for the Injector<TMemoryAlterationSetID, TCodeCave, TVariable>. |
- Parameters
-
injectorRef | A reference to an Injector<TMemoryAlterationSetID, TCodeCave, TVariable> object, with which you can perform I/O operations on the target process' memory space and access related data, like values and addresses of variables and code caves. |
bEnable | A flag specifying if the memory alteration should be enabled or disabled. |
- Returns
- Returns a flag specifying if the operation was successful or not.
Implemented in RAMvader.CodeInjection.MemoryAlterationX86BranchInstruction, RAMvader.CodeInjection.MemoryAlterationPoke, and RAMvader.CodeInjection.MemoryAlterationNOP.
◆ TargetAddress
MemoryAddress RAMvader.CodeInjection.MemoryAlterationBase.TargetAddress |
|
getprotected set |
The address (in the target process' memory space) where the memory alteration will occur.
◆ TargetOriginalBytes
byte [] RAMvader.CodeInjection.MemoryAlterationBase.TargetOriginalBytes |
|
getprotected set |
Keeps the bytes that represent the original instruction or value that was in memory before the memory alteration got activated.