mirror of
https://github.com/trickster0/OffensiveRust
synced 2026-06-08 17:54:47 +00:00
latest
This commit is contained in:
@@ -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"
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user