Agent.p is a combination of two well known open source rootkit drivers: fu and JiurlPortHide.
It is often dropped and controlled by a user-mode malware component.
The user-mode component instructs the driver to hide its process, inbound and outbound TCP connections it has opened, and the driver module itself.
Agent.p is installed by the user-mode malware component utilizing it. The user-mode component drops, installs and loads the driver. This results in one registry key:
where [driver_name] represents the name of the driver file without the .sys extension.
often the driver has been named as "rdriv.sys".
Agent.p is able to hide the following items:
- Kernel-mode modules
- Inbound and outbound TCP connections
Process and kernel-mode module hiding is based on fu (see fu description) source code. TCP connection hiding is based on the source code of JiurlPortHide with minor modifications.
To hide TCP connections, Agent.p replaces the function pointer for the NtDeviceIoControlFile from the kernel's System Service Table with its own hook function.
The hook function filters IOCTL_TCP_QUERY_INFORMATION_EX requests to the TCP/IP driver and removes any entry where source or destination port are any of the following: