Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - lattera

#136
I'm glad to help. :)

Since Synth is used on DragonflyBSD and DragonflyBSD has ASLR, Synth really should support PIEs. ASLR isn't useful when the application isn't compiled as a PIE.
#137
This is indeed to building applications as Position-Independent Executables (PIEs). The linker will output the file as an executable dynamic shared object (ELF type: ET_DYN) rather than an executable (ELF type: ET_EXEC). The file(1) application is reporting the correct ELF type.

I wonder why Synth even checks what type of ELF file /bin/sh even is. The problem lies with Synth, not with file(1) nor with sh(1). Synth should either relax/remove its file type detection for /bin/sh or learn the concept of PIEs.
#138
17.7 Legacy Series / Re: OPNSense for RPI3
July 15, 2017, 04:59:14 PM
Noctur, I completely understand and agree with you 90%. The RPI3 is vastly underwhelming as far as performance is concerned. In addition to a not-so-powerful CPU, the NIC is connected via the USB bus, thus further limiting the NIC's speed.

With that said, however, I love how portable the RPI3 is. I've got a friend who is developing a wireless radio sniffer with an RPI3, an SDR dongle, and a touchscreen and putting that in an old-fashioned Gameboy chassis.

(I'm not speaking for OPNsense here, but for myself personally). What attracts me to the RPI3 is that it's arm64. Low-level exploit mitigations like ASLR don't do much on 32-bit platforms, but are extremely effective on 64-bit platforms, like the RPI3. I myself have very little interest in any 32-bit platform because of security limitations. The RPI3 being 64-bit provides a nice portable testing platform for projects like OPNsense. I wouldn't use OPNsense on an RPI3 in production, but I would use it for development and testing.

With that said, though, my RPI3 device running HardenedBSD that acts as a Tor relay and is running a Tor-ified network is performing beautifully. I get great performance out of it. I have multiple systems sitting behind it with all their traffic being served by the RPI3. I've got a second RPI3 doing the same thing, but in a portable version that I can take with me anywhere I go. Yay for anonymity on the not-so-anonymous Internet!
#139
17.7 Legacy Series / Re: OPNSense for RPI3
July 05, 2017, 04:35:45 PM
I meant this to be a surprise to the community (not even Franco, Ad, or Jos knew about this), but this weekend I'm going to start on testing building a native generic arm64 build of OPNsense. This would be a good first step towards arm64 support.

However, since dev boards like the RPI3 use u-boot or other funky methods for booting, the image installation image I generate will not work on the RPI3.

Gotta do this one step at a time. Once I get the steps solid for doing a native arm64 build of OPNsense, I naturally plan to apply those same efforts to dev boards like the RPI3 and Pine64.

And, of course, the builds I do will be experimental and based on HardenedBSD 12-CURRENT.
#140
17.1 Legacy Series / Re: [CFT] SafeStack in Ports
May 30, 2017, 04:23:55 PM
Great to hear! Thank you very much for helping out.
#141
17.1 Legacy Series / Re: [CFT] SafeStack in Ports
May 26, 2017, 04:00:56 PM
I've been testing the SafeStack repo since 18 May. I haven't experienced any issues. Can anyone else confirm whether they've had issues?
#142
17.1 Legacy Series / Re: [CFT] SafeStack in Ports
May 18, 2017, 11:22:13 PM
Hey Franco,

You're correct that SafeStack hasn't been enabled for i386. I've only enabled it for amd64 as it has received extensive testing by the HardenedBSD community on amd64. Additionally, ASLR on 32-bit systems is rather weak--there simply isn't enough bits in the address space to randomize. SafeStack would likely be too weak to be worth it on 32-bit systems.

Thanks,

Shawn
#143
It is with pleasure that I announce the Call-For-Testing (CFT) for SafeStack in the OPNsense ports tree. While SafeStack is already deployed for the base operating system, it has not yet been applied to the ports tree (which contains third-party software). This CFT applies SafeStack to the ports tree.

SafeStack is an exploit mitigation developed by the clang/llvm folks. It helps mitigate stack-based buffer overflows. SafeStack depends on Address Space Layout Randomization (ASLR) in order to be effective. OPNsense fulfills that dependency by including HardenedBSD's ASLR implementation, which follows PaX's design. Without ASLR, SafeStack is ineffective as an attacker would know where the SafeStack lies in memory and could use that information to his/her advantage.

To help test, please follow these procedures. Please note that the SafeStack CFT package repo uses LibreSSL instead of OpenSSL as the default crypto library.

1. Login to the web GUI.
2. Click on the System tab.
3. Click on the Firmware subtab.
4. Click on the Settings subtab.
5. Change "Firmware Flavour" to "(other)" and type in "17.1/safestack" into the text field that will appear below. Remove the double-quotes.
6. Check for and apply updates
7 Reboot your OPNsense firewall.
8. Add a reply to this thread letting us know the status of your testing. Success stories are just as important as bug reports.

A sample screenshot with the firmware settings has been attached.

To relate the importance of SafeStack (and exploit mitigations in general), take a look at this article I wrote: https://github.com/lattera/articles/blob/master/infosec/Exploit%20Mitigations/General/2017-03-21-importance/article.md

I'm excited to see OPNsense be the first firewall distribution to ship with SafeStack.

#144
Quote from: fabian on May 06, 2017, 10:51:27 PM
AES-NI is a set of CPU instructions on x86 architectures. It exists to increase the performance of AES operations on those CPUs. For security, it is irrelevant if it is done in software or in hardware. The same plain text with the same key must result in the same cipher text.

Note that I'm not a cryptographer and am not currently an authoritative source to talk in-depth about cryptography. Take what I'm about to say with that in mind.

AES-NI can help resolve concerns surrounding a number of side channel attacks, thus improving the security of sensitive data. You'll also usually notice a performance increase in cryptographic operations with a good hardware crypto accelerator, which AES-NI is considered. In short, vetted hardware cryptographic accelerators provide enhanced security and performance.

AES-NI is a welcomed and well-used feature. However, for an open source project which aims to be deployable to a wide range of devices, OPNsense may decide not to force use of AES-NI. Indeed, OPNsense already supports and encourages AES-NI and other crypto accelerators, though use of them is not mandatory.

edit[0]: grammar and encouragement
#145
SafeStack is working for me on my production OPNsense installation.
#146
General Discussion / Re: /proc content?
February 21, 2017, 12:12:45 AM
It'll be in 17.1.2. So stay tuned. :)
#147
Development and Code Review / Re: ASLR unsicher?
February 15, 2017, 10:44:48 PM
ASLR is still an awesome addition to OPNsense since the AnC attack doesn't really apply to the applications installed on a typical OPNsense deployment. In order to carry out the attack, the attacker must be able to instrument the MMU, which is only possible with applications that accept and execute attacker-controlled code and provide performance APIs (like javascript in popular web browsers).
#148
General Discussion / Re: /proc content?
February 11, 2017, 10:54:22 PM
I've now committed to the master branch the work needed to harden procfs. After additional testing, it should go out in a future patch release.
#149
General Discussion / Re: /proc content?
February 10, 2017, 03:12:55 PM
OPNsense doesn't mount procfs by default. procfs exposes some rather interesting security issues. I'd encourage people not to rely on procfs.

I'll port over HardenedBSD's procfs hardening work sometime over the next few weeks. And since procfs is not mounted by default, my procfs hardening work can be pushed out with a patch release.
#150
ARM64 support by upstream FreeBSD is getting closer every day. There are still a few blockers before ARM64 becomes a reality (clang/lld 4.0.0 in base, jemalloc issues, etc.).

I'm currently using an RPI3 to create a Tor-ified wireless network at home. Meaning, every outbound TCP connection that any device connected to the network makes goes through Tor. With the experience I have on the RPI3, I can say that it would be underwhelming as a real-world firewall.

Regardless of FreeBSD's support for the RPI3 and ARM64, in order to test out new devices like the RPI3, we would need to have a 12-CURRENT branch in the OPNsense src repo. That probably wouldn't be a bad idea, but the main branch is at 11.0-RELEASE.