Skip to content

Instantly share code, notes, and snippets.

@dmaynor
Created May 19, 2024 16:27
Show Gist options
  • Save dmaynor/18006fde1d9e90a95e2cc7e9a5d09119 to your computer and use it in GitHub Desktop.
Save dmaynor/18006fde1d9e90a95e2cc7e9a5d09119 to your computer and use it in GitHub Desktop.
# Test for Windows
## Python
1. What does the `__init__` method do in a Python class?
a. Initializes a new class instance
b. Deletes an existing class instance
c. Inherits a class
d. Executes a class method
2. Which library is commonly used for network operations in Python?
a. os
b. sys
c. socket
d. json
3. How do you open a file in read mode in Python?
a. `open(file, 'w')`
b. `open(file, 'a')`
c. `open(file, 'r')`
d. `open(file, 'x')`
4. Which of the following is a correct way to create a virtual environment in Python?
a. `pip install venv`
b. `python -m venv myenv`
c. `python venv myenv`
d. `pip create venv`
5. What is the output of `print("Hello, {}!".format("world"))`?
a. Hello, {}!
b. Hello, world!
c. Hello, "world"!
d. Hello, !
## Networks
1. What is the primary purpose of the Transport layer in the OSI model?
a. Routing packets between devices
b. Providing end-to-end communication services
c. Managing data encryption and decryption
d. Formatting and presenting data
2. Which protocol is used for secure communication over the internet?
a. HTTP
b. FTP
c. HTTPS
d. SMTP
3. What is the default port number for SSH?
a. 21
b. 22
c. 80
d. 443
4. Which of the following tools is used to capture and analyze network traffic?
a. Wireshark
b. Nmap
c. Netcat
d. Tcpdump
5. What is the function of a subnet mask?
a. It encrypts data for secure transmission
b. It divides an IP address into network and host portions
c. It translates domain names to IP addresses
d. It manages data flow control
## Assembly
1. What does the `MOV` instruction do in x86 assembly language?
a. Moves data from one register to another
b. Adds two values together
c. Compares two values
d. Jumps to a specific instruction
2. Which register is commonly used as the stack pointer in x86 architecture?
a. EAX
b. EBX
c. ESP
d. EBP
3. What is the purpose of the `NOP` instruction?
a. To terminate a program
b. To perform a no-operation step
c. To push a value onto the stack
d. To perform a logical AND operation
4. Which segment register points to the code segment in x86?
a. CS
b. DS
c. SS
d. ES
5. What is the role of the `CALL` instruction in x86 assembly?
a. It defines a label
b. It terminates a program
c. It invokes a procedure or function
d. It performs a comparison
## Reverse Engineering
1. What tool is commonly used for static analysis of binaries?
a. IDA Pro
b. Wireshark
c. Metasploit
d. Burp Suite
2. What is the purpose of dynamic analysis in reverse engineering?
a. To disassemble the code
b. To observe the behavior of the code during execution
c. To decompile the code
d. To encrypt the code
3. Which of the following is a commonly used debugger for reverse engineering on Windows?
a. GDB
b. OllyDbg
c. Valgrind
d. JDB
4. What file format is used for Windows executable files?
a. ELF
b. PE
c. Mach-O
d. COFF
5. What does the acronym "ROP" stand for in the context of exploit development?
a. Return Oriented Programming
b. Read Only Page
c. Remote Operation Protocol
d. Random Object Pointer
## Windows System Programming
1. What does the `CreateProcess` function do in Windows programming?
a. Creates a new directory
b. Creates a new thread
c. Creates a new process
d. Creates a new file
2. Which API is used to allocate virtual memory in Windows?
a. `HeapAlloc`
b. `GlobalAlloc`
c. `VirtualAlloc`
d. `LocalAlloc`
3. What does the `WaitForSingleObject` function do?
a. Waits for a file operation to complete
b. Waits for a synchronization object to become signaled
c. Waits for a network packet to arrive
d. Waits for a process to exit
4. What is the primary purpose of the Windows Registry?
a. To store user documents
b. To manage file permissions
c. To store configuration settings and options
d. To monitor network traffic
5. Which function is used to create a new thread in a Windows application?
a. `CreateFile`
b. `CreateMutex`
c. `CreateThread`
d. `CreateEvent`
## Windows Internals
1. What is the role of the Executive in the Windows kernel?
a. To manage user applications
b. To handle hardware interrupts
c. To provide core operating system services
d. To manage the graphical user interface
2. Which component is responsible for process and thread management in Windows?
a. I/O Manager
b. Memory Manager
c. Object Manager
d. Kernel
3. What is the purpose of the Windows HAL (Hardware Abstraction Layer)?
a. To provide a virtual machine interface
b. To abstract hardware details from the kernel
c. To manage user permissions
d. To handle network communications
4. Which data structure represents a process in the Windows kernel?
a. EPROCESS
b. KTHREAD
c. KPROCESS
d. ETHREAD
5. What is the function of the Windows Object Manager?
a. To manage file systems
b. To manage system objects and resources
c. To manage memory allocation
d. To manage user sessions
## Vulnerability Research and Exploitation
1. What is the goal of fuzz testing?
a. To verify the correctness of a program
b. To find security vulnerabilities by inputting unexpected data
c. To optimize code performance
d. To document software features
2. Which tool is commonly used for automated web application vulnerability scanning?
a. Burp Suite
b. Wireshark
c. Nmap
d. Netcat
3. What is a "zero-day" vulnerability?
a. A vulnerability that has been patched
b. A vulnerability that is publicly known
c. A vulnerability that is discovered and exploited on the same day
d. A vulnerability that has been reported but not yet patched
4. Which type of attack involves executing arbitrary code through input validation flaws?
a. SQL Injection
b. Buffer Overflow
c. Cross-Site Scripting (XSS)
d. Man-in-the-Middle (MITM)
5. What is Return-Oriented Programming (ROP)?
a. A method for optimizing code performance
b. A technique for exploiting buffer overflows
c. A protocol for secure communication
d. A debugging methodology
## Kernel Mode Development
1. What is the primary purpose of a device driver in Windows?
a. To manage user accounts
b. To facilitate communication between the operating system and hardware devices
c. To optimize network performance
d. To provide graphical user interface elements
2. Which function is used to create a driver object in Windows?
a. `IoCreateDevice`
b. `IoAllocateDriver`
c. `IoCreateDriver`
d. `IoRegisterDriver`
3. What is an IRP (I/O Request Packet) in Windows?
a. A packet used for network communication
b. A data structure for managing I/O operations
c. A security descriptor
d. A memory allocation request
4. What is the role of the I/O Manager in the Windows kernel?
a. To manage system memory
b. To handle input and output operations
c. To manage user sessions
d. To control access to the file system
5. Which tool is commonly used for kernel debugging in Windows?
a. GDB
b. WinDbg
c. OllyDbg
d. IDA Pro
## Miscellaneous
1. What is the purpose of ASLR (Address Space Layout Randomization)?
a. To improve memory allocation efficiency
b. To increase the difficulty of exploiting memory corruption vulnerabilities
c. To speed up system boot time
d. To manage virtual memory
2. What does DEP (Data Execution Prevention) do?
a. It prevents buffer overflow attacks by limiting memory usage
b. It prevents code execution from data-only memory pages
c. It restricts access to network resources
d. It manages system power settings
3. Which Windows tool can be used to monitor real-time system performance and resource usage?
a. Task Manager
b. Event Viewer
c. Disk Management
d. Control Panel
4. What is the primary purpose of the Windows Security Account Manager (SAM)?
a. To store and manage user passwords and security information
b. To monitor network traffic
c. To manage disk partitions
d. To handle user interface elements
5. Which type of malware modifies the boot process to gain persistence?
a. Ransomware
b. Rootkit
c. Trojan
d. Worm
6. What does the term "pivoting" refer to in the context of penetration testing?
a. Gaining initial access to a target system
b. Moving laterally within a compromised network to access additional resources
c. Encrypting files on a compromised system
d. Removing evidence of an attack
7. Which protocol is commonly used for remote desktop access in Windows?
a. SSH
b. RDP
c. FTP
d. SNMP
8. What is the purpose of the Microsoft Management Console (MMC)?
a. To manage file permissions
b. To provide a unified interface for managing administrative tools and snap-ins
c. To perform disk defragmentation
d. To encrypt and decrypt files
9. What does the Windows Service Control Manager (SCM) do?
a. Manages user sessions
b. Manages and controls the services running on the system
c. Handles network communications
d. Manages system updates
10. Which tool can be used to analyze memory dumps for forensic purposes?
a. Process Explorer
b. Volatility
c. Wireshark
d. Netcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment