Skip to main content

TEHTRIS EDR alerts regarding PAExec used by Medulla

Applies to: Medulla / Tehtris EDR
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, 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 TEHTRIS EDR, therefore monitor this type of behavior by default and may trigger an alert or even block the process, depending on the mode of the applied policy (detection or protection).

Why does TEHTRIS detect a file named PAExec-XXXX-POSTE.exe?

PAExec operates using a temporary mechanism:

  1. The Medulla binary is copied to the target workstation
  2. A temporary copy is placed in C:\Windows\
  3. This copy is executed as a temporary Windows service
  4. The file is automatically 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:

C:\Program Files\Medulla\bin\paexec.exe

Note: The TEHTRIS EDR primarily detects the temporary copy placed in C:\Windows\, not the Medulla source binary.

Why does PAExec run under NT AUTHORITY\SYSTEM?

This behavior is normal. The PAExec execution cycle occurs in two phases:

  1. The Medulla binary is copied to C:\Windows\PAExec-*.exe
  2. 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 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 the PAExec service

Yes

5145

Security

Access to the ADMIN$ share

Yes

5145

Security

Access to stdin, stdout, and stderr named pipes

Yes

4648

Security

Authentication with explicit credentials

Possible

Events on named pipes:

*-stdin *-stdout *-stderr

are closely monitored by EDRs because they are characteristic of PsExec/PAExec operations.

Why does TEHTRIS associate this with lateral movement?

TEHTRIS EDR detects a set of behaviors typically associated with remote administration tools:

  • Copying an executable to C:\Windows\
  • Use of the ADMIN$ share
  • Creating a temporary Windows service
  • Running under NT AUTHORITY\SYSTEM
  • Communication via named pipes stdin, stdout, and stderr

These behaviors are identical in the following scenarios:

  • Legitimate: Medulla / system administration
  • Malicious: attacker lateral movement

Important: The exclusion must be as restrictive as possible so as not to compromise the overall security level.

Can I exclude C:\Program Files\Medulla\bin\paexec.exe?

No.

This exclusion alone is ineffective because the file detected by the EDR is the temporary copy:

C:\WINDOWS\PAExec-*.exe

not the source binary:

C:\Program Files\Medulla\bin\paexec.exe

What exclusion is recommended in TEHTRIS EDR?

In TEHTRIS, exclusions are configured from the TEHTRIS XDR Platform via the whitelist of an EDR policy, then by applying that policy to the relevant agent group. TEHTRIS allows you to create rules based on SHA256 hashes, file paths/names, and signature certificates.

Option A – Whitelisting by SHA256 hash (recommended)

In the TEHTRIS XDR Platform:

  1. Open the EDR module → Policies
  2. Edit the policy applied to the group of workstations, in the Whitelist section
  3. Create an Allow rule based on a hash (SHA256)
  4. Enter the SHA256 hash of the PAExec Medulla binary
  5. Optionally, restrict to the path and the execution account:

    Path: C:\Windows\PAExec-*.exe
    Account: NT AUTHORITY\SYSTEM

  6. Apply the policy and verify that it has been propagated to the agents

Recommendation: Exclusion by hash is the most secure method because it verifies the exact integrity of the Medulla binary.

Option B – Parent → child exclusion (recommended as a supplement)

Allow PAExec-*.exe only when the parent process is the Medulla agent.

Expected parent process:

Medulla agent service (Python scheduler)

In TEHTRIS, this translates to a whitelist rule conditioned on the parent → child chain (parent = Medulla agent, child = PAExec-*.exe). This method significantly reduces the risk of abuse.

Option C – Path exclusion (wildcard, temporary)

Create a path exclusion:

C:\Windows\PAExec-*.exe

with the following conditions:

  • Account: NT AUTHORITY\SYSTEM
  • Argument: -service
  • Parent process: Medulla agent

Caution: This method should only be used temporarily. It does not validate the integrity of the binary.

Medulla agent exclusions to be declared in TEHTRIS

In addition to PAExec, it is recommended to whitelist the main components of the Medulla agent to avoid false positives and blocks on managed workstations. These exclusions must be specified in the TEHTRIS EDR policy applied to the agent group.

Agent processes / binaries

Component

Default path

Medulla agent (root)

C:\Program Files\Medulla\

PAExec binary

C:\Program Files\Medulla\bin\paexec.exe

PAExec temporary copy

C:\Windows\PAExec-*.exe

Agent's Python interpreter

C:\Program Files\Medulla\bin\python*.exe

Scheduler / Kiosk

scheduling_launch_kiosk.py

SSH client (remote maintenance)

C:\Program Files\Medulla\bin\ssh*.exe

Folders to exclude (real-time scanning)

  • C:\Program Files\Medulla\ (and subfolders)
  • C:\ProgramData\Medulla\ (data, logs, processing queues)
  • C:\Windows\PAExec-*.exe (temporary remote execution copy)

Best practice: Whenever possible, use SHA256 hash-based exclusions rather than simple paths, and document each rule (reason, date, Medulla version). Reevaluate the entire list after each agent version update.

How do I retrieve the SHA256 hash of the PAExec binary?

From a workstation managed by Medulla (PowerShell):

Get-FileHash "C:\Program Files\Medulla\bin\paexec.exe" -Algorithm SHA256

The hash is identical between:

C:\Program Files\Medulla\bin\paexec.exe

and:

C:\WINDOWS\PAExec-*.exe

because PAExec copies itself exactly.

Does the hash change after a Medulla update?

Yes.

If PAExec is updated in a new version of Medulla, the SHA256 hash will change.

Recommendation: Check the TEHTRIS exclusions (hash-based rules) after every major Medulla update, and update the SHA256 hash if necessary.

Summary of technical elements

Element

Value

Source binary

C:\Program Files\Medulla\bin\paexec.exe

Detected path

C:\Windows\PAExec-<PID>-<ComputerName>.exe

Mechanism

Temporary copy via ADMIN$

Execution account

NT AUTHORITY\SYSTEM

Argument

-service

Windows events

7045, 7036, 5145

Medulla component

scheduling_launch_kiosk.py

Exclusion console

TEHTRIS XDR Platform → EDR → Policies → Whitelist

Recommended exclusion

SHA256 hash + execution context

Exclusion to avoid

C:\Program Files\Medulla\bin\paexec.exe alone