kern.randompid=1
#security.bsd.see_other_uids=0
security.bsd.see_jail_proc=0
# see also rc.conf kld_load="${kld_load} mac_seeotheruids". id staff=20
security.mac.seeotheruids.specificgid=20
security.mac.seeotheruids.specificgid_enabled=1
kern.random.fortuna.minpoolsize=512
sysrc firewall_enable=YES
sysrc firewall_type=workstation
Governemnt agencies. As I will use it for "Pentesting".Who is the attacker?^^
There is security(7), and https://www.freebsd.org/doc/handbook/security.html, but..
I only need the base install, my custom program, and internetGood question. For security I find some info here, some info there, use a package like lynis. Centralized info i did not found.
sysctl.conf depends largely on your personal usage. So there is nothing general.
freebsd-update IDS
) & enable the workstation firewall, if needed configure it to allow access to your program. With the additions found throughout this thread you have a pretty good basic host security. Choose a strong password & change it regularly.I will be making a firewall in hardware aswell etc.. I will take to the extreme and I will even strip FreeBSD down to the point where it is almost impossible to use for any other use than it was intended. Which is pentesting using my program. Though I will have multiple firewalls and I couldn't get Tor to work with pf. If you know a firewall for Tor please let me know, and not just pf, ipfw and all the built in firewalls would be appreciated <3 Sorry for asking alot.What's the attack surface? To mitigate access to the ME & any OOB management, you need an external packet filter. Check the base like said above (+freebsd-update IDS
) & enable the workstation firewall, if needed configure it to allow access to your program. With the additions found throughout this thread you have a pretty good basic host security. Choose a strong password & change it regularly.
During a pentest it is also good for the blue team to attack back at the red team in certain cases. Trying to deanonymize the users such as the fbi did with javascript once. I can't use the pkg system for reasons so is there a way to do something like proxychains or torsocks without actually having the program, perhaps a .sh? Also I'm a grey hat "exploiter" so when I say pentest I don't always do good. Sorry if you are dissapointed.Then you already know about nanobsd(8) & picobsd(8). What do you mean with "a firewall for tor(1)"? Traditionally, you have an external packet filter (single, extra phys. system solely for that purpose) & application gateway in a DMZ which you can set up as a collection of jailed proxies (SOCKS, HTTP, DNS, NTP, ...). There's a security/torsocks & net/tsocks to socksify any application. Nowadays you need to inspect the data streams, which is a topic of it's own. So you want to pentest another host or network, and your program is doing that? Then why do you want to harden that system?
No, not at all. tsocks(1) is a shell script. It might serve as a start for your purpose. But since you can't use packages, I'll assume you don't have root privileges & you need to download some library into your $HOME to be available for your script. Where we have a topic that wasDuring a pentest it is also good for the blue team to attack back at the red team in certain cases. Trying to deanonymize the users such as the fbi did with javascript once. I can't use the pkg system for reasons so is there a way to do something like proxychains or torsocks without actually having the program, perhaps a .sh? Also I'm a grey hat "exploiter" so when I say pentest I don't always do good. Sorry if you are dissapointed.
Simple really. Remove everything in rc.conf and don't allow users. System hardening completed.Is there a FULL cheat sheet for rc.conf sysctl.conf etc..? I would like to review all the things I might need. Thanks <3
Edit: Thank you guys so much for the useful replies and if anyone would like to add more ideas let me know! <3
Encrypt your hard disk. And do it well.^^Government agencies.
And cut/unplug every network connection. On a ZFS machine, blank out loader.conf(5), too. Information added: zero.Simple really. Remove everything in rc.conf and don't allow users. System hardening completed.![]()
My encryption passwords are hundreds of chars long. Root passwords are 20.Encrypt your hard disk. And do it well.^^
That won't prevent anyone from circumventing them if they have local access to the machine.My encryption passwords are hundreds of chars long. Root passwords are 20.
Obviously you can e.g. reset the (most) machine & boot from external media, but how would you circumvent the password/key to access encrypted data? Especially if it's two tokens, i.e. a key on a thumb drive or smartcard plus a password or fingerprint via sensor? Then there are these One-Time-Passwords.That won't prevent anyone from circumventing them if they have local access to the machine.