Windows basic security knowledge

Table of contents

Commonly used DOS commands

ipconfig  

ping  

 dir

 cd 

 net user 

Commonly used DOS commands

Built-in account access control

 Windows access control

 security identifier

 access control entry

User Account Control

UAC token

Other security configuration

local security policy

 User Password Policy Complexity Requirements

 Enforce Password History: Disable password reuse

Password minimum age

 Maximum Password Age

 Enforce Password History

 Password Policy - user reversible encryption to store passwords

 Account Lockout Policy

Account Lockout Threshold 

 Reset Account Lockout Counter

 local policy

 Local Policies -- Audit Policies

 Windows service port

Wed service (HTTP, HTTPS)

 DNS

 DNS request process

DNS security

DNS Common Attack Methods

 DHCP service

 DHCP obtains IP address process

 DHCP spoofing

mail service

SMTP

Send email based on web interface  

 Send mail based on mail client Edit

 POP3

 POP3 authentication process

 IMAP

IMAP is different from POP3 Edit

 SSL

FTP (File Transfer Protocol, file transfer protocol)

 FTP usage process

 FTP active mode

FTP passive mode

​edit

 difference between active and passive

 TELNET

 Remote Desktop

remote procedure call

syslog security

Introduction to Windows Logging

 Windows syslog

Windows security log 

 Event log analysis method

Log Analysis ToolEdit

 WSUS 

​edit

 registry security 

​edit

 Registry Composition

 Domains in Windows

Why do you need a domain?

 active directory

 Differences between workgroup domains and AD domains

Functions of the AD domain

AD domain objects

The logical structure of AD

domain performance

domain hierarchy

organizational unit

Organizational Unit Division Principles

An organizational unit (Organizational Unit, OU) has the following characteristics in Active Directory (AD):

Domain Tree

Domain Controller

trust relationship

DNS and AD domain

The role of DNS on AD domains

AD domain has some specific requirements for DNS

SRV records (Service Records)

Group Policy

baseline configuration


Commonly used DOS commands

ipconfig  

Under Windows system, ipconfigthe command is used to display the current network configuration information. The following are some commonly used ipconfigcommand parameters and their descriptions:

  1. /all: Display detailed IP configuration information, including IP address, subnet mask, default gateway, DNS server, physical address, etc.
  2. /renew: Send a request to the DHCP server to update the IP address of the current network connection.
  3. /release: Release the IP address assigned by the current network connection.
  4. /flushdns: Clear the local DNS cache.
  5. /displaydns: Display the contents of the local DNS cache.
  6. /registerdns: Force the client to register its name and IP address with the DNS server.
  7. /showclassid: Displays the DHCP class identifier (Class ID) of all network adapters.
  8. /setclassid: Change or set the DHCP class identifier for the network adapter.

These parameters can be entered at the command prompt ipconfig /?to view more detailed help information and parameter descriptions. Note that specific parameter options may vary slightly depending on OS version and network configuration.

ping  

Under Windows, pingthe command is used to test the network connection to the target host and measure network latency (i.e. round-trip time). The following are some commonly used pingcommand parameters and their descriptions:

  1. -t: Continue to ping the target host until manually stopped. Press Ctrl + C to stop.
  2. -n <次数>: Specify the number of ping requests to send. The default is 4 times.
  3. -l <大小>: Set the packet size (bytes) to send. The default is 32 bytes.
  4. -f: Set the "don't fragment" flag in the packet. Suitable for local network or high-speed network.
  5. -i <秒数>: Specifies the time interval (in seconds) between sending ping requests. The default is 1 second.
  6. -v <TTL>: Set the time-to-live (TTL) value, which is the maximum number of hops for a packet in the network. The default is 128.
  7. -r <次数>: Request to log routing details on every packet. Displays the IP address, hostname, and round-trip time for each hop.
  8. -a: Attempts to resolve an IP address to a hostname.
  9. -6: Use IPv6 address for ping test.

These parameters can be combined as needed.

For example, to send 10 packets and ping test at 1 second intervals, you can use the command

ping -n 10 -i 1 目标主机

Note that the specific parameter options and command-line syntax may vary depending on the operating system version and configuration. You can enter the command at the command prompt ping /?to get more detailed help information and parameter descriptions.

 dir

diris a commonly used command-line tool for listing files and subdirectories in a directory. It may be slightly different on different operating systems, the following are some common dircommand parameters and their descriptions:

  1. /W: Display a list of files and directories with a fixed width, and display multiple file names per line.
  2. /P: When the screen space is insufficient, pause at the bottom of each screen page and wait for the user to press any key to continue displaying the remaining files and directories.
  3. /S: Search for files in the specified directory and its subdirectories.
  4. /B: Displays file and directory listings in compact mode, showing only the names of files and directories without their details.
  5. /A: Controls the properties of the files and directories to display.
    • /A:D: Show directories only.
    • /A:-D: Only display files.
    • /A:H: Show hidden files and directories.
    • /A:-H: Do not show hidden files and directories.
  6. /O: Sorts files and directories according to specified attributes.
    • /O:N: Sort by name.
    • /O:S: Sort by size.
    • /O:D: Sort by date and time.
  7. /T: Controls how the date and time of files and directories are displayed.
    • /T:W: Sort and display according to the last write time.
    • /T:C: Sort and display according to creation time.
  8. /?: Display help information, listing  dir the available parameters and descriptions of the command.

These parameters may be different in different operating systems and command line environments, use   dir /?the command to obtain more accurate parameter descriptions during specific use.

 cd 

Under Windows, cdthe command is used to change the current working directory. The following are some commonly used cdcommand parameters and their descriptions:

  1. <目录路径>: Specify the target directory path to switch to. For example, cd C:\Users will switch to the "C:\Users" directory.

In addition, cdthe command also supports the following special parameters and symbols:

  1. .: Indicates the current directory. For example, cd . will leave the current directory unchanged.
  2. ..: Indicates the parent directory. For example, cd .. will switch to the parent directory of the current directory.
  3. \: Indicates the root directory. For example, cd \ will switch to the root directory of the current drive.
  4. %HOMEPATH%: Indicates the home directory of the current user. For example, cd %HOMEPATH% will switch to the current user's home directory.

These parameters and symbols can be used in combination as required. For example, to switch to a subdirectory under the current user's home directory, use the command cd %HOMEPATH%\子目录名.

Please note that the commands under Windows cdmay have some minor differences in different operating system versions. You can enter the command at the command prompt cd /?to get more detailed help information and parameter descriptions.

 net user 

On Windows systems, net usercommands are used to manage user accounts. The following are some commonly used net usercommand parameters and their descriptions:

  1. <用户名>: Specify the name of the user account to be operated.
  2. <密码>: Set or change the password of the user account.
  3. /add: Create a new user account. For example, net user username password /add a user account named "username" would be created with a password of "password".
  4. /delete: Delete the specified user account. For example, net user username /delete the user account named "username" will be deleted.
  5. /active:yes Or  /active:no: Enable or disable the specified user account. For example, net user username /active:no the user account named "username" will be disabled.
  6. /fullname:"<全名>": Set or change the full name (display name) of the user account. For example, net user username /fullname:"John Smith" would set the full name of a user account named "username" to "John Smith".
  7. /comment:"<注释>": Add a descriptive note to the user account. For example, net user username /comment:"This is a user account" a user account named "username" would be commented "This is a user account".
  8. /passwordchg:yes Or  /passwordchg:no: Allow or prohibit specified user accounts from changing their own passwords. For example, net user username /passwordchg:no a user account named "username" would be prohibited from changing its password.
  9. /passwordreq:yes Or  /passwordreq:no: Set or cancel the specified user account to require a password for authentication. For example, net user username /passwordreq:no a user account named "username" would be removed from requiring a password for authentication.
  10. /expires:<日期>: Set the expiration date for the specified user account. For example, net user username /expires:2024-01-01 the expiration date for the user account named "username" would be set to January 1, 2024.
  11. /times:{times}: Set the login period for the user account. where  times is a comma-separated time range of days of the week in the format HH:MM-HH:MM. For example, net user username /times:M-F,08:00-17:00 a user account named "username" would be set to be able to log in between 8:00 AM and 5:00 PM, Monday through Friday.

These are some commonly used net usercommand parameters, which can be combined as needed. Note that specific parameter options and command-line syntax may vary by OS version. You can enter the command at the command prompt net user /?to get more detailed help information and parameter descriptions.

 

 

 

Create a hidden account and join the administrator group

 Create a hidden user as shown in the figure

You can view the corresponding user group to find hidden users

 Add the hidden user to the Super Admins group

 You can see that the created hidden user belongs to both Users and administrator

 In Windows system, a user can belong to multiple user groups at the same time. User groups are a way to logically group users and assign them different permissions and access controls.

When a user belongs to multiple groups, its permissions will be superimposed by the permissions of all groups. Windows uses a mechanism called privilege accumulation to handle this situation.

Specifically, when a user belongs to multiple groups at the same time, the system will combine the user's permissions in each group and give the user the final permissions.

For example, assume that user A belongs to the "Administrators" group and the "Users" group, and the "Administrators" group has administrator privileges, and the "Users" group has ordinary user privileges. Then user A will have administrator privileges and normal user privileges at the same time.

It should be noted that some permissions are mutually exclusive, that is, a certain group grants a specific permission, while other groups cancel the permission. In this case, the revoked group will have higher priority. For example, if user A belongs to a group that grants permission to prohibit access to a resource, and another group that grants permission to access the resource, then user A will not be able to access the resource.

