Defeating Windows Personal Firewalls

深入大模型-52-Harness综述之(二)四大子系统 一个Harness都由四个子系统拼成,Agentic Loop是主干,四个子系统是Tool系统、Memory & Context、Guardrails,再加上一个把它们优雅组织起来的Skill系统。 阅读详情
ã2005 VigilantMinds Inc. All rights reserved.
1
Defeating Windows Personal Firewalls:
Filtering Methodologies, Attacks, and Defenses
Chris Ries
Security Research Analyst
VigilantMinds Inc.
4736 Penn Avenue
Pittsburgh, PA 15224
info@vigilantminds.com
ã2005 VigilantMinds Inc. All rights reserved.
2
1. Introduction
Microsoft Windows provides a variety of methods by which security software can perform network
traffic filtering and other security-related tasks. However, these same capabilities can be used by
malicious software, also known as malware, to tap into the operating system’s network
architecture in order to circumvent security software, open backdoors, and steal information. A
number of articles have been published that discuss and compare the features of different
software firewalls, but there are few resources that explore the filtering techniques that these
firewalls use. Understanding these filtering techniques is not only useful for choosing a software
firewall and troubleshooting problems with it, but it also helps to understand, detect, and prevent
the malware threats that exploit inherent weaknesses in them.
This paper provides a better understanding of how network traffic is processed by Microsoft
Windows operating systems, and how various security tools such as personal firewalls and host
intrusion prevention systems monitor network activity to protect a system. It also explores how
malware can attack the networking architecture of Windows to disable or circumvent some of
these security tools and steal information. The paper focuses on the processing path of TCP/IP
network traffic, although most other protocols follow a similar path.
ã2005 VigilantMinds Inc. All rights reserved.
3
2. Windows Network Architecture
From the time network traffic reaches a host's Network Interface Card (NIC) until the time it
reaches the application, it is subject to processing at many different layers. Traffic headed to the
network from an application follows a very similar processing path. Before discussing the security
capabilities provided by each layer, we will first explore the layers themselves. The complete
processing path of network traffic is very complex, so only the basic layers are covered. For
more detailed information on the processing path see Microsoft Windows Internals, Fourth Edition
[1]. Note that these processing layers do not have a one-to-one correspondence with the OSI
model layers.
Layer Example
Applications IE
Network
API
Winsock
User mode
TDI (interface) Kernel mode
Network
Protocol
Layer
TCPIP.SYS
NDIS (interface)
Figure 1: Basic layers of Windows network architecture.
NDIS
The Network Driver Interface Specification (NDIS) layer is the first layer that incoming network
traffic passes through. The specification’s purpose is to define a standard interface that higher
level protocols can use to communicate with NICs. The interface provides a library of wrapper
functions for communicating with the NIC card. The NDIS layer acts as an interface between the
datalink layer (layer 2) and the network layer (layer 3) of the OSI model.
Network Protocol Layer
The Network Protocol Layer is the level at which network and transport layer protocols (layers 3
and 4) are implemented. For example, TCPIP.SYS, which implements the TCP/IP stack in
Windows, sits at this layer. Below it, the network protocol layer communicates with NDIS. Higher
layers can communicate with the Network Protocol Layer via the TDI.
TDI
The Transport Data Interface (TDI) exists in the upper edge of the kernel portion of the transport
protocol stack and provides a set of functions by which clients, such as Winsock, can
communicate with lower-level transport providers, such as the TCP/IP protocol driver.
Network API
The Network Application Programming Interface (API) layer operates in user mode and is the
layer used by most applications for network communication. The most commonly used Network
API in Windows is the Winsock API. It communicates with applications above it, and with
transport providers via the TDI below it.
ã2005 VigilantMinds Inc. All rights reserved.
4
3. Security Capabilities of Layers
Every layer of processing provides its own filtering capabilities, each of which has its own
advantages and disadvantages. If processing is done at a lower layer, more packet information,
such as header flags, is available for inspection. However, at a lower layer traffic is seen before
actions such as reassembly have occurred. As a result, these actions need to be duplicated,
which has a performance impact. At higher layers these processing actions do not need to be
duplicated, and associations can be more easily made between traffic and applications.
However, higher layers do not protect the kernel code that processes packets, and can also be
bypassed more easily by malware.
This section explores the security capabilities provided by each processing layer, as well as their
advantages and disadvantages.
Layer Example Filtering
Applications IE
Network API Winsock Winsock LSP User mode
TDI (interface) TDI Filter driver Kernel mode
Network
Protocol Layer
TCPIP.SYS Filter-hook driver
Firewall-hook driver
NDIS (interface) NDIS-hooking driver
Intermediate driver
Figure 2: Filtering available for Windows network layers.
NDIS
Since NDIS filtering occurs at such a low level, filtering can be performed according to data from
layer 3 and above. This includes IP headers, TCP/UDP/ICMP headers, as well as any
application layer data. However, since none of this data has been parsed or dissected, the filter
will have to process the packet itself.
Filtering can be performed at the NDIS layer by either loading an Intermediate Driver or an NDIShooking
filter driver. The Intermediate Driver is installed into the NDIS between the bottom layer
which communicates with the NIC and the top layer which provides the NDIS interface to protocol
drivers. NDIS-hooking filter drivers accomplish the same task, but they go about it a little
differently. These drivers hook some of the NDIS wrapper functions so that they can intercept
every call to them. For more information on NDIS-hooking drivers, see Firewall For Windows [2].
The advantage of filtering at the NDIS layer is that it occurs at the lowest possible layer. This
makes it very difficult to bypass, and exposes less of the operating system’s TCP/IP stack to
unwanted traffic. This layer can be used to filter both incoming and outgoing packets, and can
inspect packets moving to and from protocol drivers other than the one for the TCP/IP stack.
Because they operate at such a low level, NDIS filters inspect traffic before actions such as
packet reassembly have occurred. As a result NDIS filters must perform these actions before
filtering can occur. The NDIS layer also does not provide any stateful filtering, and since traffic is
inspected multiple layers below the application, it is more difficult to associate traffic with
ã2005 VigilantMinds Inc. All rights reserved.
5
processes. Despite the drawbacks of filtering at the NDIS layer, it is the filtering method
recommended for third-party software firewalls by Microsoft because it provides the ability to
protect the entire TCP/IP stack.
Network Protocol Layer
There are a variety of different ways in which traffic can be filtered at the TCP/IP network protocol
layer.
Filter-hook driver. Microsoft has supported the ability for a filter-hook driver to be
installed since the release of the Windows 2000 operating system. The driver
implements a function, which is used by the system-supplied IP filter to determine which
incoming and outgoing packets to allow and which to drop. Even though the filter-hook
driver is simpler to implement than NDIS layer filtering options, only one can be used at a
time. It also exposes more of the operating system to potentially malicious traffic than
NDIS filtering does. In addition, there is no built-in support for stateful filtering. For more
information on filter-hook drivers, see [3] and [4].
RRAS Packet Filtering API. Microsoft also added the ability in Windows 2000 for user
mode applications to apply traffic filtering rules using an API available with the Routing
and Remote Access Service. This API has the advantage of being easy to use and
accessible from user mode. However, filtering can only be performed according to
limited layer 3 and 4 information such as source and destination IP address and port, as
well as limited flags. More information on the Packet Filtering API can be found at [5].
Firewall-hook drivers and the Windows XP Firewall. Microsoft added support for
firewall-hook drivers with the release of Windows 2000. These drivers work similarly to
filter-hook drivers, the main difference being that more than one filter can be applied at a
time.
With the release of Windows XP, Microsoft added a built-in firewall with stateful filtering
capabilities. This firewall was designed to be an easy to use lightweight firewall, and was
implemented as a firewall-hook driver called IPNat.sys. As the name suggests, the
firewall is also capable of performing Network Address Translation (NAT). To configure
and manage this firewall from user mode, Microsoft added the Internet Connection
Firewall (ICF) API, which was replaced by the Windows Firewall API in Service Pack 2.
The Windows XP Firewall can perform filtering based on limited layer 3 and 4
information, such as IP addresses and ports. Rules can also be created to allow or deny
certain network activity by specific applications. It provides incoming filtering of TCP,
UDP, and ICMP traffic, with the ability to open ports by adding applications that use them
to an “exceptions” list, or by creating port mappings to be used by NAT. It is important to
note that the only outbound filtering that is offered through the Windows Firewall API is
for the ICMP protocol.
The Windows XP Firewall was in no way intended to be a heavy -duty firewall, and
therefore it is lacking in a number of areas, the most obvious of which is the ability to filter
outbound traffic. The firewall also provides an API for applications to silently open ports
and add programs to the exception list, as well as the capability to disable the firewall
altogether. The Windows Firewall API allows filtering rules to be based on a very limited
amount of information, and since it filters at a higher level it exposes more of the
operating system’s TCP/IP stack to potentially malicious traffic. For Microsoft’s
documentation on the Windows Firewall API, see [6] and [7].
ã2005 VigilantMinds Inc. All rights reserved.
6
TDI
Filtering can be performed at the TDI layer by using a TDI Filter Driver, which is installed between
a TDI client, such as Winsock, and a TDI Provider, such as the TCP/IP Protocol Driver. Since
this filter works above the NDIS layer and protocol driver, it is unable to protect the underlying
TCP/IP stack. TDI filtering can also only be performed according to limited layer 3 and 4 data.
However, it does perform filtering closer to the applications, making it easier to associate traffic
with a specific process. For more information on TDI Filter Drivers, see [8].
Network API
Network API filtering can be performed based on limited network and transport layer data and on
higher layer protocols. There are a variety of ways to apply filtering at the Network API level, each
of which is specific to a particular Network API. Since it is the most common Network API used by
applications, some filtering options for Winsock are discussed here.
Filtering can be accomplished in Winsock by hooking its functions or modifying its DLLs, but the
built-in Service Provider Interface (SPI) provides a much easier method. Winsock’s SPI allows
developers to either create base protocols that work at the lower end of Winsock, or to create
Layered Service Providers (LSP) that are plugged in between a base protocol and the Winsock
API that applications communicate with. These LSPs, along with their base provider, make up a
protocol chain.
Filtering can be accomplished in Winsock by creating an LSP and chaining it above the TCP/IP
base protocol. The LSP can filter any incoming or outgoing connection attempts made by a
Winsock application according to the local and remote IP addresses and ports. Additionally, data
flowing to and from the application can be inspected and filtered.
Figure 3: Winsock’s SPI architecture.
Because it works at such a high level, LSPs are very limited in what they can see. They only see
data flowing to and from applications that use the Winsock API, and they operate at a layer too
high to inspect any layer 3 or 4 header fields from packets. LSPs can still be very effective at
filtering network traffic that is more closely related to applications, such as web filtering, parental
controls, or e-mail filtering. One advantage that LSP filtering has over filters operating at lower
layers is the ability to perform content filtering on data before it is encrypted or after it is
decrypted. Depending on which encryption scheme is in use, lower layer filters may not have
access to data that LSPs can inspect. Additional information on LSPs can be found at [9] and
[10].
Base Protocol
Winsock API
LSP
LSP
ã2005 VigilantMinds Inc. All rights reserved.
7
LSPs can even be used for security purposes other than filtering, such as adding layers of
encryption to protocols. For example, Zone Lab’s IMSecure PRO product uses LSPs to
implement encryption for secure instant messaging [11].
ã2005 VigilantMinds Inc. All rights reserved.
8
4. Attacks Against Filtering Capabilities
Even though these built-in filtering capabilities were intended to be used by security software to
protect a system, they are not impenetrable and can still be susceptible to a variety of attacks.
Additionally, they can be used by attackers and malware to hide and protect themselves from
security tools and users.
For example, if security software can filter malicious traffic, then malicious software can filter
benign traffic such as virus definition updates. If security software can intercept traffic to filter out
malicious attacks, then malicious software can intercept traffic to steal information. In this
section, we will take a look at how an attacker or malicious program can bypass some of these
security capabilities, and how they can be turned against the systems that they are designed to
protect. More importantly, we will also explore how security software can defend itself against
such attacks.
Many of these attacks require administrative privileges to be carried out, which may make them
seem to be less of a risk. It is not uncommon, however, for malware to be run with administrative
privileges. Worms often spread by exploiting vulnerabilities, which in many cases provide remote
administrative privileges to a system. For example, the LSASS vulnerability that Sasser exploited
and the RPC DCOM vulnerability exploited by Blaster both provided administrative access to
hosts. More recently, the Zotob worm exploited a vulnerability in Microsoft’s implementation of
Plug and Play (PNP) to gain remote administrative privileges to Windows 2000 machines. Even
mass-mailing worms and other malware that use social engineering to infect machines are often
run as admin, since it is often a home user running with administrative privileges that executes
the malicious code.
If malware is run with administrative privileges, it may seem pointless to attempt to circumvent it
when it can just be disabled. However, it may be advantageous for malicious individuals or
software to circumvent filtering instead of disabling it, because this makes its presence on the
machine less apparent. Additionally, it is not always possible for malware to simply disable
filtering from user land. If the filtering is performed by a kernel driver that cannot be easily
unloaded, then malware may not be able to disable the filtering without executing code with ring 0
(kernel) privileges. Depending on what other protection mechanisms the security software has
built into it, executing code to disable filtering may be very complex, or even impossible. As a
result, it may be much easier for the malware to simply bypass the filtering instead of disabling it.
Circumventing Filtering
Malware developers may want to circumvent filters on a system for a variety of reasons. If there
are outbound filters in place, then a worm would need to bypass these filters in order to spread to
other machines. If malware tries to open a backdoor either by connecting to an IRC channel or
binding a shell to a port, then filters will need to be bypassed as well. One of the easiest ways
that malware can accomplish this is by disabling the filtering altogether. However, as we
previously mentioned, this is not very stealthy, and is not always easy to accomplish. Therefore,
it is worth exploring the circumvention of filtering without disabling it. Methods that malware can
use to disable filtering altogether are explored later in this section.
If malware is running with administrative privileges, then the simplest way that it could circumvent
filtering is to open up a hole in the firewall. Most software firewalls do not provide a documented
API for applications to do this. However, with the firewall built into Windows XP , an application
can silently open a port. This is only possible with the Windows Firewall because it was meant to
be lightweight and provide limited notifications so as not to bother the user. Most firewalls do not
allow applications to silently open up ports, because it would provide malware with an easy way
around them.
ã2005 VigilantMinds Inc. All rights reserved.
9
Another popular method used to circumvent all but NDIS-level firewalls is to simply bypass the
firewall and communicate directly with lower layers of the protocol stack. For example, if a
firewall is implemented as a TDI filter, then the malware can simply implement its own lightweight
protocol and speak directly to the NDIS interface. This “parallel stack” method is nothing new,
and has been explored in-depth in the past [15][16]. The best way to combat this category of
circumvention is to either implement filtering at the lowest possible interface (NDIS), or to monitor
any protocol drivers that are loaded or unloaded by hooking kernel functions. Both of these
methods involve providing kernel layer protection, which a number of heavy -duty firewalls and
Host Intrusion Prevention Systems (HIPS) already utilize.
Many of the filtering methods provided by the Windows protocol stack can also be used to
implement backdoors. For example, a rootkit could install a filter-hook driver that drops packets
matching particular criteria, but also extracts commands from those packets to execute on the
machine. This approach was implemented in the “Thorny Path” kernel backdoor, which is
discussed in article [17]. A similar backdoor could be implemented as an NDIS-hooking driver or
NDIS intermediate driver. Such a backdoor would be difficult to detect, because the traffic it sent
and received would not be visible to layers above NDIS. Running a packet sniffer such as
ethereal [18] on the compromised host would not show the traffic, since Winpcap’s protocol driver
works above the NDIS at the network protocol layer.
All of the circumvention methods discussed so far require the malware to run with administrative
privileges. If malware is not run with administrative privileges, it cannot open up holes in the
firewall, install its own protocol driver, or install any NDIS drivers. It may still be possible,
however, for malware to sneak through the firewall if it is not running with administrative
privileges. A well-known method that can be used to accomplish this is for the malware to inject
itself into a trusted process [19]. For example, if the firewall already has a rule to allow Internet
Explorer to make outbound connections, then the malware can inject itself into an Internet
Explorer process to gain the process’s privileges. There are a large number of trojans, spyware
programs, and worms that inject themselves into processes that are usually trusted such as
Explorer.exe. Aside from bypassing filtering, this injection technique also makes detection of the
malware more difficult, because it is not visible in the process list. Some variants of the Lovgate
and Korgo worms use this technique [20][21]. This attack has been around for a long time, and
many software firewalls have already addressed it [22]. To combat this attack, security tools can
monitor API calls that are used for process injection. However, this attack is still effective against
a number of popular personal firewalls.
A second method that malware can use to gain the privileges of a trusted application is to use the
application itself. If a trojan needs to download files to install on an infected system, it can just
use the system’s trusted web browser to download these files. If it needs to transmit stolen
information to a remote attacker, it can simply send the information as part of an HTTP request.
This type of attack can be countered by monitoring API calls that are used to create processes,
and to check the parent process of trusted applications to make sure that it is a trusted process.
There are variations of this attack, however, that can bypass these countermeasures. For
example, a malicious process can first create a process such as cmd.exe, and then have the
cmd.exe process create the process for the trusted application. To detect this variation of the
attack, a firewall needs to not only check the trusted application’s parent process, but also check
every parent process above the trusted application. Another variation of the attack is for a
malicious process to launch a trusted application and then terminate itself. If the firewall attempts
to check the trusted application’s parent process, it will not be able to find it. Some firewalls will
respond to this situation by allowing the trusted application to execute instead of notifying the
user that the parent process does not exist and that this is a potential attack. These attack
variations have been implemented in a number of tools, and many firewall vendors have
ã2005 VigilantMinds Inc. All rights reserved.
10
responded by adding protection against them [23].
Disabling Filtering
Most malware today does not need to be sophisticated in order to be effective. As a result, most
malware simply tries to disable any security measures on a system instead of circumventing
them. After all, if a user is naïve enough to execute an email attachment named ‘importantdetails.
pif’, they will probably not notice that their firewall or anti-virus is turned off, and even if
they do they will not interpret this to mean that their machine is infected.
Most malware applications attempt to disable security software by terminating its processes.
Although this may work for some security products, firewalls that work at lower layers such as TDI
and NDIS filters require more than this to be disabled. For example, disabling the drivers
themselves by unloading and uninstalling them would be more effective. An RRAS packetfiltering
driver can also be unloaded in order to disable it. In order to fend off these attacks, the
drivers should make themselves difficult to unload and the kernel functions used to unload the
drivers should be monitored.
Disabling the Windows XP Service Pack 2 Firewall is easy to accomplish. Just as Microsoft
provides API functions for programs to open up holes in it, they also provide functions for
disabling the firewall altogether. This is not a flaw as much as it is the result of the design goals
of an easy to use firewall. This firewall can also be disabled by unloading and uninstalling the
ipnat.sys driver. If this is done, it is not possible to re-enable the firewall until the driver has been
installed and loaded again.
Adding Filters to Block Access to Anti-virus Sites
In order to gain a foothold on infected systems, most malware attempts to disable anti-virus
scanners. This is usually accomplished by either terminating processes with names associated
with well known security tools, or by adding entries to the hosts file that point security-related
domain names at 127.0.0.1. The hosts file is the first place that Windows checks when trying to
find an IP address associated with a hostname. Therefore, by adding these entries to the hosts
file, tools such as anti-virus scanners become unable to download updated signatures, because
the hostname of the signature download site points to the loopback IP address. Without new
signatures, the scanner cannot detect the new malware, which allows it to safely remain on the
system. As effective as they may be, these methods of disabling anti-virus tools are easy to
detect. A user or scanner simply needs to check the hosts file and running process list. A variety
of tools, such as Hijackthis [12], make discovering and removing such malware easy.
An alternative approach that malware could take is to add filters that block access to the security
sites. This is just as effective as modifying the hosts file, except that it is much more difficult to
detect, especially considering that filtering can be applied at so many different layers.
The Fantibag family of trojans uses this approach to block access to anti-virus sites [13][14]. It
uses the RRAS packet filtering API to accomplish this task, probably because the API is easy to
use and can be reached from user mode. The trojan also uses the API to block access to
Microsoft sites, preventing infected computers from downloading the latest patches. In order to
detect and prevent this attack, security software should monitor the APIs that are used to apply
filtering. It should also ensure that no attempts are made to load filtering drivers at any layer.
ã2005 VigilantMinds Inc. All rights reserved.
11
Stealing Information
Given the dramatic increase in spyware and adware over the past few years, it is obvious that
one of the primary goals of malware developers today is to gather and steal information from
compromised systems. Usually this is accomplished by searching the registry and files, and by
monitoring keystrokes. However, there are a number of spyware, adware, and trojan programs in
the wild that insert themselves into the Windows networking stack to intercept data as it passes
through. There are rootkit and bot variants, for example, that install Winpcap on infected
machines, which allows them to run packet capturing utilities. Malicious code can also install TDI
or NDIS hooks to intercept traffic as it passes through.
One method used by a wide variety of malware for nefarious purposes is Winsock LSPs. Various
adware applications, such as SpywareNuker, install themselves as LSPs to monitor a user’s web
surfing habits [24]. Since they are installed below the application layer, they can monitor users
despite what browser is being used, as long as the browser uses Winsock. Some trojans, such
as Kika [25], monitor traffic passing to and from Winsock applications for login names and
passwords by searching for keywords that are used in protocols right before logins. There are
even commercial spyware products that install themselves as LSPs in order to monitor user’s
activities. For example, Tropsoft sells a product called Winvestigator that uses LSPs to monitor
users’ network activities [26]. LSPs can even be used to set up a backdoor to a system, which is
discussed in article [27]. Since firewalls are primarily responsible for filtering incoming and
outgoing data, most of them do not monitor the installation of LSPs, so they will not detect or
prevent these types of threats.
One problem that often arises with malware that uses LSPs is that removal can break the LSP
chain, and therefore disrupt network access for any applications using Winsock. In these cases
tools such as LSPFix [28] can be used to repair the problem. Such tools can also be used to
detect any malware that has inserted itself as an LSP.
For a more comprehensive list of adware, spyware, and trojans that use LSPs see [29].
ã2005 VigilantMinds Inc. All rights reserved.
12
5. Protection From Filtering Attacks
Many of the attacks discussed in the previous section pose a serious risk. They could allow an
infected system to propagate a worm to other hosts on a network, or facilitate an attacker in
gaining a foothold on a system and keeping it secret. Therefore, it is necessary that software
firewalls implement protection against these types of attacks. Protection not only involves filtering
network traffic, but also includes monitoring processes’ behavior, protecting the registry, drivers,
and system files, and protecting the security software itself.
In this section, the countermeasures mentioned briefly in the previous section are explored in
greater detail. The technical details of some methods that firewalls can use to prevent these
attacks are examined. Additionally, countermeasures that system administrators and users can
take are discussed.
NDIS Layer Filtering
In order to mitigate the risk of bypassing attacks, filtering should be performed at the NDIS layer.
If filtering is performed at a higher layer, it is usually a trivial task to bypass it by using the parallel
stack technique. Higher layer filtering also exposes at least part of the protocol stack to
potentially malicious traffic. NDIS filtering is not perfect, but many of its weaknesses can be
remedied by performing additional filtering at higher layers. Despite its weaknesses, NDIS layer
filtering is still the most effective single approach to packet filtering in Windows, which is why
Microsoft recommends it over any other filtering method.
The level of security provided by the NDIS layer comes with the price of a more complex
implementation, because tasks such as reassembly that occur higher in the processing path need
to be duplicated by the filtering code. The result of this complexity is greater performance
overhead when it is implemented properly. In order to simplify the implementation and reduce
overhead, some filtering can be performed at higher layers in addition to the NDIS layer.
Additional higher layer filtering will eliminate the need to duplicate processing actions, and could
also provide access to data that may not be visible at the NDIS layer due to encryption.
Driver Protection
Many of Window’s packet-filtering techniques are implemented as filtering drivers. As a result, it
is necessary to protect these drivers from being unloaded and uninstalled by malware in an
attempt to disable the filtering. Many of the attacks discussed in the previous section are also
accomplished by installing drivers. For example, attackers can install a protocol driver to bypass
higher layer filtering, or can install an NDIS driver to act as a backdoor. Since a driver’s code is
executed with kernel privileges, rootkits often install drivers in order to attack various parts of the
kernel, such as the Interrupt Descriptor Table [IDT], System Service Descriptor Table [SSDT],
and various devi ce drivers [40].
To combat these types of attacks it is necessary to monitor the loading and unloading of drivers.
Drivers can be loaded and unloaded using a number of different methods, and all of these
methods should be closely watched. For example, various functions can be used to install, load,
unload, and uninstall drivers, such as CreateService(), StartService(), ControlService(),
DeleteService(), NtLoadDriver() and NtUnloadDriver(). These functions, as well as the registry
keys that they store information in, should be monitored to protect security-related drivers and to
prevent malicious drivers from sneaking into ring 0.
To help prevent malicious code from unloading them, filtering drivers can also incorporate
protective measures into their unloading routines, or they can simply not implement an unload
routine. This will not prevent a filtering driver from being unloaded, but it will make it more difficult
ã2005 VigilantMinds Inc. All rights reserved.
13
because the driver cannot be removed from memory without a reboot. To prevent the filtering
driver from being unloaded, additional measures, such as registry and API call monitoring, can be
performed.
API Call Monitoring and Kernel Hooking
A number of the attacks discussed earlier in the paper are performed using Win32 and Native API
calls. For example, an LSP is usually installed by either using functions provided by the Winsock
API, or by manipulating the registry using Win32 API functions. Process launching and injection
techniques used to hijack trusted applications are also usually carried out using a number of
different Win32 API calls. For example, one method of performing DLL injection is to use the
CreateRemoteThread() API call to load a DLL into a process’ memory and begin execution of its
code. Some of the filtering methods available in Windows also provide an API for adding filtering
rules, and malware can use these APIs to block access to anti-virus sites.
Security software can detect and prevent many of these attacks by intercepting calls to the API
functions used to carry them out. For example, a software firewall can monitor Winsock’s API
functions associated with installing LSPs, and prompt the user every time these functions are
called. The user can then determine if they trust the application to perform the given action, and
can allow or deny the action accordingly.
API calls are usually intercepted by hooking the API functions either in the binary file or at runtime
in memory. It does not make sense for security software to modify every binary on the
system, so performing hooking at run-time is a better approach. Hooking should also be done at
the lowest possible level, so that it cannot be bypassed by malware. For example, there are a
variety of Win32 API calls that can be used to create a process, such as WinExec(),
CreateProcessA(), CreateProcessW(), and CreateProcessAsUser(). However, all of these
different functions use the same Native API calls, such as NTCreateProcess() and
NtCreateThread(). If security software were to only hook the Win32 API calls, then malware
could bypass the hooks by calling the underlying Native API calls, which are accessible in user
land via NTDLL.DLL.
The lower the interc eption is performed the harder it is to bypass. For the best level of security,
interception should take place at the lowest possible level in the kernel. This can be
accomplished by hooking the SSDT, IDT, or by hooking various routines in device drivers. For
more information, see [40].
Call hooking is not only useful for preventing filtering attacks, it can also be used to protect the
security software itself. It can be used to prevent firewall-related processes from being
terminated, and registry keys associated with the firewall from being modified or deleted. It can
also be used to protect security-related files such as the policy file. Of course, if call hooking is
being used to protect the host and security software itself, then measures must be taken to
prevent the removal of these hooks. How this is accomplished varies depending on the hooking
method that is being used.
Administrator and User Countermeasures
Good security practices are important to help prevent intrusion and compromise in the first place.
Strong passwords, up to date patches, and up to date anti-virus signatures are all proactive
measures that can mitigate the risk of the attacks discussed in this paper. Regularly scanning a
computer with anti-virus and anti-spyware tools can also help to detect and stop these attacks. All
security software installed on a system should be configured for the highest level of security. For
example, a number of the tested software firewalls provided protection against some of the
attacks, but the protection was disabled by default. Configuration and preferences should be
ã2005 VigilantMinds Inc. All rights reserved.
14
checked to ensure that the most secure options are enabled.
Additionally, administrators and users can choose security software that protects against these
attacks, or they can use supplementary tools to detect and prevent the specific attacks that affect
their software firewall. A tool such as Processguard [30] can be used to protect against many of
the launching and injection attacks used by various malware applications. Additionally, tools such
as HijackThis [12] and LSPFix [28] can be used to analyze installed LSPs for possible malware. It
is much more effective, however, to use software that protects against these attacks than to try to
make combinations of different tools to cover all of the bases. If a particular vendor does not
provide adequate protection against these attacks in their personal firewall, they may offer
another product that does, such as a HIPS.
ã2005 VigilantMinds Inc. All rights reserved.
15
6. Conclusion
Microsoft Windows provides a variety of different methods for monitoring and filtering network
traffic, each of which has its advantages and disadvantages. Although there is no perfect
method, it usually makes sense to deploy filtering at multiple layers. Filtering at lower layers
makes it more difficult for malware to circumvent the firewall, while higher layer filtering usually
allows easier associations between network traffic and processes.
Although these methods were designed to be used for well intentioned purposes, malicious code
can also use these same capabilities for nefarious purposes. They can be used to bypass or
disable security software, implant backdoors into the system, and steal information.
Most personal firewalls are very effective at preventing external attackers from successfully
compromising a system. However, detecting and preventing local attackers and malware from
circumventing outbound filtering is an issue that is less frequently addressed. To combat these
types of threats, security software must extend its responsibilities beyond traffic filtering. It needs
to audit process’ behavior, monitor certain parts of the kernel, and implement self-defense
mechanisms. While some personal firewalls do provide this level of security, these protection
mechanisms are more common in HIPS products, and many of the vendors that do not
incorporate protection into their personal firewall products do so in their HIPS.
In their next generation of Windows Operating Systems, called Vista (codenamed Longhorn),
Microsoft has added the Windows Filtering Platform, which includes improved access to the
packet processing path [31]. This architecture has been designed to allow third party firewall,
anti-virus and intrusion detection software to be installed into the protocol stack much more
easily. Like the current architecture, it also allows filtering to be performed at multiple layers.
ã2005 VigilantMinds Inc. All rights reserved.
16
7. Firewall Tests
Table 1: Resources for Attacks that can be performed against Windows software firewalls.
Attack Category Description Tool(s)
Process
Injection
Bypass This attack is carried out by injecting code (usually by
injecting a DLL) into a trusted application’s process in
order to take advantage of its privileges. If an
application such as Internet Explorer has been granted
network access by the firewall, then malware could
inject a DLL into IE and bypass the firewall. This attack
can be prevented by monitoring API calls used to inject
code into processes, such as OpenProcess() and
CreateRemoteThread().
PCAudit2,
Firehole,
Thermite,
all available at
http://www.firewallleakt
ester.com.
Launching Bypass An application can perform this attack by launching a
trusted application in order to use its privileges. For
example, if Internet Explorer has been granted network
access by the firewall, then a trojan could use IE to
download files from the Internet, or to report back to a
remote host. This attack can be prevented by
monitoring API calls that are used to create processes.
If a process attempts to launch a trusted application,
then the firewall can notify the user of this activity.
WallBreaker,
available at
http://www.firewallleakt
ester.com.
Launching -
Indirect
Bypass This is a variation of the launching attack, where
malware uses cmd.exe or explorer.exe to indirectly
launch an application that is trusted by the firewall.
Wallbreaker,
available at
http://www.firewallleakt
ester.com.
Launching -
Timing
Bypass This is a variation of the launching attack, where a
malicious process launches a trusted application, then
terminates its own process. When the firewall checks
the process that has attempted to launch a trusted
application, it will not be able to find the process since it
has been terminated. As a result, some firewalls will not
notify the user of the launch.
Ghost,
available at
http://www.firewallleakt
ester.com.
Parallel
Stack
Bypass This attack involves attempting to bypass filtering that is
performed at higher layers by communicating directly
with the NDIS interface. If the firewall performs filtering
at a layer higher than NDIS, then it will not be able to
see this communication. The attack works by using its
own Network protocol layer driver, so it could be
prevented by either monitoring the loading of protocol
drivers or performing filtering at the NDIS layer.
Winpcap and Nemesis,
available at
http://www.winpcap.org
and
http://www.packetfactor
y.net.
Unloading
Drivers
Disable This attack is performed by attempting to disable any
drivers that are associated with the firewall using a
simple driver loading/unloading utility. Note that there
are more complex methods of unloading drivers that
could be more successful than the simple method used
for this test.
Drvloader, available at
http://www.toolcrypt.org
.
LSP Stealing
Information
This attack attempts to install an LSP, which could be
used for a variety of malicious purposes such as
information theft. This attack could be detected or
prevented by monitoring the installation of LSPs, which
can be accomplished by hooking API calls or watching
the portion of the registry that stores LSP information.
Komodia LSP, available
at
http://www.komodia.co
m.
ã2005 VigilantMinds Inc. All rights reserved.
17
Table 2: Results of performing attacks listed in Table 1 against various software firewalls.
A ‘Pass’ rating implies that the firewall correctly identified and protected against the particular
attack. ‘Fail’ implies that it did not. For tests that used multiple tools, such as ‘Process Injection’,
the firewall needed to protect against all tested tools to pass. Results marked a (*) imply that in
order for the firewall to pass the test, it was necessary to enable options that are not turned on by
default.
Vendor Responses
All vendors were notified of their product’s test results in advance of the release. A summary of
each vendor’s response is provided below.
Since Microsoft does not aim to provide a level of security in their Windows Firewall that would
stop these attacks, they were not concerned with their results.
Sygate acknowledged that their firewall was susceptible to some of the attacks, and stated that
they offer a HIPS product that provides a higher level of security and addresses these issues.
Tiny Software acknowledged that their Raw Packet protection provides defense against the
parallel stack attack.
Zone Labs stated that they are planning to add LSP protection in future releases of ZoneAlarm.
While Symantec (Norton) and McAfee did not comment on the results of their products, they do
offer Host IDS and IPS products that may provide protection against the attacks.
Firewall Version Process
Injection
Launching Parallel
Stack
Unloading
Drivers
LSP
Insertion
McAfee Personal
Firewall Plus
6.1.6144 Fail Fail Fail Fail Fail Pass Fail
Norton Personal Firewall 8.0.5.14 Fail Fail Fail Fail Fail Pass Fail
Sygate Personal Firewall 5.6.2808.0 Pass* Pass Fail Fail Pass Pass Fail
Tiny Desktop Personal
Firewall
6.5.92 Pass Pass Pass Pass Pass* Pass Pass
ZoneAlarm Pro 6.0.631.2 Pass Pass Pass Pass Pass Pass Fail
Windows Firewall XP SP2 Fail Fail Fail Fail Fail Fail Fail
ã2005 VigilantMinds Inc. All rights reserved.
18
References
[1] Russinovich, M.E., Solomon, D.A. Microsoft Windows Internals, Fourth Edition: Microsoft
Windows Server(TM) 2003, Windows XP, and Windows 2000. Microsoft Press; 4th edition.
December 8, 2004.
[2] http://www.ntkernel.com/w&p.php?id=14
[3] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
network/hh/network/fltrhook_65cd5716-ffa7-4fc5-b054-c3adf97344d8.xml.asp
[4] http://www.codeproject.com/internet/FwHookDrv.asp
[5] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
rras/rras/packet_filtering_reference.asp
[6] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
ics/ics/windows_firewall_start_page.asp
[7] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
network/hh/network/firewall_5932d4d9-b61d-472d-8f27-c6a1d26ddc36.xml.asp
[8] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
network/hh/network/303tdi_ffb2fd6d-d03a-4dec-95af-fb9116e151aa.xml.asp
[9] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
winsock/winsock/transport_service_providers_2.asp
[10] http://www.microsoft.com/msj/0599/LayeredService/LayeredService.aspx
[11]http://www.zonelabs.com/store/content/catalog/products/sku_list_imsp.jsp?lid=imlink
[12] http://www.spywareinfo.com/~merijn/downloads.html
[13] http://www.f-secure.com/v-descs/fantibag_b.shtml,
[14] http://securityresponse.symantec.com/avcenter/venc/data/trojan.fantibag.a.html
[15] http://www.dslreports.com/forum/remark,7321041~root=security,1~mode=flat
[16] http://www.dslreports.com/forum/remark,1003666~mode=flat~days=9999
[17] http://www.phrack.org/phrack/62/p62-0x06_Kernel_Mode_Backdoors_for_Windows_NT.txt
[18] http://www.ethereal.com
[19] http://www.phrack.org/phrack/62/p62-
0x0d_Bypassing_Windows_personal_fw_with_process_infection.txt
[20]http://securityresponse.symantec.com/avcenter/venc/data/w32.hllw.lovgate.g@mm.html
[21] http://securityresponse.symantec.com/avcenter/venc/data/w32.korgo.i.html
[22] http://www.sygate.com/alerts/Outbound-Blocking.htm
[23] http://www.firewallleaktester.com
[24] http://securityresponse.symantec.com/avcenter/venc/data/adware.spywarenuker.html
[25] http://securityresponse.symantec.com/avcenter/venc/data/backdoor.kika.a.html
[26] http://www.tropsoft.com/winvestigator/
[27] http://www.securityfocus.com/infocus/1840/2
[28] http://www.cexx.org/lspfix.htm
[29] http://castlecops.com/LSPs.html
[30] http://www.diamondcs.com.au/processguard/
[31] http://www.microsoft.com/whdc/device/network/WFP.mspx
[32] http://www.microsoft.com/technet/community/columns/cableguy/cg0605.mspx
[33] http://www.ndis.com/papers/winpktfilter.htm
[34] http://www.securityfocus.com/infocus/1839/2
[35] http://www.informit.com/articles/article.asp?p=130716
[36] http://www.eeye.com/~data/publish/whitepapers/research/OT20050205.FILE.pdf
[37] http://msdn.microsoft.com/library/default.asp?url=/library/enus/
randz/protocol/windows_tcp_ip_stack.asp
[38] http://www.rootkit.com/newsread.php?newsid=219
[39] http://www.rootkit.com/newsread.php?newsid=253
[40] Hoglund, G., Butler, J. Rootkits : Subverting the Windows Kernel. Addison-Wesley
Professional. July 22, 2005.
RemoveWGAv1.2(去除winXP右下角微软的非正版提示) 一家名为Firewall Leak Tester的个人防火墙软件开发公司推出首个专门屏蔽微软正版验证程序WGA给微软家里打电话的工具软件--RemoveWGA。一旦微软的WGA认证工具确定你使用的是正版Windows,微软就再没有理由接连将你的计算机信息传给微软服务器--在微软本月更新前,你每次开机都会和微软总机打声招呼。Firewall Leak Tester在软件发布备忘中表示。这款工具软件不 立即下载

相关推荐

DEAP数据集实战指南:从脑电信号到情绪分类的完整流程解析

本文提供了DEAP数据集在脑电信号情绪识别领域的完整实战指南。详细解析了数据下载、结构理解、频带功率特征提取等核心步骤,并演示了如何构建和评估机器学习分类模型,为研究者实现从原始脑电信号到情绪分类的完整流程提供了清晰路径。

jj890的博客 909

wga

一家名为Firewall Leak Tester的个人防火墙软件开发公司推出首个专门屏蔽微软正版验证程序WGA“给微软家里打电话”的工具软件--RemoveWGA。 “一旦微软的WGA认证工具确定你使用的是正版Windows,微软就再没有理由接连将你的计算机信息传给微软服务器--在微软本月更新前,你每次开机都会和微软总机打声招呼。”Firewall Leak Tester在软件发布备忘中表示。...

weixin_30624825的博客 158

2026年ERP选型实战:按规模分档,避开成本与实施陷阱

企业资源计划(ERP)是现代企业数字化转型的核心系统,它将财务、供应链、制造、人力等业务整合到统一平台。随着云计算和人工智能技术的发展,ERP已从传统本地部署的记录工具演变为SaaS订阅制、具备AI辅助决策能力的智能运营平台。不同规模企业在选型时的关注点差异巨大:小微企业追求轻量化和快速出报表,中型企业需要在流程标准化与业务灵活性间取得平衡,大型集团则注重多法人管控和数据治理。此外,制造、电商、工程等行业对ERP的模块要求也各有侧重,成本核算数据跑不通更是普遍痛点。如何结合企业规模与行业特征,制定合理的选型

