Skip to content

Commit 83bca85

Browse files
committed
init
1 parent 3eac595 commit 83bca85

File tree

7 files changed

+836
-0
lines changed

7 files changed

+836
-0
lines changed

.github/conf/.goreleaser.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- go generate ./...
5+
builds:
6+
- id: "with-upx"
7+
env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- windows
12+
- darwin
13+
goarch:
14+
- amd64
15+
- arm64
16+
- "386"
17+
goarm:
18+
- "6"
19+
- "7"
20+
flags:
21+
- -trimpath
22+
ldflags:
23+
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
24+
ignore:
25+
- goos: windows
26+
goarch: arm64
27+
- goos: linux
28+
goarch: arm64
29+
- goos: darwin
30+
goarch: "386"
31+
hooks:
32+
post: upx --best -f -q "{{ .Path }}"
33+
34+
checksum:
35+
name_template: 'checksums.txt'
36+
snapshot:
37+
name_template: "{{ incpatch .Version }}-next"
38+
changelog:
39+
sort: asc
40+
filters:
41+
exclude:
42+
- '^docs:'
43+
- '^test:'

.github/workflows/go.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 60
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
-
22+
name: Set up Go
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.19
26+
-
27+
name: Run GoReleaser
28+
uses: goreleaser/goreleaser-action@v2
29+
with:
30+
distribution: goreleaser
31+
version: latest
32+
args: -f .github/conf/.goreleaser.yml
33+
workdir: .
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# autoRebind
2+
3+
[README](README.md) | [中文文档](README_zh.md)
4+
5+
autoRebind can parse CobaltStrike's `Malleable C2 profile` and convert it into the source code of the communication library available to [CrossC2](https://github.com/gloxec/CrossC2)
6+
7+
## Usage
8+
9+
`autoRebind <c2profile> [section-name] > rebind.c`
10+
11+
12+
13+
Read the `default section` configuration in the c2profile file by default
14+
15+
16+
17+
When there are multiple `http-get/post` sections in c2profile, you can specify the section name for parsing
18+
19+
## Note
20+
21+
`gcc -fPIC -shared rebind.c -o librebind.so`
22+
23+
24+
25+
The generated `rebind.c` source file should be compiled under a low-version Linux system as much as possible, otherwise it may be incompatible due to the `GLIBC version is too high` on the target system
26+

README_zh.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# autoRebind
2+
3+
[README](README.md) | [中文文档](README_zh.md)
4+
5+
autoRebind可以解析CobaltStrike的`Malleable C2 profile`,转换成[CrossC2](https://github.com/gloxec/CrossC2)可用的通信库源码
6+
7+
8+
## Usage
9+
10+
`autoRebind <c2profile> [section-name] > rebind.c`
11+
12+
默认读取c2profile文件中的default section配置
13+
14+
15+
当c2profile中存在多个 http-get/post 节时,可以指定节名称来做解析
16+
17+
18+
## Note
19+
20+
`gcc -fPIC -shared rebind.c -o librebind.so`
21+
22+
生成的`rebind.c`源文件尽量在低版本Linux系统下进行编译,否则可能会因为目标系统上`GLIBC版本过高`不兼容
23+
24+

go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/CrossC2/autoRebind
2+
3+
go 1.19
4+
5+
require (
6+
github.com/D00Movenok/goMalleable v0.0.0-20220314191301-14f91f43c3b0 // indirect
7+
github.com/alecthomas/participle/v2 v2.0.0-alpha7 // indirect
8+
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae // indirect
9+
)

go.sum

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
github.com/D00Movenok/goMalleable v0.0.0-20220314191301-14f91f43c3b0 h1:J2/ncp0Jfq6GAws9YNvL0DxG+DnmPxIJkZ0u01y14uY=
2+
github.com/D00Movenok/goMalleable v0.0.0-20220314191301-14f91f43c3b0/go.mod h1:FTxb8RmunucvVgT4QCa0SM1AKYkqIsVH+Z5+zkuHWU4=
3+
github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c=
4+
github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA=
5+
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ=
6+
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
7+
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=

0 commit comments

Comments
 (0)