HNHacker News
TopNewBestAskShowJobs

bennofs

549 karma · joined December 9, 2014

[ my public key: https://keybase.io/bennofs; my proof: https://keybase.io/bennofs/sigs/wcPXzHZpmIhdUO3v_US4scJ5O4TGk46NqjneY_Ph6KQ ]
submissionscomments
bennofs··on Intel Analysis of Speculative Execution Side Channels [pdf]
You would not send requests to keepass in order to leak passwords. Instead, you would try to setup the branch prediction cache in way such that during ordinary execution, keepass will causes cache accesses dependent on secret data b.c. of the code that is speculatively executed due to indirect branch prediction (you setup the branch prediction cache in such a way that it executes your "gadget" to leak things). So yes, assuming you manage to get enough control over the addresses of things in memory via javascript (may be hard, but there are known ways to defeat ASLR via javascript as well), I think you should be able to attack keepass even if V8 fixed it.
bennofs··on How a researcher hacked his own computer and found 'worst' chip flaw
The other thing is that it is not necessary to be in the same process for this: you could in theory have one process do the access (which gets killed) and then observe the cache result in another process.
bennofs··on Intel Issues Updates to Protect Systems from Security Exploits
Just masking the lower bits is not enough: you can easily reconstruct a high-precision timer from that by observing the clock edges (waiting until rtdsc increases): wait for clock edge, do your experiment, increase counter until next clode edge in busy loop. the counter now correlates strongly with the amount of time taken for the experiment.

Also, while cache flushes are the easiest way to trigger this, I am not convinced that there aren't other ways to do it. For example, you could attempt to clear the cache by spamming it with new data to cache, or you could try to use one of the other sidechannels (I've seen ALU ports being mentioned as one alternative: instead of accessing cache lines, you do some heavy math operations that will cause the ALU ports of the cpu to be used and then you observe how long ALU operations take in userspace)

bennofs··on Intel Issues Updates to Protect Systems from Security Exploits
These patches should only affect syscall entry/exit performance. So if you're not doing things that do enormous amounts of syscalls, you should be more at the 3% end of the scale. The 30% number comes from doing things like calculating the file sizes of a directory with a lot of very small files, where the performance overhead of a single syscall matters. In most performance sensitive applications like games, you probably won't see any syscalls in a hot loop since that'd be too slow anyway. Even if you're doing heavy IO, then that is most likely also done in batch and blocked on disk IO speed, not on syscall overhead.
bennofs··on Using Java 9 Modularization to Ship Zero-Dependency Apps
I find it's pretty straightforward using gradle (except that it doesn't build fat jars out of the box). Can you elaborate on what you're having trouble with?
bennofs··on Quick Tips for Fast Code on the JVM
Probably pinning the object in memory, so that you can keep a stable reference to it without the danger of the GC moving it away under your pointer.
bennofs··on Open-sourcing MonkeyType – Let your Python code type-hint itself
Java? But that's another kind of hell
bennofs··on Five years with Rust
> Why not integrate rust and the libraries into the existing packagement systems, like so many other software projects do?

This makes me curious: can you tell me some examples of other software projects which are not written in C that integrate libraries into existing package management systems?

Personally, I feel like `apt` could almost be called a C/C++ package manager at this point. It does have some packages written in other languages, but most languages still have their own package manager for development. For example:

* Python: has pip and virtualenv, packaging with apt is difficult due to incompatible version requirements * Ruby: not personally using ruby much, but seems like most apps are installed via bundler or gem and not packaged * Haskell: Small binary compatibility of libraries make traditional packages difficult (even dependencies of dependencies need to match for compatibility) * Java: I don't even know how java libraries would work with apt * PHP: I have never used a PHP package installed through the package manager

Granted, I may be missing something here, but the majority of the packages in apt repository seem to be C/C++, maybe some perl or python which are "made to work" simply because too many things depend on them.

bennofs··on The Screenless Office
Isn't an ereader basically such a device? Or where is the difference?

Combine it with Pocket or some epub newsletter.

bennofs··on The importance of Devuan
> Which grants root to any user with a numeral

This formulation may be misunderstood. The bug did not grant users root rights, it ignored the user= setting on a service if the service was intended to run as a user stating with a numeral. So you already needed to be root to create a service. The bug allows a service to run with more permissions than intended though.

bennofs··on Germany Is Burning Too Much Coal
Risk is not the only reason to move away from nuclear energy. There's also the problem of radioactive waste, which will need to be dealt with for many, many years (German laws require secure storage for one million years).

I won't claim that radioactive waste is more problematic than burning coal here, because I don't know enough about the topic. But it needs to be taken into account in the discussion.

Calling nuclear energy "emissions free" is just wrong in my opinion: it just generates a different kind of emissions, nuclear waste.

