Content Injection (RCE) in Yandex Browser for Android [2018]
The Yandex Browser for Android app loads certain help, about, homepage, and search engine links over HTTP instead of HTTPS. A man-in-the-middle attacker could intercept and inject malicious content, which could lead to remote code execution within the browser app.
Nightwatch Cybersecurity Follow
Published on wwws.nightwatchcybersecurity.com
The Yandex Browser Android application provided by Yandex can be injected with malicious content by an MITM attacker. Because this application is a web browser, this can lead directly to remote code execution (RCE) within the app.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The app uses HTTP instead of HTTPS for several internal links, and the affected domains are not on the HSTS preload list, so the browser does not force HTTPS.
Impact
An attacker on the same network could inject content that leads to remote code execution within the browser app; the vendor disputes this and has not fixed it.
What the attacker needed
Attacker on same network (MITM); victim opens affected link in app; affected domain not HSTS-preloaded
The fix
The app should use HTTPS for all affected links; the vendor has not fixed the issue.
How it was found
- Install the app on an Android device but do not start it.
- Install and configure dnsmasq and NGINX on a Linux host.
- Modify the hosts file to map the target domain to the Linux host.
- Configure dnsmasq to listen on the host IP and restart it.
- Place a file with malicious content in the web root.
- Set the Android device to use the Linux host as DNS, then open the app and navigate to Help.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When an app loads a web page over HTTP, anyone on the same network can secretly change what is sent back. Because this app is a browser, the attacker could make it run harmful code. The fix is to use HTTPS, which encrypts and verifies the connection.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.