Live data from Hacker News

Binsider – A TUI for analyzing Linux binaries

binsider.dev

11–20 of 30 posts

Re: Binsider – A TUI for analyzing Linux binaries

#11
post #5
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

"llvm-readelf --elf-output-style=JSON | jq" is handy.

Push it through jless and you just made a great TUI for that :)

Re: Binsider – A TUI for analyzing Linux binaries

#13
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

One of the biggest benefits of a (good) TUI (or GUI) is that it guides someone who doesn't already know exactly what they want to do towards the most relevant information and the most common actions. Once you already know these things, it is usually faster and more powerful to work with code instead. With this TUI, someone who doesn't know very much about the internals of a binary gets that information presented them in a way that helps them learn the parts of the file, and their relations and relevance.

It is also easier for many people to remember how to navigate a GUI/TUI to achieve a task than to use the CLI, likely because it makes use of the parts of our brain for navigating space. This often makes them easier to use for tasks that you only do occasionally (at least until you learn how to take good notes, manage snippets, and work with your shell history).

So why a TUI instead of a GUI? Probably mostly for aesthetic and comfort reasons than for utility reasons - but I prefer staying in the terminal if possible, as I have a lot of control over its appearance and behavior, and TUIs generally have much better keyboard support than GUIs.

Re: Binsider – A TUI for analyzing Linux binaries

#14
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

One of the biggest benefits of a (good) TUI (or GUI) is that it guides someone who doesn't already know exactly what they want to do towards the most relevant information and the most common actions. Once you already know these things, it is usually faster and more powerful to work with code instead. With this TUI, someone who doesn't know very much about the internals of a binary gets that information presented them…

> So why a TUI instead of a GUI? Probably mostly for aesthetic and comfort reasons than for utility reasons - but I prefer staying in the terminal if possible, as I have a lot of control over its appearance and behavior, and TUIs generally have much better keyboard support than GUIs.

Also it is much easier to run remotely and doesn't need half a gigabyte of dependencies making it easier on a VPS etc

Re: Binsider – A TUI for analyzing Linux binaries

#15
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

One of the biggest benefits of a (good) TUI (or GUI) is that it guides someone who doesn't already know exactly what they want to do towards the most relevant information and the most common actions. Once you already know these things, it is usually faster and more powerful to work with code instead. With this TUI, someone who doesn't know very much about the internals of a binary gets that information presented them…

Great reply about TUI/GUI vs CLI! Well-designed TUIs help teach and navigate the mental model of a situation. I try to also have a CLI available for the TUI that helps extract data for terminal pipeline use. You can even have the TUI tell you what the CLI command would be.

> So why a TUI instead of a GUI?

Also, TUI is available in constrained environments and over SSH/serial.

NB: the author's GitHub contribution graph is pure green for several years! https://github.com/orhun

Re: Binsider – A TUI for analyzing Linux binaries

#16
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

One of the biggest benefits of a (good) TUI (or GUI) is that it guides someone who doesn't already know exactly what they want to do towards the most relevant information and the most common actions. Once you already know these things, it is usually faster and more powerful to work with code instead. With this TUI, someone who doesn't know very much about the internals of a binary gets that information presented them…

does this offer a programming api? what I think is the sweetest approach is if there's a tui/gui to explore and find what you want, and then click a button and have it dump a bunch of code that would achieve the same thing - so now you can play around with the api instead.

Re: Binsider – A TUI for analyzing Linux binaries

#17
post #3

I don't really get why this is a TUI. Any time I actually hack on this sort of stuff, I'd rather have the outputs (eg. symbols, ELF sections/segments, strings, ...) directly on stdout so I can then further filter stuff or otherwise process it. Especially strings! The only part of this tool that seems to merit a TUI is the hex view...

Sometimes you find yourself looking for a piece of info over and over again, and you'll lose something in stdout you think you'll remember as you do further analysis.

Ie for this, switching between readelf and objdump options, a handful of operations are already getting you 1000 lines into scrollback. I imagine having one terminal with this up and pre-parsed could be useful on the side while doing other analysis.

Re: Binsider – A TUI for analyzing Linux binaries

#19

[flagged]

A reminder of why it’s good to analyze your project’s binaries. Test data, famously, but also firmware blobs, etc.

Why the black flag, though? That's a symbol of anarchy, which kinda suggests some kind of endorsement to me. But that also doesn't make sense because the Jia Tan affair was an attack on the commons, which is absolutely opposed to anarchist values.

Re: Binsider – A TUI for analyzing Linux binaries

#20
post #18

Earlier quoted context omitted.

Yeah, an explanation would be nice, or perhaps a demonstration of whatever he has in mind that involves xz. That would make for a good demo.

The demo screencaps are of the xz binary.

What I tried to emphasize is documentation, like how Binsider may have helped mitigate security issues (or help raise awareness of potential issues) with regarding to xz.
Post reply on HN