This commit is contained in:
trickster0
2021-09-28 00:22:43 +03:00
parent 8bb1f90d08
commit e9587dc956
2 changed files with 24 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
[package]
name = "Allocate_With_Syscalls"
version = "0.1.0"
edition = "2018"
author = "trickster0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
ntapi = "0.3.6"
+15
View File
@@ -0,0 +1,15 @@
extern crate ntapi;
use ntapi::ntmmapi::NtAllocateVirtualMemory;
use ntapi::ntpsapi::NtCurrentProcess;
use std::ptr::null_mut;
use ntapi::winapi::ctypes::c_void;
fn main() {
unsafe {
let mut allocstart : *mut c_void = null_mut();
let mut seize : usize = 150;
NtAllocateVirtualMemory(NtCurrentProcess,&mut allocstart,0,&mut seize, 0x00003000, 0x40);
}
}