tncc.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <PAGE>
  2. <INCLUDE file="inc/header.tmpl" />
  3. <VAR match="VAR_SEL_FEATURES" replace="selected" />
  4. <VAR match="VAR_SEL_FEATURE_TNCC" replace="selected" />
  5. <PARSE file="menu1.xml" />
  6. <PARSE file="menu2-features.xml" />
  7. <INCLUDE file="inc/content.tmpl" />
  8. <h1>Juniper Host Checker (tncc.jar)</h1>
  9. <p>The Host Checker mechanism is a security scanner for the <a
  10. href="juniper.html">Juniper</a> VPNs, in the same vein as <a
  11. href="csd.html">Cisco's CSD</a> and <a href="hip.html">GlobalProtect's
  12. HIP</a>. It is also used by the <a href="pulse.html">Pulse Secure</a>
  13. protocol but support for running it with the Pulse protocol is not included
  14. in OpenConnect yet.</p>
  15. <h3>Background</h3>
  16. <p>Many sites require a Java applet to run certain tests as a precondition
  17. of authentication. This works by sending a <tt>DSPREAUTH</tt> cookie
  18. to the client which is attempting to authenticate, and the Java code
  19. in <tt>tncc.jar</tt> then runs and communicates with the server, handing
  20. back a new value for the <tt>DSPREAUTH</tt> cookie to be used when
  21. autnentication continues.</p>
  22. <p>This Java applet is a black-box binary provided by a server outside
  23. of the client's control, and therefore has similar security concerns to Cisco's CSD
  24. trojan.</p>
  25. <h2>TNCC support in OpenConnect</h2>
  26. <p>OpenConnect supports running the Java binary, or emulating its
  27. behaviour, by passing the <tt>--csd-wrapper=SCRIPT</tt> argument
  28. with a shell script.</p>
  29. <p>The OpenConnect distribution includes <i>two</i> alternative
  30. scripts to support the execution or emulation of Host Checker, in
  31. the <tt>trojans/</tt> subdirectory:</p>
  32. <ul>
  33. <li><tt>tncc-wrapper.py</tt>: This Python 3.x wrapper script runs the actual <tt>tncc.jar</tt> binary,
  34. with a little assistance. Running this wrapper requires you to build <tt>tncc-preload.so</tt> from
  35. <a href="https://github.com/russdill/ncsvc-socks-wrapper">russdill/ncsvs-socks-wrapper on GitHub</a>.
  36. Because of the security dangers of executing a server-provided trojan binary, this script should ideally be executed
  37. with the permissions of a low-privilege user (e.g. <tt>--csd-user=nobody</tt>).</li>
  38. <li><p><tt>tncc-emulate.py</tt>: This Python 3.x script does <b>not</b> actually run the <tt>tncc.jar</tt> binary.
  39. Instead, it <i>emulates</i> the behaviour of the <tt>tncc.jar</tt> binary, rather than actually
  40. executing it. Because this script does not actually execute a server-provided binary, security concerns are greatly
  41. alleviated.</p>
  42. <p>It may require configuration or customization to work with VPNs that have modified
  43. the behaviour of their Host Checker binaries in some way; consult its source code for details, starting with the
  44. list of environment variables that may be set to overridden some of the data that it sends to the server.</p>
  45. <p>This script is based entirely on <a href="https://github.com/russdill/juniper-vpn-py"><tt>tncc.py</tt>
  46. from russdill/juniper-vpn-py on GitHub</a>.)</p></li>
  47. </ul>
  48. <p>With either of these scripts, it may also be necessary to pass a Mozilla-compatible user agent string:</p>
  49. <pre>
  50. ./openconnect --protocol=nc --useragent 'Mozilla/5.0 (Linux) Firefox' --csd-wrapper=trojans/tncc-wrapper.py vpn.example.com
  51. </pre>
  52. <INCLUDE file="inc/footer.tmpl" />
  53. </PAGE>