bennofs··on Useful GCC warning options not enabled by -Wall -Wextra
You can just use `-Weverything -Wno-effc++` then
bennofs··on Useful GCC warning options not enabled by -Wall -Wextra
I agree that using `-Werror` in release builds is a bad idea. But I don't think you need to "not make it the default" for this: just provide an easy way to disable it, and do it automatically for release builds. It should be on by default for any developer.
bennofs··on Linux PIE/stack corruption
The article also explains this. It seems to be possible to get a much smaller distance if you eat up a lot of stack space using large execve arguments for example (this might be wrong, I haven't 100% understood all details yet). But the article has a POC for ping.
bennofs··on Linux PIE/stack corruption
You can exploit existing binaries such as ping that have special capabilities or are setuid to get privilege escalation.

A better link would have been https://www.qualys.com/2017/09/26/cve-2017-1000253/cve-2017-... which also explains an actual exploit.

bennofs··on Supporting Hypothesis
> very different and it has a bunch of interesting non-QuickCheck features.

I'm only familar with QuickCheck, but what are those differences / features? Couldn't tell from a quick look at the website of Hypothesis.

bennofs··on Reducing Python's startup time
Just don't do this for things you intend to make public - it makes installing and packaging it really difficult
bennofs··on Try Out Rust IDE Support in Visual Studio Code
That does sound like a bad UI though. Perhaps vscode could stage the files before, so that they end up in Git's objects at least? Or somehow store them in the reflog
bennofs··on Rustgo: Calling Rust from Go with near-zero overhead
Well, the stated goal was to use rust for small hotspots. These hotspots could take very little time but are called a lot, so the overhead of creating a process / communicating with another process can be quite a lot (think of a function called in a tight inner loop)
bennofs··on Chrome's 'Secure' indicator was designed to make users proceed on any HTTPS site
> What annoys me most is that Firefox refuses to show you the certificate if it fails to validate, which makes figuring out validation errors more painful.

You can view it in Firefox as well: Advanced -> Add exception -> View

Or, as I just noticed, when you click on the error code (SEC_ERROR_EXPIRED_CERTIFICATE for example) it'll show you the raw certificate.

bennofs··on Give me 15 minutes and I'll change your view of GDB (2015) [video]
The symbol thing sounds useful and is something I cannot comment on, since most often I either debug open source programs that I run myself (so I have the binary with compiled with debug symbols) or there is no source at all for the binary (and so no symbols). But, most of the other things you listed are, IMO, quite easy with GDB:

> view program state

in my experience, your often only interested in a few variables. then, you just run

    display var
once for each variable and GDB will show the value of var on every break. There is also `info locals` to show a local variables, and I am pretty sure that you can set it up to run on every break with some simple config (there's probably an extension pack that does it)

> call stacks

almost every enhancement plugin for GDB in python that I know of does this (GEF, voltron, ...)

> unpacked C++ containers

I am pretty sure GDB pretty-prints C++ containers?

This isn't to defend GDB, it cannot do Heap activity or CPU usage or GPU state out of the box and sometimes, a visual interface is nicer. I just wanted to comment on what is possible with GDB, because I was often not aware of that either.

bennofs··on Give me 15 minutes and I'll change your view of GDB (2015) [video]
Oh! That makes sense, thank you. It only raises the question though, does anyone really use hexadecimal line numbers? :)
bennofs··on Give me 15 minutes and I'll change your view of GDB (2015) [video]
First of all, I agree! GDB without extensions is not that nice to use. But there exist several extensions (https://github.com/cyrus-and/gdb-dashboard, https://github.com/hugsy/gef, https://github.com/pwndbg/pwndbg, https://github.com/longld/peda, even though developed for it, these are not only useful for exploit dev!) that make it a lot better.

> - No way to get a 16-column (bytes+ASCII) standard hexdump. This is functionality that even the most basic debugger should have, yet it's missing from gdb.

This should be quite easy to implement as a small python snippet that you put in your ~/.gdbinit. Granted, this should be builtin functionality, but it also shows how extensible GDB can be.

> - If you write "b 0x12345" intending to set a breakpoint at address 0x12345, it doesn't work. An unnecessary and nonsensical extra asterisk is needed (which makes it look like it's retrieving 4/8 bytes from 0x12345, and using that as the address of the breakpoint.)

Agreed, I never understood why that was necessary. It is really annoying. Perhaps someone wanted to avoid a conflict if you had a symbol named "0x12345"? (can you even do that?)

> - Starting gdb with a binary and passing arguments to it --- you'd expect it to be smart enough to realise that anything after the executable name should be the arguments to the debuggee and not the debugger, but it isnt.

I recently learned that gdb has a neat option called --args, that does exactly this:

    gdb --args program arg1 arg2
GDB feels quite similar to VIM to me: you have to spent some time to get used to it, it has some warts but it is very flexible and useful if you know it.
bennofs··on Give me 15 minutes and I'll change your view of GDB (2015) [video]
Can you tell me some of the things that VS does much better? I've only ever used GDB, and I am kind of lost when trying to debug a binary on windows
bennofs··on Give me 15 minutes and I'll change your view of GDB (2015) [video]
I found rr to be much better for reverse debugging than gdb's record feature. For some reason, hardware watchpoints while reverse-continuing don't work for me when using gdb record but do when using rr.
bennofs··on Exa, a modern replacement for ls
Ncdu is a command line application that does this (a tree with sizes)
bennofs··on GNU Ring 1.0 released
How about https://jitsi.org/jitsi-meet/ ?
bennofs··on GNU Ring 1.0 released
I'm not very familiar with Matrix and new to Ring, but can you explain how Ring is more decentralized than Matrix? I guess Matrix still requires the homeserver, making it somewhat centralized?
bennofs··on Status update from the Reproducible Builds project
Well, reproducible builds doesn't necessarily mean that it stays reproducible when you turn on debug info.
bennofs··on Terminal and shell performance
And alacritty (https://github.com/jwilm/alacritty) would be interesting to see as well.
← PreviousPage 6 of 8Next →