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

Fix proxy support for http/https requests #115

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

l0rda
Copy link
Contributor

@l0rda l0rda commented Apr 9, 2024

Hello,

The proxy support was missed when creating a new http.Client with custom Transport{}.
Therefore the "-proxy" option had no effect on http/https connections. This PR reverts to the standard behavior of the go http client with os environ support.

@j-baines
Copy link
Contributor

oof. Thanks! Giving this a test.

@j-baines
Copy link
Contributor

Before:

albinolobster@mournland:~/cve-2023-22527/nashorn$ ./build/cve-2023-22527_linux-arm64 -v -rhost google.com -rport 443 -s -proxy http://127.0.0.1:8080
time=2024-04-09T21:17:40.296-04:00 level=STATUS msg="Starting target" index=0 host=google.com port=443 ssl=true "ssl auto"=false
time=2024-04-09T21:17:40.296-04:00 level=STATUS msg="Validating Confluence target" host=google.com port=443
time=2024-04-09T21:17:40.646-04:00 level=ERROR msg="The target isn't recognized as Confluence, quitting" host=google.com port=443 verified=false

Resulted in:

albinolobster@mournland:~/Downloads/PolarProxy$ ./PolarProxy --httpconnect 8080
<6>Starting PolarProxy 0.9.7.0
<6>[8080] HTTP CONNECT proxy Listening on: 0.0.0.0:8080

After:

albinolobster@mournland:~/cve-2023-22527/nashorn$ ./build/cve-2023-22527_linux-arm64 -v -rhost google.com -rport 443 -s -proxy http://127.0.0.1:8080
time=2024-04-09T21:16:15.992-04:00 level=STATUS msg="Starting target" index=0 host=google.com port=443 ssl=true "ssl auto"=false
time=2024-04-09T21:16:15.992-04:00 level=STATUS msg="Validating Confluence target" host=google.com port=443
time=2024-04-09T21:16:16.420-04:00 level=ERROR msg="The target isn't recognized as Confluence, quitting" host=google.com port=443 verified=false

Resulted in:

albinolobster@mournland:~/Downloads/PolarProxy$ ./PolarProxy --httpconnect 8080
<6>Starting PolarProxy 0.9.7.0
<6>[8080] HTTP CONNECT proxy Listening on: 0.0.0.0:8080
<6>[8080] HTTP CONNECT proxy CONNECT proxy request from 127.0.0.1:45320 to google.com:443
<6>[8080] 127.0.0.1:8080 -> google.com:443 Connection request for google.com from 127.0.0.1:45320
<6>[8080] 127.0.0.1:8080 -> google.com:443 Action: DECRYPT
<6>[8080] HTTP CONNECT proxy CONNECT proxy request from 127.0.0.1:45322 to www.google.com:443
<6>[8080] 127.0.0.1:8080 -> www.google.com:443 Connection request for www.google.com from 127.0.0.1:45322
<6>[8080] 127.0.0.1:8080 -> www.google.com:443 Action: DECRYPT
<6>[8080] 127.0.0.1:8080 -> www.google.com:443 Stream closed by client (239 bytes read)
<6>[8080] 127.0.0.1:8080 -> google.com:443 Stream closed by client (205 bytes read)

@j-baines j-baines merged commit 658c8d8 into vulncheck-oss:main Apr 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants