exploit the possibilities

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:

May 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    0 Files
  • 2
    May 2nd
    15 Files
  • 3
    May 3rd
    19 Files
  • 4
    May 4th
    24 Files
  • 5
    May 5th
    15 Files
  • 6
    May 6th
    14 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    0 Files
  • 9
    May 9th
    13 Files
  • 10
    May 10th
    7 Files
  • 11
    May 11th
    99 Files
  • 12
    May 12th
    45 Files
  • 13
    May 13th
    7 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    16 Files
  • 17
    May 17th
    26 Files
  • 18
    May 18th
    4 Files
  • 19
    May 19th
    17 Files
  • 20
    May 20th
    2 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    6 Files
  • 24
    May 24th
    19 Files
  • 25
    May 25th
    5 Files
  • 26
    May 26th
    12 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 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