During my commute from an airport located in a country whose government is known for intrusions into the privacy of its citizens and non-citizens, I had my laptop taken from me during a routine security procedure. I usually get to see my electronic devices being swabbed and X-Rayed as all of the equipment needed for the security checks is located in the same room. However, this time, my laptop was taken to another location where I did not get to see which checks were being performed on it. I had to wait around 25 minutes for it to return to me. Is it possible that during that time, spyware or spy-hardware was installed on my laptop?
Checking the screws and other physical marks of being opened might indicate if hardware was installed.
If you had a strong enough password, they likely were not able to "install something" in 25 minutes.
"Evil Maid" attacks have been mentioned, but, while possible, are not so probable given modern firmware. It depends on your laptop (and how old it is). That can happen in a few minutes.
Your peripherals are another matter, though, and if they had those (including the power supply), I might be more worried about those.
And yet, they would not have had to install anything or monkey around with your equipment at all to now be able to spy on you.
With your laptop, no extra equipment, and 25 minutes to leisurely do their thing, they can get your laptop's:
- make, model, serial number
- operating system
- wifi MAC address
- "auto-connect" wifi networks you use
- [possible - there are a bunch of dependencies to be able to do this] services/websites you use and browser fingerprint (if you only locked the machine instead of power it down and the browser was active in the background)
and connect all those things with whatever is on your national identity papers. Now, they can spy on you just by tracking your laptop, wifi, and internet activity over the core country network and/or wifi trackers.
No installs needed.
This brought to mind some articles about the so called "Evil Maid attack", which installs a firmware backdoor on a laptop in less than 4 minutes: https://wccftech.com/evil-maid-attack-firmware-backdoor/ https://hothardware.com/news/evil-maid-attack-takes-pc-cleaners-sub-4-minute-backdoor-firmware-install
It's totally possible that the malware if it's sophisticated enough is installed in the bios, the firmware for peripherals, data files on removable storage devices or on your backups.
Reinstalling operating system under previous statements, you'll only wipe the disk data and even there, you might need to take care of the backup you create before the OS reinstall, that data may have been compromised also.
Malware can be stored inside memory of almost if I'm not wrong any component of a modern computer.
I don't guarantee that your device is safe enough anymore, you can buy a new one to stay safe if you wish, I wouldn't trust my device after this kind of intrusion.