* Conoscenza del computer >> Computer >  >> Social media

Architettura e funzionamento di Windows 2000: kernel, executive, sottosistemi, NTFS, networking

Windows 2000 (NT 5.0, febbraio 2000) è il **spartiacque tra l'era NT enterprise e l'era consumer moderna**. Costruito su NT 4.0 (kernel 4.0), introduce: Active Directory, MMC, Group Policy, DFS, EFS, Kerberos, LDAP, DHCP/DNS/WINS integrati, Plug & Play, USB, FireWire, DirectX 7, Windows Installer, WMI, WSH, recupero sistema, hibernation, driver signing, WFP. Ecco l'architettura interna.

1. Kernel Mode: Executive + Kernel + HAL + Driver

Architettura **monolitica modulare**: la maggior parte dei servizi OS gira in kernel mode (Ring 0) per performance, ma strutturata in componenti distinti con interfacce formali.

Kernel (ntoskrnl.exe) — nucleo non-paginabile, non-preemptible (mostly)

  • Dispatcher: Scheduler (priority-based, 32 livelli real-time + 16 variabili), dispatcher database (ready queues per CPU, wait queues), context switch, DPC (Deferred Procedure Call), APC (Asynchronous Procedure Call), timer (absolute, relative, periodic).
  • Trap/Exception/Interrupt handling: IDT, trap frames, exception dispatching (KiDispatchException), bug check (KeBugCheckEx → BSOD).
  • Synchronization: Spinlock (queued, in-stack), mutex (kernel mutant), fast mutex, pushlock (Vista+), ERESOURCE (shared/exclusive), interlocked operations (atomic), memory barriers.
  • Memory management (core): PFN database (page frame number), working set manager, balance set manager, modified page writer, mapped page writer, page fault handler (demand zero, copy-on-write, transition, prototype, paged pool).
  • Object Manager (core types): Object header, type descriptors (Process, Thread, File, Section, Port, Event, Mutant, Semaphore, Timer, Token, Job, Device, Driver, Controller, Adapter, Arc, SymbolicLink, Directory, Key, Callback, IoCompletion, WaitCompletion, EtwRegistration, DxgkSharedResource, etc.), namespace (\ObjectTypes, \Directory, \SymbolicLink, \Device, \Driver, \File, \Global??, \KernelObjects, \KnownDlls, \Nls, \ObjectTypes, \Registry, \Security, \Sessions, \Windows).

Executive Services (in ntoskrnl.exe, esportati come routine di sistema)

Hardware Abstraction Layer (HAL — hal.dll / halmacpi.dll / halaacpi.dll / halmps.dll / halsp.dll)

  • Isola kernel da dettagli hardware: interrupt controller (PIC vs APIC vs x2APIC), timer (PIT vs RTC vs HPET vs ACPI PM timer), DMA, bus (PCI, EISA, MCA, PCMCIA), SMP (IPI, cache coherency), NUMA, ACPI tables (DSDT, FADT, MADT, SRAT, SLIT), firmware (BIOS vs UEFI), machine check (MCA), PCI Express (ASPM, AER).
  • Scelta al boot via registry HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Hal o BCD.

Driver Model (Kernel Mode Drivers — KMD)

  • Tipi: Device function driver, Filter driver (upper/lower), File system driver (FSD), File system filter driver (minifilter, legacy filter), Bus driver, Class driver, Port driver, Miniport (NDIS, Storport, Video, Audio, HID, Battery, UPS).
  • Driver entry: DriverEntry → AddDevice (PnP) → DispatchXxx (IRP_MJ_XXX). Unload: DriverUnload.
  • Signature: WHQL (Windows Hardware Quality Labs) — .cat file, cross-certificate. Driver Signing Policy: Ignore / Warn / Block (Group Policy).
  • Verifier: Driver Verifier (verifier.exe) — special pool, force IRQL checking, pool tracking, I/O verification, deadlock detection, DMA verification, security checks.

2. User Mode Subsystems

