Re: Writing a SECURE daemon

From: Volker Birk (bumens_at_dingens.org)
Date: 11/07/03

  • Next message: Volker Birk: "Re: Searching for security article."
    Date: Fri, 7 Nov 2003 09:34:42 +0100
    
    

    Mario L. Mueller <mario@goopers.com> wrote:
    > What do you mean by "split" the code?

    I.e. make two services which are communicating via IPC.

    > A separate
    > thread?

    A thread will not be enough because it runs with the UID of the
    calling thread. You need another process.

    > In my current code, I've setuid and setgid within the same executable
    > to a special user "mydaemon.mydaemon", since this user/group has
    > restricted access on the server. And I'm wondering if this is enough
    > to achieve what you're suggesting.

    This is better than nothing. But think about using two processes.
    Also using inetd could be a good choice. You then can run everything
    without UID 0.

    > Maybe I'm overlooking something, but is it safe to assume that only a
    > hacker who has access to the source code would be able to take
    > advantage of these unchecked buffers?

    No, the object code is already enough to examine such holes.

    > Or in other words, are there
    > ways for hackers to find unchecked buffers to exploit without
    > referencing the source code? (Disregarding psychic hackers) :-)

    Disassemblers and Debuggers exist.

    VB.

    -- 
    X-Pie Software GmbH
    Postfach 1540, 88334 Bad Waldsee
    Phone +49-7524-996806 Fax +49-7524-996807
    mailto:vb@x-pie.de  http://www.x-pie.de
    

  • Next message: Volker Birk: "Re: Searching for security article."

    Relevant Pages

    • Re: help a novelist sound credible?
      ... So I am a writer, ... > a hacker, although I am fairly computer savvy. ... A hidden *feature in Linux source code? ... If you want your novel to be believable by the Linux community, ...
      (alt.os.linux)
    • Re: help a novelist sound credible?
      ... >hacker, although I am fairly computer savvy. ... The easiest way is to alter the program ps, which reports on the processes ... It depends on how well hidden you want it to be-- ie from 90% of Linux ... It does not even have to be in the source code. ...
      (alt.os.linux)