Jump to content
Welcome to our new Citrix community!
  • Securing the ICA File Enhancements within Citrix Workspace App


    cugcblogs

    raydavis22rnd.jpg by Ray Davis, CTA

    I recently worked with a client requesting extra features be set up within the Citrix Workspace app. The environment had a good security team and asked the following:

    1. Remove all ICA files being stored after launch use.
    2. Make the ICA file stored in memory so that if the ICA files were not removed, there was no location it would be downloaded to. The mindset around this is: "To reduce the attack surface, ICA files from Citrix Workspace app for Windows will now be stored in memory."

    Let's dive into each setting and go over how I approached this.

    Delete the ICA file after being used:

    1. You will notice the typical setup in most environments I have seen.
      • The user opens a URL, navigates to the area where their company Citrix hosting site is, inputs username/password/MFA, clicks the Citrix resource, an ICA file is downloaded, and then opens.
      • Depending on the browser, in most cases, it's going to be Chrome/Chromium Edge/Firefox.
      • Afterwards, you will notice the session ICA files in downloads (in most cases).
    2. To address this, the first setting is to Enable "ICA File Settings" and then check the box to "RemoveICAFile." I explained to the customer that inside the ICA file, there is an STA (Secure Ticket Authority) and the lifetime of this is 100 seconds. Therefore, it will not be good. But as we all know, it will contain some environmental data. With that in mind, it was a reasonable request. I also explained that the STA ticket could only be used once, although they still wanted this feature set. "Okay, we can do that," I said.
    3. Below is the screenshot of the GPO that will be needed, as the client was all Windows-based clients.
    image-27.png.7c9edb7730d0bbd59966eb3419d7a4f2.png
    1. For example, if the GPO above is not enabled, you will notice ICA files in the downloads from my last session.
    image-28.png.55a87e147d74f8806372e9d3dbd7d6a1.png
    1. The default for Citrix Workspace App is when I launch a Citrix Session. You will see it download to my downloads folder and start connecting to the Desktop once you close the resource. The ICA file persists. But if I set the GPO, as I explained above, you will see this behavior.
    2. I log into my URL, open my Citrix resource, and download an ICA file.
    image-29.png.ebbdf88dcc62002fc8e50293e46ae62b.png
    1. I am now logged into the Desktop, and the current ICA file is still in the downloads while I am in my session.
    image-30.png.dd376584ff6643a2fab861f4590461d9.png
    1. Once the ICA session has ended, the ICA file is deleted per the GPO. As you can see, you don't see it anymore. It deleted the ICA file, which was the desired configuration I was after.
    image-31.png.e24e98a5df368d0d6e55f289c00e3e41.png
    1. Once the GPO applies, you will see it here on the local Client if you want to check if the keys are enforced and get peace of mind, which the security team wanted to see as well.
      • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Client Engine\ICA File
      • REG_SZ = RemoveICAFile
      • Value = True

    Addressing the ICA File in Memory

    1. I needed to do some reading on this, as I recall it being announced. I read the blogs to get a better understanding of the flow: Enhanced ICA file security on Citrix Workspace app for Windows | Citrix Blogs
    image-32.png.917a09033c32be749829d44a3d9e0fb4.png
    1. I also remember a podcast on this with some great information from Andy and Bill at XenTegra. (These podcasts provide excellent value by investing in the technology not only from an informative aspect but also a technical aspect for folks like myself. E83 - The Citrix Session: Enhanced ICA file security on Citrix Workspace app for Windows - XenTegra - Citrix, Microsoft, EUC, & Cloud Solutions and Services

    What I Discovered After Some Quick Education

    1. This applies to Workspace App (Native application) and Workspace for Web.
    2. After reading the documentation on this, natively it was only supported by the Workspace app. Then in time, Citrix released it for the Workspace Web side.
    3. On Citrix StoreFront, you will see inside the Web.config file an entry like this.
    4. On the Citrix StoreFront server, inetpub location is where you will see the Web.config file. C:\inetpub\wwwroot\Citrix\labWeb
    5. I also went and enabled "Secure ICA File Session launch." This will block the ICA files from being opened by browsers that can't use the ICA in memory. I have no ICA file downloaded either, because I set this Citrix Workspace GPO.
    6. It's no longer required to add the registry EnableIcaFileInMemory and set the value to "True."
    image-33.png.4812a1a00ec21bc4f2427334d13609d4.png
    1. To check this after the Citrix Workspace GPO is applied:
      • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Citrix
      • REG_DWORD = BlockDirectICAFileLaunches
      • Value = 1
    2. At first, I couldn't get this to work in Edge.
    3. I am trying it with Edge.
    image-34.png.709f2a33f50e6482440701a31a757c54.png
    1. Next, I am trying it with Chrome. As you can see, it did what it was supposed to.
    image-35.png.5bd52c0fe290a95f23cd99a44839c7ba.pngimage-36.png.ffdae44d6f7e5f72c34685e3f4624a1b.png
    1. For the most part, Chrome and Edge have the same code, and I was not sure why it wasn't working in Edge.
    2. I went back to the docs, and this jumped out at me: "When you sign in to the store through the browser, click Detect Workspace App. If the prompt doesn't appear, clear the browser cookies and try again."
    3. This part is what detects the workspace for the web when, from what I gather, it is what detects to apply the "protocolHandler enabled="true" If it does not do this the first time, it will not be able to open the ICA file if you have the GPO set to "Secure ICA File Session launch."
    4. I cleared all my cookies from Edge and got the "Detect Workspace App" to prompt me.
    image-37.png.497ffe9e535aa552736dc01835a51388.pngimage-38.png.3527a56a7cc4e428bac41d44a3d767a6.png
    1. As you can see, it opened my Citrix Desktop now from Edge.
    image-39.png.269508315cd617458a103e8e7c97527d.png
    1. If the user gets this error:
    image-40.png.b89eb1073412410dcb46aafa8a7f9b7d.png
    1. You will have to ask them to clear the cookies to allow it to work. It may happen more than it should as well. Also, this was from my lab and testing.
    2. If the users are using only the Native Citrix Workspace app without going to the URL, this should not be a problem. It works every time as well.
    3. What about BYOD devices? Citrix has a solution for those as well: Global App Configuration Service (cloud.com)
    image-41.png.750213f761bbb37126daba5579298f4a.png
    1. Recent enhancement: Manage Citrix Workspace app for your users with just one click | Citrix Blogs
    2. At this time, it is in Tech Preview, but it will be a game changer, in my humble opinion. Customize Citrix Workspace app settings [Technical Preview]
    image-42.png.30045bc61e0d3b7fe4a1747b9f6f7ed0.pngimage-43.png.ee957522aaf2a626a4e28388492b7dc5.pngimage-44.png.bbbffa277971d11a10467cf07ef8c5aa.png

    With these settings in place, I could achieve the desired configuration. I hope everyone had a wonderful holiday in 2022 and a safe and happy new year!

     

    See more posts from Ray Davis here.

    Are you a member of CUGC? Join free today!


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...