'Does reading network packets access a process' memory space?

On a given computer, does reading network packets, destined for a given process, using a raw socket or a driver such as npcap access said process' memory space? In other terms, can the process (coded appropriately and forcibly ran as admin), be aware that its network traffic is being read? For more context, I am talking Windows 10, no packet editing of any sort. Here a snippet of how I open the socket (UDP) on Python:

import socket

HOST = socket.gethostbyname(socket.gethostname())
        s = socket.socket(socket.AF_INET, socket.SOCK_RAW,
                          socket.IPPROTO_UDP)
        s.bind((HOST, 0))
        s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)

        while self._isRunning is True:
            data = s.recv(4096)
            # <code accessing data...>


Solution 1:[1]

On a given computer, does reading network packets, destined for a given process, using a raw socket or a driver such as npcap access said process' memory space?

If you mean that the program reading the network packets is a separate program from the program running in the process to which the packets are destined, then the answer is "no". In both cases, the packets are being delivered separately to both processes by the kernel; they're not being extracted from the address space of one process and delivered to another.

In other terms, can the process (coded appropriately and forcibly ran as admin), be aware that its network traffic is being read?

No.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user16139739