Rootkits: User-Mode vs Kernel-Mode Rootkits Notes in Hindi & English : रूटकिट (Rootkits): सिस्टम प्रिविलेज अधिग्रहण और डिटेक्शन बचाव और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Rootkits: User-Mode vs Kernel-Mode Rootkits (रूटकिट (Rootkits): सिस्टम प्रिविलेज अधिग्रहण और डिटेक्शन बचाव) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: Rootkits operate at user, kernel, hypervisor, or firmware rings to subvert OS visibility and conceal malicious processes, files, and network sockets from defenders. Detecting them requires cross-view verification, raw memory forensics, Kernel Patch Protection (PatchGuard), and clean offline inspection rather than trusting compromised OS APIs.

अध्याय सार: रूटकिट यूजर-मोड, कर्नेल-मोड, हाइपरवाइजर या फर्मवेयर स्तर पर ऑपरेटिंग सिस्टम के नियंत्रण और दृश्यता को बदलकर दुर्भावनापूर्ण प्रोसेस, फाइलों और नेटवर्क कनेक्शनों को छिपा देते हैं। इनकी पहचान के लिए संक्रमित OS API पर भरोसा करने के बजाय क्रॉस-व्यू सत्यापन, मेमोरी फॉरेंसिक्स, PatchGuard और ऑफलाइन जांच की आवश्यकता होती है।

Rootkits: User-Mode vs Kernel-Mode Rootkits: Detailed Notes & Architecture (रूटकिट (Rootkits): सिस्टम प्रिविलेज अधिग्रहण और डिटेक्शन बचाव)

1. Rootkit Privilege Architecture: CPU Protection Rings (-2 to 3) (रूटकिट और CPU प्रोटेक्शन रिंग्स (Ring -2 से Ring 3))

[EN] Unlike standard malware that steals data or encrypts files directly, a Rootkit is a stealth cloak engineered to maintain privileged persistence and hide malicious artifacts from administrators and security tools. x86 architectures enforce privilege separation across Rings: applications run unprivileged in Ring 3 (User Mode), whereas OS kernels and drivers execute with unrestricted hardware access in Ring 0 (Kernel Mode). Even deeper, Hypervisor rootkits (like the 2006 Blue Pill proof-of-concept) operate beneath the OS at Ring -1, while UEFI Bootkits and SMM (System Management Mode) implants execute at Ring -2/-3, surviving complete hard-drive replacement.

[HI] सामान्य मैलवेयर के विपरीत, रूटकिट मुख्यतः विशेषाधिकार (Root/SYSTEM) बनाए रखने और अन्य मैलवेयर के प्रोसेस, फाइल व पोर्ट्स को छिपाने का एक आवरण होता है। x86 आर्किटेक्चर में सामान्य प्रोग्राम Ring 3 (User Mode) में चलते हैं, जबकि ऑपरेटिंग सिस्टम कर्नेल और ड्राइवर Ring 0 (Kernel Mode) में पूर्ण हार्डवेयर अधिकारों के साथ चलते हैं। इनसे भी गहरे स्तर पर हाइपरवाइजर रूटकिट Ring -1 में और UEFI बूटकिट व SMM इम्प्लांट Ring -2/-3 में चलते हैं जो हार्ड डिस्क बदलने के बाद भी सिस्टम में बने रह सकते हैं।

2. User-Mode Rootkits (Ring 3): API Hooking and LD_PRELOAD (यूजर-मोड रूटकिट (Ring 3): API हुकिंग और LD_PRELOAD)

[EN] User-mode rootkits operate inside Ring 3 without requiring kernel driver exploits, modifying how user-space diagnostic utilities perceive the system. On Windows, they patch Import Address Tables (IAT), overwrite initial function bytes with inline `JMP` trampolines (`Detours`), or inject DLLs into `taskmgr.exe` and `explorer.exe` to filter out specific processes or files from `NtQuerySystemInformation` and `FindNextFile`. On Linux, classic user-mode rootkits (e.g., Azazel, Jynx) abuse `/etc/ld.so.preload` or `LD_PRELOAD` environment variables to interpose custom `libc` wrappers (`readdir()`, `fopen()`, `accept()`) ahead of `ls`, `ps`, and `netstat`.

