HNHacker News
TopNewBestAskShowJobs

hxtk

508 karma · joined August 12, 2015

submissionscomments
hxtk··on China issues new encryption import control
I haven't heard anything about not using enough rounds, so it's possible that my information is just out of date. My understanding is that AES-128 was chosen to be resistant against classical attacks, and AES-256 was chosen to achieve the same level of security as AES-128 against attacks that incorporate quantum computers and Grover's algorithm.
hxtk··on Docker Hub Registry is down
At the time that you made your comment, I think it had the potential to be accurate for a lot more people because at that time my understanding is that the outage was ongoing.

With the incident now resolved, I have the benefit of hindsight to say it was down for a total of two hours, which is well within error budget to maintain 99.5% monthly uptime, and since this isn't part of a larger pattern (so far), they're within budget for 99.95% yearly.

I think that for most companies that aren't already heavily invested in a highly available container runtime platform, the cost of this kind of downtime will be less than the cost of self-hosting something better. Especially if they're not in a situation where registry downtime implies an equal amount of customer-facing service downtime.

hxtk··on Apache Log4j vulnerability shows the importance of SBOMs of running apps
> “it’s a lot of work” should never be a reason for not securing an system.

It is, though. Software bugs are almost entirely optional: we could just formally verify every piece of software with a mathematical proof. Computer software would still be in the 70s or 80s because of how long that takes, but if security is the only goal of a system, that's what we need to be doing.

In practice, projects balance a multitude of concerns and, while important, cybersecurity is only one of them.

> It’s also invite to solve a problem so it’s not a lot of work. It should be easy to secure your systems from making outbound connection.

This, I agree with wholeheartedly. The way to improve security is to address the factors that put humans in situations where skipping important security steps makes sense.

hxtk··on Apache Log4j vulnerability shows the importance of SBOMs of running apps
Netfilter (the kernel backend for the deprecated {ip,arp,ip6,eb}tables and the newer nftables) supports allow/deny by ipsets, and you can configure some DNS resolvers such as dnsmasq to populate an ipset from a DNS name.

This has a few issues, though, such as the fact that it is impossible to allow one site but not another if they are both hosted at the same IP address. After all, DNS names are basically just aliases for IP addresses unless the application layer protocol assigns them some semantic meaning (as is the case with HTTP and TLS).

If that matters, you do have to resort to something protocol-aware like an intercepting HTTP proxy that inspects the Subject Name Indicator for TLS traffic or the Host header for plaintext HTTP traffic. Or a regular HTTP proxy, if your application supports that configuration.

hxtk··on Log4j: Between a rock and a hard place
I'm not under the impression that GP means to suggest you personally have any obligation to donate time to OSS by virtue of being an employee at a large company.

Something I believe we agree on is that it is in the interest of large tech companies to spend time fixing critical security bugs in their own programs, regardless of who originally wrote the malfunctioning code and for whom said code was written.

One way to fix those bugs would be to create a patch for the external OSS library in instances where such a library is the origin of the vulnerability. This is especially practical when that library is used heavily as a basic piece of the company's common software development framework.

GP appears to be arguing that these patches should be upstreamed instead of simply being maintained internally until the bug is patched by someone else in the OSS community.

hxtk··on Don't soften feedback
> I feel like there's always something odd about some of these taught communication techniques, where I feel like there's a reason these communication styles don't come naturally to us, and there is a bit of a manipulative aspect to them.

This definitely can be true, but in practice these techniques shape your understanding of people. Motivational Interviewing and NVC both draw upon an attitude of acceptance—that is, treating the person you are talking to with accurate empathy for their perspective, support for their autonomy, affirmation of their strengths and efforts, and the belief that they have intrinsic worth.

Someone who is comfortable thinking of themselves as a manipulator could pretend to believe such things for the sake of coming up with the right thing to say, and if they're a skilled liar then they would likely get away with using the technique manipulatively at least some of the time, but if you interpret your interactions as if you are accepting of the people in your life then it is far more natural to genuinely think of them with an attitude of acceptance, which is fundamentally at odds with manipulative behavior.

