Skip to content

Commit 50d011a

Browse files
committed
release v0.2
1 parent dada654 commit 50d011a

File tree

6 files changed

+125
-27
lines changed

6 files changed

+125
-27
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- uses: cargo-bins/cargo-binstall@main
1616
- uses: dtolnay/rust-toolchain@stable
1717
with:
18-
toolchain: nightly
18+
toolchain: nightly-2024-12-31 #we do not trust llvm20 yet
1919
components: clippy rustfmt
2020

21-
- run: cargo binstall -y bpf-linker
21+
- run: cargo install bpf-linker
2222

2323
- name: Build Tamanoir
2424
run: just tamanoir-build

.github/workflows/release.yaml

Lines changed: 103 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,138 @@ on:
55
tags:
66
- "*"
77
jobs:
8-
build:
8+
build_x86:
99
permissions:
1010
contents: write
1111
continue-on-error: false
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
with:
18+
toolchain: "nightly-2024-12-31" #we do not trust llvm20 yet
19+
components: clippy rustfmt
1620

17-
- uses: taiki-e/install-action@just
21+
- name: Install the dependencies
22+
run: |
23+
sudo apt update
24+
sudo apt install -y protobuf-compiler
25+
cargo install bpf-linker
26+
27+
- name: Build tamanoir-ebpf
28+
run: cd tamanoir-ebpf && cargo build --release
1829

19-
- uses: cargo-bins/cargo-binstall@main
30+
- name: Build tamanoir for x86_64
31+
run: |
32+
cargo build -p tamanoir --target x86_64-unknown-linux-gnu --release
33+
cp target/x86_64-unknown-linux-gnu/release/tamanoir tamanoir-x86_64
2034
35+
- name: Build tamanoir-c2 for x86_64
36+
run: |
37+
cargo build -p tamanoir-c2 --target x86_64-unknown-linux-gnu --release
38+
cp target/x86_64-unknown-linux-gnu/release/tamanoir-c2 tamanoir-c2-x86_64
39+
40+
- name: Build tamanoir-tui for x86_64
41+
run: |
42+
cargo build -p tamanoir-tui --target x86_64-unknown-linux-gnu --release
43+
cp target/x86_64-unknown-linux-gnu/release/tamanoir-tui tamanoir-tui-x86_64
44+
45+
- name: Build hello-world shellcodes for x86_64
46+
run: |
47+
./tamanoir-c2-x86_64 rce build -c ./assets/payloads/hello -t x86_64
48+
./tamanoir-c2-x86_64 rce build -c ./assets/payloads/xeyes -t x86_64
49+
cp $HOME/.tamanoir/bins/tamanoir-rce-hello_x86_64.bin tamanoir-rce-hello_x86_64.bin
50+
cp $HOME/.tamanoir/bins/tamanoir-rce-xeyes_x86_64.bin tamanoir-rce-xeyes_x86_64.bin
51+
52+
- name: Persist artifacts
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: x86-artifacts
56+
path: |
57+
tamanoir-x86_64
58+
tamanoir-c2-x86_64
59+
tamanoir-tui-x86_64
60+
tamanoir-rce-hello_x86_64.bin
61+
tamanoir-rce-xeyes_x86_64.bin
62+
63+
build_arm:
64+
permissions:
65+
contents: write
66+
continue-on-error: false
67+
runs-on: ubuntu-24.04-arm
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
2171
- uses: dtolnay/rust-toolchain@stable
2272
with:
23-
toolchain: nightly
73+
toolchain: "nightly-2024-12-31" #we do not trust llvm20 yet
2474
components: clippy rustfmt
2575

2676
- name: Install the dependencies
2777
run: |
2878
sudo apt update
29-
sudo apt install -y podman binutils-aarch64-linux-gnu musl-tools
30-
cargo binstall -y cross
31-
cargo binstall -y bpf-linker
79+
sudo apt install -y protobuf-compiler llvm-19-dev libclang-19-dev clang-19
80+
export LD_LIBRARY_PATH=/usr/lib/llvm-19/lib:$LD_LIBRARY_PATH
81+
cargo install bpf-linker
82+
3283
3384
- name: Build tamanoir-ebpf
34-
run: just build-ebpf
85+
run: cd tamanoir-ebpf && cargo build --release
3586

