Task #11398

Support #11289: [SCP ID :##5584##] : PCI DSS: Web and Mobile SAP Remediation

Pentest_Web_ADMIN (H1) - Cross-site scripting (stored & reflected DOM-based)

Added by Nurul Athira Abdul Rahim almost 4 years ago. Updated about 3 years ago.

Status:Work Completed-End life cycleStart date:December 01, 2020
Priority:HighDue date:December 03, 2020
Assignee:Nurul Athira Abdul Rahim% Done:

100%

Category:PentestSpent time:-
Target version:-

Description

Stored DOM-based vulnerabilities arise when user input is stored and later embedded into a response within a part of the DOM that is then processed in an unsafe way by a client-side script. An attacker can leverage the data storage to control a part of the response (for example, a JavaScript string) that can be used to trigger the DOM-based vulnerability.

DOM-based cross-site scripting arises when a script writes controllable data into the HTML document in an unsafe way. An attacker may be able to use the vulnerability to construct a URL that, if visited by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to visit the attacker's crafted URL in various ways, similar to the usual attack delivery vectors for reflected cross-site scripting vulnerabilities.

Recommended solution :

The most effective way to avoid DOM-based cross-site scripting vulnerabilities is not to dynamically write data from any untrusted source into the HTML document. If the desired functionality of the application means that this behavior is unavoidable, then defenses must be implemented within the client-side code to prevent malicious data from introducing script code into the document. In many cases, the relevant data can be validated on a whitelist basis, to allow only content that is known to be safe. In other cases, it will be necessary to sanitize or encode the data. This can be a complex task, and depending on the context that the data is to be inserted may need to involve a combination of JavaScript escaping, HTML encoding, and URL encoding, in the appropriate sequence.

sc.png (19 KB) Najmi Pasarudin, December 03, 2020 12:11

IBAM H1 - 1.jpg (228 KB) Nurul Athira Abdul Rahim, December 04, 2020 13:21

IBAM H1 - 2.jpg (262 KB) Nurul Athira Abdul Rahim, December 04, 2020 13:21

IBAM H1 - 3.jpg (293 KB) Nurul Athira Abdul Rahim, December 04, 2020 13:21

History

#1 Updated by Najmi Pasarudin almost 4 years ago

  • Status changed from New - Begin Life Cycle to Development / Work In Progress
  • % Done changed from 0 to 90

#2 Updated by Najmi Pasarudin almost 4 years ago

  • Due date set to December 03, 2020

#3 Updated by Najmi Pasarudin almost 4 years ago

Solution:
Display data using struts

#4 Updated by Najmi Pasarudin almost 4 years ago

  • Status changed from Development / Work In Progress to Internal Testing
  • Assignee changed from Najmi Pasarudin to Nurul Athira Abdul Rahim

Test case:
1. Access IBAM>Message Box
2. Compose new message with <script>alert(123123123)</script>
3. Expected result, can save message without any alert popup.

#5 Updated by Nurul Athira Abdul Rahim almost 4 years ago

Tested and passed

#6 Updated by Nurul Athira Abdul Rahim over 3 years ago

  • Status changed from Work Completed-End life cycle to System Integration Test

#7 Updated by Nurul Athira Abdul Rahim about 3 years ago

  • Status changed from System Integration Test to Work Completed-End life cycle

Pending for 2nd scanning report

Also available in: Atom PDF