mttaggart / rustyneedle

A Rust-based dropper for shellcode payloads.
MIT License
42 stars 5 forks source link

compile problem #1

Closed shorefall closed 2 years ago

shorefall commented 2 years ago

Hey I'm not sure whats going on here could you help?

error: proc macro panicked
  --> src\main.rs:33:1
   |
33 | use_litcrypt!();
   | ^^^^^^^^^^^^^^^
   |
   = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
  --> src\main.rs:80:35
   |
80 |                     let err_msg = lc!("Could not convert bytes to string");
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:103:31
    |
103 |                 let err_msg = lc!("Could not decode shellcode");
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:112:20
    |
112 |         return Err(lc!("Could not download shellcode"));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:133:32
    |
133 |                 println!("{}", lc!("Couldn't allocate memory to current proc."));
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:135:32
    |
135 |                 println!("{}", lc!("Allocated memory to current proc."));
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:139:28
    |
139 |             println!("{}", lc!("Copying Shellcode to address in current proc."));
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:141:28
    |
141 |             println!("{}", lc!("Copied..."));
    |                            ^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:144:28
    |
144 |             println!("{}", lc!("Changing mem protections to RX..."));
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:156:39
    |
156 |                 return println!("{}", lc!("Error during injection"));
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:160:28
    |
160 |             println!("{}", lc!("Calling CreateThread..."));
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:175:32
    |
175 |                 println!("{}", lc!("Error during inject."));
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:181:31
    |
181 |                println!("{}", lc!("Good!"));
    |                               ^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.

error: proc macro panicked
   --> src\main.rs:182:31
    |
182 |                println!("{}", lc!("Injection completed!"));
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: LITCRYPT_ENCRYPT_KEY environment variable not set.
shorefall commented 2 years ago

How do I set that variable? I'm on vscode using windows

mttaggart commented 2 years ago

You have to set the LITCRYPT_ENCRYPT_KEY environment variable.

I will assume you're using PowerShell for your console on Windows.

In a PowerShell window navigated to the Rustyneedle folder, execute:

$env:LITCRYPT_ENCRYPT_KEY = "my encryption key"
code .\
shorefall commented 2 years ago

Thank you for helping out :) much appreciated