Cybereason alerts regarding PAExec used by Medulla
Applies to: Medulla / Cybereason
Version: All
Environment: Windows / On-Premise / SaaS
Category: Security / EDR / Remote Execution
Background
Medulla uses PAExec, an open-source equivalent of PsExec/SysInternals, to perform remote actions on managed Windows workstations:
- Application deployment
- Running scheduled scripts
- Orchestrating tasks from the application Kiosk
- Remediation or maintenance actions
Important: Any security exclusions (EDR, antivirus, or whitelists) must be regularly reassessed to ensure they remain relevant given the context, software versions, and your security policy. It is recommended to apply the most restrictive exclusions possible.
In Medulla, this mechanism is notably used by the following component:
scheduling_launch_kiosk.py
PAExec intentionally behaves similarly to PsExec, a legitimate tool widely used by system administrators but also known as a vector for lateral movement in certain attack scenarios.
Modern EDR solutions, including Cybereason, therefore monitor this type of behavior by default and may trigger an alert or block the process, depending on the enabled protection modules and the applied policy.
Why does Cybereason detect a file named PAExec-XXXX-POSTE.exe?
PAExec operates using a temporary mechanism:
- The PAExec binary is used by Medulla to execute the requested action
- A temporary copy is placed in
C:\Windows\ - This copy is executed as a temporary Windows service
- The service performs the requested action with the necessary privileges
- The service and the temporary file are deleted at the end of the operation
The file name is dynamic:
C:\WINDOWS\PAExec-<PID>-<ComputerName>.exe
Example:
C:\WINDOWS\PAExec-2124-CSE-SDN-ALV-02.exe
The Medulla source binary remains located in:
C:\Program Files\Medulla\bin\paexec.exe
Note: Cybereason can detect or block the temporary copy placed in C:\Windows\, even if the source binary in the Medulla directory is not blocked.
Why does PAExec run under NT AUTHORITY\SYSTEM?
This behavior is normal. The PAExec execution cycle consists of two main phases:
- The binary creates a temporary copy in
C:\Windows\PAExec-*.exe - The copy installs itself as a temporary Windows service
This second phase runs under:
NT AUTHORITY\SYSTEM
with the argument:
-service
Expected behavior: Running under SYSTEM and using the -service argument are normal in the Medulla context.
What Windows events are generated?
|
ID |
Log |
Description |
Expected |
|
7045 |
System |
Installing the temporary PAExec service |
Yes |
|
7036 |
System |
Starting or stopping the PAExec service |
Yes |
|
5145 |
Security |
Access to the |
Yes |
|
5145 |
Security |
Access to the named pipes |
Yes |
|
4648 |
Security |
Authentication with explicit credentials |
Possible |
Events on the following named pipes can be observed, among others:
*-stdin
*-stdout
*-stderr
These pipes are closely monitored by EDRs, as they characterize the operation of PsExec and PAExec.
Why does Cybereason associate this with lateral movement?
Cybereason can detect a set of behaviors typically associated with remote administration tools:
- Copying an executable to
C:\Windows\ - Using the
ADMIN$administrative share - Creating a temporary Windows service
- Running under
NT AUTHORITY\SYSTEM - Communicating via the named pipes
stdin,stdout, andstderr - Deleting the service and the temporary file after execution
These behaviors can occur in two contexts:
- Legitimate use: Medulla or system administration
- Malicious use: lateral movement by an attacker
Important: The exclusion must be as restrictive as possible so as not to compromise the overall security level.
Can I exclude only C:\Program Files\Medulla\bin\paexec.exe?
No, this exclusion alone may not be sufficient.
The file detected by Cybereason may be the following temporary copy:
C:\WINDOWS\PAExec-*.exe
and not just the source binary:
C:\Program Files\Medulla\bin\paexec.exe
Note: The exclusion for the source binary can be kept as a supplement, but it does not necessarily cover the temporary file running as a service in C:\Windows\.
What exclusion is recommended in Cybereason?
In Cybereason, Anti-Malware exclusions are configured in a policy via the System → Policies Management menu. The policy must then be published and assigned to the Sensors corresponding to the workstations managed by Medulla.
Important: The reference procedure used for this documentation describes the creation of Anti-Malware exclusions by path. It does not document exclusions by hash, certificate, parent process, or command line. These methods are therefore not presented as available by default in this procedure.
Step 1 – Log in to the Cybereason console
Log in to the Cybereason administration console with an account that has the necessary permissions to modify and publish security policies.
Step 2 – Open policy management
System
└── Policies Management
Then select:
- the policy currently applied to the affected Windows workstations;
- or a new policy created specifically for workstations managed by Medulla.
Best practice: Creating a dedicated policy makes it easier to control the scope of the exclusion and limits its application to only those workstations managed by Medulla.
Step 3 – Access Anti-Malware exclusions
In the selected policy, open the section:
Anti-Malware
└── Exclusions
Then click:
+ Add New
Step 4 – Add the PAExec Medulla binary exclusion
Add an exclusion for the source binary used by Medulla:
C:\Program Files\Medulla\bin\paexec.exe
This exclusion covers the binary installed with the Medulla agent.
However, it may not be sufficient if Cybereason blocks the temporary copy created in the C:\Windows\ directory.
Step 5 – Add the PAExec temporary copy exclusion
PAExec temporarily creates a file with a dynamically generated name.
Path format:
C:\Windows\PAExec-<PID>-<ComputerName>.exe
Example:
C:\Windows\PAExec-2124-CSE-SDN-ALV-02.exe
If the version of Cybereason you are using supports wildcards in path exclusions, add:
C:\Windows\PAExec-*.exe
Caution: Do not create a global exclusion for the C:\Windows\ directory. Such an exclusion would be far too broad and would significantly reduce the workstation’s level of protection.
Important: Verify wildcard support in the documentation for your version of Cybereason. If the * character is not accepted in this field, contact your administrator or Cybereason support to define an exclusion tailored to files whose names begin with PAExec-.
Step 6 – Save and publish the policy
After adding the necessary exclusions, click:
Save & Publish
The policy is then saved and published in Cybereason.
Note: Publishing the policy does not guarantee that it will be immediately applied to the affected workstations. You must then verify that it has been assigned to the Sensors.
Step 7 – Open the list of Sensors
System
└── Sensors
The list of workstations equipped with the Cybereason Sensor appears.
Step 8 – Select the relevant workstations
Select the Sensors corresponding to the workstations managed by Medulla.
You can start with:
- a test workstation;
- a limited group of workstations;
- then all affected workstations after validation.
Recommendation: First apply the policy to a pilot workstation before deploying it to the entire fleet.
Step 9 – Assign the policy to the Sensors
After selecting the Sensors, click:
Actions
└── Set Policy
Select the policy containing the Medulla exclusions.
Then click:
Continue
Finally, confirm the assignment by clicking:
Assign to Sensors
The policy will be applied to the selected Sensors the next time they synchronize with the Cybereason console.
Which Medulla exclusions should be added?
The following minimum exclusions may be necessary to enable PAExec to work with Medulla.
PAExec source binary
C:\Program Files\Medulla\bin\paexec.exe
PAExec temporary copy
C:\Windows\PAExec-*.exe
Excluding the temporary copy is generally the most important step when the Cybereason alert concerns a file of the following type:
C:\Windows\PAExec-2124-CSE-SDN-ALV-02.exe
Should the entire Medulla directory be excluded?
An exclusion covering the entire following directory may be considered:
C:\Program Files\Medulla\
However, a blanket folder exclusion is broader than an exclusion targeting only the PAExec binary.
It is therefore preferable to start with the following targeted exclusions:
C:\Program Files\Medulla\bin\paexec.exe
C:\Windows\PAExec-*.exe
A complete exclusion of the Medulla directory should only be considered if other Medulla components are also blocked, after analyzing the Cybereason events.
Which exclusions should be avoided?
The following exclusions are not recommended:
C:\Windows\
C:\Program Files\
*.exe
These exclusions are too broad and could allow malicious files to run without Anti-Malware checks.
How do I verify that the exclusion is working?
After applying the Cybereason policy, run a test on a pilot workstation.
From Medulla:
- Launch an application deployment
- Run a remote script
- Launch an action from the application Kiosk
- Check the result of the action in the Medulla audit
In Cybereason, verify that:
- PAExec is no longer blocked
- The temporary copy is not quarantined
- The temporary service can be created and executed
- No automatic remediation action deletes the file before it is executed
- The previously observed detection no longer occurs
On the Windows workstation, also verify that the Medulla action completes successfully.
Is the exclusion applied immediately?
Policy enforcement may require a delay corresponding to the Sensor’s synchronization with the Cybereason console.
Verify:
- that the policy was successfully published using Save & Publish;
- that the correct policy is assigned to the Sensor;
- that the Sensor is connected to the console;
- that the workstation has received the new configuration;
- that no other policy or security rule takes precedence.
If necessary, restart the test workstation after applying the policy.
What should you do if PAExec is still blocked?
If the problem persists, check the following in Cybereason:
- The exact path of the detected file
- The exact name of the detection
- The Cybereason module that generated the alert
- The policy actually applied to the Sensor
- The policy’s publication status
- The exclusion syntax
- Support for wildcards
- The presence of another blocking rule or behavioral control rule
The detected path must be compared to the excluded path.
Example of a detected path:
C:\Windows\PAExec-2124-CSE-SDN-ALV-02.exe
Expected exclusion, if wildcards are supported:
C:\Windows\PAExec-*.exe
What should you do if the Anti-Malware exclusion is not sufficient?
An Anti-Malware exclusion may not override a detection generated by another Cybereason module, such as a behavioral detection or a prevention rule.
In this case, note the following information:
- Exact name of the alert
- Affected Cybereason module
- File path
- Command line
- Parent process
- Executing user
- Date and time of the action
- Workstation name
- Detection ID
Next, forward this information to your Cybereason administrator or Cybereason support to identify the appropriate exception type.
Important: The procedure described in this FAQ applies to path exclusions in the Anti-Malware section. It does not guarantee that all behavioral detections related to the use of PAExec will be suppressed.
How do I retrieve the SHA256 hash of the PAExec binary?
From a workstation managed by Medulla, open PowerShell and run:
Get-FileHash "C:\Program Files\Medulla\bin\paexec.exe" -Algorithm SHA256
Example output:
Algorithm : SHA256
Hash : <SHA256_HASH>
Path : C:\Program Files\Medulla\bin\paexec.exe
The hash allows you to verify the integrity of the PAExec binary used by Medulla.
Note: The Cybereason procedure used as a source for this FAQ does not document how to create a hash-based exclusion. The SHA256 hash is therefore presented here as a verification tool, unless your version of Cybereason explicitly supports this type of exclusion.
Does the hash change after a Medulla update?
Yes.
If the PAExec binary is replaced during a Medulla update, its SHA256 hash will be different.
It is recommended to verify the hash after:
- a major Medulla update;
- a Windows agent update;
- a manual replacement of the binary;
- a new Cybereason alert regarding PAExec.
Security best practices
It is recommended that you:
- create a policy specifically for workstations managed by Medulla;
- test the policy on a limited number of workstations;
- avoid any global exclusions of
C:\Windows\; - limit exclusions to only the necessary paths;
- monitor other instances of PsExec or PAExec;
- regularly verify the relevance of the exclusions;
- review the configuration after a major update to Medulla or Cybereason;
- document the rationale, date, and scope of each exclusion.
Summary of technical elements
|
Element |
Value |
|
Source binary |
|
|
Detected path |
|
|
Mechanism |
Temporary copy and Windows service |
|
Execution account |
|
|
Argument |
|
|
Possible Windows events |
7045, 7036, 5145, 4648 |
|
Medulla component |
|
|
Cybereason console |
System → Policies Management → Anti-Malware → Exclusions |
|
Publication |
Save & Publish |
|
Assignment |
System → Sensors → Actions → Set Policy |
|
Source binary exclusion |
|
|
Temporary copy exclusion |
|
|
Exclusion to avoid |
|
Source
This procedure is based on the following document:
Cybereason – Setting up Exclusions
A document published by Cymulate describing the general procedure for creating exclusions in a Cybereason policy and assigning it to Sensors.
See the document Cybereason – Setting up Exclusions
System
└── Policies Management
└── Anti-Malware
└── Exclusions
└── + Add New
Save & Publish
System
└── Sensors
└── Actions
└── Set Policy
└── Assign to Sensors
Note: The source document outlines the exclusion procedure in Cybereason for the Cymulate software. The paths C:\Program Files\Medulla\bin\paexec.exe and C:\Windows\PAExec-*.exe have been adapted to accommodate the operation of Medulla and PAExec. Support for wildcards and the exact behavior of the various protection modules must be verified based on the version of Cybereason deployed.