[HI] यूजर-मोड रूटकिट Ring 3 में रहकर सामान्य प्रशासनिक टूल की दृष्टि को बदल देते हैं। विंडोज में ये Import Address Table (IAT) पैच करते हैं, फंक्शन के शुरुआती बाइट्स में `JMP` ट्रैंपोलिन जोड़ते हैं या `taskmgr.exe` में DLL इंजेक्ट करके छिपे प्रोसेस व फाइलों को फिल्टर कर देते हैं। लिनक्स में यूजर-मोड रूटकिट `/etc/ld.so.preload` या `LD_PRELOAD` के जरिए `libc` के `readdir()` या `fopen()` फंक्शन को बदल देते हैं, जिससे `ls`, `ps` और `netstat` जैसे कमांड रूटकिट की फाइलें या पोर्ट नहीं दिखाते।

3. Kernel-Mode Rootkits (Ring 0): SSDT Hooking and DKOM (कर्नेल-मोड रूटकिट (Ring 0): SSDT हुकिंग और DKOM)

[EN] Kernel-mode rootkits execute inside Ring 0—loaded via malicious `.sys` drivers, Vulnerable Driver exploitation (BYOVD — Bring Your Own Vulnerable Driver), or Linux Loadable Kernel Modules (`insmod` LKMs). Traditional kernel rootkits hooked the Windows System Service Descriptor Table (SSDT), Interrupt Descriptor Table (IDT), or Linux `sys_call_table` to intercept every system call globally. More subtly, Direct Kernel Object Manipulation (DKOM) hooks no code pointers at all: instead, it unlinks the hidden process's `EPROCESS` node from the doubly-linked `ActiveProcessLinks` list (`Flink`/`Blink`), making the process invisible to Task Manager while the thread scheduler still gives it CPU time! Windows counters Ring 0 tampering via Kernel Patch Protection (PatchGuard) and Driver Signature Enforcement (DSE).

[HI] कर्नेल-मोड रूटकिट Ring 0 में विंडोज `.sys` ड्राइवर (अक्सर BYOVD—असुरक्षित हस्ताक्षरित ड्राइवर का दुरुपयोग) या लिनक्स LKM मॉड्यूल के रूप में लोड होते हैं। पारंपरिक कर्नेल रूटकिट Windows SSDT या Linux `sys_call_table` को हुक करते थे। इसके विपरीत Direct Kernel Object Manipulation (DKOM) किसी टेबल को हुक किए बिना ही कर्नेल की `ActiveProcessLinks` डबली-लिंक्ड लिस्ट से अपने `EPROCESS` ब्लॉक को अनलिंक कर देता है—जिससे Task Manager को प्रोसेस दिखना बंद हो जाता है पर CPU शेड्यूलर उसे चलाता रहता है। विंडोज इसे रोकने के लिए PatchGuard (KPP) और Driver Signature Enforcement (DSE) लागू करता है।

4. Cross-View Detection, Memory Forensics and Remediation (क्रॉस-व्यू डिटेक्शन, मेमोरी फॉरेंसिक्स और निवारण)

[EN] Because a compromised OS kernel actively lies to scanners running inside it, reliable rootkit hunting relies on Cross-View Verification and out-of-band analysis. Tools compare high-level API enumeration against raw filesystem structures (NTFS `$MFT` or Linux `ext4` inodes) or offline Live-USB scans. In RAM forensics with Volatility, comparing `windows.pslist` (walks `ActiveProcessLinks`, fooled by DKOM) against `windows.psscan` (scans raw physical RAM pool tags for `EPROCESS` structures) immediately exposes DKOM-hidden rootkits. True remediation of kernel or firmware rootkits demands full bare-metal OS reinstallation and verified UEFI firmware reflashing.

[HI] चूंकि संक्रमित कर्नेल अपने भीतर चलने वाले एंटीवायरस से भी झूठ बोलता है, इसलिए रूटकिट पकड़ने के लिए Cross-View सत्यापन और ऑफलाइन विश्लेषण आवश्यक है। इसमें उच्च-स्तरीय OS API आउटपुट की तुलना सीधे डिस्क के कच्चे `$MFT` या ऑफलाइन Live USB स्कैन से की जाती है। मेमोरी फॉरेंसिक्स (Volatility) में `windows.pslist` (जो `ActiveProcessLinks` पढ़ता है) और `windows.psscan` (जो पूरी RAM में `EPROCESS` पूल टैग ढूंढता है) की तुलना करने पर DKOM द्वारा छिपाए गए प्रोसेस तुरंत पकड़े जाते हैं। कर्नेल या फर्मवेयर रूटकिट को पूरी तरह हटाने के लिए क्लीन OS पुनः इंस्टॉल और BIOS/UEFI रिफ्लैशिंग ही सबसे सुरक्षित उपाय है।

Syntax, Formula & Technical Example (Rootkits: User-Mode vs Kernel-Mode Rootkits)

# Rootkit Hunting: User-Mode LD_PRELOAD Audit & Volatility DKOM Cross-View
# 1. Linux User-Mode Rootkit Check (inspect global preload & hidden LKMs):
cat /etc/ld.so.preload              # Should typically be empty or absent
lsmod && dmesg | grep -i taint      # Check tainted/unsigned kernel modules

# 2. Volatility 3 Memory Forensics Cross-View Check (Exposes DKOM Rootkits):
vol -f memory.raw windows.pslist    # Walks kernel ActiveProcessLinks list
vol -f memory.raw windows.psscan    # Scans raw RAM pool tags for EPROCESS
# Any PID present in psscan but MISSING from pslist = DKOM-hidden process!

Rootkits: User-Mode vs Kernel-Mode Rootkits Quick Reference & Comparison Table

Rootkit LayerExecution Privilege & Hiding MechanismDefinitive Countermeasure / Detection
User-Mode Rootkit (Ring 3)Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappersInspect memory hooks or run statically linked binaries
Kernel-Mode Rootkit (Ring 0)Hooks SSDT/sys_call_table or unlinks EPROCESS via DKOMPatchGuard + DSE + Volatility pslist/psscan diff
Bootkit / UEFI Rootkit (Ring -2)Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OSUEFI Secure Boot + TPM Measured Boot + reflash
Hypervisor Rootkit (Ring -1)Subverts Intel VT-x/AMD-V beneath OS kernel (Blue Pill)Hardware IOMMU / CPU timing & firmware attestation

Rootkits: User-Mode vs Kernel-Mode Rootkits Top 20 Bilingual MCQs with Answers

Q1. How does Direct Kernel Object Manipulation (DKOM) hide a malicious running process from Windows Task Manager without modifying SSDT pointers or hooking any code?

(Direct Kernel Object Manipulation (DKOM) बिना किसी कोड या SSDT पॉइंटर को हुक किए Windows Task Manager से एक सक्रिय प्रोसेस को कैसे छिपा देता है?)

(A) It disables TCP/IP loopback networking inside `hosts`

(B) It encrypts the entire Windows Registry with RSA-2048

(C) It unlinks the target process's `EPROCESS` structure from the doubly-linked `ActiveProcessLinks` list while leaving scheduling thread lists intact

(D) It changes the file extension of `taskmgr.exe` to `.txt`

Correct Answer: (C)

[EN] Task Manager walks `ActiveProcessLinks` to display processes, whereas the Windows scheduler schedules threads independently; unlinking `EPROCESS` (`Flink`/`Blink`) hides it cleanly.

[HI] Task Manager प्रोसेस दिखाने के लिए `ActiveProcessLinks` लिंक सूची पढ़ता है, जबकि शेड्यूलर थ्रेड्स के आधार पर CPU देता है; केवल `EPROCESS` को सूची से अनलिंक करने पर प्रोसेस अदृश्य हो जाता है।

Q2. During RAM forensics using Volatility, a PID appears in `windows.psscan` output but is completely absent from `windows.pslist`. What does this discrepancy prove?

(Volatility द्वारा RAM फॉरेंसिक्स के दौरान एक PID `windows.psscan` में दिखती है लेकिन `windows.pslist` में गायब है। यह अंतर क्या सिद्ध करता है?)

(A) Windows Defender successfully quarantined an Adware cookie

(B) A kernel-mode rootkit used DKOM to unlink the `EPROCESS` object from `ActiveProcessLinks` (or the process recently terminated)

(C) The user opened too many Google Chrome tabs simultaneously

(D) The workstation has faulty DDR5 hardware memory chips

Correct Answer: (B)

[EN] `pslist` follows linked-list pointers (which DKOM breaks), whereas `psscan` scans raw RAM pages for `Proc` pool headers, exposing unlinked active rootkit processes.

[HI] `pslist` लिंक्ड-लिस्ट का अनुसरण करता है जिसे DKOM तोड़ देता है, जबकि `psscan` पूरी RAM में `EPROCESS` टैग खोजता है—इसलिए यह अंतर DKOM रूटकिट का स्पष्ट संकेत है।

Q3. Which Linux file is commonly abused by Ring 3 User-Mode rootkits to inject a malicious shared library ahead of `libc` into every dynamically linked command (`ls`, `ps`, `ss`)?

(Ring 3 यूजर-मोड रूटकिट हर डायनामिक लिनक्स कमांड (`ls`, `ps`, `ss`) में `libc` से पहले अपनी दुर्भावनापूर्ण लाइब्रेरी लोड करने के लिए किस फाइल का दुरुपयोग करते हैं?)

(A) `/etc/resolv.conf`

(B) `/etc/fstab`

