Loading
UNIX Agent Permission

Hi,

I'm trying to implement SNOW Agent installation with principle of least privileges, but something is going wrong.

I believe there is an issue how Agent is trying to run the parsed commands:

For example, this is how sios.jar running sudo commands:

  1. /sbin/sh, -c, /bin/sudo -S /bin/pargs
  2. /sbin/sh, -c, /bin/sudo -S /bin/pwdx

And this is how snowagent.jar trying to run:

  1. /bin/sudo, -S, /sbin/sh, -c, /bin/file

 

And so, Agent, while main inventory trying to apply "sudo" to "sh" which is unacceptable with principle of least privileges.

 

Can somebody confirm this or did someone faced same issue?


  • Hi Albert,

    you are rigth and we faced same issue.

    Generic commands like /sbin/sh are incompatible with principle of least privileges and must not be given via sudo.

    But we don't resolve this issue so far with snow support.

     

    According to USER GUIDE Snow Inventory Agent for Unix 6.0 the following sudo permissions are required:

    snow ALL=NOPASSWD: /usr/bin/ls -l /proc/*

    snow ALL=NOPASSWD: /usr/bin/file

     

    But snowagent unsuccessfully tries to execute the (generic) /sbin/sh command as part of Unix software scanning:

    <out of snowagent.rotation1.log, LogLevel trace>

    Executing system command: [/bin/sudo, -S, /sbin/sh, -c, /bin/file -f /var/tmp/file...

    ERROR;         Scanning;;;; sudo couldn't be performed. Please check your sudo rights.

     

    The other named commands are part of Automatic Oracle DB discovery.

    According to USER GUIDE Snow Inventory Oracle Scanner 6.0.1 the following sudo permissions are used for determining OracleHome:

    (Example for Solaris)

    snow ALL=NOPASSWD: /bin/pargs

    snow ALL=NOPASSWD: /bin/pwdx

     

    Our main focus is Oracle DB Discovery but we would appreciate it, if you can solve this least privilege issue with snow support.

     

    Best Regards

    Joachim

    Expand Post
    • Hi Joachim,

       

      Thank you for reply. I have an active case in snow support and hope this will be fixed within next release.

       

      I'm glad to know that we are not alone with this issue :)

      Expand Post
  • Hi Albert,

    Snow Agent on Linux is probably the most serious case respective principle of least privileges.

    On Linux platform snowagent needs 22 "sudo commands" according to User Guide Snow Inventory Agent for Linux 6.1.

    Many commands are unused by snowagent (SLES12) but several commands are generic (awk, grep, java, javac, last, sed, sh) and permits to read any file content or execute any command.

    Maybe this is for Ideas Board and not a support case.

    Expand Post
    • Hi Joachim,

      Correct me if I'm wrong, but mentioning "sh" command in Cmnd_Alias for snow the same as running as NOPASSWD: ALL and I would like to call it a security breach.

      I think that different commands being used for different Linux distributives and that is the logic of Inventory Agent. In section "Example sudoers configuration" mentioned commands that needs to be performed as "sudo" and any other are not required (on my experience).

       

      Inventory on UNIX machine can not be completed not because of we didn't mention "/bin/file" in sudoers file, but because of how Agent substitutes commands and instead of perform "sudo" to "file" it's performing "sudo" to "sh".

      Expand Post
  • Hi Albert,

    to my knowledge /sbin/sh is a shell used for User root on unix platform.

    /sbin/sh is statical linked and operational also in single user mode while system boot when /usr filesystem with shared libraries is not yet mounted.

     

    I don't know the reason why snowagent executes /bin/file indirectly via /sbin/sh and not directly (example):

    ls -1 /opt/snow/data/* >/var/tmp/file123456789

    /usr/bin/file -f /var/tmp/file123456789

     

    Yes, indeed! Generic commands like sh and java/javac granted via sudo NOPASSWD: ALL are a security breach because the privileged user can execute any command.

    Commands like awk, grep, last and sed granted as sudo NOPASSWD: are a data privacy breach because the privileged user can read any file content.

    Both cases should be avoided.

     

    Expand Post
    • Hi Joachim,

      It took a while, but I got an answer from Snow Support.

       

      Long story short, their point that this not an issue or bug - it's a feature. And if we want to change something we need to put in "Ideas Board".

      I've already submit and waiting while my idea will be visible for others.

      Expand Post

Related  Product Forums


                     → Flexera One



                      → Snow Atlas



                      → FlexNet Manager



                      → Snow License Manager



                       → App Broker


       Need help finding an answer?


        Ask a Question →


Loading
UNIX Agent Permission