csd.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <PAGE>
  2. <INCLUDE file="inc/header.tmpl" />
  3. <VAR match="VAR_SEL_FEATURES" replace="selected" />
  4. <VAR match="VAR_SEL_FEATURE_CSD" replace="selected" />
  5. <PARSE file="menu1.xml" />
  6. <PARSE file="menu2-features.xml" />
  7. <INCLUDE file="inc/content.tmpl" />
  8. <h1>Cisco Secure Desktop</h1>
  9. <p>The CSD ('Cisco Secure Desktop') mechanism is a security scanner
  10. for the <a href="anyconnect.html">Cisco AnyConnect</a> VPNs, in the
  11. same vein as <a href="juniper.html">Juniper's Host Checker (tncc.jar)</a>
  12. and <a href="hip.html">GlobalProtect's HIP</a>.</p>
  13. <h2>Background</h2>
  14. <p>The 'Cisco Secure Desktop' is a bit of a misnomer &#8212; it works by
  15. downloading a trojan binary from the server and running it on your
  16. client machine to perform some kind of 'verification' and post its
  17. approval back to the server. This seems anything <em>but</em> secure
  18. to me, especially given their history of trivially-exploitable
  19. bugs.</p>
  20. <p>It's also fairly easy to subvert, by running your own modified binary
  21. instead of the one you download from the server. Or by running their
  22. binary but poking at it with gdb.</p>
  23. <p>We support this idiocy, but because of the security concerns the
  24. trojan will be executed only if a userid is specified on the command
  25. line using the <tt>--csd-user=</tt> option, or the <tt>--csd-wrapper=</tt>
  26. option is used to handle the script in a 'safe' manner.</p>
  27. <p>
  28. This support currently only works when the server has a Linux binary
  29. installed, and only when that Linux binary runs on the client machine.</p>
  30. <h2>CSD support in OpenConnect</h2>
  31. <p>OpenConnect supports running the CSD binary, or spoofing its
  32. behaviour, by passing the <tt>--csd-wrapper=SCRIPT</tt> argument
  33. with a shell script.</p>
  34. <p>The OpenConnect distribution includes <i>two</i> alternative
  35. scripts to support the execution or spoofing of the CSD behaviour, in
  36. the <tt>trojans/</tt> subdirectory:</p>
  37. <ul>
  38. <li><p><tt>csd-post.sh</tt>: This script does <i>not</i> actually run the CSD trojan binary. Instead, it emulates
  39. the behaviour of the CSD trojan, creating a plaintext report similar to the one that the CSD trojans build, and
  40. uploading it to the server sent by the VPN gateway. The report may need to be customized in order to be accepted by some
  41. servers; the <a href="https://github.com/Gilks/hostscan-bypass">hostscan-bypass</a> tool may help with this.
  42. Because this script does not actually execute a trojan binary, and because its complete output is easily visible
  43. in the script, the security concerns are greatly alleviated.</p>
  44. <p>If it doesn't work for your VPN, please add <tt>set -x</tt> to the top of the script to make it generate copious
  45. logging output, and <a href="https://www.infradead.org/openconnect/mail.html">contact the developers</a> so that we can
  46. figure out what needs to be modified in order for it to work with more Cisco VPNs.</p></li>
  47. <li><tt>csd-wrapper.sh</tt>: This script accepts the same options as some versions of the CSD trojan binary,
  48. (<tt>-ticket</tt>, <tt>-stub</tt>, <tt>-group</tt>, <tt>-certhash</tt>, <tt>-url</tt>, <tt>-langselen</tt>),
  49. downloads the files required by the binary, and then wraps the execution of the <tt>cstub</tt> binary.
  50. That binary is often buggy, and may be untested or
  51. <a href="https://gitlab.com/openconnect/openconnect/commit/7a5974a5971da3374d5906b05adde04e24416368">may not even exist</a>.
  52. Because of the security dangers of executing a server-provided trojan binary, this script should be executed
  53. with the permissions of a low-privilege user (e.g. <tt>--csd-user=nobody --csd-wrapper=trojans/csd-wrapper.sh</tt>).
  54. <b>Don't use this unless you know what you're doing.</b>
  55. </li>
  56. </ul>
  57. <INCLUDE file="inc/footer.tmpl" />
  58. </PAGE>