weixin_34320724的博客 380

利用鼠标键盘钩子截获密码

钩子能截获系统并得理发送给其它应用程序的消息,能完成一般程序无法完成的功能。把握钩子的编程方法是很有必要的钩子分类:1、WH_CALLWNDPROC和WH_CALLWNDPROCRET:使你可以监视发送到窗口过程的消息3、WH_DEBUG调试钩子4、WH_FOREGROUNDIDLE当当应用程序的前台线程大概要变成空闲状态时,系统就会调用WH_FOREGROUNDIDL5、WH_JOURNAL

Jinhill's Blog 2183

(nginx) nginx5 nginx https部署实战

综上所述,相比 HTTP 协议,HTTPS 协议增加了很多握手、加密解密等流程,虽然过程很复杂,但其可以保证数据传输的安全。所以在这个互联网膨胀的时代,其中隐藏着各种看不见的危机,为了保证数据的安全,维护网络稳定,建议大家多多推广HTTPS。SSL 证书费用很高,以及其在服务器上的部署、更新维护非常繁琐HTTPS 降低用户访问速度(多次握手)网站改用HTTPS 以后,由HTTP 跳转到 HTTPS 的方式增加了用户访问耗时(多数网站采用302跳转)

weixin_50382197的博客 1505

压电陶瓷传感器避坑指南:实测阻抗匹配对信号输出的影响(附示波器调试技巧)

本文深入探讨压电陶瓷传感器在工业振动监测中的阻抗匹配问题,通过等效电路模型和实测数据揭示负载阻抗对信号输出的关键影响。文章提供从元件选型到示波器调试的完整解决方案,特别强调100kΩ以上负载阻抗的重要性,并分享JFET缓冲器设计和PCB布局的实用技巧,帮助工程师避免信号失真和输出不稳定问题。

ooo22的博客 516

世界顶级防火墙 Look'n Stop 试用心得

Look ’n’ Stop 被誉为世界顶级防火墙!与同类产品相比具有最为突出的强劲功能以及与众不同的特点,不仅功能评测在知名防火墙中是最强的!而且软件大小只有区区600多k十分小巧, 占内存非常小,可以监控dll,更具强大的御防黑客攻击能力!!        Looknstop在2004年度的个人网络防火墙中排名第一(虽然测试可能并不完善),希望能通过本文使更多的上网用户受益。(其强大之处欢迎

严海的专栏 6869

HALCON 20.11实战:5步搞定工业图像异常检测(附完整代码)

本文提供了一份基于HALCON 20.11的工业图像异常检测实战指南。通过五个核心步骤——环境准备、数据预处理、模型训练、推理解析与工程化部署,详细演示了如何利用深度学习技术,仅使用正常样本快速构建并优化金属表面划痕等缺陷的检测模型,并附有完整可运行的HDevelop代码,助力工程师实现高效、智能的工业视觉质检。

weixin_29243279的博客 143

各类防火墙测试

2007年已经2个多月了,回首上年和本年初的网络安全市场可谓是风风火火,再创新高。不仅是杀毒软件,在防火墙的竞争上也非常激烈;很多老品牌陆续更新,包括著名的厂商ZA,OP,Kerio等等;还有出来历史不长的新产品,包括LNS,Comodo,Jetico等等;甚至有些防火墙最近几个月才诞生,包括界面漂亮,典雅的Ashampoo Firewall Pro和PC Tools Firewall Plus等

5377

嵌入式开发实战:如何用cJSON库在STM32上实现轻量级JSON通信(附完整代码)

本文详细介绍了如何在STM32嵌入式系统中使用cJSON库实现高效的JSON通信方案。针对嵌入式环境的内存限制,提供了内存优化策略、cJSON库的深度定制方法以及完整的通信流程实现代码,帮助开发者解决JSON解析效率低下和跨平台兼容性等核心挑战。

star5的专栏 474

ABAP RANGES及比较符号

RANGES *选项介绍: *1.SIGN 值为 I 和 E 。 I是包含, E是排除, 一般使用I。 2.OPTION 如果HIGH 为空 ,为单值选择 。有 EQ、NE、GT、LE、LT等逻辑操作 对于的 CP包含 NP是排除 如果HIGH 不为空 为区间选择 有BT,NB可选 *3.LOW 低值 *4.HIGH 高值 lt:less than 小于 le:less than or equal to 小于等于 eq:equal to 等于 ne:

Pegasus666的博客 5390

循环嵌套(多层 for 循环)

表:order(订单表,order_id, user_id)、user(用户表,user_id, user_name)✅ 优化:先查所有订单,拿到所有 user_id 批量 in 查询,内存 join。✅ 优化:先把优惠券转 HashMap,单层循环查找(hash 查找 O (1))SQL 只有 2 次,O (1) 数据库查询,内存遍历 O (n)。需求:查询所有订单列表,同时带出每个订单对应的用户名称。需求:订单列表、优惠券列表,把订单匹配对应的优惠券名称。复杂度:O (M+N),非常快。

weixin_43732943的博客 215

解决Gradle中NPM命令失效问题

摘要:本文分析了IntelliJ IDEA中Gradle执行npm命令失败的问题,报错显示"npm"文件不存在。通过确认npm安装路径、检查系统PATH与Gradle环境的差异,提出两种解决方案:1) 在build.gradle中使用npm绝对路径;2) 通过launchctl修改用户PATH。实例展示了如何修改Gradle脚本或系统配置来解决该问题,指出跨平台开发中环境变量配置的重要性。文章为开发者提供了处理类似问题的实用方法。

2501_90323865的博客 91

Python+Agent入门笔记(六):记忆和状态,从“一次性问答”到“能用助手”

滑动窗口的缺点很明显:被扔掉的信息就真没了。如果用户第一轮说“我不吃辣”,隔了二十轮让他推荐餐厅,模型已经忘了。定期把旧的对话压缩成一段总结,作为一条特殊的消息插进去。"""把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。"""# 把旧消息拼成纯文本,让模型总结content = f"[工具结果]把除 system 和最近 keep_recent 条以外的消息,压缩成一条摘要。返回新的 messages 列表。

qq_41241612的博客 108

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

【数据结构-5】单链表的实现

单链表,具体来说是单向的、不带头的、不循环的链表。链表由一个一个节点组成,每个节点分为数据域和指针域,数据域存放数据,指针域存放下一节点的地址。这样,就可以根据指针域中的地址找到下一个节点,节点就串起来了构成了单链表。

a bit 215

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

本地chatbot4--引入LangGraph

上一节实现了chatbot的连续调用工具的功能,但目前流程还是提示词→模型→解析→调用工具(可选)→输出线性的一条路走到底(LangChain)只适合简单线性任务(问答、摘要、简单RAG)agent的本质是:“模型决定调工具→执行→结果喂回模型→再决定……直到完成”。举例:读日志 → 解析 ─失败→ 重试(≤3次) ─→ 退出│成功↓算统计 → 对比历史 → 生成报告 → [人工审核卡点] → 发送。

