Summary
The web UI of Sunshine lacks protection against Cross-Site Request Forgery (CSRF) attacks. This vulnerability allows an attacker to craft a malicious web page that, when visited by an authenticated user, can trigger unintended actions within the Sunshine application on behalf of that user.
Specifically, since the application does OS command execution by design, this issue can be exploited to abuse the "Command Preparations" feature, enabling an attacker to inject arbitrary commands that will be executed with Administrator privileges when an application is launched.
Details
The application uses Basic Authentication, which is inherently vulnerable to Cross-Site Request Forgery (CSRF) attacks. Once a user is authenticated, the browser includes the "Authorization: Basic ..." header in all subsequent requests, including cross-origin requests. This behavior allows attackers to craft malicious forms on their own websites that, when visited by an authenticated user, can trigger unauthorized actions within the Sunshine application.
Impact
An attacker is able to perform command injection as Administrator on the machine running Sunshine. This vulnerability is particularly impactful, as the CSRF can be triggered over the internet without an exposed Sunshine instance.
The PoC is built for command injection but an attacker could also build a form to pair a new device, or perform any action available in the application.
Fix
The bug was patched by 738ac93.
Summary
The web UI of Sunshine lacks protection against Cross-Site Request Forgery (CSRF) attacks. This vulnerability allows an attacker to craft a malicious web page that, when visited by an authenticated user, can trigger unintended actions within the Sunshine application on behalf of that user.
Specifically, since the application does OS command execution by design, this issue can be exploited to abuse the "Command Preparations" feature, enabling an attacker to inject arbitrary commands that will be executed with Administrator privileges when an application is launched.
Details
The application uses Basic Authentication, which is inherently vulnerable to Cross-Site Request Forgery (CSRF) attacks. Once a user is authenticated, the browser includes the "Authorization: Basic ..." header in all subsequent requests, including cross-origin requests. This behavior allows attackers to craft malicious forms on their own websites that, when visited by an authenticated user, can trigger unauthorized actions within the Sunshine application.
Impact
An attacker is able to perform command injection as Administrator on the machine running Sunshine. This vulnerability is particularly impactful, as the CSRF can be triggered over the internet without an exposed Sunshine instance.
The PoC is built for command injection but an attacker could also build a form to pair a new device, or perform any action available in the application.
Fix
The bug was patched by 738ac93.