Thursday, May 29, 2008

How to protect Microsoft Windows from SYN Flood attack

How to protect Microsoft Windows from SYN Flood attack

Edit the registry by adding the following keys in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters.

Value Name Value (REG_DWORD)
---------------- ----------------------------
SynAttackProtect 2
TcpMaxPortlovehausted 1
TcpMaxHalfOpen 500
TcpMaxHalfOpenRetried 400
TcpMaxConnectResponseRetransmissions 2
TcpMaxDataRetransmissions 2
EnablePMTUDiscovery 0
KeepAliveTime 300000 (5 minutes)
NoNameReleaseOnDemand 1


Reference: http://msdn2.microsoft.com/en-us/library/aa302363.aspx

How to test your Antivirus program?

How to test your Antivirus program?

You my create a file with EICAR (European Institute for Computer Antivirus Research) test string.

Here is the EICAR test string:

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Copy and past this string into a notepad document, then click FILE > SAVE AS. Type .COM as the filename.

For more information, please refer to http://www.eicar.org/anti_virus_test_file.htm.

Wednesday, May 28, 2008

Check current tcp/ip connection for each program for Windows XP

Check current tcp/ip connection for each program for Windows XP.

Click Start - Run, Type CMD.exe.
Type netstat.exe -bv.

You can see the foreign address and port number your program connecting to. By adding a space and a number, you can check most up-to-dated information.

netstat.exe -bv 5

Press Ctrl + C to cancal it.

How to repair TCP/IP issue in Windows XP

How to repair TCP/IP network connectivity issue in Windows XP?

Unlike Windows 2000, you cannove remove TCP/IP. If TCP/IP stack is corrupted, you can reset the Internet Protocol (TCP/IP) stack by rewrite the registry by using the follow command.

netsh int ip reset

Or you may use this link if you are using US version of Windows XP.

http://support.microsoft.com/?scid=aw;en-us;299357&eula=1

Vista boot up sequence


Vista boot up sequence is different from previous Windows.

Here is how Windows Vista boot up.

Preboot:

1. POST routines run.

2. BIOS finds the boot devices and loads ans tuns MBR.

3. MBR locates the active partition in the partition table. Load
the boot sector into memory an run it.

The files used to load 2000\XP in this sequence:
Ntldr, Boot.ini, Bootsect.dos (if you have Windows 9x), Ntdetect.com, Winnt\system32\Ntoskrnl.exe.

Boot:

1. Ntldr (NT Loader) is loaded, executed and started the minifile system drivers to load Windows in FAT or NTFS partition format.

2. Ntldr read the boot.ini and you have operrating system selection. (if boot.ini is not found, it will attemp to load on the first partition of the first disk.)

3. If Windows 9x\Me is selected, Ntldr loads bootsect.dos.
If Windows 2000/XP is selected, Ntdetect.com performs hardware detection. Ntdetect.com detects bus/adapter type, comm ports, flating point pocessor, floppy, keyboard, mouse, parallel ports, SCSI, video cards which in the registry HLM\HARDWARE key.

4. After collection hardware information, Hardware Profiles menu is present if there is more than one hardware profile.

5. NTldr loads Winnt\System32\Ntoskrnl.exe, hal.dll (hardwareware abstraction layer), HKLM\SYSTEM key from winnt\system32\Config\System, and loads and initializes device drivers control set that used to iniialize the computer. The order list of loading device
drivers is in HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder.

6. After successful initialization, a set of registry key will be set in HKLM\HARDWARE. A copy of ControlSet will be created in HKL\System.

7. Kernal scans and loads the device drivers in HKLM\SYSTEM\CurrentControlSet\Services.

8. Session Manger (Smss.exe) executes commands in BootExecute data item, creates the pagining file by Memory Manager, DOD device key, subsystem and services for Windows.

9. The Win32 subsystem start Winlogon.exe, loads Local Security Authority (Lsass.exe) and
display Login dailog box.

10. Service Controller makes a final scan and runs serverices marked to run automatically in
HKLM\SYSTEM\CurrentControlSet\Services.

11. After successfully logon, a copy of cntrol set is made to LastKnownGood control set.

How to check what service (svchost.exe) is running in Task Manager?

