what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Moab User Impersonation

Moab User Impersonation
Posted Sep 30, 2014
Authored by John Fitzpatrick

Moab versions prior to 7.2.9 and 8 suffer from a user impersonation vulnerability.

tags | exploit
advisories | CVE-2014-5375
SHA-256 | 06269ab2431aa1292e9d181643ace50442b15f7c22b2ca8e0be470c5e444f592

Moab User Impersonation

Change Mirror Download
##[Moab User Impersonation : CVE-2014-5375]##

Software: Moab
Affected Versions: All current versions of Moab. However, the impact is limited in Moab 7.2.9 and Moab 8.
CVE Reference: CVE-2014-5375
Author: John Fitzpatrick, Luke Jennings MWR Labs (http://labs.mwrinfosecurity.com/)
Severity: High Risk
Vendor: Adaptive Computing
Vendor Response: Updates in Moab 7.2.9 and Moab 8 provide some mitigations


##[Description]

It is possible to submit jobs to Moab as arbitrary users due to insufficient authentication checks during the submission of a job to the Moab server.


##[Impact]
Users are able to submit jobs as arbitrary users. In environments that permit it this could allow job execution as root.


##[Cause]

Moab does not sufficiently validate the job submissions against its intended user ID values.


##[Solution]

An upgrade to Moab 7.2.9 or Moab 8 prevents direct exploitation of this issue (further details are provided in the “Technical Details” section below). In these versions jobs submitted in this manner enter a held state, this is flagged as a known issue by Adaptive (MOAB-7478):

"Jobs submitted with invalid credentials are put in a held state, instead of rejected, until the administrator can respond. The checkjob command gives administrators further information regarding why the job is held. Blindly assuming that all held jobs should in fact be running RIGHT NOW is not only unsafe, but circumvents intentional Moab policies and workflow. An administrator should exercise care when resolving held jobs".

Administrators should be aware that attackers can control the <UserID> value which provides them control over the user specified within the checkjob. MWR would recommend that Adaptive make use of the “actor” value passed to Moab, as the controls introduced in 7.2.9 and 8 prevent manipulation of this value.


##[Technical Details]

Moab is a workload manager used in High Performance Computing (HPC) environments. In a typical environment a user submits their jobs to the Moab server for it to handle the workload. Moab communication makes use of an XML based protocol. An example message showing a job submission is shown below:

<Envelope component="ClusterScheduler" count="1" name="moab" type="nonblocking" version="8.0.beta.2">
<Signature>
<DigestValue>7v49VzAlbyNQ4O3VChCus+v2LeE=</DigestValue>
<SignatureValue>QG13cmxhYnMgRWFzdGVyIEVnZyE=</SignatureValue>
</Signature>
<Body actor="test" timestamp="1408488412">
<Request action="submit" actor="test" cmdline="\STARTmsub">
<Object>job</Object>
<job>
<Owner>test</Owner>
<UserId>test</UserId>
<GroupId>test</GroupId>
<InitialWorkingDirectory>/home/test</InitialWorkingDirectory>
<UMask>2</UMask>
<Executable>/usr/bin/id</Executable>
<SubmitLanguage>PBS</SubmitLanguage>
<SubmitString>\START/usr/bin/id\0a\0a</SubmitString>
</job>
</Request>
</Body>
</Envelope>

Within this message users are specified in multiple locations, these are highlighted in bold in the message above. In versions of moab prior to Moab 8 there are two instances of the "actor" value specified. In order for mauth to sign a message the actor specified within the <Request> tag must match the user calling mauth. It is not necessary for the actor value within the <Body> tag to match the calling user.
In addition to checks at the mauth level the server will perform its own checks. The server ensures that the <Owner> matches the user specified within the <Body> actor value. If either differs an error (code 999 – invalid credentials specified for submitted job) is returned by the server and the job rejected.

Since the actor value within the body tag is not verified by mauth, and this actor value is also the one against which the server checks the <Owner> tag, it is possible to smuggle through jobs to the server with an arbitrary user specified in each of these values. The user under which the job is queued by Moab is the user specified within the <UserId> tag. Whilst it is possible to impersonate a user by changing only this value, doing so appears to impede communication between Moab and a workload manager, on TORQUE this results in the job entering a BatchHold state where it will not execute. When the Body.actor value, the <Owner> and the <UserId> value are altered (but the Request.actor value remains legitimate to facilitate signing) it is possible to impersonate any user.

The example above describes this process when impersonating users during job submission. Moab also provides a means to reconfigure the server and a similar approach can be adopted to impersonate root and perform server reconfiguration.
In Moab 8 only a single actor value is contained within the messages and is used by both mauth and by the Moab server. This prevents manipulation of the <Owner> value during job submission. It remains possible to alter the <UserId> value and submit jobs in Moab 8 (as described above), although in a typical Moab+TORQUE configuration this does cause the job to enter a BatchHold state (other resource managers have not been tested).

Whilst components of this issue remain outstanding, upgrading to 7.2.9 or Moab 8 appears to mitigate direct exploitation of the issue.


##[Detailed Timeline]

2014-01-21 : Detailed vulnerability information provided to Adaptive
2014-09-01 : Full advisory provided to Adaptive
2014-09-08 : Release of advisory to HPC community
2014-09-25 : Public release of advisory


http://labs.mwrinfosecurity.com
Login or Register to add favorites

File Archive:

February 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    16 Files
  • 2
    Feb 2nd
    19 Files
  • 3
    Feb 3rd
    0 Files
  • 4
    Feb 4th
    0 Files
  • 5
    Feb 5th
    24 Files
  • 6
    Feb 6th
    2 Files
  • 7
    Feb 7th
    10 Files
  • 8
    Feb 8th
    25 Files
  • 9
    Feb 9th
    37 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    17 Files
  • 13
    Feb 13th
    20 Files
  • 14
    Feb 14th
    25 Files
  • 15
    Feb 15th
    15 Files
  • 16
    Feb 16th
    6 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    35 Files
  • 20
    Feb 20th
    25 Files
  • 21
    Feb 21st
    18 Files
  • 22
    Feb 22nd
    15 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    10 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    37 Files
  • 27
    Feb 27th
    34 Files
  • 28
    Feb 28th
    27 Files
  • 29
    Feb 29th
    8 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close