Restrict access to the OS/2 and POSIX subsystem

1 January 2000 by Snakefoot | Comment » | Trackback Off
Windows NT has support for several subsystems, the most common ones are DOS and 16 Bit Windows. It also has support for OS/2 1.0(No GUI), and it is regarded as a security issue to have the OS/2 and POSIX support enabled. Before disabling OS/2 support make sure that you are not using OS/2 dependent legacy applications or cross-platform executables with OS/2 support (Like HIEW).

To disable OS/2:
  1. Start the registry editor and remove the following entries:
    • [HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \OS/2 Subsystem for NT]
    • [HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \Session Manager \Environment]
      Os2LibPath=
    • [HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \Session Manager \SubSystems]
      Optional=
      OS2=
      Posix=
  2. Enter the %Windir%\System32\Dllcache directory and remove these files (Because of Windows File Protection)
    • os2.exe
    • os2ss.exe
    • os2srv.exe
  3. Enter the %Windir%\System32 directory and rename/remove these files:
    • os2.exe
    • os2ss.exe
    • os2srv.exe
    • psxss.exe
    • posix.exe
    • psxdll.dll
  4. Enter the %Windir%\System32\OS2 directory and rename/remove these files:
    • All files except the DLL folder and its contents
More Info MS KB Q101270

Note that with Windows XP the OS2 and POSIX subsystem is not installed, though the registry entries are still created. More Info MS KB Q308259

Credits NSA Win2k Security Guide
Credits NSA WinXP Security Guide

Updated: 23 September 2007

Comments:

Comment by AB - 25 June 2003 @ 7:56 Reply

Is it possible to add back OS/2 support to XP (maybe copying the appropriate system files from an NT or 2000 system & updating the registry)?

Comment by damn - 21 September 2003 @ 3:44 Reply

If you use HIEW6.11 as your favorite hex editor, you should never do the suggested things. HIEW won’t start anymore since it has both DOS and OS/2 modules in one EXE…

It of course can be fixed (change NE signature to something else) but is quite annoying at the beginning :(

Comment by snakefoot - 21 September 2003 @ 4:56 Reply

damn
If you use HIEW6.11 as your favorite hex editor, you should never do the suggested things. HIEW won’t start anymore since it has both DOS and OS/2 modules in one EXE…

Have updated the tip about making sure that one is not using cross platform executables that are dependent of the OS/2 subsystem (Though have a feeling that most will first discover, that they are using such applications, when they have actually disabled os/2 subsystem like you did)

Leave a comment


You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>