(C) `/etc/ld.so.preload`

(D) `/boot/grub/grub.cfg`

Correct Answer: (C)

[EN] Listing a malicious `.so` in `/etc/ld.so.preload` forces the dynamic linker (`ld.so`) to intercept `readdir()` or `fopen()` globally across user-space binaries.

[HI] `/etc/ld.so.preload` में दर्ज साझा लाइब्रेरी हर कमांड में `libc` से पहले लोड हो जाती है, जिससे रूटकिट `ls` और `ps` के आउटपुट से अपनी फाइलें व प्रोसेस छिपा देता है।

Q4. What security feature built into 64-bit Windows editions checks critical kernel tables (SSDT, IDT, GDT, and kernel code) periodically to trigger a BugCheck (`CRITICAL_STRUCTURE_CORRUPTION`) if a Ring 0 rootkit tampers with them?

(64-बिट विंडोज में कौन सी सुरक्षा सुविधा SSDT, IDT और कर्नेल कोड की अखंडता की जांच करके Ring 0 रूटकिट द्वारा छेड़छाड़ होने पर सिस्टम को तुरंत रोक (BugCheck) देती है?)

(A) Windows SmartScreen URL Filter

(B) Internet Explorer Enhanced Security Mode

(C) NTFS Disk Compression

(D) Kernel Patch Protection (KPP / PatchGuard)

Correct Answer: (D)

[EN] Introduced in x64 Windows, PatchGuard prohibits both third-party AV and kernel rootkits from patching the SSDT, IDT, or core kernel structures.

[HI] 64-बिट विंडोज में PatchGuard (KPP) कर्नेल की मुख्य तालिकाओं (SSDT/IDT) में किसी भी अनधिकृत बदलाव को पकड़कर सिस्टम को सुरक्षित रूप से हॉल्ट कर देता है।

Q5. What is a BYOVD ('Bring Your Own Vulnerable Driver') attack in modern kernel rootkit campaigns?

(आधुनिक कर्नेल रूटकिट अभियानों में BYOVD ('Bring Your Own Vulnerable Driver') हमला क्या होता है?)

(A) Attackers mail a physical USB keyboard driver inside a phishing parcel

(B) Attackers disable BIOS settings using CSS stylesheets

(C) Attackers convert Linux `.ko` files directly into Java `.jar` packages

(D) Attackers with local Admin rights drop a legitimate, digitally signed third-party driver containing a known flaw, then exploit it to gain Ring 0 access and bypass DSE

Correct Answer: (D)

[EN] Because Windows Driver Signature Enforcement (DSE) blocks unsigned `.sys` files, attackers load old legitimately signed vulnerable drivers (e.g., anti-cheat/hardware utilities) to disable EDR from Ring 0.

[HI] DSE बिना हस्ताक्षर वाले ड्राइवर रोकता है; इसलिए हमलावर किसी पुरानी वैध कंपनी के हस्ताक्षरित लेकिन कमजोर ड्राइवर को लोड करके उसकी खामी से Ring 0 अधिकार पा लेते हैं।

Q6. Which CPU execution ring do UEFI Bootkits and System Management Mode (SMM) firmware rootkits inhabit, enabling them to survive an OS wipe or disk replacement?

(UEFI बूटकिट और SMM फर्मवेयर रूटकिट किस CPU प्रिविलेज स्तर पर चलते हैं, जिससे वे हार्ड डिस्क बदलने या OS फॉर्मेट करने के बाद भी बने रह सकते हैं?)

(A) Application Layer 7 of the OSI model

(B) Inside temporary browser `sessionStorage`

(C) Ring 3 unprivileged browser sandbox

(D) Below Ring 0 (Ring -2 / Ring -3 firmware & SPI flash level)

Correct Answer: (D)

[EN] SPI flash-resident UEFI/SMM rootkits run outside the OS disk entirely before Ring 0 boots, surviving standard OS reinstallation unless firmware itself is reflashed.

[HI] ये OS और हार्ड डिस्क से भी नीचे मदरबोर्ड की SPI फर्मवेयर चिप (Ring -2/-3) में रहते हैं, इसलिए OS रीइंस्टॉल करने से भी नहीं हटते।

Q7. Why is running `chkrootkit` or an antivirus scan directly from inside an actively infected Ring 0 rootkit system considered unreliable?

(सक्रिय Ring 0 रूटकिट से संक्रमित सिस्टम के भीतर ही `chkrootkit` या एंटीवायरस चलाना विश्वसनीय क्यों नहीं माना जाता है?)

(A) Antivirus software cannot execute when TCP/IP is installed

