Re: A few thoughts..

From: H. S. (security_at_revolutionsp.com)
Date: 03/31/05

  • Next message: William Michael Grim: "4BSD Scheduler Problem on 5.3"
    Date: Thu, 31 Mar 2005 14:10:27 -0600 (CST)
    To: freebsd-hackers@freebsd.org
    
    

    > On Tue, 29 Mar 2005, H. S. wrote:
    >
    >> My "USERNAME" account doesn't have access to /sbin/dmesg, but I uploaded
    >> a /sbin/dmesg from a 5.2.1-RELEASE to a 5.3-STABLE box, and then I could
    >> have access to this system information. The same goes for systat ,
    >> vmstat, and all these commands that (most people think) shouldn't be
    >> available for regular users.
    >
    > dmesg is implemented as an unprivileged program that uses an unprivileged
    > sysctl to retrieve the message buffer, kern.msgbuf. You can set the
    > sysctl security.bsd.unprivileged_read_msgbuf to 0 to block unprivileged
    > reading of the buffer.
    >

    Very nice, I didn't know this MIB!

    Thanks for the tip :-)

    >> Shouldn't this information be protected at kernel level? Am I missing
    >> something I can do about this ? Because this method works with
    >> everything that ressembles permissions in order to hide system
    >> information that can be obtained without root privileges.
    >
    > In essense, yes. Historically, system information was retrieved by
    > programs using /dev/mem, which required privilege. In that scenario,
    > deleting or removing set{ug}id from /sbin/dmesg (et al) removed the
    > ability to retrieve the information for an unprivileged user. Changes
    > were made to limit the use of privileged programs, which represent a
    > substantially risky approach (privileged code rather than a controlled
    > interface), FreeBSD has generally moved to exporting system information
    > using the sysctl MIB, which generally doesn't require privilege. Some
    > system export MIB entries make use of access control to limit the export
    > of system information -- for example, we export process information for
    > use by ps(1) using sysctl, but the sysctls in question will check whether
    > the user has the right to retrieve information on specific processes (such
    > as with jail, or security.bsd.see_other_uids=0).
    >
    > However, this approach has not been taken universally with sysctls,
    > because it adds moderate complexity to the implementation, and adding
    > restrictions to many of the MIB entries isn't useful in most environments.
    > Using the MAC Framework, it's possibel to construct a module that would
    > restrict access to a broad range of sysctls -- however, this also prevents
    > calls like gethostname() from succeeding, so this approach also would have
    > to be taken cautiously.
    >

    I've just begun trying to understand MAC. Is it possible to block this or
    that sysctl MIB to users using MAC? MAC is very complex, I had no idea.I
    thought it was mostly about ACLs, but after a bit of reading, now I know I
    was wrong.

    > Robert N M Watson
    >
    > _______________________________________________
    > freebsd-hackers@freebsd.org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    >

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: William Michael Grim: "4BSD Scheduler Problem on 5.3"

    Relevant Pages

    • Re: A few thoughts..
      ... sysctl to retrieve the message buffer, ... system information was retrieved by ... ability to retrieve the information for an unprivileged user. ... which generally doesn't require privilege. ...
      (freebsd-hackers)
    • Re: Cant send mail using Mail.app, but can with Thunderbird
      ... If so, you need SSL for outgoing on port 587, and SSL for incoming on ... Set Authentication to 'Password'. ... Windows free zone (Mac G5 Dual Processor) ...
      (comp.sys.mac.system)
    • Re: 24" Monitor Problems with Mac Mini
      ... found through the system information via about this mac), ... but why didn't you have a look at the specifications of your ... isn't powerful enough to handle such high resolutions: ... Mac Mini. ...
      (microsoft.public.macintosh.general)
    • Re: System Info
      ... The above is only some of the places this kind of config is stored, ... What is the command for the System information? ... > address, Mac address? ... > Can I retieve these in the registry? ...
      (microsoft.public.win2000.general)
    • System Info
      ... What is the command for the System information? ... How did the system retrieve the information like IP ... address, Mac address? ...
      (microsoft.public.win2000.general)