Loading ...
Sorry, an error occurred while loading the content.
 

Shell Escapes

Expand Messages
  • David Olbersen
    Greetings, Is there a way to (at compiletime) disable the :shell command? I ask because I ve installed sudo and some people have sudo vim. This is dangerous
    Message 1 of 4 , Jan 3, 2001
      Greetings,

      Is there a way to (at compiletime) disable the ":shell" command?
      I ask because I've installed sudo and some people have sudo vim. This is
      dangerous because if they run sudo vim (running vim as root) then they can
      simlply ":shell" to get a root shell.

      I consider this a very large problem and would like the advice of this list in
      patching it.

      -- Dave

      +----------------------------------+
      | Is this message signed and you |
      | need a key? |
      | Just ask and I'll send it along! |
      | Don't know what PGP is? |
      | Go to http://www.pgpi.org/ |
      +----------------------------------+
    • Sven Guckes
      ... No. Disabling the shell makes filtering useless. FAQ. ... The problem is silly Mr Root. Sven
      Message 2 of 4 , Jan 3, 2001
        * David Olbersen <dave@...> [010103 21:48]:
        > Is there a way to (at compiletime) disable the ":shell" command?

        No. Disabling the shell makes filtering useless. FAQ.

        > I ask because I've installed sudo and some people have sudo vim.
        > This is dangerous because if they run sudo vim (running vim
        > as root) then they can simlply ":shell" to get a root shell.
        > I consider this a very large problem and would
        > like the advice of this list in patching it.

        The problem is silly Mr Root.

        Sven
      • David Olbersen
        On Wed, 3 Jan 2001, Sven Guckes wrote: - I ask because I ve installed sudo and some people have sudo vim. - This is dangerous because if they run sudo vim
        Message 3 of 4 , Jan 3, 2001
          On Wed, 3 Jan 2001, Sven Guckes wrote:

          ->> I ask because I've installed sudo and some people have sudo vim.
          ->> This is dangerous because if they run sudo vim (running vim
          ->> as root) then they can simlply ":shell" to get a root shell.
          ->> I consider this a very large problem and would
          ->> like the advice of this list in patching it.
          ->
          ->The problem is silly Mr Root.

          You suggest what then? Changing the group of every file that these accounts
          might need to edit?

          -- Dave

          +----------------------------------+
          | Is this message signed and you |
          | need a key? |
          | Just ask and I'll send it along! |
          | Don't know what PGP is? |
          | Go to http://www.pgpi.org/ |
          +----------------------------------+
        • raf
          ... it s hard to say without knowing what root owned files these users need to be able to edit. do the really, really, really need root privileges? avoiding
          Message 4 of 4 , Jan 3, 2001
            David Olbersen wrote:

            > On Wed, 3 Jan 2001, Sven Guckes wrote:
            >
            > ->> I ask because I've installed sudo and some people have sudo vim.
            > ->> This is dangerous because if they run sudo vim (running vim
            > ->> as root) then they can simlply ":shell" to get a root shell.
            > ->> I consider this a very large problem and would
            > ->> like the advice of this list in patching it.
            > ->
            > ->The problem is silly Mr Root.
            >
            > You suggest what then? Changing the group of every file that these accounts
            > might need to edit?

            it's hard to say without knowing what root owned files these users need
            to be able to edit. do the really, really, really need root privileges?
            avoiding this at all costs would be good. setting the group might be the
            right thing to do. or maybe giving them a command that locks and copies
            the relevant files to a special location, chroots there, then sudo vim
            to let them edit the files and then copies them back to their original
            locations after the chroot'ed process ends?

            perhaps the changes that these users need to make can be defined
            programmatically and you could give them access to some sudo commands
            that perform specific changes.

            basically anything is better than giving someone root privileges in an
            editor. even without :shell, what's to stop them editing /etc/passwd
            so root can log in without a passwd, quitting the editor and then logging
            in as root?

            raf
          Your message has been successfully submitted and would be delivered to recipients shortly.