Hi all, we are hiring a remote worker and will be supplying a laptop to them. The laptop will be running a Debian variant of Linux on it.
We are a small shop and this is the first time we have entrusted somebody outside of our small pool of trusted employees.
We have sensitive client data on the laptop that they need to access for their day-to-day work.
However, if something goes wrong, and they do the wrong thing, we want to be able to send out some kind of command or similar, that will completely lock, block, or wipe the sensitive data.
We don’t want any form of spying or tracking. We are not interested in seeing how they use the computer, or any of the logs. We just want to be able to delete that data, or block access, if they don’t return the laptop when they leave, or if they steal the laptop, or if they do the wrong thing.
What systems are in place in the world of Linux that could do this?
Any advice or suggestions are greatly appreciated? Thank you.
There is a fundamental issue with this approach: the rogue employee has already copied the data to a USB drive by the time you try to wipe it.
If the data is confidential, you either need to set up standard disk encryption and trust the employee, or not let them access it in a way it can be bulk copied. For instance, might it be possible for them to use a webapp that you control access to or a remote desktop type setup?
Realistically the best option here is to not have the data in the laptop. So they would remote into a machine you control to access the data, or something of the sort. Regardless the laptop should have full disk encryption so if it gets stolen no data is accidentally leaked.
Other than that the best way I can think of is giving the user a non-root account and have the laptop connect to tailscale automatically so you can always ssh into it and control it if needed. But this is not ideal, because a malicious person could just not connect to the internet and completely block you from doing anything. This is true for almost any sort of remote management tool you would be able to find.
VM behind a VPN with a firewall that blocks everything except the rdp protocol and no sudo access?
If the data is sensitive just give them a cheap whatever machine and have them connect to a vdi. That way the data never leaves your estate and means you don’t have to worry as much about the device being lost/stolen. If this isn’t an option I’d strongly recommend looking into an MDM solution for your devices.
This is the correct answer, while it may have more up front costs. It’ll save in the long run, especially if the company has growth potential.
However, if something goes wrong, and they do the wrong thing, we want to be able to send out some kind of command or similar, that will completely lock, block, or wipe the sensitive data.
You’re assuming you’ll have a network connection and that sensitive data is all in the same place.
Short of remotely unlocking an encrypted disk on every single boot… and even then…
You’ll first want to lock down the laptop with using the TPM so it only boots kernels signed by you, and also encrypt the drive using the TPM as the locking key so the key is only ever available to a kernel you signed. From there you’ll probably want to use dm-verity to also verify the integrity of the system or at least during the boot process.
Then, on top of that, once online and the machine is still authorized to access that data, you download a key from a server under your control to unlock the rest of the drive (as another partition). And log those accesses of course.
Then, when you want to revoke access to it, all you have to do is stop replying with the key whenever requested. That just puts a ton of hurdles to overcome to access the data once the server stops handing the key. They would have to pry out the key from the TPM to unlock the first stage and even be able to see how it works and how to potentially obtain the key. They could still manage to copy the data out while the system is fully unlocked and still trusted, which you can make a lot harder by preventing access to external drives or network shares. But they have physical access so they kind of have the last word if they really really really want to exfiltrate data.
This is the best you can do because it’s a passive: you stop supplying the unlock key so it’s stuck locked encrypted with no key, so the best they can do is format the laptop and sell it or use it for themselves. Any sort of active command system can be pretty easy to counter: just don’t get it online if you suspect the kill signal is coming, and it will never come, and therefore never get wiped. You want that system to be wiped by default unless your server decides it’s not.
This is honestly an extremely expensive (in terms of skills, maintenance, chance of messing up) solution for a small shop that doesn’t mitigate at all the threats posed.
You said correctly, the employee has the final word on what happens to the data appearing on their screen. Especially in the case of client data (I.e., few and sensitive pieces of data), it might even be possible to take pictures of the screen (or type it manually) and all the time invested in (imperfect) solutions to restrict drives and network (essentially impossible unless you have a whitelist of IPs/URLs) goes out the window too.
To me it seems this problemi is simply approached from the wrong angle: once the data is on a machine you don’t trust, it’s gone. It’s not just the employee, it’s anybody who compromises that workstation or accesses it while left unlocked. The only approach to solving the issue OP is having is simply avoiding for the data to be stored on the machine in the first place, and making sure that the access is only for the data actually needed.
Data should be stored in the company-controlled infrastructure (be in cloud storage, object storage, a privileged-access workstation, etc.) and controls should be applied there (I.e., monitor for data transfers, network controls, etc.). This solves both the availability concerns (what if the laptop gets stolen, or breaks) and some of the security concerns. The employee will need to authenticate each time with a short-lived token to access the data, which means revoking access is also easy.
This still does not solve the fundamental problem: if the employee can see the data, they can take it. There is nothing that can be done about this, besides ensuring that the data is minimised and the employee has only access to what’s strictly needed.
If you find a reliable way to allow for people to use data without being able to copy it: Patent it right away, the entertainment industry will be paying big time for it.
Same for erasing the laptop: You can only erase something as long as you can talk to the machine in some way to instruct it to clean itself up. The guy with the machine in hand can just turn off wifi to stop it from receiving the message…
That’s why I focused on platform security. You can’t fully eliminate the possibility, but you can make it as hard as possible to pull off. TPM+dm-verity is to make it hard for the user to even look at how it works and prevent filesystem modifications that would give them root access to intercept the key loading mechanism.
The part where the laptop continuously check and refreshes the key is to address the second part about just turning off WiFi: make it so if you do that, you have N hours to break the system open before it reboots itself and you’ve lost access to the key for good. This can also depend on hardware-backed checks like TPM measurements and signature, to make sure the data key is only handed over to the expected environment.
It’s the same fundamental principles as Android and Play Integrity: use the security processor to attest the state of the device before the server agrees to send you stuff over. It’s been worked around via leaked keys mostly because Google is lenient for older devices, but the actual secure enclave hasn’t been broken yet.
The point is for the security to hold long enough the key’s gone before they can get it, and without the key the laptop is effectively wiped. That’s plenty for the overwhelming majority of “employee got fired and is pissed off and wants to retaliate”, and the best that can be done without going remote desktop/VDI.
ScaleFusion does this.
+1 for going with a third party on something like this. Your small shop is an expert in whatever they’re doing, don’t try and recreate someone else’s buisness thinking it will be easy
Useful for standardized management of fleets, but requires personnel to maintain and configure it, but I don’t think it’s very effective (or feasible - I doubt they will even join the call for a 1-device contract) for what OP needs.
- use a non sudo user for the user
- somehow get the IP address of that laptop all the time. There are dynDNS solutions like this where the client just needs to automatically download a certain file daily and you know his IP, my implementation is here.
- have ssh access to root with a ssh key. The usual hardening, fail2ban, block using passwords
- open the port for ssh on the clients system
If something goes wrong, login via ssh (you know the dynamically changing IP) and remove a directory or the entire user.
You cannot avoid that a user would copy files from there to a usb stick. Well you could, by using usbguard. Works really well in my experience, just prevent nonsudo users from adding new devices.
And then you need to prevent the user from booting another system, or taking out the SSD and reading it. TPM and boot lock is the right thing here, what Max-P wrote.
Your ability to SSH in the machine depends on the network connectivity. Knowing the IP does nothing if the SSH port is not forwarded by the router or if you don’t establish a reverse tunnel yourself with a public host. As a company you can do changes to the client device, but you can’t do them on the employee’s network (and they might not even be connected there). So the only option is to have the machine establish a reverse tunnel, and this removes even the need for dynamic DNS (which also might not work in certain ISPs).
The no-sudo is also easier said than done, that means you will need to assist every time the employee needs a new package installed, you need to set unattended upgrades and of course help with debugging should something break. Depending on the job type, this might be possible.
I still think this approach (lock laptop) is an old, ineffective approach (vs zero-trust + remote data).
You could implement a ssh tunnel every time it is online. Then you just use a reverse tunnel through that connection.
Yeah, that’s what I wrote too, but that is still a very fragile way. For once, you depend on a network connections, or in the local firewall not blocking you etc.
Reactive, on-demand ssh is something you can do for tech support, not for security imho.
True, forgot about that.
Alternatively yeah some system to load the data online, autodelete after a while of not logging into something.
But the question really is “why?”
Disk encryption should deal with everything. Secure boot and usbguard are useful anyways.
Disk encryption is a control against lost or stolen device and malicious physical access (kinda). Storing the data elsewhere is more a control (or the basis for controls) against malicious insiders.