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:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close