LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-11-2019, 06:23 PM   #1
cerber
LQ Newbie
 
Registered: Dec 2017
Posts: 21

Rep: Reputation: Disabled
How OpenBSD is secure compared to other operating systems?


I read many times OpenBSD is the most secure system and it has a minimal code base which affects its security. I'm curious how OpenBSD is secure comparing to other operating systems from BSD family (mainly FreeBSD, NetBSD, and HardenedBSD) and comparing to any hardened Linux (for example Gentoo, Arch, Slackware, Debian, RHEL etc.). Let's take into account FreeBSD - if we wish containerization, it has jails, if we wish MAC then FreeBSD has its built-in while in Linux we have a lot of different approaches and solutions - SELinux, RBAC, Apparmor, Firejail, Docker, LXC etc.
Let's consider two cases:

1. desktop - we assume using this system mainly for day-to-day operations, programming, sysadmin, running pentesting distro in VM etc.,
2. server - a website written in whatever programming language (for example PHP, Python, Ruby), mail server, IRC bouncer, LDAP, VPN etc.
Are default applications in OpenBSD such as OpenNTPd, httpd, OpenSMTPd more secure than tlsdate, nginx, postfix and dovecot?
 
Old 01-11-2019, 06:43 PM   #2
JWJones
Senior Member
 
Registered: Jun 2009
Posts: 1,444

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
I recently read this article, updated as of last month, regarding OOTB security ranking of various OS:

https://www.quora.com/Is-BSD-more-secure-than-Linux

Granted, security is a process, and even an OpenBSD box can be made unsecure by poor configuration choices.
 
Old 01-13-2019, 09:15 AM   #3
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
As you must have seen when you asked this question on multiple subreddits ... everyone has their favorites, and everyone has an opinion.
I have one too, which is:

Security is a process, it is not a product you install.

Whether "desktop" or "server" makes no difference. Any application you happen to run is a collective. The application, supporting services, libraries, subfunction systems, operating system, physical architecture, and microcode are all part of delivering something ill-defined and unclear called "security."
 
4 members found this post helpful.
Old 01-05-2021, 05:05 PM   #4
rufwoof
Member
 
Registered: Nov 2017
Distribution: Kernel+busybox+ssh+vnc+alsa (framebuffer)
Posts: 201

Rep: Reputation: Disabled
OpenBSD comes secure by default. As a desktop system with a browser installed it keeps things like ssh keys and hardware fingerprinting much more obscured than many Linux systems. Being a single 'whole' rather than a kernel + third parties (as per Linux) its more inclined to be more secure.
 
Old 01-06-2021, 12:34 PM   #5
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Talking

I do not think I ever saw this question

But one development in OpenBSD I noticed is pledge(2) and unveil(2) has been added to Firefox. I noticed it with 6.8 and you can adjust using files in /etc/firefox-esr

To me that minimizes some risk Firefox can present to you.
 
Old 01-07-2021, 07:24 AM   #6
rufwoof
Member
 
Registered: Nov 2017
Distribution: Kernel+busybox+ssh+vnc+alsa (framebuffer)
Posts: 201

Rep: Reputation: Disabled
Firefox-esr works better for me in OpenBSD, chromium throws out more regular 'Oh snap!'. I had noticed the 6.8 pledge/unveil settings for /etc/firefox-esr, but haven't changed the defaults. The only changes I've made are to redirect the default search engine over to DuckDuckGo instead of Google.

Security is subjective ... data, keys (ssh), fingerprinting/tracking, penetration/persistence ...etc. At least from a 'desktop user' perspective.

If userid separation can be breached, such as privilege elevation at the main/host level then its game over. If that is reflected into a container then its still most likely game over.

