Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

crossc2反向代理 #205

Open
ksopen1 opened this issue Sep 24, 2023 · 3 comments
Open

crossc2反向代理 #205

ksopen1 opened this issue Sep 24, 2023 · 3 comments

Comments

@ksopen1
Copy link

ksopen1 commented Sep 24, 2023

给cs配置了一个反向代理,但是使用crossc2就无法上线了 crossc2生成马并没有header host和bind port选项

@gloxec
Copy link
Owner

gloxec commented Sep 25, 2023

可以具体描述信息吗?还有这里的bind port是指?

关于header host:
1.在生成crossc2时,指定的host和port值会替换到请求体http header的host处
2.使用c2profile自动解析时,会将c2profile中定义的get-post/http header值全部替换置到请求体http header中(包含host等等)
3.使用通信协议自定义库时,则可以自己编写整个http请求内容

@ksopen1
Copy link
Author

ksopen1 commented Oct 1, 2023

@gloxec
Copy link
Owner

gloxec commented Oct 7, 2023

  1. 如果使用自定义协议库,可自由编写http请求体的所有内容

  2. 如果直接使用c2profile解析方式生成beacon,是支持该工具下正常上线的,如果还是无法上线,可能需要仔细核对redguard提示的错误项

$ ./genCrossC2 www.example.com 443 .cs_key ";;c2profile.profile" Linux x64 ./a.out
$ ./a.out

例如出现UserAgent不符合http请求Header头不符合Host地址不对时,需检查c2profile中有无配置正确的数据段

c2profille:

set useragent "Mozilla.....";   # 1. 可直接全局配置UserAgent

http-get {
    client {
        header "Host" "www.example.com"; # 3.1 配置beacon请求头中的Host (windows版本的beacon可缺省/或由用户指定)
        header "Accept" "text/html"; # 2. 其他 header  
        header .....
    }
}
http-post {
    client {
        header "Host" "www.example.com:9991"; # 3.2 Host可自由设定
        header .....
    }
}

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

No branches or pull requests

2 participants