Raw sockets, MS05-019 and Windows Firewall -- Summary

From: Robin Keir (robin_at_KEIR.NET)
Date: 04/25/05

  • Next message: Eric Ayre: "Re: Restoring deleted security groups in AD"
    Date:         Mon, 25 Apr 2005 14:33:01 -0700
    To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
    
    

    With the advent of XP SP2 and the recent MS05-019 patch, using raw
    sockets for scanning from a Windows platform has proven to be very
    problematic. I thought I would summarize the situation.

    Based upon the presence of MS05-019 and the state of the Windows
    Firewall service(s) we have to decide whether we need to stop or start
    the firewall service(s). Even then there may still be issues. The logic
    is as follows:

    Windows 2000 is unaffected. It fully supports all raw socket actions and
      since it doesn't have the Windows Firewall/ICF we don't have any of
    those associated issues.

    XP SP0 should have the firewall stopped ("net stop sharedaccess"). Even
    though TCP raw sockets are unaffected by the firewall the ALG service,
    which is intimately tied to the firewall service on XP, prevents
    discovery of several ports such as 21, 389, 1002 and 1720 when using TCP
    raw sockets. Stopping the sharedaccess service thus automatically stops
    the ALG service and we're good to go.

    XP SP1 *without* MS05-019 functions the same as XP SP0.

    XP SP1 *with* MS05-019 needs to have the sharedaccess firewall service
    *running* (see http://support.microsoft.com/kb/897656) otherwise TCP raw
    sockets are blocked. Because the sharedaccess service needs to be
    running to enable sending of TCP packets using raw sockets we have the
    problem with the ALG service blocking sending to certain ports, but it's
    better than nothing.

    XP SP2 *without* MS05-019 functions the same as XP SP1 without the patch
    apart from a driver-level restriction on the number of
    in-the-process-of-connecting TCP connections. This can affect regular
    socket style scanning. The only known workaround to the driver issue is
    a TCPIP.SYS hack.

    XP SP2 *with* MS05-019 is unusable for raw-socket TCP scanning. It
    totally blocks TCP raw sockets with or without the firewall enabled.

    Windows Server 2003 acts like XP SP0. The ALG service, which is now no
    longer tied to the sharedaccess (Windows Firewall) service, should be
    stopped ("net stop alg").

    What a mess :-)

    --
    Robin
    --
    NTBugtraq Editor's Note:
    Most viruses these days use spoofed email addresses. As such, using an Anti-Virus product which automatically notifies the perceived sender of a message it believes is infected may well cause more harm than good. Someone who did not actually send you a virus may receive the notification and scramble their support staff to find an infection which never existed in the first place. Suggest such notifications be disabled by whomever is responsible for your AV, or at least that the idea is considered.
    --
    

  • Next message: Eric Ayre: "Re: Restoring deleted security groups in AD"

    Relevant Pages

    • Re: Hacking to Xp box
      ... Raw sockets can't be reenabled via command ... Firewall servicewe have to decide whether we need to stop or start ... Windows XP>restricts most of the attacks that use anonymous connections. ...
      (Pen-Test)
    • Re: TCP Client socket in zweiten Thread
      ... > Windows CE3.0 Application Programming von Nick Grattan: ... and Winsock itself is based around the Berkeley socket library. ... Die non-blocking Sockets verhindern Aktionen, die das Programm blockieren ...
      (microsoft.public.de.vc)
    • Re: Socket communication on multihomed box
      ... LAN route before USB ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
      (microsoft.public.win32.programmer.networks)
    • Re: Socket communication on multihomed box
      ... LAN route before USB ... The thing is that connection MUST always stay open. ... as for sockets, I'm using native syscalls, not MFC. ... Another thing is that is should work both under Linux and Windows. ...
      (microsoft.public.win32.programmer.networks)
    • Re: linux to windows porting help
      ... I am working on a project that involves porting c programs from ... linux environment to windows environment. ... Any effort to move some decent software to the Windows platform ... all the networking headers with, add the relevant sockets ...
      (comp.programming)