Skip to content

Commit

Permalink
Statically compile docs (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
hulto authored Oct 20, 2023
1 parent 68de0f4 commit 540037f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ dist/**
implants/imix/imix-test-config.json

implants/golem/embed_files_golem_prod/*
!implants/golem/embed_files_golem_prod/.gitkeep
33 changes: 33 additions & 0 deletions docs/_docs/user-guide/imix.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,36 @@ See the [Eldritch User Guide](/user-guide/eldritch) for more information.
## Task management
Imix can execute up to 127 threads concurrently after that the main imix thread will block behind other threads.
Every callback interval imix will query each active thread for new output and rely that back to the c2. This means even long running tasks will report their status as new data comes in.

## Static cross compiliation

### Linux

```bash
rustup target add x86_64-unknown-linux-musl

apt update
apt install musl-tools

RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target=x86_64-unknown-linux-musl
```

### MacOS
**MacOS does not support static compilation**
https://developer.apple.com/forums/thread/706419

**Cross compilation is more complicated than we'll support**
Check out this blog a starting point for cross compiling.
https://wapl.es/rust/2019/02/17/rust-cross-compile-linux-to-macos.html/


### Windows
```bash
rustup target add x86_64-pc-windows-gnu

apt update
sudo apt install gcc-mingw-w64

RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target=x86_64-pc-windows-gnu
```

Empty file.
1 change: 1 addition & 0 deletions implants/lib/eldritch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ hex-literal = { workspace = true }
ipnetwork = { workspace = true }
md5 = { workspace = true }
nix = { workspace = true }
openssl = { workspace = true, features = ["vendored"] }
regex = { workspace = true }
reqwest = { workspace = true , features = ["blocking", "stream"] }
russh = { workspace = true }
Expand Down

0 comments on commit 540037f

Please sign in to comment.