Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

XSS in modules output #7

@chadillac

Description

@chadillac

How to reproduce:

example payload:

$ cat this_is_a_test
this
<h1>is a</h1>
test
<strong>payload</strong>
<script>alert('this is a test');</script>

upload the this_is_a_test sample to the Viper instance, go to the modules tab and run the All Strings module...

You'll get an alert and formatted HTML in the display.

Why it's bad:
This could allow malicious code embedded in malware samples to achieve execution in an analysts browser session...

How to fix it:
It should be using innerText over innerHTML when injecting the content into the page, as this will have it bypass HTML processing attempts. An alternative fix would be running all output returned from modules through an HTML special characters encoding process before injecting the content into the page.

Either case should fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions