GithubHelp home page GithubHelp logo

fl0rp / hostscan-bypass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gilks/hostscan-bypass

0.0 1.0 0.0 9 KB

Generate OpenConnect CSD files to bypass Cisco AnyConnect hostscan requirements

Go 100.00%

hostscan-bypass's Introduction

Hostscan Bypass

Generate an OpenConnect Cisco Secure Desktop (CSD) file that bypasses AnyConnect hostscan requirements.

This script parses an AnyConnect client connection and outputs a CSD file that can be used with OpenConnect. The CSD file will perform a POST request to the AnyConnect server, giving the illusion a hostscan took place. Even if the AnyConnect server does not publish binaries for your Operating System (OS), you will still be able to connect. This is due to the fact that OpenConnect allows you to specify which OS you are connecting from. This means you can be on a Linux box and pretend to be a Windows client!

WARNING: Doing this will bypass the checks hostscan performs. This may be against your company's policy. By using this script and the resulting CSD file, you are using these files at your own risk. This script is for educational purposes only.

Using MacOS with the Hostscan Bypass

The hostscan bypass was originally coded and tested against a Windows machine running AnyConnect. I do not personally have the resources to troubleshoot issues on MacOS. However, @cjbirk did a bit of troubleshooting and successfully generated a CSD file using the bypass on MacOS. Please see this issue for suggestions on troubleshooting any mac related issues.

Blog

You can find the associated blog for this tool here.

Quick Start

Note: You will need to install go. That process won't be covered here.

  1. sudo go run hostscan-bypass.go -l <YOUR IP> -p 443 -r <TARGET VPN URL>:443 -s
  2. Use AnyConnect and connect to <YOUR IP>
  3. Wait. You do not need to enter in any credentials for hostscan to start. By default, the CSD file will be named hostscan-bypass.sh.
  4. Make the CSD file executable (otherwise OpenConnect can't use it): chmod +x hostscan-bypass.sh
  5. Finally, connect: sudo openconnect --csd-wrapper=hostscan-bypass.sh <VPN URL> --os=win

Shout Outs

  1. hostscan-bypass.go was hacked off of tcpprox. Thanks @staaldraad!
  2. Fromzy, who posted the most simple CSD example
  3. @bmaddy, who posted examples and resources that aided in the completion of this project
  4. @cjbirk for taking the time to figure out how to successfully intercept AnyConnect on MacOS!

hostscan-bypass's People

Contributors

benichmt1 avatar gilks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.