Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cs4.8 c2profile解析问题 #207

Open
Tycx2ry opened this issue Oct 15, 2023 · 4 comments
Open

cs4.8 c2profile解析问题 #207

Tycx2ry opened this issue Oct 15, 2023 · 4 comments

Comments

@Tycx2ry
Copy link

Tycx2ry commented Oct 15, 2023

使用的cs4.8,在windows下>genCrossC2.Win.exe 1.1.1.1 443 .cobaltstrike.beacon_keys ;;js.profile Linux x64 a.out upx 4.8
profile使用的是https://github.com/threatexpress/malleable-c2/blob/master/jquery-c2.4.8.profile

{cs = 4.1 ~ 4.8}
parse c2profile: js.profile
panic: runtime error: slice bounds out of range [:6] with length 2

goroutine 17 [running, locked to thread]:
main.get_match_string(0xc000201600?, {0xc00027b3ac, 0x2}, {0xc000404180, 0x176}, 0x0)
/mnt/fs/libc2profile-musl/libc2profile.go:177 +0xcd
main.fmt_profile_dedata({0x6?, 0x226ff69?}, {0xc000198c80, 0xc00027a5a0?, 0x7?})
/mnt/fs/libc2profile-musl/libc2profile.go:223 +0x4c5
main.fmt_profile_get_server(0xc0003fa4f8?)
/mnt/fs/libc2profile-musl/libc2profile.go:322 +0x39
main.parsefile(0xc000072000?, 0x0?, 0x1?)
/mnt/fs/libc2profile-musl/libc2profile.go:131 +0x226
Aborted (core dumped)

@Tycx2ry
Copy link
Author

Tycx2ry commented Oct 15, 2023

我模糊测试出来的具体地方:http-get中server中output中append的值为;}是就会报错:
append ";}";
超过6个字符就好了

@gloxec
Copy link
Owner

gloxec commented Oct 16, 2023

嗯嗯,因为前后追加字符过少的话,在解析数据时可能会产生元数据误定位bug

所以推荐c2profile中的可定位数据在6位以上,后续将会主动报错提示该类问题

@480840342
Copy link

想问以下你们cs4.8 使用最新的cs2怎么上线linux的,我这边创建不了beacon

@gloxec
Copy link
Owner

gloxec commented Dec 21, 2023

@480840342 可以描述具体的使用方式及对应的 输出/报错 吗?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants