RE: Bypassing Personal Firewalls

From: John Howie (JHowie@securitytoolkit.com)
Date: 02/22/03

  • Next message: KF: "Re: Cisco IOS OSPF exploit"
    Date: Fri, 21 Feb 2003 16:51:56 -0800
    From: "John Howie" <JHowie@securitytoolkit.com>
    To: "Drew Copley" <dcopley@eeye.com>, "xenophi1e" <oliver.lavery@sympatico.ca>, <bugtraq@securityfocus.com>
    

    Folks,

    The security model employed by the OS for calls to OpenProcess () and
    the like is not radically different from that used in calls such as
    CreateFile (). The true problem is the lack of understanding of process
    and thread creation on Win32 systems.

    A process created using CreateProcess () can have a DACL set on it,
    using a security descriptor. Without an explicit security descriptor the
    process will inherit a default security descriptor, which is the
    security descriptor for the process calling CreateProcess (), and
    ultimately will have come from the primary or impersonation token.

    As most user processes can trace their roots to EXPLORER.EXE and as
    most, if not all, calls to CreateProcess () neglect to explicitly set a
    security descriptor with a DACL, any process created from EXPLORER.EXE
    has access to any other process created from EXPLORER.EXE as the default
    security descriptor contains a DACL that will grant them full access.

    If explicit security descriptors were set during CreateProcess () things
    like Task Manager would fail, processes could not communicate with each
    other, etc. However, it is important to understand that the most that
    can happen is that a user can only access, corrupt, or interfere, with
    their processes using the same default security descriptor. A user
    should not be able to access a process in another logon session,
    including processes launched using the Secondary Logon service, as the
    session SID in the token will be different, if not the SID of the owner.
    The exception is that if the user has privileges above what is normally
    afforded to users, such as Debug programs or Act as part of the
    operating system, they would be able to affect any process.

    In reality the process model is not that different from *nix systems,
    and is not really any more vulnerable. I can think of code injection
    attacks that work along similar lines on *nix systems, which doesn't
    have the concept of DACLs for protection, and relies on uid only.

    To secure applications, developers might want to consider how they call
    CreateProcess (), or use SetSecurityInfo (), to protect their
    applications running as processes from unwanted interference by other
    processes in the same logon session.

    John



    Relevant Pages

    • Executing Class on remote machine
      ... Set oShares = oWMI.ExecQuery("select Name from Win32_Share ... control list (DACL) ... ' for the target object. ... ' After the security descriptor is retrieved, ...
      (microsoft.public.windows.server.scripting)
    • Re: GetAce API in VB.Net
      ... the old SD DACL aces and placing them in a new SD DACL. ... have left to do is to initialize a new Security Descriptor, ... >> End Enum ...
      (microsoft.public.dotnet.languages.vb)
    • Re: GetAce API in VB.Net
      ... Imran. ... >> I want to create a new file security descriptor exactly like the old one ... >> the old SD DACL aces and placing them in a new SD DACL. ...
      (microsoft.public.dotnet.languages.vb)
    • Re: 10 Immutable Laws of Security
      ... ACL in the descriptor on the new object. ... Yes, the container and object inherit, and inherit only bits did ... the storage the DACL was null). ... What is wrong is to create a non-NULL security descriptor with a NULL ...
      (microsoft.public.security)
    • Re: Problem - connecting to cluster - impersonation level
      ... Security descriptor contains the ACLs apart from owner ... In this particular case, I think, there was no ACE in the DACL of SD of the ... cluster for the user account Ian was using to connect to the cluster, ...
      (microsoft.public.windows.server.clustering)