libxfont-1.dll
There are executables that allowlibxfont-1.dll to be DLL hijacked.Expected Locations
The filelibxfont-1.dll is normally found in the following paths:
%PROGRAMFILES%\Mobatek\MobaXterm Personal Edition%PROGRAMFILES%\Mobatek\MobaXterm
Vulnerable Executables
DLL Sideloading (2 EXEs)
By copying (and optionally renaming) any of the following vulnerable applications to a user-writeable folder, alongside a malicious
libxfont-1.dll, arbitrary code can be executed through it.
Detection
Below a sample Sigma rule that will find processes that loadedlibxfont-1.dll located in a folder that is not one of the expected locations (see above).
title: Possible DLL Hijacking of libxfont-1.dll
id: 4954711b-9809-48a3-9172-5b9ff8180439
status: experimental
description: Detects possible DLL hijacking of libxfont-1.dll by looking for suspicious image loads, loading this DLL from unexpected locations.
references:
- https://hijacklibs.net/entries/3rd_party/mobatek/libxfont-1.html
author: "Jai Minton - HuntressLabs"
date: 2024-05-10
tags:
- attack.defense_evasion
- attack.T1574.001
logsource:
product: windows
category: image_load
detection:
selection:
ImageLoaded: '*\libxfont-1.dll'
filter:
ImageLoaded:
- 'c:\program files\Mobatek\MobaXterm Personal Edition\\*'
- 'c:\program files (x86)\Mobatek\MobaXterm Personal Edition\\*'
- 'c:\program files\Mobatek\MobaXterm\\*'
- 'c:\program files (x86)\Mobatek\MobaXterm\\*'
condition: selection and not filter
falsepositives:
- False positives are likely. This rule is more suitable for hunting than for generating detections.title: Possible preparation for libxfont-1.dll DLL Hijacking
id: 4954712b-9809-48a3-9172-5b9ff8180439
status: experimental
description: Detects possible DLL hijacking of libxfont-1.dll by looking for suspicious file writes of this DLL, to unexpected locations.
references:
- https://hijacklibs.net/entries/3rd_party/mobatek/libxfont-1.html
author: "Jai Minton - HuntressLabs"
date: 2024-05-10
tags:
- attack.defense_evasion
- attack.T1574.001
logsource:
product: windows
category: file_event
detection:
selection:
TargetFileName: '*\libxfont-1.dll'
filter:
TargetFileName:
- 'c:\program files\Mobatek\MobaXterm Personal Edition\\*'
- 'c:\program files (x86)\Mobatek\MobaXterm Personal Edition\\*'
- 'c:\program files\Mobatek\MobaXterm\\*'
- 'c:\program files (x86)\Mobatek\MobaXterm\\*'
condition: selection and not filter
falsepositives:
- False positives are likely. This rule is more suitable for hunting than for generating detections.title: Possibly malicious versions of libxfont-1.dll
id: 4954713b-9809-48a3-9172-5b9ff8180439
status: experimental
description: Detects possible DLL hijacking of libxfont-1.dll by looking for versions not meeting the known signature data.
references:
- https://hijacklibs.net/entries/3rd_party/mobatek/libxfont-1.html
author: "Jai Minton - HuntressLabs"
date: 2024-05-10
tags:
- attack.defense_evasion
- attack.T1574.001
logsource:
product: windows
category: image_load
detection:
selection:
ImageLoaded: '*\libxfont-1.dll'
filter:
ImageLoaded:
- Signed: 'true'
- SignatureStatus: 'signed'
- Signature|contains:
- 'C=FR, PostalCode=31830, S=Midi-Pyrénées, L=Plaisance du Touch, STREET=13 rue Paul Bernadot, O=Mobatek, CN=Mobatek'
condition: selection and not filter
falsepositives:
- False positives are likely. This rule is more suitable for hunting than for generating detections.Note that this rule is also included in the Detection Content Feeds that comprise all DLL Hijacking entries part of HijackLibs.
FAQs
Why should I care about this?
DLL Hijacking enables the execution of malicious code through a signed and/or trusted executable. Defensive measures such as AV and EDR solutions may not pick up on this activity out of the box, and allow-list applications such as AppLocker may not block the execution of the untrusted code. There are numerous examples of threat actors that have been observed to leaverage DLL Hijacking to achieve their objectives. As such, this project wants to encourage you to monitor for unusual activity involvinglibxfont-1.dll.
How do I abuse this vulnerability?
As a red teamer, you will have to compile your own version oflibxfont-1.dll. There are various guides on how this can be achieved.