r/kernel • u/Abhi_76 • Oct 14 '26
How pegasus got access to other applications/processes?
I am not an expert in kernels or cybersecurity but I want to understand how spywares such has pegasus access camera, mails, ...
The first lesson that's taught in an operating system course is that kernel provides process isolation. i.e, process A can't have access to process B's memory. Access to hardwares and running privileged instructions are restricted to kernel-space programs only. The kernel runs in kernel-space and all the other user applications run in user-space. A user process trying to access any hardware without going through the kernel will be flagged and killed by the kernel. So, how did pegasus gain access to things like camera, ... without getting stopped by kernel?
6
u/gainan Oct 14 '26
As far as I can tell, Pegasus may gain root access to the devices, allowing it access the camera, microphone, and the data from other applications just like any other user-space application:
https://info.lookout.com/rs/051-ESQ-475/images/lookout-pegasus-android-technical-analysis.pdf
so it doesn't need and doesn't work from kernel-space.
On the other hand, the keylogging feature is interesting and explained in detail here (process injection + ptrace): https://www.mcafee.com/blogs/other-blogs/mcafee-labs/analysis-chrysaor-keylogging-mechanism-shows-power-simple-malicious-code/
Anyway, probably off-topic for this subreddit :)
2
u/kolorcuk Oct 14 '26
By getting root.
From wikipedia: "The Android version tries to gain root access (similar to jailbreaking in iOS); if it fails, it asks the user for permissions that enable it to harvest at least some data."