Skip to content

Commit ed2c4bf

Browse files
committed
release v0.2
fix
1 parent dada654 commit ed2c4bf

File tree

3 files changed

+122
-23
lines changed

3 files changed

+122
-23
lines changed

.github/workflows/release.yaml

Lines changed: 104 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,70 @@ 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: cargo-bins/cargo-binstall@main
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
toolchain: nightly
20+
components: clippy rustfmt
1621

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

19-
- uses: cargo-bins/cargo-binstall@main
31+
- name: Build tamanoir for x86_64
32+
run: |
33+
cargo build -p tamanoir --target x86_64-unknown-linux-gnu --release
34+
cp target/x86_64-unknown-linux-gnu/release/tamanoir tamanoir-x86_64
2035
36+
- name: Build tamanoir-c2 for x86_64
37+
run: |
38+
cargo build -p tamanoir-c2 --target x86_64-unknown-linux-gnu --release
39+
cp target/x86_64-unknown-linux-gnu/release/tamanoir-c2 tamanoir-c2-x86_64
40+
41+
- name: Build tamanoir-tui for x86_64
42+
run: |
43+
cargo build -p tamanoir-tui --target x86_64-unknown-linux-gnu --release
44+
cp target/x86_64-unknown-linux-gnu/release/tamanoir-tui tamanoir-tui-x86_64
45+
46+
- name: Build hello-world shellcodes for x86_64
47+
run: |
48+
./tamanoir-c2-x86_64 rce build -c ./assets/payloads/hello -t x86_64
49+
./tamanoir-c2-x86_64 rce build -c ./assets/payloads/xeyes -t x86_64
50+
cp $HOME/.tamanoir/bins/tamanoir-rce-hello_x86_64.bin tamanoir-rce-hello_x86_64.bin
51+
cp $HOME/.tamanoir/bins/tamanoir-rce-xeyes_x86_64.bin tamanoir-rce-xeyes_x86_64.bin
52+
53+
- name: Persist artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: x86-artifacts
57+
path: |
58+
tamanoir-x86_64
59+
tamanoir-c2-x86_64
60+
tamanoir-tui-x86_64
61+
tamanoir-rce-hello_x86_64.bin
62+
tamanoir-rce-xeyes_x86_64.bin
63+
64+
build_arm:
65+
permissions:
66+
contents: write
67+
continue-on-error: false
68+
runs-on: ubuntu-24.04-arm
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v4
2172
- uses: dtolnay/rust-toolchain@stable
2273
with:
2374
toolchain: nightly
@@ -26,36 +77,68 @@ jobs:
2677
- name: Install the dependencies
2778
run: |
2879
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
80+
sudo apt install -y protobuf-compiler
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: test
134+
run: ls -lhR
135+
- name: Upload Binaries
57136
uses: softprops/action-gh-release@v2
137+
if-no-files-found: error
58138
with:
59-
files: "tamanoir*"
139+
files: |
140+
"release-assets/**/*"
60141
body: |
61142
[Release.md](${{ github.server_url }}/${{ github.repository }}/blob/main/Release.md)
143+
144+

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

0 commit comments

Comments
 (0)