weixin_45859446的博客 103

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

C# 数据结构和特殊类型

.NET Core(现称.NET)提供丰富数据结构,优化性能与开发效率。日常开发首选List<T>和Dictionary<TKey,TValue>;高性能场景推荐Span<T>与Memory<T>减少内存分配;并发环境使用ConcurrentDictionary等线程安全集合;避免非泛型集合如ArrayList。

cccloveforever的博客 746

C++ 入门笔记(十七):list 入门 —— 为什么 list 不能 sort?

第17课:用大白话讲清 list 的双向链表结构、哨兵头、push_back 四步、迭代器封装、merge 与 splice 的区别,以及 vector 排序为什么常比 list 快。

wo_jack的博客 251

list

的底层是双向链表结构,双向链表中每个元素存储在互不相关的独立节点中,在节点中通过指针指向其前一个元素和后一个元素。,因此反向迭代器的实现可以借助正向迭代器,即:反向迭代器内部可以包含一个正向迭代器,对正向迭代器的接口进行包装即可。是可以在常数范围内在任意位置进行插入和删除的序列式容器,并且该容器可以前后双向迭代。迭代到该位置,在这段位置上迭代需要线性的时间开销;最大的缺陷是不支持任意位置的随机访问,比如:要访问。还需要一些额外的空间,以保存每个节点的相关联信息。个元素,必须从已知的位置。