ComponenteFunzioneStrutture chiave
I/O ManagerIRP (I/O Request Packet) lifecycle: create, read, write, device control, fsctl, cleanup, close, pnp, power, query/set info. Driver stack (device objects, driver objects, filter drivers). Completion routines. Cancel-safe queues. Asynchronous I/O (event, APC, IOCP).IRP, DEVICE_OBJECT, DRIVER_OBJECT, FILE_OBJECT, VPB, FCB/CCB
Memory ManagerVirtual address space (per process, system, session), section objects (mapped files, shared memory, images), page file management, memory mapped I/O, large pages, AWE (Address Windowing Extensions), working set tuning, prototype PTEs, clone (fork-like via section copy-on-write).VAD (Virtual Address Descriptor), PTE, PFN, SECTION, CONTROL_AREA, SUBSECTION
Process/Thread ManagerProcess creation (PspCreateProcess → NtCreateProcessEx), thread creation, job objects (resource limits, accounting), protected process (DRM, anti-cheat), fiber (user-mode scheduling), UMS (User-Mode Scheduling, 7+). Token (access token, privileges, groups, integrity level, claims, restricted SIDs, capabilities, AppContainer).EPROCESS, ETHREAD, EJOB, TOKEN, KPROCESS, KTHREAD
Security Reference Monitor (SRM)Access validation (SeAccessCheck), DACL/SACL evaluation, privilege check (SeSinglePrivilegeCheck), mandatory integrity control (MIC, Vista+ backport?), audit generation, token filtering, impersonation, restricted tokens, capability SIDs.SECURITY_DESCRIPTOR, ACL, ACE, SID, TOKEN, PRIVILEGE_SET, GENERIC_MAPPING
Cache ManagerFile system cache (system cache, not per-file). Read-ahead, write-behind (lazy writer), purge, mapped file I/O (section objects), pinning (fast I/O), BCB (Buffer Control Block), VACB (Virtual Address Control Block). Coherency con filesystem (FSRTL).VACB, BCB, SHARED_CACHE_MAP, PRIVATE_CACHE_MAP
Configuration Manager (Registry)Hive files (SYSTEM, SOFTWARE, SAM, SECURITY, DEFAULT, user NTUSER.DAT, USRCLASS.DAT). Cell-based allocation (bins, cells). Transactional (log + base). Key control blocks (KCB), delayed close, notify (RegNotifyChangeKeyValue).HBIN, HCELL, KCB, CM_KEY_BODY, CM_KEY_CONTROL_BLOCK
Plug & Play ManagerDevice enumeration (bus drivers: PCI, ACPI, USB, PCMCIA, ISAPNP, 1394), resource allocation (IRQ, I/O port, memory, DMA, bus number), device tree (\Device\...), driver loading (AddDevice, StartDevice), surprise removal, eject, device relations (bus, ejection, power, target, removal).DEVICE_OBJECT, DEVICE_NODE, PNP_IRP (IRP_MN_START_DEVICE, QUERY_RESOURCES, QUERY_RESOURCE_REQUIREMENTS, FILTER_RESOURCE_REQUIREMENTS, STOP_DEVICE, REMOVE_DEVICE, SURPRISE_REMOVAL, EJECT, QUERY_INTERFACE, QUERY_CAPABILITIES, QUERY_ID, QUERY_PNP_DEVICE_STATE, QUERY_LEGACY_BUS_INFORMATION)
Power ManagerSystem power states (S0, S1, S2, S3, S4, S5), device power states (D0-D3), processor power states (C0-C3, P-states), wake capabilities, idle detection, policy (user, admin, system), hibernation (S4) — memory image to hiberfil.sys, resume.POP_POLICY, DEVICE_CAPABILITIES, SYSTEM_POWER_STATE, DEVICE_POWER_STATE

3. File System: NTFS 5.0 (Windows 2000)

  • MFT (Master File Table): Ogni file/dir = record MFT (base + attribute list). Attributi: $STANDARD_INFORMATION, $FILE_NAME, $DATA (resident/non-resident), $INDEX_ROOT/$INDEX_ALLOCATION/$BITMAP (dir), $OBJECT_ID, $REPARSE_POINT, $EA, $LOGGED_UTILITY_STREAM.
  • Journaling (Log File — $LogFile): Transazioni metadata (non data by default). Write-ahead logging → recovery atomico dopo crash (analysis, redo, undo). chkdsk /f / fsutil repair.
  • Security Descriptor per file: $SECURITY_DESCRIPTOR attributo → ACL (DACL/SACL) → SRM enforcement. Ereditarietà, proprietario, gruppo primario.
  • EFS (Encrypting File System): FEK (File Encryption Key) per file (DESX/3DES/AES256) → crittografato con chiave pubblica utente (RSA) + agenti recupero (DRA). Transparent per app. cipher /e.
  • Sparse files, Reparse points (junctions, mount points, symlinks Vista+), Quotas (per utente/volume), Object IDs (link tracking), USN Journal (change journal), Defrag (fsctl).
  • Cluster size default: 4KB (fino 16TB vol). Max file: 16TB (theoretical 2^64-1 clusters). Max volume: 256TB (practical 16TB pre-2003, 256TB SP4+).

4. Networking Stack

  • TDI (Transport Driver Interface) — legacy + NDIS 5.0 (Network Driver Interface Specification) per miniport NIC.
  • Protocolli: TCP/IP (IPv4, IPv6 experimental), NetBEUI/NetBIOS Frames (legacy LAN), IPX/SPX (NWLink, NetWare), AppleTalk (Services for Macintosh), DLC (Data Link Control, SNA/AS400).
  • Servizi: DHCP Client/Server, DNS Client/Server (Dynamic DNS, SRV records per AD), WINS (NetBIOS name resolution), RRAS (Routing and Remote Access Service: NAT, VPN PPTP/L2TP/IPSec, dial-up, demand-dial), IPSec (policy-based, Kerberos auth, preshared key, certificate), QoS (RSVP, Traffic Control API), ICS (Internet Connection Sharing).
  • Winsock 2 (WS2_32.dll) + Service Providers (Layered: namespace, transport, security). Raw sockets (admin).