(B) The kernel rootkit intercepts system calls (`getdents64`, `read`, `NtQueryDirectoryFile`) and returns falsified clean results to the scanner

(C) Kernel rootkits automatically unplug the computer monitor

(D) `chkrootkit` only runs on Apple iOS devices

Correct Answer: (B)

[EN] Because every user-space scanner relies on the OS kernel for disk and process queries, a compromised kernel controls everything the scanner sees.

[HI] सिस्टम के भीतर चलने वाला कोई भी टूल फाइल या प्रोसेस देखने के लिए कर्नेल से ही पूछता है, और संक्रमित कर्नेल स्कैनर को झूठे साफ परिणाम दिखा देता है।

Q8. Which mitigation technique checks a system's integrity by running a statically linked binary or booting an external clean OS and comparing its findings with what the suspect OS reported?

(संक्रमित संदिग्ध OS के आउटपुट की तुलना बाहरी क्लीन बूट OS या रॉ डिस्क/मेमोरी से प्राप्त आउटपुट के साथ करके रूटकिट पकड़ने की तकनीक क्या कहलाती है?)

(A) Polymorphic Code Emulation

(B) DNS Round-Robin Load Balancing

(C) Diffie-Hellman Ephemeral Exchange

(D) Cross-View Detection (Differential Integrity Checking)

Correct Answer: (D)

[EN] Cross-view detection flags discrepancies between high-level API listings (`FindFirstFile`) and low-level truth (raw `$MFT` parsing or offline rescue scan).

[HI] Cross-View डिटेक्शन में उच्च-स्तरीय OS API से मिले परिणामों की तुलना निचले स्तर के रॉ डिस्क या ऑफलाइन स्कैन से करके छिपे हुए रूटकिट को पकड़ा जाता है।

Q9. How does a Hypervisor-based Rootkit (Ring -1, exemplified by Joanna Rutkowska's 2006 'Blue Pill' research) maintain stealth beneath the OS?

(जोआना रुटकोव्स्का के 2006 'Blue Pill' शोध द्वारा प्रदर्शित हाइपरवाइजर-आधारित रूटकिट (Ring -1) ऑपरेटिंग सिस्टम के नीचे छिपकर कैसे काम करता है?)

(A) It stores malicious scripts inside HTML `<meta>` tags

(B) It forces the OS to boot strictly from a 1.44 MB floppy disk

(C) It replaces the Ethernet NIC MAC address with `00:00:00:00:00:00`

(D) It activates hardware virtualization (AMD-V / Intel VT-x) on the fly to migrate the running OS into a virtual machine controlled secretly by the rootkit

Correct Answer: (D)

[EN] By slipping beneath the OS kernel into Ring -1 via CPU virtualization extensions, the rogue hypervisor intercepts privileged instructions transparently.

[HI] यह CPU की हार्डवेयर वर्चुअलाइजेशन क्षमता (VT-x/AMD-V) चालू करके पूरे चल रहे OS को एक वर्चुअल मशीन के अंदर डाल देता है और स्वयं Ring -1 से सब नियंत्रित करता है।

Q10. Which statement is NOT true regarding Rootkits and their classification?

(रूटकिट और उनके वर्गीकरण के संबंध में निम्नलिखित में से कौन सा कथन सत्य नहीं है?)

(A) Driver Signature Enforcement (DSE) blocks unsigned kernel drivers from loading by default in modern Windows

(B) User-mode rootkits can hook Import Address Tables (IAT) or overwrite function prologues with `JMP` trampolines

(C) The name 'Rootkit' historically stems from Unix toolkits designed to maintain stealth `root` administrator access

(D) Running Windows 'System Restore' inside the compromised OS guarantees complete removal of a UEFI SPI-flash Bootkit

Correct Answer: (D)

[EN] Windows System Restore only rolls back OS files and registry snapshots—it cannot clean malicious UEFI firmware sitting in motherboard SPI flash memory.

[HI] Windows System Restore केवल OS फाइलें वापस लाता है; यह मदरबोर्ड की SPI फ्लैश चिप में बैठे UEFI बूटकिट को नहीं हटा सकता।

Q11. Why did early Linux user-mode rootkits replace system binaries like `/bin/ls`, `/bin/ps`, and `/bin/netstat` with trojanized executables, and what simple control caught them?

(शुरुआती लिनक्स यूजर-मोड रूटकिट `/bin/ls`, `/bin/ps` जैसे सिस्टम बाइनरी बदल देते थे; उन्हें पकड़ने का सबसे सरल उपाय क्या था?)

(A) Disabling ICMP ping packets on localhost

(B) Changing the desktop background to solid black

(C) Clearing web browser cookies every Friday

(D) File Integrity Monitoring (AIDE/Tripwire) or cryptographic package verification (`rpm -Va` / `debsums`) comparing binary SHA-256 hashes against known clean packages

Correct Answer: (D)

[EN] Trojanizing `/bin/ls` changes its cryptographic hash and file size; package-manager hash verification (`rpm -Va`, `debsums`) or FIM exposes altered binaries immediately.

[HI] `/bin/ls` या `/bin/ps` बदलने से उनके क्रिप्टोग्राफिक हैश बदल जाते हैं, जिन्हें Tripwire, AIDE या `rpm -Va` / `debsums` जैसी पैकेज अखंडता जांच तुरंत पकड़ लेती है।

Q12. What does 'Measured Boot' (using TPM 2.0 PCR registers) accomplish against Bootkits before the OS finishes loading?

(OS लोड होने से पहले बूटकिट्स के विरुद्ध 'मेजर्ड बूट' (TPM 2.0 PCR रजिस्टर का उपयोग) क्या कार्य करता है?)

(A) It automatically deletes the MBR whenever a USB mouse is plugged in

(B) It doubles the rotational speed of SATA hard disks

(C) It translates Windows `.exe` files into Linux `.deb` packages

(D) Each boot stage hashes the next stage into immutable TPM Platform Configuration Registers (PCRs), enabling cryptographic attestation and sealing BitLocker keys against boot tampering

Correct Answer: (D)

[EN] If a bootkit alters the bootloader or kernel, the TPM PCR hash diverges from expected values, sealing off BitLocker decryption keys and flagging remote attestation.

[HI] बूट के हर चरण का हैश TPM के PCR में दर्ज होता है; यदि बूटकिट बूटलोडर बदल दे, तो PCR मान बदल जाता है और BitLocker कुंजियां अनलॉक नहीं होतीं।

Q13. In Windows API hooking, what is the difference between 'IAT Hooking' and 'Inline Hooking'?

(विंडोज API हुकिंग में 'IAT हुकिंग' और 'इनलाइन हुकिंग' (Inline Hooking) के बीच क्या अंतर होता है?)

(A) IAT hooking affects network routers while Inline hooking affects printers

(B) IAT hooking runs only on macOS while Inline hooking runs only on Android

(C) IAT hooking overwrites a pointer inside a module's Import Address Table, whereas Inline hooking overwrites the first few bytes of the target API function itself with a `JMP`

(D) IAT hooking works without RAM while Inline hooking works without a CPU

Correct Answer: (C)

[EN] IAT hooking is bypassed if a program calls `GetProcAddress` dynamically, whereas Inline hooking patches the function prologue directly so all callers are intercepted.

[HI] IAT हुकिंग केवल इंपोर्ट टेबल का पॉइंटर बदलती है, जबकि इनलाइन हुकिंग सीधे टारगेट API फंक्शन के शुरुआती बाइट्स में `JMP` निर्देश लिख देती है।

Q14. Why can a statically compiled diagnostic binary stored on a read-only USB drive sometimes defeat a Linux `LD_PRELOAD` user-mode rootkit?

(रीड-ओनली USB पर रखा एक स्टैटिकली कंपाइल्ड (Statically Compiled) टूल लिनक्स के `LD_PRELOAD` यूजर-मोड रूटकिट को कैसे मात दे सकता है?)

(A) Static binaries bypass the Linux kernel completely without syscalls

(B) Statically linked binaries embed their own clean syscall wrappers directly and ignore `/etc/ld.so.preload` dynamic shared-library hooks

(C) Static binaries automatically flash the motherboard BIOS

(D) Static binaries run directly inside the GPU shader cores

Correct Answer: (B)

[EN] Because static binaries do not invoke the dynamic linker (`ld.so`) to load external `libc.so`, `LD_PRELOAD` interception never executes—though a Ring 0 kernel rootkit would still fool them.

[HI] स्टैटिकली लिंक्ड प्रोग्राम बाहरी `libc.so` लोड नहीं करते, इसलिए `/etc/ld.so.preload` वाले यूजर-मोड हुक्स उन पर काम नहीं करते (हालांकि Ring 0 कर्नेल रूटकिट उन्हें भी धोखा दे सकता है)।

Q15. What does the Linux command `lsmod` reveal, and how do advanced Linux Kernel Module (LKM) rootkits try to hide from it?

(लिनक्स कमांड `lsmod` क्या दिखाता है और उन्नत LKM रूटकिट इससे छिपने के लिए क्या करते हैं?)

(A) `lsmod` lists active Wi-Fi passwords in plaintext

(B) `lsmod` lists loaded kernel modules from `/proc/modules`; LKM rootkits unlink their own `module` struct from the kernel `modules` linked list (`list_del_init(&THIS_MODULE->list)`)

(C) `lsmod` displays open TCP ports on remote cloud servers

(D) `lsmod` prints CPU temperature metrics from ACPI BIOS

Correct Answer: (B)

[EN] By removing itself from the kernel module linked list and sysfs (`kobject_del`), an LKM rootkit remains active in Ring 0 while disappearing from `lsmod` and `rmmod`.

[HI] `lsmod` लोड किए गए कर्नेल मॉड्यूल दिखाता है; LKM रूटकिट कर्नेल की मॉड्यूल लिंक्ड-लिस्ट से खुद को हटा लेते हैं ताकि वे `lsmod` में न दिखें।

Q16. Once a confirmed Kernel-Mode (Ring 0) or UEFI Bootkit compromise is discovered on a production server, what is the only industry-trusted remediation path?

(किसी प्रोडक्शन सर्वर पर कर्नेल-मोड (Ring 0) या UEFI बूटकिट संक्रमण की पुष्टि होने के बाद उद्योग-मानक विश्वसनीय समाधान क्या है?)

(A) Capture forensic images, wipe and rebuild the OS cleanly from trusted media, reflash/verify UEFI firmware, and rotate all credentials

(B) Install a second antivirus program alongside the first one

(C) Run `ipconfig /flushdns` and change the desktop password

(D) Simply delete the suspect file in File Explorer and reboot once

Correct Answer: (A)

[EN] Because Ring 0/firmware implants can leave hidden backdoors in system drivers, shadow volumes, or SPI flash, in-place cleaning cannot guarantee complete eradication.

[HI] Ring 0 या फर्मवेयर में छिपे बैकडोर को सामान्य सफाई से पूरी तरह हटाने की गारंटी नहीं दी जा सकती, इसलिए सिस्टम को पूर्ण रूप से वाइप कर क्लीन रीबिल्ड और फर्मवेयर फ्लैश करना ही सुरक्षित उपाय है।

Q17. Within Rootkits: User-Mode vs Kernel-Mode Rootkits, which rootkit layer directly maps to: "Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers"?

(Rootkits: User-Mode vs Kernel-Mode Rootkits में कौन सा Rootkit Layer सीधे "Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers" से संबंधित है?)

(A) User-Mode Rootkit (Ring 3)

(B) Kernel-Mode Rootkit (Ring 0)

(C) Bootkit / UEFI Rootkit (Ring -2)

(D) Hypervisor Rootkit (Ring -1)

Correct Answer: (A)

[EN] In Rootkits: User-Mode vs Kernel-Mode Rootkits, 'User-Mode Rootkit (Ring 3)' handles 'Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers' (Inspect memory hooks or run statically linked binaries).

[HI] Rootkits: User-Mode vs Kernel-Mode Rootkits में 'User-Mode Rootkit (Ring 3)' का कार्य/विवरण 'Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers' (Inspect memory hooks or run statically linked binaries) है।

Q18. Which option accurately describes 'Kernel-Mode Rootkit (Ring 0)' in Rootkits: User-Mode vs Kernel-Mode Rootkits?

(Rootkits: User-Mode vs Kernel-Mode Rootkits के संदर्भ में 'Kernel-Mode Rootkit (Ring 0)' की सही विशेषता कौन सी है?)

(A) Subverts Intel VT-x/AMD-V beneath OS kernel (Blue Pill)

(B) Hooks SSDT/sys_call_table or unlinks EPROCESS via DKOM

(C) Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS

(D) Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers

Correct Answer: (B)

[EN] 'Kernel-Mode Rootkit (Ring 0)' provides 'Hooks SSDT/sys_call_table or unlinks EPROCESS via DKOM' — key point: PatchGuard + DSE + Volatility pslist/psscan diff.

[HI] 'Kernel-Mode Rootkit (Ring 0)' का मुख्य विवरण 'Hooks SSDT/sys_call_table or unlinks EPROCESS via DKOM' है (PatchGuard + DSE + Volatility pslist/psscan diff)।

Q19. In Rootkits: User-Mode vs Kernel-Mode Rootkits, identify the correct parameter for the specification: "Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS".

(Rootkits: User-Mode vs Kernel-Mode Rootkits में "Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS" विवरण किस विकल्प के लिए सही है?)

(A) User-Mode Rootkit (Ring 3)

(B) Kernel-Mode Rootkit (Ring 0)

(C) Hypervisor Rootkit (Ring -1)

(D) Bootkit / UEFI Rootkit (Ring -2)

Correct Answer: (D)

[EN] 'Bootkit / UEFI Rootkit (Ring -2)' corresponds to 'Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS' (UEFI Secure Boot + TPM Measured Boot + reflash).

[HI] 'Bootkit / UEFI Rootkit (Ring -2)' का संबंध 'Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS' (UEFI Secure Boot + TPM Measured Boot + reflash) से है।

Q20. Considering Rootkits: User-Mode vs Kernel-Mode Rootkits, what key behavior defines 'Hypervisor Rootkit (Ring -1)'?

(Rootkits: User-Mode vs Kernel-Mode Rootkits में 'Hypervisor Rootkit (Ring -1)' की मुख्य भूमिका या मान क्या है?)

(A) Subverts Intel VT-x/AMD-V beneath OS kernel (Blue Pill)

(B) Modifies MBR, VBR, or UEFI DXE firmware drivers pre-OS

(C) Patches IAT, inline API hooks, or `/etc/ld.so.preload` wrappers

(D) Hooks SSDT/sys_call_table or unlinks EPROCESS via DKOM

Correct Answer: (A)

[EN] 'Hypervisor Rootkit (Ring -1)' represents 'Subverts Intel VT-x/AMD-V beneath OS kernel (Blue Pill)' (Hardware IOMMU / CPU timing & firmware attestation).

[HI] 'Hypervisor Rootkit (Ring -1)' का अर्थ/मान 'Subverts Intel VT-x/AMD-V beneath OS kernel (Blue Pill)' है (Hardware IOMMU / CPU timing & firmware attestation)।

Rootkits: User-Mode vs Kernel-Mode Rootkits — Exam FAQs

Q1: What is the difference between a Trojan and a Rootkit?

ट्रोजन हॉर्स और रूटकिट में क्या अंतर होता है?

[EN] A Trojan is a delivery or payload disguise pretending to be legitimate software so a user executes it. A Rootkit is a stealth toolkit specifically engineered to subvert OS visibility—modifying user APIs, kernel tables, or firmware—to hide malicious processes, files, and backdoors from detection. Many real-world attacks drop a Trojan first, which then installs a Rootkit.

[HI] ट्रोजन एक छलावा है जो वैध सॉफ्टवेयर बनकर सिस्टम में प्रवेश करता है। इसके विपरीत रूटकिट एक स्टेल्थ टूलकिट है जो ऑपरेटिंग सिस्टम के API या कर्नेल को बदलकर मैलवेयर की फाइलों, प्रोसेस और बैकडोर को छिपाने का काम करता है।

Q2: Why is a Kernel-Mode Rootkit much harder to remove than a User-Mode Rootkit?

यूजर-मोड रूटकिट की तुलना में कर्नेल-मोड रूटकिट को हटाना इतना कठिन क्यों होता है?

[EN] A User-Mode rootkit runs in Ring 3 with limited permissions and can be terminated or uncovered by trusted administrative tools or kernel drivers. A Kernel-Mode rootkit executes in Ring 0 at the exact same privilege level as the OS kernel and antivirus drivers—meaning it can intercept disk reads, blind EDR telemetry, and block removal attempts.

[HI] यूजर-मोड रूटकिट Ring 3 में सीमित अधिकारों के साथ चलता है, जबकि कर्नेल-मोड रूटकिट Ring 0 में सीधे ऑपरेटिंग सिस्टम कर्नेल और एंटीवायरस ड्राइवरों के बराबर अधिकारों से चलता है—इसलिए वह डिस्क रीड, प्रोसेस लिस्ट और हटाने के प्रयासों को खुद ही ब्लॉक कर सकता है।

Q3: How does Windows PatchGuard (Kernel Patch Protection) protect against Kernel Rootkits?

Windows PatchGuard (Kernel Patch Protection) कर्नेल रूटकिट्स से सिस्टम की रक्षा कैसे करता है?

[EN] On 64-bit Windows systems, PatchGuard runs periodic randomized integrity checks across critical Ring 0 structures like the SSDT, IDT, GDT, and kernel code images. If unauthorized modification is detected, Windows halts immediately with a `CRITICAL_STRUCTURE_CORRUPTION` BugCheck to prevent stealth rootkit execution.

[HI] 64-बिट विंडोज में PatchGuard समय-समय पर रैंडम अंतराल पर SSDT, IDT और कर्नेल कोड की अखंडता जांचता है; यदि कोई रूटकिट इनमें बदलाव करे, तो सिस्टम तुरंत `CRITICAL_STRUCTURE_CORRUPTION` त्रुटि के साथ रुक जाता है।

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)