-
Notifications
You must be signed in to change notification settings - Fork 45
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
OS X Troubleshooting #4
Comments
Full disclosure, I never tested this using a Linux or OS X client. When I built the tool I used a Windows client. I do not have the development environment available to test Linux and OS X clients. However, I'm interested in seeing if we can make this work. This may require a bit of troubleshooting on your part- please let me know if you manage to get it working! Take a look around the Linux/OS X AnyConnect client and try to find a setting like |
Hi @Gilks It looks strange that you don't have a Linux dev environment. You can google the |
I appreciate your awareness. It sounds like there may be a misunderstanding around what is required to develop this project. Allow me to explain. The Linux development environment is not limited to the distribution and AnyConnect binary. In addition to the aforementioned requirements, the developer also requires a valid Cisco VPN that publishes the hostscan binaries for Linux. I do not have a valid VPN that publishes Linux hostscan binaries. Therefore I do not have the resources to support this request. When I have the opportunity (and authorization) to utilize a companies VPN page for the continued development of this project, I will happily do so. Thanks again for taking the time to use the bypass! |
Oh, I understand that! Your vpn is much more locked down than ours. Ours does not allow downloading the installer from a web page, barely from the times I joined that company, but still updates it and provides the trojans. Some years ago I've been unpacking the ASA image at my study courses and saw it containing Linux, macos and necrosoft window versions of installers and trojans, respectively. |
I'm curious- is there a reason you need to intercept Linux/OS X? If you are able to intercept the Windows AnyConnect client connection, you can connect to the network with Linux/OS X using OpenConnect. |
It looks like this: One more disclosure... About 3 years ago I've been working for a company, called Cisco Systems. After I couldn't connect with Cisco Anydisconnect, they've issued me a nice Vpnc config, so that I've been really happy. But now I'm working for another company that really makes use of these Cisco tools to build some kind of Soviet-style walled garden. |
Ah, that makes sense. You worked for Cisco Systems? What a small world! Without access to OS X there isn't much I can do to help. I've only got two ideas:
|
Yeah, some years ago I've been involved into ESA/WSA and Cisco-cloud. |
Good news! I found a way to get my hands on an OS X machine temporarily. I was able to reproduce the exact scenario you were describing where the error message I found that removing the TLS Proxy command line argument
Let me know how this works! |
Hey @megastallman. Did you get a chance to check this out? |
Not yet. Hope to try this week. |
Closing issue due to inactivity. |
Hi @Gilks ! When I omit the '-s' option, I get the following result: From Client [0]: And it couldn't get the proper end of the stream, printing So the try is basically unsuccessful. Thanks in advance! I think we can reopen the issue. |
I apologize but I cannot be of anymore help. I would need the actual machine producing that output to troubleshoot this any further. I have no way of reproducing the bug. I'm out of ideas unfortunately. If you troubleshoot the issue and have any questions you think I can answer I will happily help. |
Hi there @megastallman. I think I have a solution for you. Create a file in the repository called 'config.json' Populate it with the following (to suit your needs - i set the common name to the hostname of the internal IP i was using):
Then, run the hostscan-bypass.go program as such:
Now, I added the certificate to my mac's keychain by fetching it with openssl and then saving it to a file. Then I opened it. However, I'm not sure this really matters because AnyConnect still complains that the cert is invalid:
Once your keychain opens up, make sure you modify the ca/cert to be trusted. Ensure that the checkbox in your AnyConnect preferences is still set to not block invalid certs, type in the IP or hostname of your internal host and hit connect. Voila You should now have a successfully saved hostscan-bypass.sh in your folder! |
Thanks @cjbirk ! It works on Linux, and in a couple of days I will ask mac users to sniff the 'corporate' reply. I hope to overcome those company's network restrictions, that currently I'm cheating around with sshuttle over openconnect. |
That's awesome to hear. I'm glad it worked for you |
I can't get this to work on Linux or mac @cjbirk. I just get the same EOF issue no matter what. |
Did you try the solution posted by @cjbirk ? |
Yeah, I tagged the wrong user 🤦♂️ |
Hi @m0ngr31 !
There could be more options, but I've got satisfied with a Macos Shimo reply. |
So, @m0ngr31 , what is your situation? Maybe we can work it around somehow? Maybe you can just try Openconnect or Shimo on a corp laptop? |
I have a corporate Macbook with my personal linux box I'm trying to use to do the MITM. I think I got it working with some csd-wrapper scripts last night though. |
Hello guys, Administrator@Star-pc MINGW64 /c/projects/go/src/github.com/gilks/hostscan-bypass (master) This is what i am getting when i use AnyConnect and connect to 10.10.10.8 |
Thanks for making use of the bypass! It sounds like a connection to remote-vpn.example.com is failing. Make sure the machine you are running
the hostscan-bypass.go on is able to reach remote-vpn.example.com.
If you can reach it in a web browser, try prepending https:// to your vpn
url (-r argument).
|
Hello @megastallman , I am stuck at last phase, below is the error message:- $ openssl s_client -showcerts -connect 10.10.10.8 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycert.pem && open mycert.pem kindly help. |
Hi @Sputnik-001 ! |
Hi @Joshuaks ! |
Ok @Joshuaks . I've asked to build that hostscan-bypass binary and send it to me. It has been built with |
@megastallman It could be similar to #6 in that this sounds suspiciously like a TLS issue. I don't think using older go binaries will work here unless golang deprecated the needed ciphers (in that case it would work). @Joshuaks The
|
@Gilks I am honestly surprised at all the help so far! I really appreciate it.
@megastallman Thanks for the binary. I'll definitely give it a try and report back. |
Yeah, the old go binary isn't going to help much here. There's no way it's a cipher support issue (as seen in #6). Couple more questions about your hostscan-bypass one liner:
|
|
Try using two separate machines. One machine running the hostscan-bypass and a victim machine (Windows) running AnyConnect. I know it shouldn't matter but something is happening with the TLS handshake.. It's kind of hard to troubleshoot issues like this because I don't have a way to reproduce the problem. Use this one liner: |
I'm not sure when I'll get to it (the machine it pretty locked down) but that'll be my next step. Will keep you updated. |
So far I've been unsuccessful in getting it to work. AnyConnect prompts for an invalid certificate, click "Connect Anyway", login dialog shows up. On the hostscan-bypass side there's some activity and it ends with this:
I know the manual says not to login, so I wait. Nothing else happens, no further output and no CSD file created. I've tried with -c config.json as well, and if no -s is used AnyConnect establishes connection and passes the validation. Yet still no CSD file to be found. Can anyone point me in the right direction? |
@miminno when you open an issue please be sure to include the distro you're trying to MITM and all of the output that you get up until the |
It was a poor decision to lock discussions on this thread. I've reopened it to allow continued troubleshooting for any OS X related issues. @cjbirk @megastallman - are either of you able to help this user? You can post your replies here. |
@Gilks you seemed to have closed the issue again? |
Originally I meant to unlock the conversation not re-open the issue. Sorry about that. |
Hi, Thanks for this tool. I found an alternative which is pretty straightforward (does not require to change AnyConnect preferences or trust invalid certificates) Install Then use AnyConnect to connect to the https url generated by Juan |
@ncortines interesting! could you please be a bit more specific? Are you saying you don't need this hostscan bypass tool at all with ngrok? What does stand for? |
@desilinguist this tool is great and needed! |
Ah, got it now! Thanks! |
I had success with the config.json file, but only after removing the [ ] array wrapping:
I noticed if I navigated to the hostscan-bypass webserver with Firefox, the certificate looked more normal after this as well, with the CN showing up, etc. |
Hi @Gilks !
I've been able to sniff a window machine with hotscan-bypass, but when I do the same with the Linux client I get the "Limited Access DNS Failure" line with the banner saying
AnyConnect cannot confirm it is connected to your secure gateway. The local network may not be trustworthy. Please try another network. Connection attempt has failed.
The macos user say they get the same.The bypass script says:
[*] Listening for AnyConnect client connection.. [*] Accepted from: 87.228.186.66:58944 [*][0] Connected to server: 198.49.180.205:443 read tcp 10.10.0.2:33620->198.49.180.205:443: read: connection reset by peer
Thanks!
The text was updated successfully, but these errors were encountered: