Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Ok!

Ok!

Scheduled Pinned Locked Moved Uncategorized
14 Posts 7 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

    Ok! On the topic of FUSE crimes. A problem I face in my job is that we have widespread deployment of agentic workflows under a variety of harnesses, many of which end up running CLI tools that hit API endpoints. This means the CLI tools need to be able to authenticate to the API, and the standard approach for this is to have some sort of bearer token that sits on disk. These tokens aren't bound to the underlying device in any way - anyone who has the token has the level of access granted to it.

    gbraad@mastodon.socialG This user is from outside of this forum
    gbraad@mastodon.socialG This user is from outside of this forum
    gbraad@mastodon.social
    wrote last edited by
    #3

    @mjg59 scary, plus whatever the agent can do with it. I have seen rsynced tokens, and even git committed, and documented tokens.

    1 Reply Last reply
    0
    • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

      The general fear around this sort of thing is either infostealer malware, stuff that gets onto a machine, looks for tokens, and then exfiltrates them, or tokens being checked into public code repositories. There's a big market for this, both in terms of being able to access data that the token grants access to, but also being able to use expensive resources (if an AWS token that gives the ability to spin up VMs escapes, you'll suddenly find you've spent a shitload on bitcoin mining)

      mjg59@nondeterministic.computerM This user is from outside of this forum
      mjg59@nondeterministic.computerM This user is from outside of this forum
      mjg59@nondeterministic.computer
      wrote last edited by
      #4

      But having LLMs running around trying to figure out how they can achieve a thing means having all these tokens on disk where the LLM can get at them is also a risk. What if it writes a tool to make its own queries, embeds the token it found on disk, and publishes that somewhere? What if it just decides to drop it into Slack? The non-deterministic chaos agent is potentially going to make my day Extremely Bad.

      mjg59@nondeterministic.computerM 1 Reply Last reply
      0
      • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

        But having LLMs running around trying to figure out how they can achieve a thing means having all these tokens on disk where the LLM can get at them is also a risk. What if it writes a tool to make its own queries, embeds the token it found on disk, and publishes that somewhere? What if it just decides to drop it into Slack? The non-deterministic chaos agent is potentially going to make my day Extremely Bad.

        mjg59@nondeterministic.computerM This user is from outside of this forum
        mjg59@nondeterministic.computerM This user is from outside of this forum
        mjg59@nondeterministic.computer
        wrote last edited by
        #5

        The most common approach to solving this I've found is to run a proxy. The real token ends up in the proxy, the CLI tool gets a placeholder. All queries get sent via the proxy, which replaces the placeholder with the real token. This works, but it's actually harder than it sounds (eg, if these are oauth tokens, the proxy probably needs to handle token refresh, and also a bunch of these tools are third party binaries and it's hard to get them to adapt to this flow)

        mjg59@nondeterministic.computerM 1 Reply Last reply
        0
        • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

          The most common approach to solving this I've found is to run a proxy. The real token ends up in the proxy, the CLI tool gets a placeholder. All queries get sent via the proxy, which replaces the placeholder with the real token. This works, but it's actually harder than it sounds (eg, if these are oauth tokens, the proxy probably needs to handle token refresh, and also a bunch of these tools are third party binaries and it's hard to get them to adapt to this flow)

          mjg59@nondeterministic.computerM This user is from outside of this forum
          mjg59@nondeterministic.computerM This user is from outside of this forum
          mjg59@nondeterministic.computer
          wrote last edited by
          #6

          So: FUSE. This is very much PoC stage so I'm not publishing it, but I now have a working toy FUSE filesystem that implements a very simple control - the files created can only be read by the app that created them. The CLI tools can obtain their tokens and store them, and can then read them back on re-invocation. But if the agent itself tries to read the file, it gets told to fuck off.

          mjg59@nondeterministic.computerM mutesplash@uncontrollablegas.comM 2 Replies Last reply
          0
          • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

            So: FUSE. This is very much PoC stage so I'm not publishing it, but I now have a working toy FUSE filesystem that implements a very simple control - the files created can only be read by the app that created them. The CLI tools can obtain their tokens and store them, and can then read them back on re-invocation. But if the agent itself tries to read the file, it gets told to fuck off.

            mjg59@nondeterministic.computerM This user is from outside of this forum
            mjg59@nondeterministic.computerM This user is from outside of this forum
            mjg59@nondeterministic.computer
            wrote last edited by
            #7

            This is obviously not a strong security barrier - the tokens still exist on the system, malware would still be able to grab them. But it makes it much less likely that tokens will be accidentally exfiltrated, and I get to sleep easier.

            ss23@toot.ss23.geek.nzS nelhage@mastodon.socialN 2 Replies Last reply
            0
            • R relay@relay.infosec.exchange shared this topic
            • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

              This is obviously not a strong security barrier - the tokens still exist on the system, malware would still be able to grab them. But it makes it much less likely that tokens will be accidentally exfiltrated, and I get to sleep easier.

              ss23@toot.ss23.geek.nzS This user is from outside of this forum
              ss23@toot.ss23.geek.nzS This user is from outside of this forum
              ss23@toot.ss23.geek.nz
              wrote last edited by
              #8

              @mjg59 Without thinking about it too hard, is this possible to implement within an SELinux policy instead?

              A mjg59@nondeterministic.computerM 2 Replies Last reply
              0
              • ss23@toot.ss23.geek.nzS ss23@toot.ss23.geek.nz

                @mjg59 Without thinking about it too hard, is this possible to implement within an SELinux policy instead?

                A This user is from outside of this forum
                A This user is from outside of this forum
                alwayscurious@infosec.exchange
                wrote last edited by
                #9

                @ss23 @mjg59 It absolutely is. In fact, one can make this a strong-ish security barrier by using a wrapper process that sanitizes the environment and not allowing the CLI tool to be ptraced or otherwise debugged.

                1 Reply Last reply
                0
                • mjg59@nondeterministic.computerM This user is from outside of this forum
                  mjg59@nondeterministic.computerM This user is from outside of this forum
                  mjg59@nondeterministic.computer
                  wrote last edited by
                  #10

                  @condret Because it's literally my job?

                  1 Reply Last reply
                  0
                  • ss23@toot.ss23.geek.nzS ss23@toot.ss23.geek.nz

                    @mjg59 Without thinking about it too hard, is this possible to implement within an SELinux policy instead?

                    mjg59@nondeterministic.computerM This user is from outside of this forum
                    mjg59@nondeterministic.computerM This user is from outside of this forum
                    mjg59@nondeterministic.computer
                    wrote last edited by
                    #11

                    @ss23 Oh yes, but that's a massively more complicated thing to deploy

                    1 Reply Last reply
                    0
                    • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

                      This is obviously not a strong security barrier - the tokens still exist on the system, malware would still be able to grab them. But it makes it much less likely that tokens will be accidentally exfiltrated, and I get to sleep easier.

                      nelhage@mastodon.socialN This user is from outside of this forum
                      nelhage@mastodon.socialN This user is from outside of this forum
                      nelhage@mastodon.social
                      wrote last edited by
                      #12

                      @mjg59 It feels like security has gone through a bit of a midwit meme:
                      [low IQ] If we make the tokens only accessible to the binary that created them, it will be secure!
                      [medium IQ] But an attacker could easily get them via a zillion other pathways, a partial security barrier is worse than no barrier because of the false sense of security!!!!!!
                      [high IQ] It will provide some level of protection from generic malware, and also increase the chance our D&R can notice a malicious actor!

                      1 Reply Last reply
                      0
                      • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

                        So: FUSE. This is very much PoC stage so I'm not publishing it, but I now have a working toy FUSE filesystem that implements a very simple control - the files created can only be read by the app that created them. The CLI tools can obtain their tokens and store them, and can then read them back on re-invocation. But if the agent itself tries to read the file, it gets told to fuck off.

                        mutesplash@uncontrollablegas.comM This user is from outside of this forum
                        mutesplash@uncontrollablegas.comM This user is from outside of this forum
                        mutesplash@uncontrollablegas.com
                        wrote last edited by
                        #13

                        @mjg59 HSM except make it software?

                        1 Reply Last reply
                        0
                        • mjg59@nondeterministic.computerM mjg59@nondeterministic.computer

                          Ok! On the topic of FUSE crimes. A problem I face in my job is that we have widespread deployment of agentic workflows under a variety of harnesses, many of which end up running CLI tools that hit API endpoints. This means the CLI tools need to be able to authenticate to the API, and the standard approach for this is to have some sort of bearer token that sits on disk. These tokens aren't bound to the underlying device in any way - anyone who has the token has the level of access granted to it.

                          lee_holmes@infosec.exchangeL This user is from outside of this forum
                          lee_holmes@infosec.exchangeL This user is from outside of this forum
                          lee_holmes@infosec.exchange
                          wrote last edited by
                          #14

                          @mjg59 That's definitely a tough problem. One too where the ideal solution ends up being different depending on the endpoints, auth mechanisms etc.

                          1 Reply Last reply
                          1
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups