SSD Advisory – AContent Multiple Vulnerabilities

Credit to Author: SSD / Maor Schwartz| Date: Tue, 16 May 2017 05:32:18 +0000

Want to get paid for a vulnerability similar to this one?
Contact us at: sxsxdx@xbxexyxoxnxdxsxexcxuxrxixtxy.xcom

Vulnerabilities Summary
The following advisory describes two (2) vulnerabilities types found in AContent version 1.3.

AContent is an open source learning content management system (LCMS) used to create interoperable, accessible, adaptive Web-based learning content. It can be used along with learning management systems to develop, share, and archive learning materials. For those familiar with ATutor, AContent contains the content authoring, test authoring, and content interoperability features of ATutor, producing a standalone tool that can be used with any system that supports IMS content interoperability standards.

The vulnerability found are:

  • Directory Traversal
  • Directory Traversal that lead to Remote Code Execution – question_import.php
  • Directory Traversal that lead to Remote Code Execution – ims_import.php
  • Directory Traversal that lead to Remote Code Execution – import_test.php

Credit
An independent security researcher, Steven Seeley, has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program.

Vendor Response
AContent has fixed the vulnerabilities in their GitHub master branch.
For more details:

Vulnerabilities Details

Directory Traversal
AContent is vulnerable to a Directory Traversal vulnerability. The vulnerable code can be found in file tool_provider_outcome.php.

The second parameter passed to the sendOAuthBodyPOST() function called in tool_provider_outcome.php is vulnerable to a directory traversal that can be used to disclose files.

Proof of Concept

Directory Traversal that lead to Remote Code Execution – question_import.php
AContent is vulnerable to a Directory Traversal vulnerability that can lead to a Remote Code Execution. The vulnerable code can be found in file question_import.php.

Vulnerable code can be found in lines 168-170 in test/question_import.php

This code calls extract() on a user supplied uploaded zip file.

The preImportCallBack() does not check for directory traversals and performs a blacklist check on teh file extension.

This can be used to write into the web root and gain remote code execution.

Notes:

  • Requires that the target has display_errors=On in the php.ini
  • Requires that you use an author account, but open registration is enabled by default
  • Requires that you have at least one writable directory in the web-root, this is common
  • Requires that the author has at least one course created under their account

Proof of Concept

Directory Traversal that lead to Remote Code Execution – ims_import.php
AContent is vulnerable to a Directory Traversal vulnerability that lead to a Remote Code Execution. The vulnerable code can be found in file ims_import.php

Vulnerable code can be found in lines 896-899 in home/ims/ims_import.php

This code calls extract() on a user supplied uploaded zip file. The preImportCallBack() does not check for directory traversals and performs a blacklist check on teh file extension. This can be used to write into the web root and gain remote code execution.

Notes:

  • Requires that the target has target has display_errors=On in the php.ini
  • Requires that you use an author account, but open registration is enabled by default
  • Requires that you have at least one writable directory in the web-root, this is common

Proof of Concept

Directory Traversal that lead to Remote Code Execution – import_test.php
AContent is vulnerable to a Directory Traversal vulnerability that lead to a Remote Code Execution. The vulnerable code can be found in import_test.php

Vulnerable code can be found in lines 184-186 in test/import_test.php

This code calls extract() on a user supplied uploaded zip file. The preImportCallBack() does not check for directory traversals and performs a blacklist check on teh file extension. This can be used to write into the web root and gain remote code execution.

Notes:

  • Requires that the target has display_errors=On in the php.ini
  • Requires that you use an author account, but open registration is enabled by default
  • Requires that you have at least one writable directory in the web-root, this is common
  • Requires that the author has at least one course created under their account

Proof of Concept

https://blogs.securiteam.com/index.php/feed