Skip to content

C2 Perscriptive Ordering #790

@DominicBreuker

Description

@DominicBreuker

Describe the bug
When I set up an HTTP Squid proxy (local network, no HTTPS) in Windows 10, manual configuration, then Windows only accepts IP and port. The implant detects the proxy as a WinHTTP:NamedProxy and since no scheme is found, it defaults to HTTPS (code). Thus, it cannot connect, even though the proxy otherwise works perfectly.

To Reproduce
Steps to reproduce the behavior:

  1. Get a Linux VM and configure a Squid proxy (I've used Squid 4.13)
  2. Get a Windows VM and configure the Squid VM as a manual HTTP proxy
  3. Get a Linux VM and run the Sliver server (I've used Sliver 1.5.16)
  4. Generate and deliver an HTTP implant to Windows VM (e.g., generate beacon --http 192.168.1.10 --debug --save /tmp/beacon.exe --seconds 5 --jitter 0 --os windows)
  5. Execute the implant and you will not get a session. The debug log will show two attempts to connect via the proxy with HTTPS, and it complains about the TLS handshake error. The Squid proxy logs will show error:invalid-request.

Expected behavior
The implant should try both HTTP and HTTPS for the proxy URL if the scheme is not specified

Screenshots
A screenshot of what the error looks like:

proxyerror

Desktop (please complete the following information):

  • OS: Sliver ran on Kali Linux, Squid on Debian, the Target was Windows 10

Additional context
I've PoCed a fix for this, will open a PR and link it here

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions