-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split the security-misc
into security-misc-shared
, security-misc-desktop
and security-misc-server
#187
Comments
Ok.
Not really. I always developed everything in universal ways to not loose any functionality that can be used if using Debian. This is going to stay this way.
Both Kicksecure, and Whonix have e-mail server and rsync server functionality. So far no issues because of any hardening.
You mean in theory, a project with supposedly exponentially more traffic (such as protonmail while not on the level as gmail for sure having much more e-mail traffic). If such a project was to consider Kicksecure, I would assume they have engineers who figure that stuff out. It's not really something I can avoid breaking because I don't administrate such high traffic systems.
The names are good just another consideration... Do you see CLI configs which aren't applicable to Also I'd keep the current In summary, at least 3 packages:
I hope not more packages. (There's a similar issue with packages vm-config-dist or usability-misc - is it for desktop or server...) |
Let me give some examples first. Only applicable to workstations:
Only applicable to servers:
As you see, keeping compatible for both ends stifles us.
CLI is a term we should not use. You can use your desktop workstation with no GUI. But you can still apply the privacy extensions and mac randomization and the network hardening. The classification here is server and workstation. We should make the following assumption only: I think the differences are significant enough to warrant a complete split of the package. Having extra additions and having one universal package is more complicated in my opinion. But if you think this is easier to manage and maintain, then go with that. But once again, I personally think server compatibility is a distraction here, and is better dropped. |
Good.
Firewall very most likely needs a dedicated package and there's quiet a lot technologies to choose from. I guess netfilter-persistent + nftables might be most suitable, configurable. Dunno about UFW and complex security settings. Or porting whonix-firewall which has some general security features to Kicksecure.
Probably also good.
What's currently in security-misc - which is a lot - seems very compatible with both. Some configs, systemd units suitable by default for a server might still be suitable on an opt-in / per VM basis for desktops.
That's... Well... For the future.... Because kicksecure-meta-packages (and whonix-meta-packages) uses this term a lot and difficult to migrate away from it. Happy to avoid the term CLI for security-misc. I do prefer the word "desktop" over "workstation" just because "workstation" in Whonix "workstation" does not mean "desktop" but just the "the place where most applications / servers run".
Having a shared package is an absolute must have to avoid code duplication (or config duplication). This is also how Debian (and probably most other distributions) handle packaging. No code duplication. And I agree with this. For the few places where code was duplicated in Kicksecure it has always been a hassle to not only update one but both.
You could contribute to security-misc-desktop only. Only security-misc-server might take a long time to materialize. |
How about having two separate packages, but only one repository. This is common practice for a lot of projects. There is no make file per se but, it is like having too make targets in the Makefile.
I can create a make file. Make dependencies can also be installed this way easily. I am not sure if this would be conventional or common place in debian packages. Calling |
That feature needs to be removed when ported that's for sure.
Right but many parts don't need to be re-invented. Examples:
That's how I would probably do it. Obviously, it would not have any anonymity features anymore. Only security features.
For example the grub config based Linux kernel parameter hardening can remain shared for the most part. (Not sure what needs to be different.)
All in 1 repository, this repository but with sub folders (shared, desktop, server) seems actually better indeed. But some implementation details... Needs to be genmkfile style. Meaning: no manifest file maintained by hand. I.e. not declaring each and every file etc/default/grub.d/40_cpu_mitigations.cfg copy to /etc/default/grub.d/40_cpu_mitigations.cfg. Similar to the already existing
Make files are to be avoided. Maybe a make file that runs a bash script if really needed but I hope not. genmkfile also has all the usual targets, so things such as I might implement this in the mid future. Faster if contributed. Feel free to start adding stuff to desktop / server sub folders. The more stuff is there the more obligated I'll feel to implement this. |
security-misc
into security-misc-shared
, security-misc-desktop
and security-misc-server
Ok I think splititng the package is a no brainer and is easy to implement. But handling the building of these three packages within the same repository will be the optimal way to do things. I do not understand why you are trying to avoid makefiles at all costs. I can easily write a makefile for this task and it would work very well. I don't know much about genmkfile, so I'm not sure how that would be implemented. I will create pull with the different config files that are meant for desktop or server specifically, it will be incomplete, but work can be tracked better that way I think. |
A broad list of what and how I think stuff should be split between packages: Should be moved or added to the desktop version:
Should be moved or added to the server version:
Anything else should be shared. |
Mostly good.
Some exceptions needed.
Useful for both, desktop and server.
What do you mean by hardened malloc exceptions?
How come? |
Ok.
You can see it as an implicit (meaning not previously spelled out) Kicksecure policy that all packages maintained by Kicksecure, that were invented by Kicksecure (meaning no such packaging existed before) need to be simple, generic, genmkfile based, no make files, no manifests. If I add a repository that isn't compatible with genmkfile it creates a mess for the build system and my development, build processes. Packages need to be easily maintainable, potentially few regressions, robust, simple, you name it. Because at time of writing, I am maintaining 2 Linux distributions, Kicksecure (56 repositories), Whonix (16 repositories), for various platforms (bare metal, Qubes, Virtualbox) + documentation + server + user support + bureaucracy. So I need to be extra strict to have high quality implementations that may initially take a longer time but are therefore low maintenance in the future. |
I see your point. Good approach to make sure the project does not die randomly, given its small size. I do not know what other ways there are to achieve this. But I think this could be improved upon, since it might make development harder at the same time whilst easing maintenance. I am not educated in the subject, so I might be wrong. |
This is overall good idea. This link is broken for me:
Should there be changes to hardened_malloc settings for the desktop/workstation variant compared to what currently exists? |
I hope not. On the server hardened malloc is easier to use. (Most likely no VirtualBox, no GUI browsers that can break.) |
This issue is problematic. The supposed server support of this package is not real. Only a subset of server types are supported inherently due to network hardneing in the kernel. Routing won't work for example. But if we say yes most servers, then we can split the package. But really, I think before that, the unnecessary complexity of package content (with no benefit) should be addressed to facilitate the process. |
I am into this. Actually I am more into the firewall thing, because it does not exist yet, so it is much easier to do. Splitting and gutting this package is however very undoable. Also good insight, no firewall for server, server admins should do that themselves. actually server also should do hardening themselves too. Server support is not a good idea for anything. For a desktop tho, it is not really difficult to write a universal desktop firewall config that won't break anything at all. We should not depend on ufw or firewalld, those are too high level, unnecessary. We are the OS, so we gotta use nftables configs. It should be trivial to write one. For example:
A config like this can't break anything anywhere on 99% of desktops. Just an example, a proof of concept. Anyway, as I said, this package needs a fresh start or something to be separated properly. Unnecessarily complex and entangled inner structure. Needs a clean-up. |
First steps needed:
But also not that I don't support keeping the server support. A non-worth use of energy and resources if you ask me. Server admins should do their hardening themselves. Because depending on the function of the server, the way we harden will be absolutely different. The current hardening for example will break a server that needs to support packet forwarding. Which is valid and not that rare. So we already do not have server compatibility anyway, and we kinda can't in a real sense, because servers are really different from each other inherently. You can use them for different purposes. Anyway, just a side note. |
Firewall needs to be discussed elsewhere. Off-topic here.
|
We don't necessarily need to implement But should split into:
I don't see how permission hardener can be converted into a systemd unit. Systemd units running scripts is a good design. |
I think it's worth noting that what is worthwhile on a server vs. what is worthwhile on a desktop is somewhat a matter of opinion. Looking at some of the discussion here, for instance:
Why? What about a workstation where multiple users are logged in at the same time and use a user switching feature to manage multiple simultaneous logins? Should everyone with physical access to the machine be able to snoop around in what the other users are doing?
I think this is a bad idea in general. There are plenty of reasons someone might plug a USB drive into a server, especially if the server is a tower rather than a rackmounted device. I can see the argument to be made here, but this seems like it could be asking for trouble.
As I understand it, Debian (or more properly udev) automatically detects the modules it needs and loads them on an as-needed basis. Disabling a module disables a hardware feature, and that's not something that a distro developer should do unless a specific piece of hardware is known to be trouble. The system administrator is the only one who can know what hardware they do and don't need, and they can configure blacklisting themselves. I think I agree with the other comments, but more discussion probably needs to be done on some of these points. I'm currently compiling a list of what I believe should be moved to desktop, what I think should be moved to server, and what should remain shared. |
Alright, I've gone through and looked at every file in security-misc, categorizing them into shared, desktop, and server categories as best I can. The full audit is at https://gist.github.com/ArrayBolt3/1fef29b2214f27054cd85785530e7f7f, and a forum discussion is available at https://forums.kicksecure.com/t/splitting-security-misc-into-shared-desktop-and-server-packages/674. |
This might be more an issue of feasibility. Not sure it is feasible on the desktop. There are quite some issues: https://github.com/Kicksecure/security-misc/issues?q=is%3Aissue+is%3Aopen+%2Fproc+in%3Atitle Otherwise, sure, hiding /proc would be awesome. |
Servers and workstations differ heavily, and there is no universal hardening that is also fine grained for both. A server is inherently a network. This package should prioritize workstations, as kicksecure is meant to be one. I do not support the idea of also being a server system. Firstly, some of hardening already eliminates the possibilty of kicksecure usage on specific server types, like a file sync or an email server might already face problems because of network hardening. They may have gone unnoticed, but this doesn't change the fact. The two reasonable options are:
security-misc-desktop
and onesecurity-misc-server
. At this point you can choose any other name you like.But this has to be addressed in the near future, for the project to develop further.
The text was updated successfully, but these errors were encountered: