Live data from Hacker News

Snitch – A friendlier ss/netstat

github.com

61–70 of 109 posts

Re: Snitch – A friendlier ss/netstat

#61
post #42

I always wondered how useful such tools are against a competent adversary. If you are a competent engineer designing malware, wouldn't you introduce a dormancy period into your malware executable and if possible only talk to C&C while the user is doing something that talks to other endpoints? Maybe even choose the communication protocol based on what the user is doing to blend in even better.

At the very least, these tools should not parse /proc to obtain information of processes or connections. It should be the last option. Many LD_PRELOAD rootkits hide their activity from the system by manipulating the output of libc functions like readdir(), open(), stat(), etc. kernel rootkits can hide whatever they need, but the common functionality is also to hide data from /proc. That's why netstat, ps, *top or lso…

What makes ss different?

In any case, interesting to think of shared libraries (specifically shared libc) as a risk here. Makes sense, but I hadn't thought about it before.

That said, I'm having a hard time doing a threat model where you worry about an attacker only setting LD_PRELOAD but not modifying PATH. The latter is more general and can screw you with all programs (doesn't cover shell builtins, but it's not like those would just be one more step).

Re: Snitch – A friendlier ss/netstat

#62

Earlier quoted context omitted.

Ironic choice of example… Before systemd presented a generalised interface, there were significant differences in the init and service management systems between the popular Red Hat and Debian families of distros.

Not what I meant. Systemd has been replacing a bunch of commands too. Not just the init system.

Those additional programs can be freely chosen by distros and/or users. So each of them has to stand on their merit. Though of course they do get some built-in credibility by coming from the systemd project. But for the most part, I think systemd software just tends to have competitive offerings with nice interfaces.

Re: Snitch – A friendlier ss/netstat

#64
post #25

Earlier quoted context omitted.

Are they as accessible as GUI though (genuine question) UI libraries have a lot of features for allowing people with disabilities to “read” and interact with the screen in efficient ways

TUI tools are generally as accessible as the terminal on which they run. GUI apps are much trickier. They require that the developer implement integration with accessibility frameworks (which vary depending on X11/Wayland) or use a toolkit which does this.

GUI kits like AppKit or GTK have built-in accessibility features like standard components (input fields, dropdown boxes) and view hierarchy that interact with accessibility tools for free. It's the main upside of a GUI.

TUIs are tricky.

I think TUI accessibility generally involves rereading the screen on changes (going by macOS VoiceOver). It can optimize this if you use the terminal cursor (move it with ansi sequences) or use simple line-based output, but pretty much zero TUIs do this. You'd have to put a lot of thought into making your TUI screenreader friendly compared to a GUI.

The thing going for you when you build a TUI is that people are used to bad accessibility so they don't expect you to solve the ecosystem. Kind of like how international keyboards don't work in terminal apps because terminal emulator doesn't send raw key scans.

Re: Snitch – A friendlier ss/netstat

#65

it's weird that both lsof and ss defaults are so awful Like, ss without any options shows such arcane, rarely needed details as send/receive queue size but not the application socket belongs to . And omits listening sockets which is main use for such tools. I know picking the right defaults is hard ask but they managed to pick all the wrong defaults.

> I know picking the right defaults is hard

I think we understand that UX problem much better now than developers did back in the 70s. In general, not just for ss/lsof

Re: Snitch – A friendlier ss/netstat

#67

it's weird that both lsof and ss defaults are so awful Like, ss without any options shows such arcane, rarely needed details as send/receive queue size but not the application socket belongs to . And omits listening sockets which is main use for such tools. I know picking the right defaults is hard ask but they managed to pick all the wrong defaults.

Don’t “netstat -utan” and “ss -utan” show basically the same thing?

Re: Snitch – A friendlier ss/netstat

#68
post #40

Earlier quoted context omitted.

I've been a long time Litte Snitch user. However, these days I'm just using LuLu: https://objective-see.org/products/lulu.html

Why did you switch? Price? OSS? Or does LuLu have compelling features?

It's a mix of everything (in no particular order):

- the author of LuLu is a security researcher; he also wrote "The Art of Mac Malware"

- I already bought two versions of Little Snitch and wasn't willing to pay for the third one

- contacting their support left a bitter aftertaste

Re: Snitch – A friendlier ss/netstat

#70
post #38
post #8

When I saw this headline I assumed it was Little Snitch an existing network monitor and firewall for Macs. Might need a different name. https://www.obdev.at/products/littlesnitch/index.html

Wow that's so nice, would there be an equivalent for PC? (Windows or Linux)

dotfiles/scripts/netstatpsutil.py: https://github.com/westurner/dotfiles/blob/develop/scripts/n...

Textual or similar for a top-like mode would be cool someday

scripts/lsof.sh does lsof from /proc/*: https://github.com/westurner/dotfiles/blob/develop/scripts/l...

Post reply on HN