The way I address it is I boot a minimal Linux that wifi net connects and establishes sound, and within that I boot OpenBSD using kvm/qemu. I do it that way as otherwise OpenBSD doesn't 'see' my wifi (in the kvm/qemu OpenBSD it picks up the wifi net connection as though it were hard wired ethernet). If for instance I use the Linux (host) system to ssh and store data then that is relatively secure and the ssh keys are outside of the OpenBSD system - that I use for browsing. In addition to that laptop I also use a old desktop system as a server, that has the main TV as its display. A nice feature with kvm/qemu is that you can boot in snapshot mode, i.e. all changes are lost at shutdown and the system reverts to being clean, so the server is a form of DIY VPS with disposable sessions, that when I vnc into that from my laptop (or phone) and browse, has sites see the servers fingerprints and IP, not the device I'm actually using. I also tunnel traffic (socks5), so sites see that IP, not the servers IP, nor can my ISP see any traffic other than just the ssh link/tunnel that socks5 uses. Yes if google has say 1 pixel transparent images in many many web sites (one way or another) that provides them with what source IP and when that page was viewed, or send inaudible tones to one device and have other devices report back that they hear that tone ... along with the numerous other 'tracking' methods used, then it is the servers IP that is reported, where any one of a number of individuals could be vnc controlling that server. Giveaways would of course be if a direct login to a site occurred and was recorded, such as logging into google/yahoo/facebook/etc. services - which I personally do infrequently. Similarly DNS lookups aren't directly associated, but instead are sourced from a multi-shared source (socks5 IP/ssh server). Nor is any javascript run on the actual device, again that's run on the server. In some Linux distros/browsers for instance browse to file:///sys/devices/virtual/dmi/id ... and javascript could pick up/feed-back details such as motherboard serial number/whatever, so even if you went through tor/tails but a site was given permission to run javascript (as is more often needed in order to just see a web sites content), then that's usually game-over, but in my case has the servers motherboard serial number being reported back, not my actual devices motherboard serial number.

So for me the setup I use addresses data security (separation); ssh key security (again separation); tracking/fingerprinting; And penetration persistence risk factors. But as others have said that is a process, not a product.

If I tried setting up say a Linux box to be secure, more likely I wouldn't configure something correctly such that that 'bug' invalidated the security. As I set things up however and that is relatively secure as largely I'm just using defaults - that the OpenBSD crew had already set to secure defaults. My Linux host levels can be insecure, as they're not used for browsing, such that any Linux insecurities are irrelevant (a hacker would have to 'own' the OpenBSD system(s) and escape that in order to get to the Linux layer).

Last edited by rufwoof; 01-07-2021 at 07:46 AM.
 
Old 01-07-2021, 07:56 AM   #7
rufwoof
Member
 
Registered: Nov 2017
Distribution: Kernel+busybox+ssh+vnc+alsa (framebuffer)
Posts: 201

Rep: Reputation: Disabled
Fundamentally if you want security you have to forego using a gui browser. Base OpenBSD doesn't come with a browser and as such is more secure - but can you live/work with that? http/https is pretty much now google owned/controlled - provided at zero $ cost, but instead paid for in the form of 'oneself' - all/any personal data/activities being recorded, as though you'd given permission for a stranger to enter your home and report back all activities.

That is in breach of human rights in many countries, but is overlooked. Capitalism ($$$'s) trumps freedom.

Some, perhaps even many OpenBSD users may be content with just base OpenBSD. Calculator (xcalc), graphical editor (xedit) and ssh - that facilitates ssh'ing into a server where you aren't giving others permission to run things on your local device, and from where you can communicate with others, such as via maillists, irc, whatever. Separate to that you might run a graphical browser, perhaps via vnc, or using a phone, where you accept that everthing done via that can be monitored/recorded, and being mindful of that take care with what you do share/do. In effect consider it as being hacked/open by default.
 
Old 03-31-2023, 10:47 PM   #8
DracoSentien
Member
 
Registered: May 2019
Location: Bronx New York
Distribution: Debian
Posts: 38

Rep: Reputation: Disabled
Quote:
Originally Posted by rufwoof View Post
Fundamentally if you want security you have to forego using a gui browser. Base OpenBSD doesn't come with a browser and as such is more secure - but can you live/work with that? http/https is pretty much now google owned/controlled - provided at zero $ cost, but instead paid for in the form of 'oneself' - all/any personal data/activities being recorded, as though you'd given permission for a stranger to enter your home and report back all activities.
There is unveil and pledge for the main web browsers, in ports, and OpenBSD has LibreSSL for HTTPS etc... However, VPNs and SSL/HTTPS can be cracked by the NSA unlike a well configured SSH/SSHD and TOR (can only be de-anonymized a small fraction of the time). Xenodm is highly secure too.


Quote:
Some, perhaps even many OpenBSD users may be content with just base OpenBSD. Calculator (xcalc), graphical editor (xedit) and ssh - that facilitates ssh'ing into a server where you aren't giving others permission to run things on your local device, and from where you can communicate with others, such as via maillists, irc, whatever. Separate to that you might run a graphical browser, perhaps via vnc, or using a phone, where you accept that everthing done via that can be monitored/recorded, and being mindful of that take care with what you do share/do. In effect consider it as being hacked/open by default.
[removed]. I guess you never heard of chained SSH socks 5 proxies or torsocks or whatnot with ssh w/ spoofed mac addresses ? etc.. etc..

Last edited by DracoSentien; 04-01-2023 at 08:22 AM.
 
Old 03-31-2023, 11:03 PM   #9
DracoSentien
Member
 
Registered: May 2019
Location: Bronx New York
Distribution: Debian
Posts: 38

Rep: Reputation: Disabled
Quote:
Originally Posted by cerber View Post
I read many times OpenBSD is the most secure system and it has a minimal code base which affects its security. I'm curious how OpenBSD is secure comparing to other operating systems from BSD family (mainly FreeBSD, NetBSD, and HardenedBSD) and comparing to any hardened Linux (for example Gentoo, Arch, Slackware, Debian, RHEL etc.). Let's take into account FreeBSD - if we wish containerization, it has jails, if we wish MAC then FreeBSD has its built-in while in Linux we have a lot of different approaches and solutions - SELinux, RBAC, Apparmor, Firejail, Docker, LXC etc.
Let's consider two cases:

1. desktop - we assume using this system mainly for day-to-day operations, programming, sysadmin, running pentesting distro in VM etc.,
2. server - a website written in whatever programming language (for example PHP, Python, Ruby), mail server, IRC bouncer, LDAP, VPN etc.
Are default applications in OpenBSD such as OpenNTPd, httpd, OpenSMTPd more secure than tlsdate, nginx, postfix and dovecot?
OpenBSD is definitely the most secure OS but it is built around the idea that insecurity is caused by the end-user doing something stupid as OpenBSD is for computer/tech expert users only basically by hackers for hackers or a research operating system for security researchers. A very first release of UNIX was called PWB or programmer's workbench and Linux is not UNIX (non-TM).

The code base is cleaner, audited and the code quailty is generally higher. It is also more minimal. Much of the splendor of OpenBSD hides in the coding style of the developers.

OpenBSD has pledge and unveil and while Firefox etc.. can use firejail/apparmor , on Linux, the latter is stupid for similar reasons to SELinux it is complicated to set up right. Much of the security of OpenBSD is invisible to the user and just works.

The list of OpenBSD security innovations is on the OpenBSD website and OpenBSD turns on all available security features unlike other OS's where it might be optional. Generally a hacker exploits an app not the OS but OpenBSD can severely limit the damage that can be done in the rare instance it happens on the OpenBSD system :

https://www.openbsd.org/innovations.html

The short answer is that it is more secure in those two instances but you have to be a competent sysadmin and have UNIX skills. There is really much more to say but I am tired and it is late at night.

P.S. OpenBSD is not meant to run in a VM you can do it but is a dumb thing to do IMHO.

Last edited by DracoSentien; 04-01-2023 at 08:18 AM.
 
Old 04-01-2023, 01:52 PM   #10
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
DracoSentien, comments like those in post #8 aren't acceptable at LQ. If you'd like to continue participating here, please refrain from this moving forward. Thanks.

--jeremy
 
Old 04-01-2023, 07:02 PM   #11
verndog
Member
 
Registered: Oct 2007
Posts: 278

Rep: Reputation: 67
Using Ubuntu as my main daily driver. Also have several other Linux distros installed, I use from time to time.
I have used BSD in the past, since my work was in Unix(long since retired.)
After reading these comments, I'm going to install a version of BSD on another HD and renew my knowledge and hopefully go forward.
 
Old 04-06-2023, 09:55 AM   #12
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
The base install of OpenBSD is secure by default. However as you start installing applications you may introduce problems to your system.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 3 open source content management systems compared LXer Syndicated Linux News 0 06-30-2014 10:10 AM
which linux Operating systems applied to Embedded systems? ubun2os Linux - Embedded & Single-board computer 3 03-14-2013 04:24 PM
LXer: Isolating Your Linux Systems - How Sharing Operating Systems Can Put Holes in Your PCI Complia LXer Syndicated Linux News 0 04-09-2011 04:10 AM
What is the future in linux as compared to windows operating systems......?? charlesedwin Linux - Enterprise 7 12-31-2009 10:02 PM
ATI compared to Nvidia RATING SYSTEMS confusion! bigalexe General 2 02-20-2008 10:47 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration