From: Daniel Lenski
You then use this cookie in an HTTP CONNECT request, and can +
Some Cisco servers require you to execute a 'Cisco Secure Desktop' +trojan binary (intended for security scanning of the client system) +before authentication can complete; see the CSD +page for information on how to comply with this requirement, or +spoof it, with OpenConnect.
+ +After authentication, you use the webvpn cookie +in an HTTP CONNECT request, and can then pass traffic over that connection. IP addresses and routing information are passed back and forth in the headers of that CONNECT request.
diff --git a/www/csd.xml b/www/csd.xml index c9cb5733..b551a9ed 100644 --- a/www/csd.xml +++ b/www/csd.xml @@ -10,6 +10,13 @@The CSD ('Cisco Secure Desktop') mechanism is a security scanner +for the Cisco AnyConnect VPNs, in the +same vein as Juniper's Host Checker (tncc.jar) +and GlobalProtect's HIP.
+ +The 'Cisco Secure Desktop' is a bit of a misnomer — it works by downloading a trojan binary from the server and running it on your client machine to perform some kind of 'verification' and post its @@ -27,5 +34,33 @@ option is used to handle the script in a 'safe' manner.
This support currently only works when the server has a Linux binary installed, and only when that Linux binary runs on the client machine. +OpenConnect supports running the CSD binary, or spoofing its +behaviour, by passing the --csd-wrapper=SCRIPT argument +with a shell script.
+ +The OpenConnect distribution includes two alternative +scripts to support the execution or spoofing of the CSD behaviour, in +the trojans/ subdirectory:
+ +/ssl-vpn/hipreportcheck.esp
), including its MD5 digest and gateway-assigned IP address in the report./ssl-vpn/hipreport.esp
).OpenConnect supports HIP report generation and submission by passing the --csd-wrapper=SCRIPT
argument with a shell script to generate a HIP report in the format expected by the
+
OpenConnect supports HIP report generation and submission by passing the --csd-wrapper=SCRIPT argument with a shell script to generate a HIP report in the format expected by the server. This shell script must output the HIP report to standard output and exit successfully (status code 0). The HIP script is called with the following command-line arguments:
@@ -72,17 +72,17 @@ server. This shell script must output the HIP report to standard output and exit-Generating/spoofing a HIP report
-An example
+hipreport.sh
script is included in the -openconnect distribution.An example hipreport.sh script is included in the +OpenConnect distribution, in the trojans/ subdirectory.
Depending on how picky your GlobalProtect VPN is, it may be necessary to spoof or alter some of the parameters of the HIP report to match the output of one of the official clients. In order to capture the contents of the official Windows client's HIP reports, enable the highest logging level for the "PanGPS -Service", and then sift through the giant
PanGPS.log
file +Service", and then sift through the giant PanGPS.log file (which should be in the same directory as the executables, normally -c:\Program Files\PaloAlto Networks\GlobalProtect
) to find +c:\Program Files\PaloAlto Networks\GlobalProtect) to find the HIP report submission.diff --git a/www/juniper.xml b/www/juniper.xml index 82f31061..7ded69ca 100644 --- a/www/juniper.xml +++ b/www/juniper.xml @@ -65,23 +65,13 @@ pass the cookie to OpenConnect with its -C option, for example:
Many sites require a Java applet to run certain tests as a precondition -of authentication. This works by sending a DSPREAUTH cookie -to the client which is attempting to authenticate, and the Java code -in tncc.jar then runs and communicates with the server, handing -back a new value for the DSPREAUTH cookie to be used when -autnentication continues.
- -OpenConnect supports this with a little assistance. There is a python -script tncc-wrapper.py in the git repository which can be used -along with the tncc-preload.so from -this repository. -It may also be necessary to pass a Mozilla-compatible user agent string: -
- ./openconnect --protocol=nc --useragent 'Mozilla/5.0 (Linux) Firefox' --csd-wrapper=./tncc-wrapper.py vpn.example.com -+of authentication (similar to CSD +for AnyConnect VPNs and HIP for GlobalProtect VPNs). +See the Host Checker / TNCC page for how to configure OpenConnect +to wrap and run this applet.
The Host Checker mechanism is a security scanner for the Juniper VPNs, in the same vein as Cisco's CSD and GlobalProtect's +HIP.
+ +Many sites require a Java applet to run certain tests as a precondition +of authentication. This works by sending a DSPREAUTH cookie +to the client which is attempting to authenticate, and the Java code +in tncc.jar then runs and communicates with the server, handing +back a new value for the DSPREAUTH cookie to be used when +autnentication continues.
+ +This Java applet is a black-box binary provided by a server outside +of the client's control, and therefore has similar security concerns to Cisco's CSD +trojan.
+ +OpenConnect supports running the tncc.jar binary with a little assistance. A Python wrapper +script, tncc-wrapper.py, is provided in the trojans/ subdirectory of the +OpenConnect distribution. It can be used +along with the tncc-preload.so from +this repository. +It may also be necessary to pass a Mozilla-compatible user agent string: +
+ ./openconnect --protocol=nc --useragent 'Mozilla/5.0 (Linux) Firefox' --csd-wrapper=trojans/tncc-wrapper.py vpn.example.com ++Because of the security dangers of executing a server-provided trojan binary, this script should ideally be executed +with the permissions of a low-privilege user (e.g. --csd-user=nobody). + + +
Alternatively, the juniper-vpn-py project provides a +tncc.py which emulates the behaviour of the tncc.jar binary, rather than actually +executing it. Because this script does not actually execute a server-provided binary, security concerns are greatly +alleviated. However, this alternative script may require customization to work with VPNs that have modified +the behaviour of their Host Checker binaries in some way. +
+ + +