This commit is contained in:
trickster0
2021-09-30 16:03:11 +03:00
parent a3bea97d4c
commit cb3c784e37
2 changed files with 25 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "asm_syscall"
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]
+17
View File
@@ -0,0 +1,17 @@
#![feature(asm)]
fn main() {
let rax:u64;
unsafe {
asm!(
"push rbx",
"xor rbx, rbx",
"xor rax, rax",
"mov rbx, qword ptr gs:[0x60]",
"mov rax,rbx",
"pop rbx",
out("rax") rax,
);
}
println!("PEB Address: 0x{:x}",rax);
}