How to check what service (svchost.exe) is running in Task Manager?

In the Process tab of Task Manager, add PID column by View - Column.

Open Command Prompt, type "tasklst /svc".

Check the PID which match to the svchost.exe in Task Manager.

How to disable the Windows key of the keyboard

How to disable the Windows key of the keyboard

Have you press the Windows key by mistake during playing game in full screen?

Run Regedit.exe and go to the following.

HKEY_LOCAL_ MACHINE\System\CurrentControlSet\Control\Keyboard Layout

Add REG_BINARY value name as "Scancode Map", data as "00000000000000000300000000005BE000005CE000000000"

Restart computer.

How to speed up XP shutdown process?

How to speed up XP shutdown process?

Do not clear page file at shutdown by checking the following registry.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management "1" -> "0"

Close all programmes/services you open manually before shutdown. XP takes up to 20 seconds to close single program/service.
You may speed it up by editing the registry value to decrease the value (1 second in this example).

HKEY_CURRENT_USER\Control Panel\Desktop\WaitToKillAppTimeout "20000" -> "1000"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout "20000" -> "1000"

HKEY_CURRENT_USER\Control Panel\Desktop\HungAppTimeout "5000" -> "1000"

How to fix a service failed to start error

How to fix a service failed to start error

Verify that the service is in the correct location.

Open Regedit.exe or Regedt32.exe,

Check the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

Check the service driver (*.sys) whether in C:\Windows\System32\drivers.

Open Cmd.exe,

Use the sc command to query or config the service, such as:

sc query dgivecp
sc config dgivecp type= disabled

Windows 2000\XP boot up process

Here is how Windows 2000\XP boot up.

Preboot:

1. POST routines run.

2. BIOS finds the boot devices and loads ans tuns MBR.

3. MBR locates the active partition in the partition table. Load
the boot sector into memory an run it.

The files used to load 2000\XP in this sequence:
Ntldr, Boot.ini, Bootsect.dos (if you have Windows 9x), Ntdetect.com, Winnt\system32\Ntoskrnl.exe.

Boot:

1. Ntldr (NT Loader) is loaded, executed and started the minifile system drivers to load Windows in FAT or NTFS partition format.

2. Ntldr read the boot.ini and you have operrating system selection. (if boot.ini is not found, it will attemp to load on the first partition of the first disk.)

3. If Windows 9x\Me is selected, Ntldr loads bootsect.dos.
If Windows 2000/XP is selected, Ntdetect.com performs hardware detection. Ntdetect.com detects bus/adapter type, comm ports, flating point pocessor, floppy, keyboard, mouse, parallel ports, SCSI, video cards which in the registry HLM\HARDWARE key.

4. After collection hardware information, Hardware Profiles menu is present if there is more than one hardware profile.

5. NTldr loads Winnt\System32\Ntoskrnl.exe, hal.dll (hardwareware abstraction layer), HKLM\SYSTEM key from winnt\system32\Config\System, and loads and initializes device drivers control set that used to iniialize the computer. The order list of loading device
drivers is in HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder.

6. After successful initialization, a set of registry key will be set in HKLM\HARDWARE. A copy of ControlSet will be created in HKL\System.

7. Kernal scans and loads the device drivers in HKLM\SYSTEM\CurrentControlSet\Services.

8. Session Manger (Smss.exe) executes commands in BootExecute data item, creates the pagining file by Memory Manager, DOD device key, subsystem and services for Windows.

9. The Win32 subsystem start Winlogon.exe, loads Local Security Authority (Lsass.exe) and
display Login dailog box.

10. Service Controller makes a final scan and runs serverices marked to run automatically in
HKLM\SYSTEM\CurrentControlSet\Services.

11. After successfully logon, a copy of cntrol set is made to LastKnownGood control set.

Tuesday, May 27, 2008

How to remove hidden programs in Add/Remove Programs Control Panel

How to remove hidden programs in Add/Remove Programs Control Panel

There are some programs you could not remove in control panel by default, such as Windows Messenger, MSN Explorer, Pinball, Word Pad.

All you have to do is use NotePad to open sysoc.inf in your windows\inf folder.