5. Interfaccia Utente

  • Shell: explorer.exe — Desktop, Taskbar (Quick Launch, notification area), Start Menu (Classic / XP style), My Computer, My Network Places, Control Panel (appunti .cpl), MMC (Microsoft Management Console) snap-ins.
  • Temi: Classic (Win95 look) / Windows 2000 (default, blu/grigio). Nessun visual style theming engine (introdotto in XP / uxtheme.dll).
  • Accessibilità: Magnifier, Narrator, On-Screen Keyboard, High Contrast, StickyKeys, FilterKeys, ToggleKeys, MouseKeys, SoundSentry, ShowSounds.

6. Sicurezza: modello pre-Vista

  • Nessun UAC (User Account Control) — utenti admin = token admin completo sempre. "Run as..." (secondary logon) per elevazione manuale.
  • Nessun MIC (Mandatory Integrity Control) — processi low/medium/high/system non esistono.
  • Nessun ASLR / DEP per default (DEP hardware NX bit supportato su CPU AMD64/EM64T + PAE, opt-in via boot.ini /noexecute=optin).
  • Nessun Windows Firewall (introdotto in XP SP2 / 2003 SP1). IPsec policy per host-based filtering.
  • Nessun Windows Defender / Security Center.
  • Crittografia: CryptoAPI (CAPI), Certificate Services (Enterprise CA), EFS, IPSec, Kerberos, NTLMv2 (default), LM hash (disabilitabile via policy).

⚠️ Stato attuale: LEGACY, NON SUPPORTATO, PERICOLOSO

Windows 2000 ha raggiunto End of Life il 13 luglio 2010. Nessuna patch sicurezza da 14+ anni. Vulnerabilità critiche note (MS08-067 Conficker, MS17-010 EternalBlue, MS09-050 SMB2, MS06-040 Server Service, MS05-039 Plug & Play, MS04-011 LSASS, MS03-026 RPC DCOM, MS03-007 WebDAV, MS02-039 RPC Locator, MS01-033 IIS, MS00-078 Telnet, MS00-057 Media Player, MS00-046 RPC, MS00-034 RunOnce, MS00-019 SMB, MS99-025 IIS, MS99-013 PDU, MS98-017 IIS) — **tutte sfruttabili remote, senza patch**. TLS 1.0/1.1 only (deprecato ovunque). Certificati CA radice scaduti/non fidati. Driver hardware moderni inesistenti. **Non connettere a nessuna rete.** Solo per: ricerca malware storica, emulazione (VM isolata, snapshot, no network), archeologia software, compatibilità app legacy air-gapped.

Conclusione

Windows 2000 è un **capolavoro di ingegneria dei sistemi** (Dave Cutler, team NT): kernel robusto, executive modulare, security reference monitor, cache manager, object manager, PnP, power, HAL, NTFS 5.0 con journaling/EFS/quotas, Active Directory foundation, TCP/IP/IPX/AppleTalk, Win32/POSIX/OS2 subsystems. Ha gettato le basi per XP, 2003, Vista, 7, 8, 10, 11. Ma oggi è **un relitto insicuro**. Studiarne l'architettura è formativo; usarlo in produzione è negligenza.

Social media

  • --热点Computer

Computer © www.354353.com

SottosistemaProcesso serverClient APIRuolo
Win32 (Primary)csrss.exe (Client/Server Runtime SubSystem) + win32k.sys (kernel-mode GUI/GDI/USER)Win32 API (kernel32.dll, user32.dll, gdi32.dll, advapi32.dll, shell32.dll, comctl32.dll, comdlg32.dll, version.dll, winmm.dll, winspool.drv, ole32.dll, oleaut32.dll, rpcrt4.dll, msvcrt.dll, ntdll.dll)Finestre, messaggi, GDI, controlli, menu, clipboard, shell, processo/thread, file, registry, sicurezza, memoria, I/O, tempo, DLL, COM, RPC, multimedia, stampa. 99% applicazioni Windows.
POSIXpsxss.exePOSIX.1 API (IEEE 1003.1) — subset limitatoPortabilità app UNIX conformi. Deprecato (rimosso in XP/2003). Interix / SFU (Services for UNIX) forniva implementazione completa separata.
OS/2oso2ss.exeOS/2 1.x API (subset)Legacy. Rimosso in XP.
Security (LSA)lsass.exe (Local Security Authority SubSystem Service)Security API (secur32.dll, msv1_0.dll, kerberos.dll, schannel.dll, negotiate.dll, pku2u.dll, wdigest.dll, cloudap.dll)Autenticazione (logon, NTLM, Kerberos, TLS/SSL, PKU2U, Cloud AP), autorizzazione, token, credenziali (cached, DPAPI), policy (account, password, audit, kerberos),/packages (Negotiate, NTLM, Kerberos, Schannel, Digest, PKU2U, CloudAP).