Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
3eb4ab9
Fix make dist
dwmw2 Jun 22, 2017
f57eccd
Small mod to esp.c to support FreeBSD.
brennanmh Jul 18, 2017
4ed81ce
Merge pull request #47 from brennanmh/globalprotect
dlenski Jul 19, 2017
395201c
Suppress warnings from noverify in challenge-login
starhawking Aug 3, 2017
8d98948
Merge pull request #48 from starhawking/globalprotect
dlenski Aug 3, 2017
4d6b342
Remove supposedly excessive check to fix #50
Aug 10, 2017
3f23aac
Merge pull request #51 from kamazee/globalprotect
dlenski Aug 10, 2017
71428d0
Add -g to test CFLAGS
dwmw2 May 27, 2017
cecadff
Make dup_config_arg() always duplicate the argument
dwmw2 May 31, 2017
2e7415f
Warn if setlocale() fails
dwmw2 May 31, 2017
d8848c7
Update translations from GNOME
dwmw2 May 31, 2017
0b103e8
Add glibc-langpack-cs to gitlab CI environment
dwmw2 May 31, 2017
d298a8b
Allow reading stdin on Windows instead of forcibly opening console
dwmw2 Aug 14, 2017
39eb59e
Require GnuTLS 3.2.10+ for GnuTLS builds
dwmw2 Aug 14, 2017
881dcb2
Kill HAVE_GNUTLS_DTLS_SET_DATA_MTU
dwmw2 Aug 14, 2017
266a393
Kill HAVE_GNUTLS_PKCS11_GET_RAW_ISSUER
dwmw2 Aug 14, 2017
324b88d
Kill HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST
dwmw2 Aug 14, 2017
5f0eb81
Build ESP and DTLS unconditionally with GnuTLS
dwmw2 Aug 14, 2017
95970ab
Kill HAVE_GNUTLS_PKCS12_SIMPLE_PARSE
dwmw2 Aug 14, 2017
e42c116
Kill HAVE_GNUTLS_CERTIFICATE_SET_KEY
dwmw2 Aug 14, 2017
c47fcd1
Kill HAVE_GNUTLS_PK_TO_SIGN
dwmw2 Aug 14, 2017
5370e6f
Kill HAVE_GNUTLS_PUBKEY_EXPORT2
dwmw2 Aug 14, 2017
61cfb27
Kill HAVE_GNUTLS_X509_CRT_SET_PIN_FUNCTION
dwmw2 Aug 14, 2017
ad09413
Kill HAVE_GNUTLS_URL_IS_SUPPORTED
dwmw2 Aug 14, 2017
314dafa
Use LC_ALL for auth-nonascii test, not LC_CTYPE
dwmw2 Aug 14, 2017
76583bb
factor out common dump_buf_hex() and free_optlist() utility functions
dlenski May 20, 2017
342a85b
relax requirements for Juniper hostname packet response
dlenski Jun 14, 2017
cc6af8d
tweak the dtls_state handling in preparation for supporting GlobalPro…
dlenski May 20, 2017
5cd81d7
add vpn_proto member functions .udp_send_probes and .udp_catch_probe …
dlenski May 20, 2017
0ca5974
add new_keys argument to esp_setup_keys() in preparation for supporti…
dlenski May 20, 2017
91c8188
try alternate vpnc-script location (used by Debian-based distros)
dlenski Jun 21, 2017
3f2c753
print password expiration, if sent by GlobalProtect server
dlenski Aug 14, 2017
50d7b95
Merge remote-tracking branch 'upstream/master' into globalprotect
dlenski Aug 15, 2017
a21e4fc
Update README.md for missing Linux build step
dmoss-inContact Sep 7, 2017
cea04eb
Merge pull request #53 from dmoss-inContact/patch-1
dlenski Sep 10, 2017
c49d46f
update README instructions for Deb/Ubuntu builds based on @kozzztik's PR
dlenski Oct 3, 2017
7b86b5f
README: add ToC and remove obsolete PPA
dlenski Oct 11, 2017
1431da1
all right, adding `pkg-config` to Debian/Ubuntu build dependencies
dlenski Oct 26, 2017
5026439
Create spoofer.py
videlanicolas Oct 31, 2017
aa2a051
add HIP report check as part of config process
dlenski Nov 1, 2017
f4e8c98
make spoofer.py really dumb and simple like get-globalprotect-config.py
dlenski Nov 1, 2017
4509c93
spoofer.py → hipreport.py (and don't bother checking if HIP report is…
dlenski Nov 1, 2017
4104ab7
add --no-verify, and use absence/presence of --md5 as a sign we need …
dlenski Nov 1, 2017
89b4f41
I don't have time to teach everyone how to build this
dlenski Nov 9, 2017
ed6e357
move error checking
dlenski Nov 28, 2017
746c10e
use --csd-wrapper to submit a HIP report
dlenski Nov 28, 2017
60f6170
ignore HIP submission failure; many GP VPNs work without it despite r…
dlenski Nov 29, 2017
2d77040
Loop when sending HTTP requests larger than the 16KiB SSL record max
dlenski Nov 29, 2017
41aca6e
Loop when sending HTTP requests larger than the 16KiB SSL record max
dlenski Nov 29, 2017
598758b
simpler: do HIP submission in openconnect itself, so that the script …
dlenski Nov 29, 2017
b324d7e
unneeded
dlenski Nov 29, 2017
f8a7a2e
example HIP report generator/spoofer script
dlenski Nov 29, 2017
e4ef149
Merge pull request #70 from dlenski/hipreport
dlenski Dec 5, 2017
4594486
URI fixes in README.md
magnetikonline Dec 6, 2017
9937e7d
Merge pull request #72 from magnetikonline/readme-fixes
dlenski Dec 6, 2017
fdaba77
juniper: Support 'username' form input type
superpacof Jan 13, 2017
42ec887
Improve GPST/ESP not-stepping-on-toes tap dance
dlenski Dec 15, 2017
7274c12
Add support for tunnel-based rekey for GlobalProtect
dlenski Dec 15, 2017
0084d18
improve comments and basic Bourne-shell compatibility in hipreport.sh…
dlenski Dec 16, 2017
488635f
document HIP report support
dlenski Dec 16, 2017
fa2858c
Merge remote-tracking branch 'upstream/master' into globalprotect
dlenski Dec 17, 2017
30ad098
add per-protocol override for HTTP User-Agent
dlenski Dec 17, 2017
f9c36b4
bug fixes for HIP support (#70) backported from gpst branch
dlenski Dec 18, 2017
b2096ba
Protocols should explicitly request the same IPv4 address on reconnec…
dlenski Dec 21, 2017
24bc277
add --request-ip option to explicitly request a specific IPv4 addresses
dlenski Dec 21, 2017
eae475f
tap-dance around duplicate preferred-ip values
dlenski Dec 21, 2017
af838db
tweak comment (as suggested on #75)
dlenski Jan 2, 2018
78fc32e
fix a very dumb string-handling bug (seen in #76)
dlenski Jan 7, 2018
14b338e
factor out and clean up build_csd_token(), and clean up check_or_subm…
dlenski Jan 7, 2018
0db7ce0
cleanup cookie handling with filter_opts()
dlenski Jan 7, 2018
270651d
Save latest ESP sequence number even if replay protection isn't in use
dlenski Jan 8, 2018
352aeb5
no good reason *not* to turn on ESP replay protection for GP
dlenski Jan 8, 2018
6b01bc6
Fix a really subtle bug causing 100% CPU utilization after ESP failur…
dlenski Jan 9, 2018
86c2dea
simplify esp.c by reusing ka_check_deadline() function
dlenski Jan 9, 2018
9891d2d
ensure openconnect will actually compile with !defined(HAVE_ESP)
dlenski Jan 9, 2018
ea4307d
Update PAN_GlobalProtect_protocol_doc.md
dlenski Jan 10, 2018
8b08f9f
add test login script
dlenski Jan 12, 2018
be074cd
Smarter MTU calculation for GlobalProtect
dlenski Jan 11, 2018
da1e0ab
properly handle alternate GPST tunnel path
dlenski Jan 12, 2018
9973434
Replace static auth form for GlobalProtect portal with a dynamic auth…
dlenski Jan 13, 2018
a99b6e2
Check all oc_text_buf for errors (e.g. out-of-memory) before using th…
dlenski Jan 13, 2018
a390ef0
underp
dlenski Jan 13, 2018
dd4b8c6
Fix ESP tunnel MTU calculation
jdz Jan 15, 2018
bf579e8
Merge pull request #80 from jdz/globalprotect
dlenski Jan 15, 2018
8a44cd2
Revert "Merge pull request #80 from jdz/globalprotect"
dlenski Jan 15, 2018
6b8e53d
Close #80, fix #82 (I completely botched the cherry-pick from the gps…
dlenski Jan 16, 2018
3bb3c25
Let's try some CI
dlenski Jan 16, 2018
ae48121
allow whitespace in login response
dlenski Jan 16, 2018
d408089
define esp_magic as uint32_t (equivalent to in_addr_t) on Windows
dlenski Feb 22, 2018
d737e18
don't #include <sys/wait.h> on Win32, where it doesn't exist (working…
dlenski Feb 25, 2018
42166de
factor out Win32 IP/ICMP packet headers into a separate win32-ipicmp.…
dlenski Feb 25, 2018
73f46be
set clientos and os-version when requesting ssl-vpn/login.esp (appare…
dlenski Feb 27, 2018
a1f97f0
fix a bug leading to incorrect split-include netmasks
dlenski Feb 27, 2018
0cc199a
set clientos=Windows, as the official PAN GP client does (ping #86)
dlenski Feb 27, 2018
9c790be
Include automake into homebrew packages list
alex88 Mar 4, 2018
b542e95
typo in name
dlenski Mar 4, 2018
e401991
failure behavior on Windows (where HIP/CSD aren't supported) should b…
dlenski Mar 4, 2018
14dc2c1
Merge pull request #92 from alex88/patch-1
dlenski Mar 12, 2018
abb4ef3
allow receipt of oversize ESP packets, with 256 bytes of headroom (pi…
dlenski Mar 27, 2018
29445c3
Add basic Dockerfile
Mar 27, 2018
5b1db80
Fixes linking ubuntu
snomann Apr 9, 2018
405efcf
Merge pull request #99 from snomann/globalprotect
dlenski Apr 9, 2018
e740621
Fix leaks in getconfig XML parsing, caught with Valgrind
dlenski Apr 12, 2018
a3d0f29
more memory leaks in the passing of the challenge prompt and auth_id …
dlenski Apr 12, 2018
de0feaa
First take on a general-purpose solution for #97 and #98
dlenski Apr 12, 2018
1b38c42
fix memory leak of pw_or_cookie_field too
dlenski Apr 13, 2018
c96a880
Allow specifying server in configuration file
maxcrees Apr 2, 2018
d882fe1
ensure that ESP tunnel is disabled before we re-fetch the configurati…
dlenski Apr 13, 2018
3aa5202
move determination of ESP-vs.-TLS outside of calculate_mtu() function…
dlenski Apr 13, 2018
5596bba
extreme README makeover
dlenski Apr 14, 2018
166b5d2
add README section about HIP reports
dlenski Apr 14, 2018
de11cab
Merge branch 'globalprotect-win32' into globalprotect
dlenski Apr 15, 2018
fc0220d
underp ESP-vs.-TLS MTU calculation (borked in 3aa5202, ping #89)
dlenski Apr 16, 2018
f227781
fix too-early free(), appears to fix #101
dlenski Apr 17, 2018
f573478
Fix Google 2FA typo
Apr 19, 2018
ffe46ab
briefly mention new --server option
dlenski Apr 21, 2018
774b20a
reorder options
dlenski Apr 21, 2018
096f916
add section headings
dlenski Apr 21, 2018
55fba41
Merge branch 'nicer_options_list' into globalprotect
dlenski Apr 21, 2018
5691d95
reuse username in challenge-auth form (fixes #102)
dlenski Apr 22, 2018
7a6d32c
I always get memory handling wrong when I do things in a hurry (ping …
dlenski Apr 26, 2018
be2d62d
Add Dockerfile and instructions
andor-pierdelacabeza May 4, 2018
95fc2c6
Add Docker to ToC
andor-pierdelacabeza May 4, 2018
c156c1b
Fix Docker in ToC ¬_¬
andor-pierdelacabeza May 4, 2018
a35bdcd
Merge branch 'globalprotect' into globalprotect
May 4, 2018
64ad7ca
Add Docker ToDo
andor-pierdelacabeza May 4, 2018
eb4de65
Add first TravisCI testing
andor-pierdelacabeza May 8, 2018
7e4960a
Fix docker build :(
andor-pierdelacabeza May 8, 2018
382967a
Test multistage Travis build
andor-pierdelacabeza May 8, 2018
983a515
Test _gp_ string grepping
andor-pierdelacabeza May 8, 2018
9e79948
Add GlobalProtect support availability
andor-pierdelacabeza May 8, 2018
f509462
Merge branch 'fun_with_cookies' into globalprotect
dlenski May 10, 2018
f873d5b
Merge pull request #105 from andor-pierdelacabeza/globalprotect
dlenski May 21, 2018
077c420
attempted quick fix for #109
dlenski May 22, 2018
27c5568
don't reuse challenge auth form from portal (another kludge for #109)
dlenski May 23, 2018
49a7074
haste makes waste: don't reuse unreusable values (ping #109)
dlenski May 24, 2018
bfaba1b
call the initial form "_default", not "_gateway", since it can also b…
dlenski May 24, 2018
1b3fbc7
GlobalProtect server simulator: almost as fun as Microsoft Flight Sim…
dlenski May 29, 2018
0e71e62
just defined esp_magic as uint32_t
dlenski May 30, 2018
695de11
Tolerate packets that are larger than negotiated MTU after decompression
dlenski Aug 1, 2018
1054ac1
Align naming and commenting of mechanism for receiving oversize packe…
dlenski Aug 1, 2018
f37cc21
Clarify a few uncommented corners of the ESP support
dlenski Aug 2, 2018
bc80fb9
Clarify protocol description in connection message
dlenski Aug 2, 2018
163515a
Fill in a few missing references to GlobalProtect, TNCC, and DTLS sup…
dlenski Aug 2, 2018
6d1febd
Reduce unnecessary connection-rebuilding for Juniper
dlenski Aug 2, 2018
81cbc1f
Remove first oNCP negotiation request (only second is necessary)
dlenski Aug 2, 2018
88b075b
include computer name in the GP cookie
dlenski Aug 4, 2018
9114635
Merge remote-tracking branch 'dlenski/globalprotect' into globalprotect
TysonAndre Aug 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
<!--

Hold on a sec right there...

Are you asking for help *building* this version of OpenConnect?

If so, please refer to what I wrote in the README:

https://github.com/dlenski/openconnect/HEAD/globalprotect/README.md#installation

This version has the exact same build dependencies as the official OpenConnect v7.08;
modern versions of autoconf, automake, gcc, libxml, etc. Follow the
official build instructions, or ask for help on the official mailing list:

http://www.infradead.org/openconnect/building.html

If you are having trouble *building* this version of OpenConnect, I am
simply going to refer you back to the official instructions :-D

(Unless you can demonstrate that I have somehow broken the ability to
to build this version using the official instructions. See #9 for an example
of this:

https://github.com/dlenski/openconnect/pull/9 )


---------------------------------------------------------------------


On the other hand, if you have successfully *built* this version of
OpenConnect, and are now encountering specific, reproducible errors while
*running* it, please continue and fill out details requested below ...

-->

# Problem description

1. I ran openconnect-gp as follows: `openconnect --protocol=gp <!-- Show other command line options here -->`
Expand Down
35 changes: 18 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ CentOS7/GnuTLS:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk
java-devel-openjdk glibc-langpack-cs
- ./autogen.sh
- ./configure --with-java
- ./configure --with-java CFLAGS=-g
- make -j4
# XFAIL the auth-pkcs11 test because GnuTLS 3.3.8 doesn't support pin-value
- make VERBOSE=1 -j4 check
Expand All @@ -36,9 +36,9 @@ CentOS7/OpenSSL:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk 'pkgconfig(libp11)'
java-devel-openjdk 'pkgconfig(libp11)' glibc-langpack-cs
- ./autogen.sh
- ./configure --without-gnutls --with-openssl --with-java --without-openssl-version-check --enable-dtls-xfail --disable-dsa-tests
- ./configure --without-gnutls --with-openssl --with-java --without-openssl-version-check --enable-dtls-xfail --disable-dsa-tests CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -62,8 +62,9 @@ CentOS6/OpenSSL:
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk vpnc 'pkgconfig(libp11)' 'pkgconfig(p11-kit-1)'
glibc-langpack-cs
- ./autogen.sh
- ./configure --with-java --without-openssl-version-check --enable-dtls-xfail
- ./configure --with-java --without-openssl-version-check --enable-dtls-xfail CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -84,9 +85,9 @@ Fedora/GnuTLS:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk
java-devel-openjdk glibc-langpack-cs
- ./autogen.sh
- ./configure --with-java
- ./configure --with-java CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -107,9 +108,9 @@ Fedora/GnuTLS/clang:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk clang
java-devel-openjdk clang glibc-langpack-cs
- ./autogen.sh
- ./configure --with-java CC=clang
- ./configure --with-java CC=clang CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -130,10 +131,10 @@ Fedora/OpenSSL:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk 'pkgconfig(libp11)'
java-devel-openjdk 'pkgconfig(libp11)' glibc-langpack-cs
- dnf --enablerepo=updates-testing update -y libp11\* gnutls
- ./autogen.sh
- ./configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests
- ./configure --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -154,10 +155,10 @@ Fedora/OpenSSL/clang:
'pkgconfig(libproxy-1.0)' 'pkgconfig(liboath)' 'pkgconfig(stoken)'
ocserv softhsm 'pkgconfig(uid_wrapper)' 'pkgconfig(socket_wrapper)'
vpnc-script 'pkgconfig(libpskc)' 'pkgconfig(libpcsclite)'
java-devel-openjdk 'pkgconfig(libp11)' clang
java-devel-openjdk 'pkgconfig(libp11)' clang glibc-langpack-cs
- dnf --enablerepo=updates-testing update -y libp11\* gnutls
- ./autogen.sh
- ./configure CC=clang --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests
- ./configure CC=clang --without-gnutls --with-openssl --without-openssl-version-check --disable-dsa-tests CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -178,7 +179,7 @@ MinGW32/GnuTLS:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw32-configure
- mingw32-configure CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -199,7 +200,7 @@ MinGW32/OpenSSL:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw32-configure --without-gnutls --with-openssl --without-openssl-version-check
- mingw32-configure --without-gnutls --with-openssl --without-openssl-version-check CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -220,7 +221,7 @@ MinGW64/GnuTLS:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw64-configure
- mingw64-configure CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand All @@ -241,7 +242,7 @@ MinGW64/OpenSSL:
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./autogen.sh
- mingw64-configure --without-gnutls --with-openssl --without-openssl-version-check
- mingw64-configure --without-gnutls --with-openssl --without-openssl-version-check CFLAGS=-g
- make -j4
- make VERBOSE=1 -j4 check
tags:
Expand Down
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
notifications:
email:
false

dist: trusty
sudo: required

language: c
compiler:
- gcc

services:
- docker

jobs:
include:
- stage: app build
env: MAKEFLAGS="-j 2"
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential autoconf automake libtool pkg-config
vpnc-scripts
gettext libproxy-dev libxml2-dev liblz4-1 liblz4-dev libstoken-dev liboath-dev
libgnutls28-dev # actually GnuTLS 3.2.11 ¯\_(ツ)_/¯
script:
- ./autogen.sh
- ./configure
- make VERBOSE=1 version.c
- make
- make VERBOSE=1 -j4 check
- stage: docker build
services:
- docker
before_script:
- docker build -t openconnect .
script:
- docker run openconnect "/openconnect/openconnect" "-V"| grep gp
# This last grep should be changed if this goes upstream, as it
# only checks for GlobalProtect support availability.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM debian:9-slim as builder
WORKDIR /openconnect
RUN apt update \
&& apt install -y \
build-essential \
gettext \
autoconf \
automake \
libproxy-dev \
libxml2-dev \
libtool \
vpnc-scripts \
pkg-config \
libgnutls28-dev \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD . .
RUN ./autogen.sh
RUN ./configure
RUN make

#FROM debian:9-slim
#WORKDIR /openconnect
#COPY --from=builder /openconnect .
#RUN make install
#RUN ldconfig
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library_srcs = ssl.c http.c http-auth.c auth-common.c library.c compat.c lzs.c m
lib_srcs_cisco = auth.c cstp.c
lib_srcs_juniper = oncp.c lzo.c auth-juniper.c
lib_srcs_globalprotect = gpst.c auth-globalprotect.c
lib_srcs_gnutls = gnutls.c gnutls_pkcs12.c gnutls_tpm.c
lib_srcs_gnutls = gnutls.c gnutls_tpm.c
lib_srcs_openssl = openssl.c openssl-pkcs11.c
lib_srcs_win32 = tun-win32.c sspi.c
lib_srcs_posix = tun.c
Expand Down
66 changes: 58 additions & 8 deletions PAN_GlobalProtect_protocol_doc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
This is an anonymized log of the authentication, configuration, tunnel data transfer, and logout interactions between a [PAN](http://www.paloaltonetworks.com) GlobalProtect VPN server and client (Windows client, v3.0.1-10).
This is an anonymized log of the authentication, configuration, tunnel data transfer, and logout interactions between a
[PAN](http://www.paloaltonetworks.com) GlobalProtect VPN server and client. The logs below are based on the official Windows
client, v3.0.1-10, with some updates from v4.0.5-8.

Client version 4.0 [adds IPv6 support](https://live.paloaltonetworks.com/t5/Colossal-Event-Blog/New-GlobalProtect-4-0-announced-with-IPv6-support/ba-p/141593) and SAML authentication support.

The correct user-agent (`User-Agent: PAN Globalprotect`) is **required** for all HTTP interactions with the GlobalProtect VPN. It treats any other user-agent as a web browser, not a VPN client.

Expand Down Expand Up @@ -38,6 +42,20 @@ portal-prelogonuserauthcookie: empty
host-id: deadbeef-dead-beef-dead-beefdeadbeef
```

New parameters sent by Windows client v4.0.5-8:

```
clientgpversion: 4.0.5-8
prelogin-cookie:
ipv6-support: yes
client-ip: 34.56.78.90
client-ipv6: .
preferred-ipv6:
```

The `client-ip{,v6}` parameters refer to the client's _external_ internet-facing IP address, while `preferred-ip{,v6}` parameters
refer to the expected/desired addresses within the VPN.

Successful login response
=========================

Expand Down Expand Up @@ -70,11 +88,20 @@ In order to handle the getconfig, tunnel-connect, and logon requests properly (d
<argument>tunnel</argument>
<argument>-1</argument>
<argument>4100</argument>
<argument>preferred ip address as provided above</argument>
<argument>preferred IP address as sent in request</argument>
</application-desc>
</jnlp>
```

Windows client v4.0.5-8 receives additional input-parroting arguments at the end:

```xml
<argument>portal-userauthcookie as sent in request</argument>
<argument>prelogon-userauthcookie as sent in request</argument>
<argument>preferred IPv6 address as sent in request</argument>
```


getconfig request
=================

Expand Down Expand Up @@ -108,6 +135,17 @@ enc-algo: aes-256-gcm,aes-128-gcm,aes-128-cbc,
hmac-algo: sha1,
```

Windows client v4.0.5-8 adds additional parameters at the end:

```xml
app-version: 4.0.5-8
addr1-v6-1: f00f::/16
addr1-v6-2: f00f:dead:beef::dead:beef/128
preferred-ipv6:
hmac-algo: sha1,.
```


Response #2 (getconfig)
=======================

Expand Down Expand Up @@ -190,14 +228,22 @@ In the back-and-forth flows shown below, `<` means sent by the gateway, `>` mean

### ESP-over-UDP

Uses the keying information obtained in response to the `getconfig` request. In order to initiate the connection, the client sends 3 ESP-encapsulated ICMP request ("ping") packets to the gateway. They are sent _from_ the client's in-VPN IP address _to_ the IP address specified by the `<gw-address>` from the `getconfig` response (this is normally the same as the gateway's **public** IP address, but is sometimes a VPN-internal address ¯\\\_(ツ)\_/¯). These ICMP request packets include the following magic payload:
Uses the keying information obtained in response to the `getconfig` request. In order to initiate the connection, the client sends 3 ICMP request ("ping") packets to the gateway.

"monitor\x00\x00pan ha 0123456789:;<=>? !\"#$%&\'()*+,-./\x10\x11\x12\x13\x14\x15\x16\x18"
"monitor\x00\x00pan ha " (first 16 bytes)
* These packets are ESP-encapsulated
* These packets are sent _from_ **the client's in-VPN IP address** _to_ **the IP address specified by the `<gw-address>` from
the `getconfig` response**.
* The destination address is usually the same as the gateway's **public** internet-facing IP address, but sometimes it is a
VPN-internal address ¯\\\_(ツ)\_/¯
* These ICMP request packets include the following magic payload — though only the first 16 bytes of the payload appear
to be necessary to elicit a response from the gateway.

Only the first 16 bytes of the payload appear to be necessary to elicit a response from the gateway. Once the gateway has responded with a corresponding ICMP reply, the client and server send and receive arbitrary ESP-encapsulated traffic.
"monitor\x00\x00pan ha 0123456789:;<=>? !\"#$%&\'()*+,-./\x10\x11\x12\x13\x14\x15\x16\x18"
"monitor\x00\x00pan ha " (first 16 bytes)

The client continues to periodically send the "magic ping" packets as a keepalive.
* Once the gateway has responded with a corresponding ICMP reply, the client and server send and receive arbitrary
ESP-encapsulated traffic.
* The client continues to periodically send the same "magic ping" packets as a keepalive.

### SSL vpn tunnel

Expand Down Expand Up @@ -264,5 +310,9 @@ Successful logout response
<domain>company domain name</domain>
<user>Myusername</user>
<computer>DEADBEEF01</computer>

<!-- newer servers include these, older ones don't: -->
<saml-session-index></saml-session-index>
<saml-name-id></saml-name-id>
</response>
```
```
Loading