That is, I would argue, the primary benefit of learning these conversational styles for a layperson: the language you use shapes the way that you think, and intentional non-violent communication begets non-violent thought until non-violent communication becomes natural.

hxtk··on I don’t know how to count that low
Another useful feature is some part of my environment (I've used it in Gnome 3 on both Fedora and Arch, but it doesn't work in RHEL; I'm honestly not sure what part of my stack is providing the feature) lets me pres Ctrl+Shift+U and enter arbitrary unicode. I've memorized the hexadecimal representation for a few common symbols and can enter them into basically any text field.
hxtk··on Technology “Addiction”
Your choices are already being shaped in that way. That's why, for example, modern residential roads are designed with shorter sight distances, narrower lanes, speed bumps/humps, and more roadside shrubbery compared to their counterparts from a century ago. It turns out that the mere suggestion of a speed limit—albeit carrying force of law—does not make everyone choose to drive that speed. Instead, human factors are taken into account so that it "feels more natural" to drive the road at the speed the engineers intended. We try to make it easier to use the system in a way that is safe and accomplishes the user's goals than in a way that causes harm.

Human factors isn't a binary question of whether or not we influence the choices made by individuals. In the real world, individual choices are always influenced by a variety of factors. The question is that, when we are aware that a particular design decision will influence the choices of individuals, is it ethical to make that decision in whatever way maximizes the profitability of the product, without regard for any predictable impact it will have? Simply maintaining willful ignorance of human factors in engineering does not make the world functionally better or worse than if that same decision had been made from a position of understanding of those factors and an attitude of malice/benevolence/apathy.

I don't think it's contradictory to tell consumers to make their own choices while at the same time telling producers not to design products that needlessly influence consumers to make destructive choices.

hxtk··on Should random() be banned?
It's true that there's no one-liner you can use to sum up the whole field of software engineering, but that doesn't mean none of them are useful.

I completely agree that things which need to be fast should be designed structurally to be fast.

But which RNG function you use in a given function is about as far you can get from an architectural decision. You shouldn't need to refactor large swathes of your codebase to accommodate a substitution of one random number generator for a faster one.

hxtk··on Should random() be banned?
It's true that most people who aren't doing sensitive work don't need cryptographically secure random number generators, but if you use something secure by default, it probably won't cause problems, and to the extent that it does you can catch them with some profiling. If you use insecure RNG by default, it probably won't cause problems but if it does you'll find them when a black hat hacker compromises your system in production.

Very few people set out to roll their own crypto. The issue in my experience is less about someone writing their own hand-optimized password hash function and more about people having overly-narrow views of what counts as security critical code.

hxtk··on Why It Matters Whether Hashed Passwords Are Personal Information Under U.S. Law
In the theoretical sense what you care about is whether you can safely assume those hashes will always be unique.

In the practical sense what matters is whether you can safely assume the hash for a particular user in a particular system will ever be unique.

E.g., if I had a snapshot of a database mapping identities to password hashes and a log of all the hashes that had been computed by the auth server, I could make very reasonable guesses about who logged in at what time.

With that said, I am not a lawyer and I have no idea what the legal significance of all that might be.

hxtk··on Open Source Mission Control Software from NASA
> I'm sure the nation-states have the money and people to work it out for themselves

I'd suspect it's less a matter of preventing them from developing the capability and more a matter of making them spend their own money to do so, rather than getting it for free and using those resources to develop some other capability.

hxtk··on Linux Hardening Guide
A lot of what they talk about also conflates security with anonymity. While it may be good advice for connecting to coffee shop WiFi on your laptop, for a secure network, being able to tell who performed an action is less of a security hazard and more like a security requirement.
hxtk··on CentOS Project shifts focus to CentOS Stream
> It doesn't matter because I don't spend any money, but I'll probably swap to Ubuntu next time I re-build my server.

It kind of does matter, though, because at least for me, I am much more familiar with my home systems than what I use at work.

I started out using Redhat at work, so I migrated my home lab to CentOS to gain more familiarity, which meant that when new projects started, I advocated for Red Hat. But if I'm forced to migrate to a different production grade distro at home and develop expertise with it, the next time there's a question about what OS to use for a new project, I can imagine myself pushing for the one I will have spent the last few years tinkering with at home by that point instead.

hxtk··on CentOS Project shifts focus to CentOS Stream
It's a bundle of jinja2 templates for YAML files defining Kubernetes API resources. There's an accompanying application, Helm, which applies values to the templates and handles the interaction with the Kubernetes API.
hxtk··on German court forces mail provider Tutanota to insert a backdoor
You can also just push a pen through the zipper to open it without leaving any evidence. Simply run both locked-together sliders back over the zipper to close it.
hxtk··on Everything You Know About MongoDB Is Wrong
I had good experience using for rapidly-changing map data that needs to be queried based on location. Indexing over coordinates on the surface of a sphere is supported out of the box, which makes it simple to use with relatively low latency on databases of GeoJSON documents on the order of a few terabytes, although I'll admit to not knowing if that's a feature supported out of the box on another document database.
hxtk··on Performance Matters (2019)
> There is no situation in EMS where 250ms is the difference between life and death. It's not like the tones drop for a call and we say 'gee, I wish I could go help that person, but I still have this chart to write...'.

That wasn't how I read it. I may be incorrect, but my interpretation was that the 250ms didn't make the software too slow to be effective but rather too slow to be user friendly.

The idea isn't that it directly killed people by being slow, but rather that it was not adopted because people didn't like using it, and on the paper alternative, mistakes were made that would have been impossible to make on the computer.

hxtk··on Douane: Linux personal firewall with per application rule controls
My understanding is that nftables and iptables+ip6tables+arptables+ebtables are for exactly the same set of use cases, with the latter being deprecated in favor of the former as the new replacement.

RHEL 8 uses the nftables back end for firewalld by default.

The main difference that I have noticed is that writing configuration files for nftables is considerably more ergonomic than the iptables files which are essentially just unstructured lists of iptables commands.

Generally things like UFW or firewalld are sufficient for host firewalls, but they fall short for routing applications where it is more appropriate to use nftables (or historically, iptables) directly.

Kubernetes and docker both currently use iptables for their routing and will likely migrate to nftables. If/then those projects migrate to nftables I suspect it would also solve the issue where docker port mappings have the ability to unilaterally punch holes in host firewalls, e.g., UFW, because under nftables, tables are just namespaces for chains (with configurable priority) while on iptables the different tables meant specific things and docker made decisions in a branch off of the PREROUTING chain in the nat table, which was encountered before the FORWARD or INPUT chains on the filter table. In this way nftables makes certain expressions more ergonomic than iptables.

hxtk··on Douane: Linux personal firewall with per application rule controls
Yeah, I'm not sure if it's clear but the iptables family and its replacement, nftables, are what I'm referring to when I say netfilter. iptables/nftables are userspace applications and netfilter is the underlying kernel module.

SELinux itself is not aware of pid/user/group.

hxtk··on Douane: Linux personal firewall with per application rule controls
The underlying netfilter has not been deprecated; the userspace application for managing it is just changing from the iptables (and ip6tables, ebtables, arptables, etc.) to nftables.
hxtk··on Douane: Linux personal firewall with per application rule controls
Sort of. By default, most SELinux systems have users logged in as `unconfined_u`, which as the name implies receives nearly no confinement.

Any application that doesn't have a specific policy written for it will either inherit the domain that spawned it (in this case, `unconfined_u:unconfined_r:unconfined_t:s0:c0.c1023`) or receive some default domain (e.g., `system_u:system_r:unconfined_service_t` for systemd services, `initrc_t` for init daemons, etc.)

Because of this, most applications will end up inheriting the user's domain, which again is `unconfined_t` by default under the targeted policy.

Lots of common applications have policies so that they transition to their own domain and then execute under customized policy, but it's less common for user applications (and especially user applications that are not system tools) than for daemons so it's not generally safe to assume you're protected by selinux when going about typical user tasks.

However, writing SELinux policy isn't that hard (although it's a bit harder than just `audit2allow` to do it well) and it's a perfectly reasonable project for an afternoon to write a policy for an unconfined application you use, if you're willing to spend some time up front learning about SELinux policy language.