The sample sysoc.inf file for Windows 2000 could be like this.

[Version]
Signature = "$Windows NT$"
DriverVer=06/19/2003,5.00.2195.6717

[Components]
NtComponents=ntoc.dll,NtOcSetupProc,,4
Display=desk.cpl,DisplayOcSetupProc,,6
Fax=faxocm.dll,FaxOcmSetupProc,faxsetup.inf,hide,7
NetOC=netoc.dll,NetOcSetupProc,netoc.inf,,7
iis=iis.dll,OcEntry,iis.inf,,7
com=comsetup.dll,OcEntry,comnt5.inf,hide,7

dtc=comsetup.dll,OcEntry,dtcnt5.inf,hide,7

IndexSrv_System = setupqry.dll,IndexSrv,setupqry.inf,,7
msmq=msmqocm.dll,MsmqOcm,msmqocm.inf,,6


ims=imsinsnt.dll,OcEntry,ims.inf,,7
fp_extensions=fp40ext.dll,FrontPage4Extensions,fp40ext.inf,,7

iisdbg=iisdbg.dll,ScrptDbg,iisdbg.inf,,7


imagevue=ockodak.dll,ImagingOcEntry,imagevue.inf,hide,7

AutoUpdate=ocgen.dll,OcEntry,au.inf,hide,7


IEAccess=ocgen.dll,OcEntry,ieaccess.inf,,7
OEAccess=ocgen.dll,OcEntry,oeaccess.inf,,7
WMPOCM=ocgen.dll,OcEntry,wmpocm.inf,,7

Games=ocgen.dll,OcEntry,games.inf,HIDE,7
AccessUtil=ocgen.dll,OcEntry,accessor.inf,HIDE,7
CommApps=ocgen.dll,OcEntry,communic.inf,HIDE,7
media_clips=ocgen.dll,OcEntry,mmopt.inf,HIDE,7
MultiM=ocgen.dll,OcEntry,multimed.inf,HIDE,7
AccessOpt=ocgen.dll,OcEntry,optional.inf,HIDE,7
Pinball=ocgen.dll,OcEntry,pinball.inf,HIDE,7
MSWordPad=ocgen.dll,OcEntry,wordpad.inf,HIDE,7

[Global]
WindowTitle=%WindowTitle%
WindowTitle.StandAlone=%WindowTitle_Standalone%

[Strings]
WindowTitle=Windows
2000 Professional Setup
WindowTitle_Standalone=Windows Components
Wizard

For example, if you want to remove Pinball game, remove the HIDE
keyword from the
AccessUtil=ocgen.dll,OcEntry,accessor.inf,HIDE,7 and
Pinball=ocgen.dll,OcEntry,pinball.inf,HIDE,7 and
Games=ocgen.dll,OcEntry,games.inf,HIDE,7.

Open Control Panel and click Add/remove Programs. Click Add/Remove Windows Components. You should see the Pinball in the Games section.

Default processes in Task Manager

Default processes in Task Manager

CISVC.EXE – Indexing Service for local file searching.

CSRSS.EXE - Client Server Runtime Process, for running console windows, creating and/or deleting threads, and part of the 16-bit virtual MS-DOS environment.

CTFMON.EXE - Cicero Loader, Office XP speech recognition program.

EXPLORER.EXE – Windows Explorer, user shell, taskbar, desktop etc.

LSASS.EXE – LSA(local security authentication) Executable and Server DLL, responsible for
authenticating users for the Winlogon service

MDM.EXE - Machine Debug Manager, provide application debugging for MS IE, FrontPage, Office etc.

MSTASK.EXE - Task Scheduler Service, running program/service at specific period.

REGSVC.EXE – Remote Registry Service, accessing/managing registry remotely.

SERVICES.EXE - Services Control Manager, for starting, stopping, and interacting with system services.

SMSS.EXE - Session Manager Subsystem, for starting user session (i.e. launching the Winlogon and Win32 (Csrss.exe) processes and setting system variables).

SPOOLSV.EXE – Spooler Service, for managing prints and fax jobs.

STISVC.EXE - Still Image Service for digital cameras and scanners.

SVCHOST.EXE - Generic Process, acts as a host for other processes running from dlls (dynamic link library).