xie0510_的博客 293

3.链表相关知识点

链表

2501_93884468的博客 436

上万数据的批量插入

当数据达到上万上十万的时候,如何批量插入

junxunfs的博客 46

软件商店常见问题标准处理流程

从底层软件源来看,/etc/apt/sources.list配置错误、源地址失效、公网与内网离线源混用、ARM64与x86_64架构源串用,以及DNS解析异常、系统代理配置错误,都会导致商店无法获取应用数据;打开该应用,确认可正常运行;软件商店作为系统内置的图形化软件分发与安装入口(UKUI桌面配套组件,底层依赖APT软件源),承担着应用软件的浏览、搜索、下载、安装、升级与卸载等核心功能,是终端软件部署与管理的关键通道。覆盖软件商店启动、页面加载、应用下载、安装、卸载、搜索、自身更新等全部业务场景。

qq_39496637的博客 307

【AI 开发从入门到进阶 · 10】收官篇:LoRA 微调、模型评估、推理加速与生产部署全链路

本文系统梳理了大模型微调与生产落地的全流程,从决策是否微调、优选LoRA技术方案,到代码实现、效果评估、推理加速与FastAPI服务封装,最终构建可迭代的生产级AI系统。强调“逐级升级”原则,倡导以数据闭环驱动优化,避免技术冲动。全系列贯穿工程化思维,提供可复用模板与实战建议,助力开发者从模型训练迈向稳定可用的AI服务部署。

