U.S. Dept Of Defense · Report #1122791
[hta3] Remote Code Execution on https://███ via improper access control to SCORM Zip upload/import
How it was found
Summary:
There is a Remote Code Execution vulnerability at https://█████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx which allows any user to upload a SCORM course package. Furthermore, an attacker can add an ASPX shell to the SCORM package which will then get extracted onto the server, where the attacker can then execute commands.
Steps To Reproduce:
- Visit
https://███████/and log in with the credentials:██████████ - Now download this "malicious" SCORM course package: █████
- If you
unzip scorm.zip, you will notice this is a valid SCORM package, and you will also notice that I've included an ASPX file inshared/cdlcdlcdl.aspxwhich runs thewhoamicommand. Notice I also included that file reference in the Scorm Manifest (imsmanifest.xml) - Visit https://████████/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx, select the ██████ file. Start intercepting in Burp Suite Repeater.
- Forward the POST request to
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004uploadcourse.aspx - Now intercept the request to
/Kview/CustomCodeBehind/base/courseware/scorm/management/scorm2004editmetadata.aspx - Right-Click on it, Hover down to "Do intercept" and click "response to this request" then forward it. (In your web-browser you might be able to just right-click, inspect-element, and search for strCourseId in there but my browser was being funky).
- Once you've received the response, search for "strCourseId" and grab it.
For example, you would grab F6BAC72B45D64B34ACB662BB001D8523 out of the following response:
<a onclick="return ConfirmBeforeNavigateAway('Are you sure you want to navigate away from this page? \n\nYou made changes that will not be saved if you continue. \n\nClick OK to proceed or Cancel to return to the page.');" id="ML.BASE.WF.ReuploadCourse" class="WorkflowButton" NavigatingURL="Courseware/SCORM/Management/SCORM2004ReuploadCourse.aspx" ItemId="<IDTable><strCourseId>F6BAC72B45D64B34ACB662BB001D8523</strCourseId><strVersionId>F6BAC72B45D64B34ACB662BB001D8523</strVersionId></IDTable>" href="javascript:__doPostBack('ML.BASE.WF.ReuploadCourse','')"><span>Course Files</span></a>
- Now, visit
https://█████/CServer/Courseware/<YOUR_COURSE_ID>/shared/cdlcdlcdl.aspxand you will see the shell executes:
███
Supporting Material/References:
- https://█████/CServer/Courseware/F6BAC72B45D64B34ACB662BB001D8523/shared/cdlcdlcdl.aspx
Proof-of-Concept Video
█████████
Impact
Critical, an attacker can execute commands on this military server, steal sensitive information, pivot to internal systems, etc.
Best, @cdcl