36-
- name: Build tamanoir-proxy for arm64 musl
87+
- name: Build tamanoir for arm64
3788
run: |
38-
CROSS_CONTAINER_ENGINE=podman cross build -p tamanoir-proxy --target aarch64-unknown-linux-musl --release
39-
cp target/aarch64-unknown-linux-musl/release/tamanoir tamanoir-aarch64-unknown-linux-musl
89+
cargo build -p tamanoir --target aarch64-unknown-linux-gnu --release
90+
cp target/aarch64-unknown-linux-gnu/release/tamanoir tamanoir-aarch64
4091
41-
- name: Build tamanoir-proxy for x86_64 musl
92+
- name: Build tamanoir-C2 for arm64
4293
run: |
43-
CROSS_CONTAINER_ENGINE=podman cross build -p tamanoir-proxy --target x86_64-unknown-linux-musl --release
44-
cp target/x86_64-unknown-linux-musl/release/tamanoir tamanoir-x86_64-unknown-linux-musl
94+
cargo build -p tamanoir-c2 --target aarch64-unknown-linux-gnu --release
95+
cp target/aarch64-unknown-linux-gnu/release/tamanoir-c2 tamanoir-c2-aarch64
4596
46-
- name: Build tamanoir for arm64 musl
97+
- name: Build tamanoir-tui for arm64
4798
run: |
48-
CROSS_CONTAINER_ENGINE=podman cross build --target aarch64-unknown-linux-musl --release
49-
cp target/aarch64-unknown-linux-musl/release/tamanoir tamanoir-aarch64-unknown-linux-musl
99+
cargo build -p tamanoir-tui --target aarch64-unknown-linux-gnu --release
100+
cp target/aarch64-unknown-linux-gnu/release/tamanoir-tui tamanoir-tui-aarch64
50101
51-
- name: Build tamanoir for x86_64 musl
102+
- name: Build hello-world shellcodes for arm64
52103
run: |
53-
CROSS_CONTAINER_ENGINE=podman cross build --target x86_64-unknown-linux-musl --release
54-
cp target/x86_64-unknown-linux-musl/release/tamanoir tamanoir-x86_64-unknown-linux-musl
104+
./tamanoir-c2-aarch64 rce build -c ./assets/payloads/hello -t aarch64
105+
./tamanoir-c2-aarch64 rce build -c ./assets/payloads/xeyes -t aarch64
106+
cp $HOME/.tamanoir/bins/tamanoir-rce-hello_aarch64.bin tamanoir-rce-hello_aarch64.bin
107+
cp $HOME/.tamanoir/bins/tamanoir-rce-xeyes_aarch64.bin tamanoir-rce-xeyes_aarch64.bin
108+
109+
- name: Persist artifacts
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: arch-artifacts
113+
path: |
114+
tamanoir-aarch64
115+
tamanoir-c2-aarch64
116+
tamanoir-tui-aarch64
117+
tamanoir-rce-hello_aarch64.bin
118+
tamanoir-rce-xeyes_aarch64.bin
55119
56-
- name: Upload Binary
120+
release:
121+
permissions:
122+
contents: write
123+
continue-on-error: false
124+
needs: [build_x86,build_arm]
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Checkout
128+
uses: actions/checkout@v4
129+
- name: Download artifacts
130+
uses: actions/download-artifact@v4
131+
with:
132+
path: release-assets
133+
- name: Upload Binaries
57134
uses: softprops/action-gh-release@v2
58135
with:
59-
files: "tamanoir*"
136+
fail_on_unmatched_files: true
137+
files: |
138+
release-assets/**/tamanoir-*
60139
body: |
61140
[Release.md](${{ github.server_url }}/${{ github.repository }}/blob/main/Release.md)
141+
142+

Release.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
## v0.1 - 2024-12-02
22

33
First release 🎉
4+
5+
## v0.2 - 2024-05-12
6+
7+
### Added
8+
9+
- TUI Client
10+
- C2 Server
11+
- Shellcodes transmission:
12+
- hello-world
13+
- xeyes
14+
- reverse-shell

assets/doc/tamanoir-c2.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@ Tamanoir comes with ready-to-use payloads :
3232
| xeyes | open `xeyes` program on target gui | demonstrate how to execute simple shellcode. Only works if target uses x11 |
3333
| reverse-shell | open a tcp-shell communicating with tamanoir-c2 | needs to specify IP var when building (see below)
3434

35-
36-
### 📍 payloads location: ./assets/payloads
35+
#### 📍If using release binaries, make sure to include your `tamanoir-rce-*.bin` in `~/.tamanoir/bins` directory on tamanoir-c2 host
36+
⇨ You'll then be able to select them in tui for transmission to target.<br>
37+
⇨ You'll have to choose either aarch64 or x86_64 architecture depending on target architecture.
3738

3839

3940
## 🔧 Builder
41+
You also can build provided payloads from source, and even build your own <br>
42+
Building is mandatory for reverse-shell rce payload, which needs to know your tamanoir-c2 ip @build time
43+
44+
### 📍 payloads location: ./assets/payloads
4045

4146
`tamanoir-c2 rce build`
4247

tamanoir-ebpf/.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[build]
22
target = ["bpfeb-unknown-none", "bpfel-unknown-none"]
3+
rustflags = ["-C", "linker=bpf-linker"]
34

45
[unstable]
56
build-std = ["core"]

tamanoir-ebpf/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly"
2+
channel = "nightly-2024-12-31" #we do not trust llvm20 yet
33
components = ["rust-src"]

0 commit comments

Comments
 (0)