hxtk··on Douane: Linux personal firewall with per application rule controls
Here's a short article on it by Dan "Mr. SELinux" Walsh himself [1].

To understand it, though, you need to understand at least a little bit about type enforcement, which is a somewhat steep learning curve to get over.

If you have nftables (replaces iptables, default back-end to firewalld in RHEL 8), you might consult /usr/share/doc/nftables/examples/secmark.nft but again, this requires some background on nftables (or iptables—they're both just front-ends to the kernel netfilter module) and are pretty similar.

However it's also worth noting that most one could also stand to learn a thing or two about netfilter if this is a topic they're interested in. For example, netfilter allows you to filter packets based on the user, group, or pid of the process.

I found this page [2] quite helpful, and especially the packet flow diagram contained within it.

[1]: https://www.linux.com/training-tutorials/using-selinux-and-i...

[2]: https://www.booleanworld.com/depth-guide-iptables-linux-fire...

hxtk··on macOS unable to open any non-Apple application
Can you not just add an IPv6 entry for it in your hosts file, e.g., ::1? That would work in Linux and seems like a much less nuclear option than disabling ipv6 all together, but admittedly I've never worked with ipv6 networking on Macs.

Last time I played with a Mac they also had the BSD `ipfw` command for kernel packet filtering [1]. Could try something there if it still exists.

[1]: https://www.unix.com/man-page/FreeBSD/8/ipfw/

hxtk··on Dockerfile Security Best Practices
It has to do with the implementation of the networking. The DOCKER chain in the nat table gets hit by inbound traffic on the PREROUTING chain before UFW's chains on the filter table. IIRC, can get around this by directing UFW to write its rules to the DOCKER-USER chain.

Firewalld is implemented differently and will exhibit the expected blocking behavior: traffic targeting docker ports will encounter firewalld before it encounters docker.

hxtk··on Moving your SSH port isn’t security by obscurity
In my case it's because (not counting the machines I get paid to admin, which are indeed behind a VPN) I only admin one isolated VPS, so without a dedicated bastion I feel that the benefit of a VPN is reduced. I just secured it according to the DISA STIG plus some more intrusion detection and stronger selinux confinement.

Adding a dedicated bastion would double my monthly costs, but SELinux costs me nothing if the targeted policy covers my applications, or like half an hour of my time per service if I have to write my own policy modules.

Although, I should point out I'm playing devil's advocate here because my ssh is still on port 22.

hxtk··on Moving your SSH port isn’t security by obscurity
> When you make that port 2222 or whatever, like so many people do, you have cut out a lot of noise... but now that compromised PHP application you had running has allowed someone to now race you every time SSH is restarted for an update or crashed or whatever to bind on that port.

This attack is mitigated quite strongly if you have selinux enforcing and aren't running networked services in unconfined domains.

Even if you have networked services that aren't confined in the default targeted policy, you can probably learn to write policy for them in a day or two, although poor documentation can make for a steep learning curve.

hxtk··on Math.min(Math.max(num, min), max)
The only reason I know what to expect is because Suckerpinch on YouTube made a video in which he managed to define a logic system using NaN and +∞, and does so by abusing min and max, among other expressions:

https://youtu.be/5TFDG-y-EHs

hxtk··on How to pick a random number from 1-10
Here, we see the difference between scientists and engineers ;)
hxtk··on Giving away the company's secret sauce
I can't decide if that's horrifying or brilliant. Leaning towards both.
← PreviousPage 5 of 6Next →