SYSTEM – System processing time.

SYSTEM IDLE PROCESS - Processor time when the system isn't processing other threads.

TASKMGR.EXE - Windows Task Manager itself.

WINLOGON.EXE – Process for managing user logon and logoff.

WINMGMT.EXE - Windows Management Instrumentation, for application client management.

For more info, check this.
http://support.microsoft.com/default.aspx?scid=kb;en-us;263201&Product=win2000

http://www.liutilities.com/products/wintaskspro/processlibrary/

Windows XP Floppy Boot Disks

Windows XP Floppy Boot Disks

Microsoft Windows XP Home Edition
http://www.microsoft.com/downloads/details.aspx?FamilyID=e8fe6868-6e4f-471c-b455-bd5afee126d8&DisplayLang=en

Microsoft Windows XP Professional
http://www.microsoft.com/downloads/details.aspx?FamilyID=55820edb-5039-4955-bcb7-4fed408ea73f&DisplayLang=en

Windows XP Home Edition SP1
http://www.microsoft.com/downloads/details.aspx?FamilyID=fbe5e4fc-695f-43e5-af05-719f45c382a4&DisplayLang=en

Windows XP Professional SP1
http://www.microsoft.com/downloads/details.aspx?FamilyID=83f53be9-28fa-40e8-8ec2-631504ef5e26&DisplayLang=en

Windows XP Home Edition SP1a
http://www.microsoft.com/downloads/details.aspx?FamilyID=33a21833-7773-4f59-bd90-63cacb89ac4e&displaylang=en

Windows XP Professional SP1a
http://www.microsoft.com/downloads/details.aspx?FamilyID=bbe82a74-76af-4c21-b853-d9f07cbfa559&DisplayLang=en

Windows XP Home Edition SP2
http://www.microsoft.com/downloads/details.aspx?FamilyID=15491f07-99f7-4a2d-983d-81c2137ff464&DisplayLang=en

Windows XP Professional Edition SP2
http://www.microsoft.com/downloads/details.aspx?familyid=535D248D-5E10-49B5-B80C-0A0205368124&displaylang=en

How to recover from a corrupted registry that prevents Windows 2000/XP from starting

How to recover from a corrupted registry that prevents Windows 2000/XP from starting

For Windows 2000, you may try to download ‘Windows 2000 Registry Repair Utility’. You will also need Windows XP Professional Setup disk.
http://www.microsoft.com/downloads/details.aspx?familyid=56d3c201-2c68-4de8-9229-ca494362419c&displaylang=en

If you don’t have access to another computer, you can use Recovery Consol to replace and repair registry.

You could install Recovery Console in two way:
(1) Select options to start the computer from the CD-ROM drive. Insert the Windows 2000/XP CD-ROM, and then restart the computer. When the "Welcome to Setup" screen appears, press R to start the Recovery Console, or
(2) Use Windows 98 bookdisk to boot into DOS. Insert the Windows 2000/XP CD and type D:\i386\winnt32.exe /cmdcons, where D is your CD Rom drive. Reboot the computer, select Recovery Console.

Login as Administrator and enter the password. At the command prompt, enter the following:

Depended on which corrupted registry entry, select one or all suit your need. (Replace C:\Windows with your Windows 2000/XP folder.)

Backup current registry:
rename c:\windows\system32\config\system c:\windows\system32\system.bak
rename c:\windows\system32\config\software c:\windows\system32software.bak
rename c:\windows\system32\config\sam c:\windows\system32\sam.bak
rename c:\windows\system32\config\security c:\windows\system32\security.bak
rename c:\windows\system32\config\default c:\windows\ system32\default.bak


Replace current registry with default registry:
copy c:\windows\repair\system c:\windows\system32\config\system
copy c:\windows\repair\software c:\windows\system32\config\software
copy c:\windows\repair\sam c:\windows\system32\config\sam
copy c:\windows\repair\security c:\windows\system32\config\security
copy c:\windows\repair\default c:\windows\system32\config\default


Type exit to quit Recovery Console. Your computer will restart.

In these procedures, you might lose some Windows settings. For Windows XP, you could do a System Restore to restore the setting a day early that you had problem.