Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Proper FreeBSD system hardning :)(all for sysctl)

  • Proper FreeBSD system hardning :)
    (all for sysctl)

    security.bsd.see_other_uids
    security.bsd.see_other_gids
    --> Don't show other users processes

    security.bsd.unprivileged_read_msgbuf
    --> Don't allow unprivileges to read kernel buffer (dmesg)

    security.bsd.unprivileged_proc_debug
    --> Don't allow unprivileged to use debugging

    security.bsd.hardlink_check_uid
    security.bsd.hardlink_check_gid
    --> restrict hardlinks to same user/group

    kern.elf64.aslr.enable
    kern.elf32.aslr.enable
    --> Enable kernel address randomization (ASLR)

    security.bsd.unprivileged_mlock
    --> Restrict unprivileged users from loading kernel modules

    sysctl kern.securelevel=1
    --> Cannot lower securelevel
    --> Cannot write directly to mounted disks
    --> Cannot write to /dev/mem or /dev/kmem
    --> Cannot load/unload kernel modules
    --> Cannot change firewall rules (if compiled with IPFIREWALL_STATIC)
    --> System immutable and append-only file flags cannot be removed

    This can make a FreeBSD system more secure, especially on multi-user systems. Securelevel ca even go higher, but those restrictions generally need care.

  • Proper FreeBSD system hardning :)
    (all for sysctl)

    security.bsd.see_other_uids
    security.bsd.see_other_gids
    --> Don't show other users processes

    security.bsd.unprivileged_read_msgbuf
    --> Don't allow unprivileges to read kernel buffer (dmesg)

    security.bsd.unprivileged_proc_debug
    --> Don't allow unprivileged to use debugging

    security.bsd.hardlink_check_uid
    security.bsd.hardlink_check_gid
    --> restrict hardlinks to same user/group

    kern.elf64.aslr.enable
    kern.elf32.aslr.enable
    --> Enable kernel address randomization (ASLR)

    security.bsd.unprivileged_mlock
    --> Restrict unprivileged users from loading kernel modules

    sysctl kern.securelevel=1
    --> Cannot lower securelevel
    --> Cannot write directly to mounted disks
    --> Cannot write to /dev/mem or /dev/kmem
    --> Cannot load/unload kernel modules
    --> Cannot change firewall rules (if compiled with IPFIREWALL_STATIC)
    --> System immutable and append-only file flags cannot be removed

    This can make a FreeBSD system more secure, especially on multi-user systems. Securelevel ca even go higher, but those restrictions generally need care.

    @Larvitz we enable a bunch of these (and more) by default in BastilleBSD

  • stefano@mastodon.bsd.cafeundefined stefano@mastodon.bsd.cafe shared this topic on

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    7 Posts
    12 Views
    @speedbone @yvan absolutely, and doing it on OpenBSD is great as OpenBSD is probably the best platform for this task.
  • 0 Votes
    1 Posts
    4 Views
    Started to touch FreeBSD jail and Bhyve VMs, using them for some programming project. Damn, if only I have such unlimited power near 15 years ago, when I was in university!Need to have a building environment with some libraries for FastCGI and PostgreSQL installed? No problem, write a Bastillefile which enables sshd and mounts my catalog with projects inside the jail via the nullfs magic. Then create thin jail, apply this template to it and boom — I have a ready development environment with ssh access and all necessary stuff. Just connect to it and build the program, all necessary sources are already here.Need to test program on the NetBSD? No problem — just create Bhyve VM with preinstalled netbsd template, then install OS with comp set and setup some services: Nginx, PostgreSQL, spawn-fcgi, etc… Then type C-x d /ssh:drag0n@10.0.0.2:~ in the Emacs, copy sources via Dired and I can test my program on the environment, as close as possible to the my home server.All things looks so integrated in the OS and console software are so good, that it is incomparable with my Docker trips at work When programming become fun again #FreeBSD #bhyve #Bastille
  • 0 Votes
    1 Posts
    10 Views
    The latest article from the FreeBSD Foundation Journal is out: “Writing Effective Bug Reports”.Want your issues seen, tracked, and fixed faster? Here’s how to help:Clearly describe your setup — versions, architecture, customisations.Define what you expected to happen vs. what actually happened.Provide a reproduction path or minimal script if possible.Let’s make reporting bugs easier and more effective, together. 👉 Read the full article here: https://freebsdfoundation.org/our-work/journal/browser-based-edition/embedded-2/writing-effective-bug-reports/ #FreeBSD
  • 0 Votes
    1 Posts
    12 Views
    Running 14.3-STABLE right now. Intel iwlwifi driver with an Intel AX210 card giving me full 250/40 Mbps (the maximum of my DSL line) via WiFi :) Random connection issues, that I had with -RELEASE are solved in the current -STABLE 🙂 5Ghz, 802.11ac with 80Mhz wide channel...We're making fast progress with FreeBSD on the modern desktop 🙂 #freebsd #iwlwifi #wifi #networking