For permission issues, it is necessary to comprehensively consider all groups to which the user belongs and the permission settings between groups. When configuring user groups, assign user groups and permissions reasonably according to requirements, best practice principles of security and permission management.

Commonly used DOS commands
  1. dir - Display a list of files and subdirectories in the current directory.
  2. cd - Change the current directory. For example, enter  cd C:\Windows the Windows directory with .
  3. mkdir - Create a new directory. For example,  mkdir MyFolder create a new directory named "MyFolder" using .
  4. del - Delete Files. For example, use to  del filename.txt delete a file named "filename.txt".
  5. rmdir - Delete a directory. For example, use to  rmdir MyFolder delete a directory named "MyFolder".
  6. copy - Copy files. For example, use to  copy source.txt destination.txt copy "source.txt" to "destination.txt".
  7. xcopy - Copy a directory and its contents (including subdirectories). For example, use  xcopy C:\sourcefolder D:\destinationfolder /E Copy "C:\sourcefolder" to "D:\destinationfolder".
  8. ren - Rename a file or directory. For example, use  ren oldname.txt newname.txt to rename "oldname.txt" to "newname.txt".
  9. type - Display the content of the text file. For example, use to  type myfile.txt display the contents of a text file named "myfile.txt".
  10. ping - Test the connection to the remote host. For example, use  ping google.com Confirm that you can   communicate with Google.com .
  11. ipconfig - Display current network configuration information, such as IP address, subnet mask, etc.
  12. tasklist - Displays a list of currently running processes.
  13. taskkill - Terminates a running process. For example, use  taskkill /IM process.exe to terminate a process named "process.exe".
  14. systeminfo - Displays detailed information about the system, including OS version, computer name, etc.
  15. shutdown - Shut down or restart the computer. For example, use  shutdown /s Shut Down Computer.

The above are just some commonly used Windows command examples. Windows provides a wealth of command line tools and commands, and more operations can be performed according to specific needs. Type at the command prompt helpor append to the command name /?to get more information and options about the command.

Built-in account access control

 Windows access control

Windows access control refers to the mechanism for managing and controlling the rights of resources, files, and directories in the Windows operating system. Through access control, users or user groups can be restricted from accessing and operating system resources to protect sensitive data and system security.

Windows access control is based on several core concepts:

  1. User account: Every user who uses the Windows system has a unique user account, which is used to log in and identify the user.

  2. User group: Users can be grouped into different user groups, manage and assign rights through user groups, and simplify rights management.

  3. Access permissions: Every resource (such as a file, folder, registry key, etc.) has associated access permissions, including operations such as read, write, and execute.

  4. Security Identifier (SID): Each user and user group has a unique Security Identifier (SID), which is used to uniquely identify the user or user group.

In Windows, access control can be achieved by:

  1. File and folder permissions: Windows provides fine-grained file and folder access control, which can set individual users or user groups to read, write, execute and other permissions on specific files and folders.

  2. User Account Control: User Account Control can be used to restrict user access to system settings and sensitive operations. The administrator account has higher authority, and ordinary users are limited by the setting of access authority.

  3. Security policy: The access control of the entire system can be configured through the security policy, including account password policy, user login policy, account lock policy, etc.

  4. User group management: Grouping users into different user groups makes it easier to apply permissions and manage user access controls.

  5. Audit log: Windows provides an audit function that can record security events and operations that occur in the system to help monitor and track user access behaviors.

In order to ensure system security, it is recommended to take the following security measures in the Windows system:

  1. In principle, the principle of least privilege is used to give users the minimum privilege to access resources to avoid unnecessary privilege leakage.

  2. Regularly review and update permission settings to ensure that permissions are consistent with actual needs.

  3. Use strong passwords and regularly update password policies to limit password length, complexity, and expiration dates.

  4. Back up important data regularly to prevent data loss or damage.

  5. Regularly audit and monitor system security events and logs to detect and respond to potential threats in a timely manner.

For NTFS file system access permissions determine which users can access those file directories  

 

 security identifier

A Security Identifier (SID for short) is an identifier used to uniquely identify users, user groups, and security objects in the Windows operating system. Each user account, user group, or security object has a corresponding SID.

The SID is a string of numbers and letters in the form "S-1-5-21-3623811015-3361044348-30300820-1013". Among them, the previous "S-1-5-21" is the beginning of a fixed identifier, and the sequence of numbers behind represents specific information:

  • The first subsection (Revision) indicates the version number of the SID, which is currently fixed at 1.
  • The second subsection (Identifier Authority) indicates the authority of the SID. Common values ​​include:
    • "0": indicates an empty SID.
    • "1": Indicates the Windows built-in authority.
    • "5": Indicates that the security identifier authority is NTAuthority.
  • Subsequent subsections (Subauthority) contain more specific identifier information, such as the unique ID of a user or user group.

The role of SID is to uniquely identify security principals in the system, such as user accounts or user groups. It is widely used in access control, rights management, file sharing and other scenarios in the Windows operating system. Through SID, the system can quickly identify and verify the identity of users, user groups, and other security objects.

In Windows, SIDs are usually associated with user accounts and user groups. Each user account has a unique SID, which is used to uniquely identify the user in the system. A user group also has a corresponding SID, which is used to identify and manage a group of users.

In short, a Security Identifier (SID) is an identifier used in the Windows operating system to uniquely identify users, user groups, and security objects. It plays an important role in access control and rights management, helping the system to identify and verify identities to ensure security and controllability.

 

 access control entry

Access Control Entry (ACE for short) is a data structure used to define the access rights of resources (such as files, folders, registry entries, etc.) in the Windows operating system. ACE contains a security identifier (SID) and related permission information, which is used to determine which users or user groups can perform certain operations on resources.

ACE usually contains the following important attributes:

  1. Security Identifier (SID): ACE contains a unique security identifier used to identify user accounts, user groups or other security objects.

  2. Permissions: ACE defines authorized operations or permissions, such as read, write, execute, etc. Permissions are expressed in the form of binary flags, which can be combined and set.

  3. Access Mask: An access mask is an integer value that represents the specific setting of permissions. Different bit flags correspond to different permissions.

  4. Access Control Type (Access Control Type): ACE also contains access control type information, indicating that the ACE is to allow or deny access. Common access control types include Allow and Deny.

ACE implements fine-grained access control to resources by associating security identifiers with corresponding permissions and access control types. For example, you can create an ACE that associates a user's security identifier with read permissions, allowing that user to read a specified resource.

In Windows, ACE is usually used together with Access Control List (ACL for short). ACL is a collection of multiple ACEs used to describe a complete access control policy for resources. As required, you can add, modify, or delete ACEs to the ACL to adjust resource access rights.

User Account Control

UAC (User Account Control, User Account Control) is a security feature in the Windows operating system. It is designed to help prevent unauthorized changes and improve system security.

The main purpose of UAC is to restrict the changes that standard users can make to the system without administrator privileges. Specifically, when a standard user tries to perform a task that requires administrator privileges, UAC will pop up a prompt box asking for administrator credentials to proceed. This mechanism ensures that users are authorized before performing sensitive operations and prevents malware or unauthorized programs from causing damage to the system.

With UAC, an administrator can log into the operating system as a standard user and be asked for administrator credentials only when administrator-level tasks are required. This helps reduce the impact of accidental system changes and malware.

You can make some custom settings for UAC according to your personal needs. For example, you can adjust the UAC prompt level, which controls when and how you are prompted for actions that require administrator privileges. UAC settings can be accessed through the following steps:

  1. Click on the Start menu, search for and open "Control Panel".
  2. In the Control Panel window, select User Accounts.
  3. On the User Accounts page, click "Change User Account Control Settings".
  4. On the UAC settings page, you can adjust the prompt level by moving the slider. The four levels are:
    • Never notify: Disables UAC.
    • Notify on program installation: Only ask for administrator privileges when installing a program.
    • Notify every time: A prompt box will pop up every time an operation that requires administrator privileges.
    • Always Notify: A prompt box will pop up before any operation requiring administrator privileges.

Note that administrator privileges are required to modify UAC settings. It is recommended to adjust the UAC settings according to actual needs and security considerations.

UAC token

UAC Token (UAC Token) refers to a data structure used to identify user permissions in the Windows operating system. Each authenticated user is assigned a UAC token, which contains the user's security ID and user group information.

The main role of UAC tokens is to authenticate users and provide permission-based access control to the system. Specifically, the UAC token contains the user's security credentials, the user's identity, the permissions assigned to the user, and the user groups to which the user belongs (including built-in user groups and custom user groups).

UAC tokens play a key role when users try to perform tasks that require administrator privileges. If the user is an administrator account or an account with administrator privileges, a UAC token elevates their privileges to administrator level, allowing the user to perform restricted actions. If the user is a standard user, the UAC token triggers a UAC prompt asking the user to provide administrator credentials for temporary administrator privileges.

UAC tokens are also associated with privilege accumulation. When a user belongs to multiple user groups at the same time, the UAC token will be combined into a final permission set according to the permissions of all user groups.

It should be noted that the UAC token is a temporary token, which is only generated when the user logs in , and is set according to the user's permissions and user groups. If the user modifies their permissions or the administrator makes changes to the user, the UAC token is updated accordingly.

To sum up, UAC token is a data structure used to identify user identity and authority, and plays an important role in UAC function, used to authenticate users and control access rights.

Other security configuration

local security policy

 User Password Policy Complexity Requirements

 Enforce Password History: Disable password reuse

Password minimum age

 Maximum Password Age

 Enforce Password History

 Password Policy - user reversible encryption to store passwords

(Do not set if not necessary)

 Account Lockout Policy

Account Lockout Threshold 

 Reset Account Lockout Counter

 local policy

 Local Policies -- Audit Policies

 

 Windows service port

Wed service (HTTP, HTTPS)

 

 

 

 

 DNS

 

 DNS request process

The process of making a DNS query request generally follows the following steps:

  1. Application sends DNS request: When an application needs to resolve a domain name (for example, a browser opens a web page), it sends a DNS request to the operating system. The request contains the domain name to be resolved.

  2. Local DNS cache query: The operating system first queries the local DNS cache to see if the IP address of the domain name has been cached. If it exists, the result in the cache is returned directly without sending a request to the external DNS server.

  3. Query the local hosts file: If the corresponding IP address is not found in the local DNS cache, the operating system will search the local hosts file (hosts file) to see if there is a manually configured domain name and IP mapping relationship. If a match is found, the operating system uses that IP address and does not proceed further.

  4. DNS resolver sends a request to the preferred DNS server: If the above steps fail to find the IP address, the OS will send a DNS request to the pre-configured preferred DNS server. This preferred DNS server is usually provided by an Internet Service Provider (ISP) or network administrator.

  5. Preferred DNS server for recursive query: After the preferred DNS server receives the request, if it does not have the IP address of the requested domain name, it will perform a recursive query. Recursive query means that the preferred DNS server will query down step by step from the root domain name server until the final domain name resolution result is found. The preferred DNS server may query multiple intermediate DNS servers, including top-level domain name servers, authoritative domain name servers, and so on.

  6. DNS resolver obtains IP address: Once the preferred DNS server has found the IP address corresponding to the domain name, it will return the resolution result to the DNS resolver of the operating system.

  7. The operating system returns the analysis result to the application program: After receiving the analysis result, the operating system returns it to the application program that initiated the DNS request. The application program can use this IP address to establish a connection with the remote server for data transmission and other operations.

It is worth noting that the DNS cache and local host files in the above steps can be configured and modified, which may affect the results of DNS resolution. In addition, the Windows operating system also supports the configuration of an alternate DNS server. When the primary DNS server fails to respond, it will automatically turn to the alternate DNS server for query.

To sum up, the process of making DNS requests by the Windows operating system includes:

1. The application sends a DNS request,

2. Local DNS cache query,

3. Query the local host file,

4. Send a request to the preferred DNS server,

5. Recursive query process and finally return the analysis result to the application program.

This process can help implement domain name resolution, convert domain names into corresponding IP addresses, and establish network connections.

 

DNS security

The DNS protocol uses UDP (User Datagram Protocol) instead of TCP (Transmission Control Protocol) during transmission. Compared with TCP, UDP is a connectionless, unreliable transport protocol that lacks built-in data integrity check and encryption mechanisms. Therefore, UDP-based DNS transmission itself has some security risks.

The following are the main security risks of DNS using UDP transmission:

  1. Eavesdropping: Since UDP packets are not encrypted, they may be intercepted and eavesdropped by attackers. This allows the attacker to obtain the transmitted DNS query and response information, including the accessed domain name and corresponding IP address.

  2. Tampering: The data packets transmitted by UDP are easy to be tampered with. An attacker could modify the content of DNS queries or responses, redirect users to malicious websites or hijack users' web traffic.

  3. Replay Attacks: Attackers can use transmitted DNS responses as a vector for replay attacks. They can capture legitimate DNS responses and resend them at different points in time to trick users or bypass certain security safeguards.

In order to improve the security of DNS transmission , the following measures can be taken:

  1. Use DNS over TLS (DoT) or DNS over HTTPS (DoH): These are methods of securing DNS transmissions through encryption and tunneling. They use TLS or HTTPS protocols to encrypt DNS queries and responses, preventing eavesdropping and tampering.

  2. Implement DNSSEC: DNS Security Extensions (DNSSEC) is a security mechanism for verifying the integrity and origin of DNS data. It introduces public key infrastructure (PKI) in the DNS hierarchy through digital signatures, providing an effective way to prevent DNS hijacking and spoofing.

  3. Using VPN: By using a virtual private network (VPN), an encrypted tunnel can be established between the local computer and the remote DNS server to ensure the security and privacy of DNS transmission.

Note that the above measures require the support of both the server and the client, and the support and configuration of the network administrator or service provider. Through the combination of these measures, the security of DNS transmission can be enhanced, and the privacy and data integrity of users can be protected.

DNS Common Attack Methods

DNS pollution and DNS hijacking are some common network attacks, which aim to tamper with DNS resolution results for malicious purposes. Here is a brief description of both attacks and how to counter them:

DNS pollution: DNS pollution is also known as DNS cache poisoning or DNS spoofing. It refers to inserting false resolution information into the DNS cache server so that users can access wrong IP addresses. This type of attack usually occurs on DNS servers within the ISP or local network.

Precautions:

  • Clear the local DNS cache in time.
  • Use a reliable DNS server, such as a public DNS server (such as Google Public DNS, OpenDNS, etc.) or a secure DNS server within the enterprise.
  • Configure DNSSEC to combat DNS pollution attacks and ensure the integrity and authenticity of received DNS responses.

DNS hijacking: DNS hijacking means that attackers redirect user requests to malicious websites by tampering or forging DNS responses, thereby stealing users' sensitive information or conducting malicious activities. This kind of attack usually occurs in the user terminal equipment or local network.

Precautions:

  • Use trusted firewall and security software to detect and block malicious DNS hijacking.
  • Update and use trusted operating systems and applications to reduce the presence of known vulnerabilities.
  • Avoid clicking on links from unknown sources or downloading untrustworthy software.
  • Configure DNSSEC to provide verification and authentication of DNS responses to prevent tampering.

 Also, keep your operating system and applications up-to-date. Remind users to avoid unnecessary clicks and downloads to reduce exposure to potential threats.

 DHCP service

DHCP (Dynamic Host Configuration Protocol) is a network protocol used to automatically assign IP addresses and other network configuration parameters to devices connected to the network. Here is some important information about DHCP:

  1. IP Address Assignment: The DHCP server can dynamically assign available IP addresses to devices connected to the network. When a device joins the network, it sends a DHCP request, and the DHCP server replies with a DHCP response containing configuration information such as the IP address, subnet mask, default gateway, and DNS server assigned to the device.

  2. Automatic configuration: Through DHCP, devices in the network can automatically obtain the required network configuration information without manual configuration. This makes network management and maintenance more convenient, and reduces manual configuration errors.

  3. IP address renewal: The IP address assigned to the device by the DHCP server is limited, so the device needs to renew the contract with the DHCP server before the lease expires. The device will send a DHCP request to extend the lease, and if the DHCP server confirms that the device is still online, the lease will be renewed for the device.

  4. Dynamic allocation: DHCP allows the dynamic allocation of available IP addresses in a specific IP address pool. When the device is no longer connected to the network or the lease expires, the DHCP server can re-provide the IP address to other devices, so as to maximize the use of available IP address resources.

  5. Other configuration parameters: In addition to IP addresses, DHCP can also provide other network configuration parameters, such as subnet mask, default gateway, domain name server, NTP server, and option settings.

Overall, DHCP simplifies the configuration and management process of network devices, providing an automated and centralized way to assign and manage IP addresses and other network configuration information. It is widely used in LAN and WAN to improve the availability and flexibility of the network.

 

 DHCP obtains IP address process

The process of obtaining an IP address by DHCP can be summarized as the following steps:

  1. DHCP discovery: When a device joins the network, it will send a special DHCP discovery message (DHCP Discover), using the target IP address as the broadcast address (eg 255.255.255.255) to find an available DHCP server.

  2. DHCP Offer: After the DHCP servers on the network that received the DHCP Discover message receive the request, they will reply with a DHCP Offer message (DHCP Offer). The message contains available IP addresses, lease time and other configuration information.

  3. DHCP request: After receiving one or more DHCP offer messages, the device will select one of the offer messages and send a DHCP request message (DHCP Request) to the DHCP server that provided the message. This message indicates that the device accepts the provided IP address and configuration information.

  4. DHCP confirmation: After receiving the DHCP request message, the DHCP server will send a DHCP confirmation message (DHCP Acknowledge) to the device. The message confirms that the device was successfully assigned an IP address and other configuration information. At this point, the device completes the IP address assignment process.

During this process, multiple DHCP servers may provide IP addresses. The device will usually choose the first DHCP offer message to reply and send a DHCP request to it. After receiving the DHCP request from the device, other DHCP servers will cancel the corresponding offer message.

It is worth noting that the communication between the DHCP client and the DHCP server is based on the UDP protocol. In order to avoid the broadcast of DHCP request and offer messages in the LAN, a DHCP relay agent is usually used to forward the messages, so as to realize the DHCP function across subnets.

Obtaining IP addresses through DHCP can automatically configure devices, simplify network management and maintenance, and ensure that devices have unique and valid IP addresses, which contributes to network scalability and reliability.

 DHCP spoofing

DHCP spoofing (DHCP spoofing) is a malicious behavior designed to interfere or hijack the normal operation of the DHCP protocol to obtain unauthorized IP addresses or tamper with network configurations. Here is some important information about DHCP spoofing:

  1. How it works: Normally, a DHCP server is responsible for assigning IP addresses and other network configuration parameters to devices connected to the network. However, malicious hosts can send false DHCP Offer messages (DHCP Offer) or DHCP Acknowledgment messages (DHCP Acknowledge) to disguise themselves as valid DHCP servers by deception.

  2. IP address conflict: When two or more devices request the same IP address at the same time, an IP address conflict may result. DHCP spoofers can send false DHCP offer messages to match their own MAC addresses with the IP addresses requested by the spoofed devices, so that the spoofed devices cannot correctly obtain valid IP addresses.

  3. Network disruption: A DHCP spoofer can send a fake DHCP acknowledgment message, setting a device's IP address to an invalid address or a null value, causing the device to fail to connect to the network properly. This may cause network outages or loss of access to network resources.

  4. Man-in-the-middle attack: DHCP spoofing can be used as part of a man-in-the-middle attack. Spoofers can hijack communication between a device and its default gateway to steal sensitive information, monitor network traffic, or perform other malicious actions.

  5. Preventive measures: In order to prevent DHCP spoofing, the following measures can be taken:

    • Use DHCP Snooping: Enable the DHCP Snooping function on the network switch, which can detect and filter out unauthorized DHCP messages.

    • Use static IP addresses: For some important devices, you can manually configure static IP addresses instead of relying on dynamic allocation.

    • Use DHCP authentication: By enabling authentication on the DHCP server, only authenticated devices can obtain valid IP addresses.

    • Network Security Policy: Implement network security policies such as firewalls, intrusion detection, and network monitoring to monitor and detect potentially malicious DHCP activity.

Overall, DHCP spoofing is a potential network security threat that can lead to problems such as network outages, IP address conflicts, and man-in-the-middle attacks. By taking proper security measures, you can reduce the risk of DHCP spoofing and ensure the proper functioning and security of your network.

mail service

SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer Protocol)

POP3 (Post Office Protocol Version 3, Post Office Protocol Version 3)

IMAP (Internet Message Access Protocol, Internet Message Access Protocol)

The above are three common protocols used for email. They differ in different functions and uses.

SMTP (Simple Mail Transfer Protocol) : SMTP is a protocol used to send emails. When you send an email, your email client (such as Outlook, Gmail, etc.) uses the SMTP protocol to send the message from your computer to the mail server. SMTP is responsible for transferring mail from the sender's client to the mail server, and by specifying the server's address and port (usually port 25) to deliver the mail correctly.

POP3 (Post Office Protocol Version 3) : POP3 is a protocol for receiving electronic mail. When you want to read your email, your email client connects to the mail server using the POP3 protocol and downloads the mail stored on the server. POP3 needs to provide a user name and password for authentication and to get the mail in the inbox from the server. POP3 usually uses port 110.

IMAP (Internet Mail Access Protocol) : IMAP is also a protocol for receiving email, but it offers more features than POP3. IMAP allows users to synchronize mail on multiple devices, manage the folder structure of mail on the server, and search, filter, and sort on the client. IMAP usually uses port 143.

Main difference:

  • Function: SMTP is responsible for sending emails, POP3 and IMAP are responsible for receiving emails.
  • Port: SMTP uses port 25, POP3 uses port 110, and IMAP uses port 143.
  • Storage: POP3 downloads mail to the local device and deletes it from the server, while IMAP keeps a copy of the mail on the server, which can be viewed synchronously across multiple devices.
  • Folder management: IMAP allows creating, renaming, and deleting mail folders on the server, while POP3 does not have this feature.
SMTP

 

Send email based on web interface  

 Send mail based on mail client   

 SMTP Common Faults

 POP3

 POP3 authentication process

 IMAP

IMAP is different from POP3 
 SSL

The port of the mail service after using SSL encryption 

FTP (File Transfer Protocol, file transfer protocol)

FTP is a standard protocol for transferring files between computers. It allows users to connect to a remote computer over a network and transfer files between the local computer and the remote computer.

FTP consists of two main components: an FTP server and an FTP client.

FTP Server: An FTP server is a software program running on a remote computer that stores and manages a repository of files for download or upload by other computers. FTP servers usually have an IP address and a port number.

FTP Client: An FTP client is a software program used to connect to an FTP server from a local computer. Users can use the FTP client to browse files on the remote server, upload files to the server or download files from the server.

The FTP protocol supports the following basic operations:

  1. Login authentication: The user needs to provide a user name and password to log in to the FTP server.
  2. File browsing: Users can browse files and directories on the remote server in the FTP client.
  3. File Upload: Users can upload files from their local computer to a remote server.
  4. File Download: Users can download files from a remote server to their local computer.
  5. File deletion: Users can delete files on the remote server.
  6. File Renaming: Users can rename files on remote servers.
  7. Directory creation and deletion: Users can create and delete directories on remote servers.

It is worth noting that FTP is an unencrypted protocol, so it may have security risks during data transmission. To provide more secure file transfers, encrypted protocols such as SFTP (SSH File Transfer Protocol) or FTPS (FTP Secure) can be used. These protocols encrypt data during transmission, providing greater security.

 FTP usage process

FTP for file transfer usually involves the following steps:

  1. The client connects to the server: In the FTP client, enter the address (IP address or domain name) and port number of the remote FTP server, click the connect button or use the command line to connect to the FTP server. Generally, the FTP server uses the default port 21.

  2. Login authentication: Once a connection is established with the FTP server, the client will ask the user to provide a user name and password for login authentication. These credentials are usually provided by the FTP server administrator.

  3. Navigation Browsing: After a successful login, the client will display the file directory on the remote server it is connected to. Users can use the command or graphical interface provided by the client to browse the file directory and select the file or directory to be transferred.

  4. Uploading files: To upload files from the local computer to a remote server, users can do the following:

    • Select the file to upload and right-click, then select the "Upload" option;
    • Use the command on the command line putfollowed by the local file path and the target path on the remote server.
  5. Downloading files: To download files from a remote server to a local computer, users can do the following:

    • Select the remote file to download and right-click, then select the "Download" option;
    • Use the command on the command line getfollowed by the remote file path and the target path on the local computer.
  6. File deletion and renaming: Users can use the commands provided by the client or the graphical interface to delete and rename files on the remote server.

  7. Disconnect: After completing the file transfer, the user can choose to disconnect from the FTP server. Usually, there are options like "Disconnect", "Exit" or "Close" in the client interface.

 FTP active mode

FTP passive mode
 difference between active and passive

The active and passive modes of FTP differ in how the data connection is established, port usage, and security:

Active Mode:

  1. The client establishes a connection with the server through the control connection (default port 21).
  2. The client sends the PORT command, specifies its own IP address and a random port number, and tells the server to establish a data connection with the client through this port.
  3. The server uses the IP address and port number provided by the client to actively connect to the data port of the client and start data transmission.
  4. In active mode, the server actively connects to the client, so a range of ports needs to be opened on the client firewall to accept server connection requests.

Passive Mode:

  1. The client establishes a connection with the server through the control connection (default port 21).
  2. The client sends the PASV command to tell the server to use passive mode.
  3. The server selects an idle port in a port range greater than 1024, and sends its own IP address and the port number to the client.
  4. The client initiates a data connection according to the IP address and port number provided by the server, and the server accepts the connection and transmits data.
  5. In passive mode, since the server passively waits for client connection requests, a range of ports needs to be opened on the server firewall to accept client connection requests.

It should be noted that there are some differences between the active mode and passive mode of FTP in the configuration of firewalls and network devices. Aggressive mode may be limited by client or server firewalls and needs to be properly configured in the firewall to allow data connections to be established. The passive mode is relatively easier to adapt to different network environments, because most firewalls will allow the client to send a connection request to the server, and then the server will return the information of the data port through the established control connection, thus avoiding the problem of firewall restrictions .

 TELNET

Telnet is a network protocol used to log in remotely to a remote computer or device. Through Telnet, users can use the command line interface on the local computer to remotely connect to the target computer and perform various operations and commands.

It should be noted that because Telnet transmits data in clear text, it is not recommended to use Telnet on untrusted networks, because attackers can intercept and view transmitted data, including usernames, passwords, and other sensitive information. For security reasons, it is recommended to use a more secure remote login protocol, such as SSH (Secure Shell).

 

 Remote Desktop

Remote Desktop is a technology that allows you to connect to a remote computer from a local computer over a network and use and control the remote computer's desktop interface on the local computer.

remote procedure call

Remote Procedure Call (RPC) is a communication mechanism that allows programs to communicate and interact between different computers or network nodes. Through RPC, a program can call a function or procedure on a remote computer as if it were a local function, without knowing the underlying network details.

syslog security

Introduction to Windows Logging

Windows logs are an important part of the operating system used to record and store system activities and events. It can provide information about computer health, troubleshooting, security event tracking, and performance analysis. Here are a few common types of Windows logs:

  1. Application log: This log records application-related events and errors, such as application crashes, error messages, and warnings.

  2. Security log (Security log): The security log records events related to computer security, such as login and logout, access rights changes, security vulnerability scans, etc.

  3. System log (System log): The system log records events and errors related to the operating system, such as startup and shutdown events, driver problems, hardware errors, etc.

  4. Setup log: Setup log records information about system installation and update, including software installation, driver installation and upgrade, etc.

  5. Service log (Service log): The service log records events and errors about system services, such as service start, stop, failure, etc.

  6. Internet Information Services (IIS) logs: Used to record activities and transactions on the IIS server, such as access logs, error logs, and security logs.

In addition to the above common log types, Windows also supports other types of logs, such as DNS logs, Remote Desktop Services logs, etc. These logs can be configured and recorded according to specific requirements.

 

 Windows syslog

Windows system log is a recording tool in the Windows operating system to record events and errors related to the operating system and system components. It contains logs of multiple subcategories, common ones include:

  1. Application Log: Logs events and errors related to the application. For example, application crashes, warning messages, etc.

  2. System Log: Logs events and errors related to the operating system itself. For example, startup/shutdown events, device driver issues, system errors, etc.

  3. Security Log: Records events related to computer security. For example, login and logout records, object access, security vulnerability scanning, etc.

  4. Setup Log: Records information about system installations and updates. For example, software installation, driver installation and upgrade, etc.

  5. Forwarded Events Log: This log records event logs sent by remote computers, which can be used to centrally manage and monitor events of multiple computers.

These logs record important events and errors during computer operation, and are very useful tools for system administrators and technical support personnel. By viewing and analyzing system logs, it can help diagnose and solve operating system and application problems, deal with security incidents in a timely manner, and perform performance monitoring and optimization.

To view the Windows system logs, you can open the "Event Viewer" tool.

 

Windows security log 

The Windows Security Log (Security Log) is an important part of the Windows operating system, used to record events and activities related to computer security. It is a type of Windows event log that records information related to computer security such as user logins, object access, security permission changes, and security vulnerability scans.

The security log is created based on the Windows security audit function, which can monitor and audit system security and help administrators detect and respond to security incidents in a timely manner. The following are common event types in the security log:

  1. Login Events: Logs user login and logout activities. Including login success, login failure, logout, etc.

  2. Object access events: record access operations on objects such as files, folders, and registry. If there is an unauthorized access attempt, a corresponding event log is generated.

  3. Security Permissions Change Event: Logs permission changes for security groups, users, or objects. For example, adding or removing permissions for users, changing group policies, etc.

  4. Security Vulnerability Scanning Events: Records security vulnerability scanning activities that occur in the system. These activities may come from external threats such as malware or unauthorized penetration testing.

  5. Security audit configuration change events: record security audit policy or other configuration changes related to security audit. For example, enable or disable security auditing, change event retention period, etc.

 

 

 

 Event log analysis method

Event log analysis is the process and interpretation of data in event logs to discover potential problems, abnormal behaviors, or security incidents. The following are the general steps and methods for event log analysis:

  1. Collect event logs: First, you need to collect the event logs that need to be analyzed. This can be done by exporting log files using the event viewer tool that comes with the operating system, or by using a professional log management tool to automatically collect and store event logs.

  2. Data cleaning and preprocessing: Cleaning and preprocessing of event log data is necessary prior to analysis. This includes removing duplicate, irrelevant or non-standard data and ensuring data accuracy and consistency.

  3. Filter and filter log data: According to the purpose of analysis, filter and filter log data to obtain log entries for specific time periods, specific types of events, or related objects. This can be achieved by using the query language or filters provided by the log management tool.

  4. Detect patterns and anomalous behavior: Based on predefined patterns, rules, or behavioral characteristics, log data is analyzed to detect anomalous behavior or potential problems. For example, rules can be established to detect excessive login failures, abnormal access patterns, unauthorized operations, and so on.

  5. Correlating data and events: Correlating and analyzing event data at different points in time and from different sources to understand the relationship between events and obtain more comprehensive contextual information. This helps uncover hidden attack paths or sophisticated attack behavior.

  6. Visualization and reporting: Through data visualization technology, the analysis results are displayed in the form of charts, graphs or reports, so as to understand and communicate the analysis results more intuitively. This can be provided to decision makers, security teams or other relevant personnel for reference and action.

  7. Optimization based on feedback: According to the actual analysis results and experience, continuously adjust and optimize the methods and rules of event log analysis to improve the accuracy and efficiency of analysis.

 

 

 

 

Log Analysis Tool  

 

 WSUS 

WSUS (Windows Server Update Services) is a service launched by Microsoft for managing and distributing security updates and patches for the Windows operating system and other Microsoft products. WSUS allows administrators to centrally manage updates to computers within an organization and ensure systems are kept up to date with the latest security patches.

Following are the main functions of WSUS:

  1. Update management: WSUS can download, store and manage various types of updates from Microsoft update servers, including operating system patches, security updates, drivers, applications, etc.

  2. Deployment Control: WSUS allows administrators to filter updates, customize release rules, and selectively deploy updates to different computers or groups of computers according to the needs of the organization.

  3. Automatic Updates: WSUS can automatically deploy updates to client computers based on rules and schedules configured by administrators. Client computers will periodically check for updates on the WSUS server, and automatically download and install compliant updates.

  4. Reporting and status monitoring: WSUS provides rich reporting and status monitoring functions, administrators can view the status of deployed updates, update status of computers, errors and failed updates, and other information.

  5. Bandwidth management: WSUS can control the transmission speed and time of updates on the network by configuring bandwidth limits to avoid too much impact on network performance.

Using WSUS can help organizations simplify the update management process and improve system security and stability. By centrally managing and distributing updates, administrators can ensure that all computers receive critical security patches in a timely manner, reducing the risk of system vulnerability. In addition, WSUS also provides flexible policies and reporting functions to help monitor update status and solve problems in a timely manner.

 

 

 

 

 registry security 

The registry is a hierarchical database used to store configuration information and system settings in the Windows operating system. The registry contains many key system configuration items, user settings, and application-related data.

Registry security is an important issue in protecting registry data from unauthorized access, modification or destruction. Here are some suggestions for enhancing registry security:

  1. Control Access: Use appropriate Access Control Lists (ACLs) to restrict access to sensitive data and critical configuration items in the registry. By assigning appropriate permissions to each user and user group, you can ensure that only authorized users can read or modify registry keys.

  2. Minimize privileges: In order to limit the access power of malware or unauthorized users to the registry, user privileges should be kept to a minimum. Grant users only the minimum privileges they need to prevent them from making unnecessary changes to the registry.

  3. Regular backups: Regular backups of the registry are an important precaution to prevent data loss or corruption. Before making important changes, back up the registry so that you can revert to a previous state if something goes wrong.

  4. Detect and protect against malware: Regularly scan the system to detect the presence of malware, which may use the registry to hide and launch itself. Use a reliable anti-malware tool and keep its virus definition database up-to-date.

  5. Be wary of Registry Editor usage: Registry Editor is a tool used to modify the registry, but it can also cause system damage if not done correctly. Make sure you understand the procedures and risks involved before editing the registry, and make changes carefully.

  6. Update the operating system and applications: By keeping the operating system and applications updated in a timely manner, known security holes can be fixed and better protection can be provided. Many security updates directly involve modification of registry entries, so keeping the system updated is critical to the security of the registry.

 

 Registry Composition

The registry consists of the following main components:

  1. Keys: The registry is a hierarchical database, and the key is the top element of its hierarchical structure. Keys are similar to folders and are used in the registry to organize and store other keys and values.

  2. Subkeys: Each key can contain one or more subkeys, forming a hierarchy of keys. Subkeys can have their own subkeys, and so on, forming a tree structure of the registry.

  3. Values: Keys can contain values ​​associated with them. Values ​​can store various types of data such as strings, integers, binary data, etc. Values ​​are used to store configuration information, system settings, and application-related data.

  4. Data Types: Values ​​in the registry have predefined data types that indicate the type of data the value stores. Common data types include string (REG_SZ), binary (REG_BINARY), integer (REG_DWORD), multi-string (REG_MULTI_SZ), etc.

  5. Root Keys: Registry root keys are the starting point of the registry hierarchy and they provide entry points for accessing different parts of the registry. There are five root keys in the Windows operating system, including HKEY_CLASSES_ROOT (file association and class information), HKEY_CURRENT_USER (current user), HKEY_LOCAL_MACHINE (local computer), HKEY_USERS (all user configuration), HKEY_CURRENT_CONFIG (current hardware configuration).

 

 

 

 Domains in Windows

In the Windows operating system, a Domain is a network environment used to centrally manage and organize computers, user accounts, security policies, and resources. The domain provides a centralized management method, which makes it easier for administrators to manage a large number of computers and users, and provides a secure authentication and access control mechanism.

The following are some concepts and features related to Windows domains:

  1. Domain Controller (Domain Controller): The domain controller is the main server in the domain, responsible for storing and managing user accounts, security policies and other related information in the domain. Domain controllers store this information and provide authentication and authorization services by using the Active Directory database.

  2. Active Directory (AD): Active Directory is a directory service in the Windows environment that stores and organizes information about users, computers, and other objects in a domain. It also provides functionality for authentication and authorization of these objects, as well as access control and policy management.

  3. Domain Name: A domain name is a name that identifies a domain, and usually adopts the DNS (Domain Name System) naming rule. A domain name is used to uniquely identify a domain in the network and provide convenient identification for computers and users in the domain.

  4. Domain User Account (Domain User Account): A domain user account is a user account created in a domain, which allows users to log in on multiple computers and share resources in the domain. Domain user accounts can also be authenticated and authorized by a domain controller.

  5. Centralized management and policies: In a domain environment, administrators can use domain controllers to centrally manage user accounts, computers, permissions, and security policies. This allows administrators to more easily assign permissions, apply security policies, and exercise finer-grained control over resources and objects in the domain.

  6. Single sign-on: In a domain environment, when users log on to one computer in the domain, they can access other computers and resources in the domain without having to re-provide their credentials. This is known as single sign-on, and it provides users with a convenient and unified login experience.

With a domain environment, organizations can better manage and protect their computers and resources. Domains provide a centralized control and management mechanism, improving security, scalability, and convenience, especially for large organizations and enterprise networks.

Why do you need a domain?

  It can realize file sharing, centralized and unified, and easy to manage

Domains exist for several important reasons and advantages:

  1. Centralized management: The domain environment provides centralized management capabilities, enabling administrators to manage a large number of computers, user accounts, and security policies at a central location. In this way, administrators can manage users, assign rights, and apply policies more efficiently, reducing the complexity and workload of management work.

  2. Security: Domain environments provide strong authentication and access control mechanisms, with domain controllers authenticating users and validating their access rights. Administrators can implement fine-grained access control on users and computers through security policies and group policies, providing a higher level of security protection.

  3. Single sign-on: In a domain environment, users only need to log on once to access all computers and resources in the domain, without having to provide credentials each time. This improves user convenience and productivity, and reduces the burden of password management.

  4. Resource sharing: In a domain environment, users can easily share files, printers, and other network resources. Administrators can easily set share permissions while ensuring that only authorized users can access shared resources.

  5. Unified identity management: Through the domain environment, users can use the same authentication information to log in on different computers. This is convenient for users who work across multiple computers, while also simplifying password and account management.

  6. Simplified maintenance: A domain environment allows administrators to centrally manage and maintain computers and resources in the domain. Administrators can easily perform software updates, patch management and troubleshooting through remote management tools, reducing maintenance costs and working hours.

 active directory

"Active Directory", "Active Directory" (AD), is a directory service developed by Microsoft. Active Directory is a centralized directory service in the Windows environment, used to store and organize objects in the network, such as computers, user accounts, security policies and other information.

Active Directory provides the following functions and features:

  1. Directory Services: Active Directory acts as a central database that stores and organizes the hierarchy of objects on the network. These objects can include user accounts, computers, groups, shared folders, and more.

  2. Authentication and authorization: Active Directory provides authentication and authorization mechanisms to ensure that only authorized users can access resources in the network. Administrators can define permission policies to control user access to specific objects.

  3. Centralized management: With Active Directory, administrators can centrally manage objects in the network. For example, they can create, delete, and modify user accounts, assign group memberships, set security policies, and more.

  4. Single sign-on: Active Directory supports the single sign-on function, so that users only need to log in once in the domain to access all computers and resources connected to the domain.

  5. Distributed architecture: Active Directory supports a distributed architecture where directory data can be replicated and stored on multiple servers. This improves reliability and fault tolerance, and allows for larger scale deployments.

  6. Group Policy: Administrators can use Group Policy to apply configurations and settings to computers in a domain. Group policies can uniformly manage the behavior of computers, such as restricting software installation, disabling USB ports, and so on.

In summary, Active Directory is a powerful directory service for storing, organizing, and managing objects and resources on a network. It provides functions such as centralized management, authentication, authorization and single sign-on to help administrators better manage and protect the network environment.

 Differences between workgroup domains and AD domains

Workgroup and Active Directory Domain are two different models for managing computer networks that differ in the following ways:

  1. Management method: A workgroup is a simple form of network organization in which computers manage their own user accounts and security policies independently. Each computer has its own local account database, and users need to set up and manage accounts on each computer separately. The AD domain is a centralized management model. All user accounts and security policies are stored in the domain controller. Administrators can centrally manage users in the entire network and apply unified security policies through the domain controller.

  2. Authentication: In a workgroup, each computer has its own user account database, so users need to provide authentication information on each computer to access resources. In an AD domain, users only need to authenticate on the domain controller, and then they can access all resources in the domain without providing authentication information every time.

  3. Security and authorization: AD domains provide stronger security and authorization mechanisms. Administrators can use security policies and permissions settings on domain controllers to restrict user access to resources. In a workgroup, each computer has its own security policy, and administrators need to set it individually on each computer, making management more cumbersome.

  4. Manageable size: Workgroups are suitable for smaller network environments, such as home networks or small businesses. The AD domain is suitable for medium and large organizations, which can manage hundreds or even thousands of computers and user accounts, and provide a higher level of management and security.

  5. Resource sharing: In a workgroup, shared resource configuration and access permissions are set independently on each computer. In an AD domain, however, shared resources can be set uniformly on the domain controller, and access to resources can be controlled through domain policies.

To sum up, the working group is a simple and decentralized form of network organization, suitable for smaller network environments, while the AD domain is a centralized management network model, suitable for medium and large organizations. AD domain provides functions such as centralized management, authentication, unified security policy and resource sharing, which is more scalable and secure in comparison. Which model to use should be determined based on network scale, security requirements, and management complexity.

Functions of the AD domain

An Active Directory (AD) domain is a centralized directory service that provides many functions to manage objects and resources in a network.

The following are the main functions of an AD domain:

  1. Authentication and authorization: AD domains provide authentication mechanisms to ensure that only authorized users can access resources in the domain. Users can log on to the domain with their own accounts and have authorized access according to the permissions of their accounts.

  2. User and computer management: AD domains allow administrators to create, modify, and delete user accounts and computer accounts. Administrators can set properties, assign group memberships, reset passwords, and more.

  3. Centralized access control: Through the AD domain, administrators can define and manage security policies on the domain controller, such as password policy, account lockout policy, access control list, etc. These security policies can be applied to all objects and resources in the domain.

  4. Organizational Structure and Hierarchy: An AD domain provides a hierarchical structure to organize and manage objects in the network. Administrators can create organizational units (OUs) and containers to organize users, computers, and other objects. This allows for better management and assignment of permissions.

  5. Multiple domains and trust relationships: AD domains support trust relationships between multiple domains, enabling users and resources in different domains to interact and access securely. Administrators can configure one-way or two-way trust relationships.

  6. Single Sign-On (SSO): With an AD domain, users only need to log in once to access all resources connected to the domain. This simplifies the user login process and improves the user experience.

  7. Distributed architecture: AD domains support a distributed architecture where directory data is replicated and synchronized across multiple domain controllers. This improves reliability and fault tolerance, and allows distributed deployment in large networks.

  8. Group Policy: Administrators can use Group Policy (Group Policy) to apply and manage computer configurations and settings in the AD domain. Group policies can centrally manage computer behavior, such as installing software, disabling USB ports, and more.

Overall, an AD domain provides centralized authentication, user and computer management, access control, organizational structure, trust relationships, single sign-on, and more. These functions enable administrators to better manage and protect objects and resources in the network, improving network security and efficiency.

AD domain objects

In an Active Directory (AD) domain, there are various types of objects used to store and manage information in an organization. The following are common object types in an AD domain:

  1. User Accounts: User accounts are used to identify and manage users in the domain. Each user account has a unique username and password that can be used for authentication and access to resources in the domain.

  2. Computer Accounts: Computer accounts are used to identify and manage computers connected to a domain. Each computer is assigned a unique computer account, which is used to authenticate the computer and authorize access to resources in the domain.

  3. Groups: Groups are used to organize and manage user and computer accounts. By adding user and computer accounts to groups, administrators can more easily assign permissions and apply policies. There are two types of groups: Security Groups and Distribution Groups.

  4. Organizational Units (Organizational Units, OU): OU is a container object in the AD domain, used to organize and manage other objects. They provide a hierarchical structure that allows administrators to organize and manage users, computers, and other objects according to organizational structure and administrative needs.

  5. Domain Controllers: Domain controllers are servers that host AD domain services. They store and replicate directory data within the domain and provide authentication, authorization, and other AD domain services. An AD domain can have one or more domain controllers.

  6. Security Principles: Security Principles are secure representations of user accounts, computer accounts, and groups. Each security identity has a unique security identifier (SID) that uniquely identifies the object within the domain.

  7. Shared Resources (Shared Resources): Shared resources are network resources that are shared and managed in the AD domain, such as file sharing and printer sharing. Administrators can configure access controls and permissions to enable specific users or groups to access these shared resources.

In addition to the above object types, there are other object types, such as printers, policy objects (Policy Objects), service accounts (Service Accounts), etc., which are used to manage and control resources and services in the domain at a more granular level.

Interrelated and interacting, these objects constitute the structure and functionality of an Active Directory domain, providing centralized authentication, access control, and resource management.

The logical structure of AD

Active Directory (AD) is a hierarchical directory service that uses a tree structure to organize and manage objects in a domain. The structure of an AD domain consists of the following parts:

  1. Domain (Domain): Domain is the topmost layer of AD domain structure, which is a logical boundary for managing users, computers, groups and other objects. A domain has a unique name and can contain multiple domain controllers.

  2. Tree: A tree is a hierarchical structure consisting of one or more domains. In the tree, each domain has a parent domain and one or more child domains. The parent domain and child domains are connected through an implicit trust relationship, sharing single sign-on and resource access.

  3. Forest: A forest is a collection of one or more trees. A forest is the highest level of the AD domain structure, which defines a security boundary and shares the global directory schema, global directory replicas, and global policy settings.

  4. Domain Controller (Domain Controller): A Domain Controller is a server that hosts AD Domain Services. Each domain has at least one domain controller, which stores directory data in the domain and provides authentication, authorization, and other AD domain services.

  5. Trust Relationship: A trust relationship defines trust and security between different domains. Through the trust relationship, users can access resources across domains and realize single sign-on. Trust relationships can be one-way or two-way.

  6. Organizational Unit (Organizational Unit, OU): OU is a container object in the AD domain structure, used to organize and manage other objects. OUs provide a logical organizational structure that allows administrators to group users, computers, and groups according to organizational needs.

Multiple organizational units make up a domain,

Multiple domains form a tree,

Many trees form a forest,

Active directory is the foundation of the domain. Active directory is the index of network resources. It is equivalent to the shortcut of all resources in the network stored in active directory. Users locate resources by looking for shortcuts.

Through such a hierarchical structure, the AD domain provides flexible management capabilities and security. Administrators can design and configure the AD domain structure according to organizational structure, management needs and security requirements to achieve efficient resource management and access control.

domain performance

The performance of a domain can be affected by a variety of factors, including the following:

  1. Hardware and configuration of the domain controller: As a server hosting AD domain services, the hardware performance and configuration of the domain controller will directly affect the performance of the domain. Strong processing capability, sufficient memory and high-speed disk read and write capabilities can improve the response speed and processing capability of the domain controller.

  2. Network bandwidth and delay: AD domain is a network-based distributed service, and communication between domain controllers is limited by network bandwidth and delay to some extent. Higher network bandwidth and lower latency can speed up data synchronization and communication between domain controllers.

  3. Directory size and complexity: The size and complexity of directories in the domain can also have an impact on performance. If the domain contains a large number of objects (such as users, computers, and groups) or has a complex directory structure, the domain controller may require more time to process requests and search operations.

  4. Service load and resource utilization: If the service load of a domain is too high, domain controllers may not be able to respond to requests in a timely manner, resulting in degraded performance. Administrators can optimize domain performance by distributing service load appropriately and monitoring resource utilization.

  5. Caching and Indexing Policies: Domain controllers use caching and indexing to speed access to directory data. Optimizing caching and indexing policies can improve domain controller query performance.

  6. Regular maintenance and optimization: Regular maintenance and optimization operations on the domain, such as cleaning out expired objects, re-indexing directories, etc., can maintain a good performance status of the domain.

 

In short, domain performance is a comprehensive issue, which requires comprehensive consideration of multiple factors such as hardware, network, directory structure, and management and optimization strategies. Through reasonable configuration and optimization, domain performance can be improved to provide better service and user experience.

domain hierarchy

organizational unit

Organizational Units (Organizational Units, OUs) are containers used to organize and manage objects in Active Directory (AD). OU is a hierarchical organizational structure in the AD domain architecture, which can contain users, computers, groups and other objects, so that administrators can better organize and manage these objects.

Here is some important information about organizational units:

  1. Logical organization: OU provides a logical organizational unit, and different OUs can be created according to the needs and structure of the organization. For example, a company can create different OUs to represent departments, office locations, or project groups, etc.

  2. Hierarchy: OUs can form a hierarchy, enabling administrators to organize OUs in a tree structure. This hierarchy reflects the logical structure of the organization and can be flexibly adjusted as needed.

  3. Administrative rights: OUs can be granted administrative rights to specific administrators or groups so that they can manage objects under that OU. This fine-grained permission control provides better security and management flexibility.

  4. Policy Application: By applying a policy, such as Group Policy, to an OU, specific configuration settings can be imposed on objects within an OU. Doing so enables differentiated management of different departments or user groups.

  5. Inheritance relationship: An inheritance relationship can be established between OUs, which means that child OUs can inherit some settings and policies of the parent OU. This inheritance relationship simplifies the management process and ensures consistency and manageability.

  6. Move and Reorganize: OUs allow administrators to move objects from one OU to another to accommodate changes in organizational structure. By moving and reorganizing objects, you can better reflect your organization's changes and needs.

 

 

Organizational Unit Division Principles

When dividing organizational units (Organizational Units, OUs), the following principles can be considered:

  1. Organizational structure: According to the business structure and hierarchical relationship of the organization, divide the OU into different departments, offices or project groups. This reflects the actual structure of the organization, making management clearer and more effective.

  2. Functional area division: according to the needs of different functional areas, divide the corresponding OU. For example, you can create a dedicated OU for storing user accounts, computer objects, group objects, and so on.

  3. Security requirements: Divide OUs into different security boundaries according to security policies and permission requirements. For example, OUs can be divided according to specific security requirements, so as to implement different security policies and permission controls for objects under different OUs.

  4. Administrative Responsibilities: OUs can be divided according to the responsibilities of different administrators or administrative teams. Each OU can have a responsible administrator or group responsible for managing the objects under that OU.

  5. Geographic location: If the organization has branches or offices in different geographic locations, OUs can be divided according to geographic location. This allows for better management and organization of objects that are distributed across different locations.

  6. Simplified management: Try to avoid excessive subdivision of OUs, so as not to cause management difficulties. According to the actual situation and management requirements, the OU can be divided reasonably to make the management process more simplified and efficient.

An organizational unit (Organizational Unit, OU) has the following characteristics in Active Directory (AD):

  1. Container function: OU is a container that can be used to organize and manage objects. It can contain users, computers, groups, and other objects, and provides a logical organizational structure.

  2. Hierarchical structure: OUs can form a hierarchical structure organized in a tree structure. This hierarchical structure can be flexibly adjusted according to the needs of the organization, reflecting the logical structure of the organization.

  3. Inheritance relationship: Inheritance relationship can be established between OUs. Child OUs can inherit some settings and policies of the parent OU, such as security policies and group policies. This inheritance relationship simplifies the management process and ensures consistency and manageability.

  4. Have independent permissions: OUs can be granted administrative permissions to specific administrators or groups. In this way, administrators can perform management operations on objects under a specific OU to implement differentiated management for different departments or user groups.

  5. Policy Application: By applying a policy, such as Group Policy, to an OU, specific configuration settings can be imposed on objects within an OU. These policies can be used to control access to objects, application settings, and more.

  6. Movable and reorganizable: OUs allow administrators to move objects from one OU to another to accommodate changes in organizational structure. Doing so can better reflect the changes and needs of the organization.

  7. Simplified management: OU can help administrators to logically group and manage objects in the AD domain. By organizing objects in different OUs, administrators can more easily locate and manage these objects.

Overall, OU is an important tool for organizing and managing objects in AD. It provides features such as logical organization, hierarchical structure, inheritance relationship, permission control, etc., which help to achieve flexible and effective object management.

Domain Tree

In a Windows Active Directory (AD) environment, a hierarchy of one or more domains. The domain tree uses a tree structure to organize and manage domains, and realizes the sharing of resources and rights through the trust relationship between domains.

In a domain tree, there is usually a root domain (Root Domain) as the top-level domain of the tree. One or more child domains can be created under the root domain, and each child domain is a subordinate domain of the root domain, forming a tree structure. Each domain has its own domain controller (Domain Controller), which is responsible for storing and managing the directory service database of the domain.

Domain trees have the following features and advantages:

  1. Organizational structure: Through the domain tree, domains can be divided according to organizational needs and hierarchical relationships, making the entire AD environment more orderly and clear.

  2. Unified authentication: The domains in the domain tree establish a reliable trust relationship with each other, allowing users to perform authentication and access control between different domains. In this way, users can access resources across domains to achieve unified identity authentication and management.

  3. Resource sharing: Domains in the domain tree can share resources, such as shared folders, printers, etc. Through the trust relationship between domains, users can share and access resources between different domains.

  4. Simplified management: The domain tree structure enables delegated management between domains, granting authority to specific administrators, achieving hierarchical management and simplifying the management process.

  5. Security: The domain tree structure provides a fine-grained security control, enabling administrators to set trust relationships and access rights between domains as required to ensure the security of the AD environment.

 

In general, a domain tree is a hierarchical structure for organizing and managing multiple domains, and realizes cross-domain resource sharing and unified authentication through trust relationships. It provides the advantages of flexibility, security and simplified management, and is suitable for AD environments of medium and large organizations.

Domain Controller

A server that plays a key role in a Windows Active Directory environment. It is responsible for storing and managing the directory service database in the domain, providing functions such as user authentication, authorization, and resource management.

The main responsibilities of a domain controller include:

  1. User authentication: Domain controllers are responsible for authenticating users, verifying the accuracy of their usernames and passwords. Through authentication, users can gain access to resources within the domain.

  2. Directory service: Domain controllers store and manage the directory service database in the domain, which contains information about all users, groups, computer objects, and other network resources in the organization. Domain controllers provide users and administrators with the ability to find and access these objects through directory services.

  3. Certificate Services: A domain controller can act as a certificate authority (Certificate Authority) for issuing and managing digital certificates. Digital certificates are used for encrypted communication and identity verification, providing network security and data protection functions.

  4. Organizational structure management: Domain controllers allow administrators to manage and configure the organizational structure in the domain, including organizational units (OUs), groups, policies, and more for users and computers. Administrators can manage users and resources in the organization through the domain controller to achieve flexible authority control and management.

  5. Monitoring and Auditing: Domain controllers are responsible for monitoring activity within the domain and recording logs for security auditing. This includes user login and logout events, resource access records, and more. With the audit function, administrators can track and analyze the activities taking place in the domain to ensure the security and compliance of the network.

It should be noted that domain controllers are usually deployed in the form of multiple servers to provide high availability and load balancing. One of the domain controllers is designated as the primary controller (Primary Domain Controller, PDC), and the other domain controllers play the role of backup controllers (Backup Domain Controller, BDC). The main controller is responsible for processing changes and updates in the domain, and synchronizes the information to the backup controller to ensure reliable operation of the domain and data consistency.

To sum up, the domain controller is a crucial server in the Windows Active Directory environment, responsible for storing and managing the directory service database in the domain, and providing functions such as user authentication, resource management, and security auditing. It is a key component for user authentication and access control.

trust relationship

Trust Relationship (Trust Relationship) refers to the relationship of mutual trust and cooperation established between two or more domains (or domain trees, domain forests) in computer networks. Through the trust relationship, different domains can recognize and authorize each other to realize resource sharing, authentication and access control.

In a Windows Active Directory environment, there are the following types of trust relationships:

  1. One-way trust: One-way trust means that one domain trusts another domain, but the trusted domain does not trust the domain that initiated the trust. A one-way trust allows users in the trusting domain to access resources in the trusted domain, but not vice versa.

  2. Two-way trust: Two-way trust means that two domains trust each other, which can realize two-way resource sharing and authentication. Two-way trust is the most common type of trust relationship, and it is often used between enterprises and organizations that have a mutual cooperative relationship.

  3. External trust: External trust refers to the trust relationship established between different AD forests (Forest). An AD forest is a collection of multiple domain trees, and each AD forest has its own independent namespace and directory service. External trusts allow domains in different forests to interoperate, enabling cross-forest resource sharing and access control.

Establishing a trust relationship requires appropriate configuration and authentication settings. Through trust relationships, users between domains can access resources across domains without creating the same user accounts in each domain. This simplifies management and reduces redundancy, improving the overall efficiency and security of the organization.

It should be noted that establishing a trust relationship requires ensuring security and proper permission configuration and monitoring. Misuse or misconfiguration of trust relationships can lead to security breaches and information disclosure. Therefore, when establishing and managing trust relationships, organizations should follow security best practices and regularly review and update trust relationship settings.

Trust relationship is a cooperation and mutual trust mechanism established between different domains in a computer network. It allows sharing of resources between domains, implementing authentication and access control. By configuring proper trust relationships, organizations can increase productivity and security.

DNS and AD domain

DNS (Domain Name System) and AD domain (Active Directory Domain) are closely related in the Windows environment, and there is a close relationship between them.

DNS is a distributed naming system used on the Internet to translate domain names into IP addresses. It can map user-friendly domain names
to corresponding IP addresses. DNS plays a role in finding and locating resources in the network.

In a Windows environment, the AD domain uses DNS as part of its infrastructure. AD domains rely on DNS to store and manage directory service databases in the domain. Each domain controller registers its own DNS records so that other computers can find them through domain name resolution.

The domain controller in the AD domain usually also acts as a DNS server. The DNS services running on these domain controllers are known as AD-integrated DNS or DNS zones. The AD-integrated DNS is different from the traditional independent DNS server. It stores all resource records in the domain, including information of domain controllers, users, computers and other objects.

Through AD-integrated DNS, client computers can find and access resources in the domain through domain name resolution. When a user logs in to a domain, the client will send a DNS query request to the domain controller to obtain the IP address of the domain controller, and use this IP address for authentication and access control.

The relationship between AD domain and DNS is also reflected in the following aspects:

  1. Dynamic DNS Updates: AD domains allow dynamic DNS updates, which automatically update DNS records when objects in the domain change. For example, when new users or computers are added, related DNS entries are automatically created and updated.

  2. Hostname resolution: Computers in an AD domain usually have hostnames corresponding to their domain names. Through DNS host name resolution, the client can resolve the corresponding IP address according to the computer name.

  3. SRV records: AD domains use SRV records to indicate the location of a particular service. For example, a domain controller's SRV record instructs clients how to find the domain controller.

 

In summary, DNS and AD domains are closely related in Windows environment. The AD domain relies on DNS to store and manage the directory service database in the domain, and realize the search and access of resources such as domain controllers, users, and computers. Through AD-integrated DNS, clients can locate and access resources in the domain through domain name resolution.

The role of DNS on AD domains

DNS (Domain Name System) plays a vital role in AD domain (Active Directory Domain). It works on the AD domain in the following ways:

  1. Domain name resolution: Computers and other network devices in the AD domain use domain names to identify themselves. DNS is responsible for resolving these domain names to their corresponding IP addresses. When client computers need to access resources in the AD domain, they will send a query request to the DNS server to obtain the IP address of the corresponding resource. Domain name resolution is the basis for realizing communication between the client and the AD domain.

  2. Domain controller lookup: The AD domain manages and maintains the directory service database through the domain controller. The client uses DNS resolution to find the domain controller in the domain to which it belongs. Using the domain name resolution function provided by DNS, the client can find the appropriate domain controller through the domain name, and establish a connection with it for authentication and access control.

  3. Dynamic update: AD domains allow dynamic DNS updates, which means that when objects in the AD domain (such as users, computers, groups, etc.) are created, modified or deleted, the related DNS entries will also be updated automatically. This ensures consistency between the AD domain and DNS, and when the AD domain objects change, the DNS records are updated accordingly.

  4. SRV records: AD domains use SRV records (Service Records) to indicate the location of specific services. For example, an SRV record for a domain controller tells clients how to find a domain controller, and an SRV record for an LDAP service tells clients how to find a server that provides LDAP services. SRV records enable clients to locate and connect to specific services in the AD domain.

  5. Security: The security of AD domain depends on the security function of DNS. By using the Security Extended DNS protocol (DNSSEC) and other security mechanisms, the authenticity and integrity of DNS queries can be ensured, and attacks such as DNS spoofing and hijacking can be prevented, thereby protecting the security of the AD domain.

 

In conclusion, DNS plays a very important role in AD domain. It is responsible for resolving the domain name to an IP address and realizing the communication between the client and the domain controller. Through dynamic updates and SRV records, it ensures the consistency of domain objects and DNS records, and enables clients to accurately locate and connect to resources and services in the AD domain. At the same time, the security function of DNS also plays a key role in the security of AD domain.

AD domain has some specific requirements for DNS

To ensure its proper functioning and efficient management of resources in the domain. The following are the AD domain's requirements for DNS:

  1. Dynamic update: AD domain requires DNS to support dynamic update, which means that when objects in the AD domain (such as users, computers, groups, etc.) change, the relevant DNS records can be automatically updated. This can maintain consistency between the AD domain and DNS, and ensure that clients can accurately find resources in the domain through DNS resolution.

  2. Security: AD domain requires DNS to have certain security. DNS Security Extensible Protocol (DNSSEC) is a mechanism used to enhance DNS security to prevent attacks such as DNS spoofing and hijacking. AD domain recommends enabling DNSSEC to ensure the authenticity and integrity of DNS queries.

  3. Support for SRV records: AD domains use SRV records to indicate the location of specific services. The SRV record of the domain controller tells the client how to locate the domain controller, and the SRV record of the LDAP service tells the client how to locate the LDAP server. Therefore, the DNS server must support SRV records to meet the service location requirements of the AD domain.

  4. Support for zone transfers: AD domains typically have DNS as part of their infrastructure and run DNS services on domain controllers. Zone transfers are required between domain controllers to ensure replication and synchronization of DNS data. Therefore, the DNS server must support the zone transfer function to meet the data replication requirements of the AD domain.

  5. Support reverse query: AD domain also requires DNS to support reverse domain name resolution, that is, to resolve IP addresses to corresponding domain names. This is important for identifying and verifying the identity of network devices, especially for logging and auditing purposes.

AD domains have some specific requirements for DNS. In addition to supporting dynamic updates, security, and SRV records, the DNS server should also support zone transfer and reverse query functions to meet the AD domain's requirements for resource management and domain controller location. These requirements help ensure proper functioning and effective management of AD domains.

SRV records (Service Records)

is a special type of DNS record used to indicate the location of a particular service. It provides a mechanism that enables clients to locate and connect to the appropriate server based on the service type and protocol.

An SRV record consists of the following parts:

  1. Service Name: Specifies the service name corresponding to the server that provides the service. For example, common service names include " ldap" (LDAP service), " ftp" (FTP service), "_sip" (SIP service), etc.

  2. Protocol Type: Specifies the network communication protocol used by the service, such as TCP, UDP, etc.

  3. Service Weight: Among servers with the same priority, it indicates the relative weight of the server being selected. A higher weight value indicates a greater probability of the server being selected.

  4. Service Priority: Used to specify servers with different priorities. A server with a lower priority will only be selected if a server with a higher priority is unavailable.

  5. Service Port: Specifies the port number used by the server that provides the service.

  6. Target Host: Indicates the domain name of the server that provides the service.

By parsing the SRV record, the client can locate the target host and connect to the corresponding service according to the service name, protocol type and priority. For example, when a client needs to connect to a domain controller in an AD domain, it can obtain the IP address and port number of the domain controller by parsing the SRV record of the domain controller, and then establish a connection with it for authentication and access control.

Group Policy

 

 

 

baseline configuration

Identification

 The SAM file is similar to the /etc/shadow file under linux. By default, only the system user can read and write

SID The unique identifier of the user

 

 

 

 

 

 

 

 

 

 

 

 Access control  

 

 

 

Windows file permission characteristics  

 

 

 

 

 

 

 

 

security audit

 

 There is no audit by default, and the Equal Protection Assessment requires event auditing to be turned on

Serve

 

 

 

 

Protection of residual information  

 

clean up virtual memory 

 

Intrusion Prevention  

Use WSUS server to update the operating system in the intranet

Enable DEP

 

 

Malicious code prevention

 

 

Three-thread technology (main thread, monitor thread, daemon thread)

 

 

 

 

Guess you like

Origin blog.csdn.net/bbq1234564/article/details/132319879