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