信息安全领域优质创作者|操作系统领域专家 126

ARIA规范

ARIA用来补充原生HTML缺失的语义,原则:优先原生标签,ARIA仅做补充。 ARIA角色role:定义组件身份,分为地标角色、构件角色、文档角色;构件角色用于自定义弹窗、tab、下拉菜单等复杂组件; ARIA状态与属性:以aria-开头,描述组件实时状态;常用:aria-label、aria-labelledby、aria-describedby、aria-hidden、aria-expanded、aria-selected、aria-modal、aria-live; 常用场景:图标按钮用aria-l

2401_83227843的博客 471

LangGraph(03):状态归约、并行更新与消息管理

并行节点写入报错?历史消息无法清理?本文拆解 LangGraph 状态归约与消息增删改机制,带你精确控制复杂工作流状态。

专注于 Agent 工程、AI 产品、Harness Engineering、LLM 算法等方向,OpenMathModel、Nivik 等开源项目作者 142

LangGraph 的分离思想总结

LangGraph 的分离思想,本质上是对"高内聚、低耦合"这一经典工程原则在 LLM 应用领域的落地。它通过状态与逻辑分离、节点职责分离、控制流与执行分离、计算与持久化分离、编排与实现分离五个层面,把一个难以维护的"大黑盒"拆解成一组可组合、可测试、可观测的部件。理解这套分离思想,比记住 API 更重要——因为当你面对新的智能体场景时,真正指导你做出合理拆分的,正是这些分离原则。

张晨光老师的播客 413
上一篇: Kernel-mode API spying - an ultimate hack
下一篇: Additional_File_Transfer_Methods
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值