docs.rs failed to build dll-hijack-1.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
dll-hijack
Dll hijack -- just one macro
usage
-
Create a lib project
cargo new demo --lib -
Modify Cargo.toml
[] = "demo" = "0.1.0" = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [] = ["cdylib"] [] = "1.0.0" -
Modify lib.rs
-
Write a function that will be executed when the dll is loaded
use process; -
Set the original dll name and evil dll name using macros
use process; use hijack;
-
The malicious dll will be disguised as the original dll, and the malicious dll will execute the malicious function first when loaded.
Then the request for the malicious dll will be forwarded to the original dll.