BlackSnufkin / BYOVD

Some POCs for my BYOVD research and find some vulnerable drivers
GNU General Public License v3.0
128 stars 23 forks source link

Compiling #1

Closed sec13b closed 5 months ago

sec13b commented 5 months ago

i`m facing this problem , can you give me a solution? Kali

thank you

cargo build --release
Compiling Ksapi64-Killer v0.1.0 (/home/kali/Desktop/byovd/BYOVD/Ksapi64-Killer)
error[E0433]: failed to resolve: could not find `windows` in `os`
  --> src/main.rs:10:14
   |
10 | use std::os::windows::ffi::OsStrExt;
   |              ^^^^^^^ could not find `windows` in `os`
   |
note: found an item that was configured out
  --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/os/mod.rs:53:9
note: found an item that was configured out
  --> /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/os/mod.rs:100:9

error[E0433]: failed to resolve: could not find `shared` in `winapi`
  --> src/main.rs:16:13
   |
16 | use winapi::shared::minwindef::{DWORD, LPVOID};
   |             ^^^^^^ could not find `shared` in `winapi`

error[E0433]: failed to resolve: could not find `shared` in `winapi`
  --> src/main.rs:17:13
   |
17 | use winapi::shared::ntdef::NULL;
   |             ^^^^^^ could not find `shared` in `winapi`

error[E0433]: failed to resolve: could not find `shared` in `winapi`
  --> src/main.rs:18:13
   |
18 | use winapi::shared::winerror::NO_ERROR;
   |             ^^^^^^ could not find `shared` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:19:13
   |
19 | use winapi::um::fileapi::{CreateFileW, OPEN_EXISTING};
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:20:13
   |
20 | use winapi::um::handleapi::{CloseHandle, INVALID_HANDLE_VALUE};
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:21:13
   |
21 | use winapi::um::ioapiset::DeviceIoControl;
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:22:13
   |
22 | use winapi::um::processenv::GetCurrentDirectoryW;
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:23:13
   |
23 | use winapi::um::tlhelp32::{CreateToolhelp32Snapshot, Process32First, Process32Next, PROCESSENTRY32, TH32CS_SNAPPROCESS};
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:24:13
   |
24 | use winapi::um::winnt::{SERVICE_AUTO_START, HANDLE};
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:25:13
   |
25 | use winapi::um::winnt::{SERVICE_ERROR_NORMAL, SERVICE_KERNEL_DRIVER, SERVICE_WIN32_OWN_PROCESS};
   |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `um` in `winapi`
  --> src/main.rs:26:13
   |
26 | use winapi::um::winsvc::{CloseServiceHandle, ControlService, SERVICE_STOPPED, CreateServiceW, DeleteService, OpenSCManagerA, OpenSCManage...
   |             ^^ could not find `um` in `winapi`

error[E0599]: no method named `encode_wide` found for reference `&OsStr` in the current scope
   --> src/main.rs:328:10
    |
327 | /     OsStr::new(s)
328 | |         .encode_wide()
    | |         -^^^^^^^^^^^ method not found in `&OsStr`
    | |_________|
    | 

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `Ksapi64-Killer` (bin "Ksapi64-Killer") due to 13 previous errors
cargo build --release  --target=x86_64-pc-windows-msvc
    Compiling windows_x86_64_msvc v0.52.5
   Compiling clap v0.5.14
   Compiling winapi v0.3.9
   Compiling windows-targets v0.52.5
   Compiling windows-sys v0.52.0
   Compiling ctrlc v3.4.4
   Compiling Ksapi64-Killer v0.1.0 (/home/kali/Desktop/byovd/BYOVD/Ksapi64-Killer)
error: linker `link.exe` not found
  |
  = note: No such file or directory (os error 2)

note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
note: VS Code is a different product, and is not sufficient.
error: could not compile `Ksapi64-Killer` (bin "Ksapi64-Killer") due to 1 previous error
BlackSnufkin commented 5 months ago

consider downloading the target with rustup target add x86_64-pc-windows-msvc or just compiled this on windows

sec13b commented 5 months ago

i dont use windows i did: rustup target add x86_64-pc-windows-msvc

┌──(kali㉿kali)-[~/Desktop/byovd/BYOVD/Ksapi64-Killer]
└─$ cargo build --release  --target=x86_64-pc-windows-msvc
   Compiling windows_x86_64_msvc v0.52.5
   Compiling winapi v0.3.9
   Compiling clap v0.5.14
   Compiling windows-targets v0.52.5
   Compiling windows-sys v0.52.0
   Compiling ctrlc v3.4.4
   Compiling Ksapi64-Killer v0.1.0 (/home/kali/Desktop/byovd/BYOVD/Ksapi64-Killer)
error: linker `link.exe` not found
  |
  = note: No such file or directory (os error 2)

note: the msvc targets depend on the msvc linker but `link.exe` was not found

note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.

note: VS Code is a different product, and is not sufficient.

error: could not compile `Ksapi64-Killer` (bin "Ksapi64-Killer") due to 1 previous error

┌──(kali㉿kali)-[~/Desktop/byovd/BYOVD/Ksapi64-Killer]
BlackSnufkin commented 5 months ago

If you don't want to use Windows, that's up to you, but the error is very clear

sec13b commented 5 months ago

ok , i will make a image , and try compile in vmware

thank you

sec13b commented 5 months ago

on windows compile perfectly , thank you