HNHacker News
TopNewBestAskShowJobs

zwp

601 karma · joined March 24, 2011

submissionscomments
zwp··on Open Source Security at Astral
> pip allows it but it's with a timestamp

A PR to be able to use a relative timestamp in pip was merged just last week

https://github.com/pypa/pip/pull/13837/commits

zwp··on The Future of Programming (2013) [video]
You might like https://cs.brown.edu/~spr/codebubbles/
zwp··on Learn Makefiles
I used to like having a "depend" target to make the dependencies explicit and so minimize build time, although that fiddles with the contents of the Makefile (some discussion at https://wiki.c2.com/?MakeDepend).

The standalone makedepend(1) that does the work is available in package xutils-dev on Ubuntu.

zwp··on Setting up a trusted, self-signed SSL/TLS certificate authority in Linux
Is it coming? I notice that OpenSSL now has support for raw public keys.

The spec (RFC 7250, "Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)") suggests DANE/DNSSEC as a mechanism to bind identities to public keys (section 6).

https://datatracker.ietf.org/doc/html/rfc7250

Will this really be simpler?

zwp··on Handling cookies is a minefield
We already have Macaroons

https://en.wikipedia.org/wiki/Macaroons_(computer_science)

https://en.wikipedia.org/wiki/Macaroon

zwp··on Title drops in movies
And Layer Cake
zwp··on Vulnerabilities show why STARTTLS should be avoided if possible (2021)
There was a sense of "wasting a port". A modern Linux /etc/services has only 200 or so reserved TCP ports (out of a possible ~50k) so that fear might have been overblown.

I suspect the bureaucratic overhead of needing to go to IANA to reserve a new port might have had a chilling effect. See:

  https://www.iana.org/protocols/apply

  https://www.iana.org/form/ports-services
zwp··on Vulnerabilities show why STARTTLS should be avoided if possible (2021)
> you are supposed to still continue if you strictly follow the standard

Which standard? RFC 3207 (for STARTTLS over SMTP), 2002, says: "If the client receives the 454 response [TLS not available], the client must decide whether or not to continue the SMTP session".

zwp··on Anonymous Block Forwarding in Ruby

    def execute(f)
      f.call "test response"
    end

    perform = TOPLEVEL_BINDING.method(:execute)

    perform.call Kernel.method(:puts)
zwp··on Why use strace in 2023? [video]
You still need to pull out the paths?

A sprinkling of grep/perl (awk/sed/ruby/...) is mostly good enough eg:

strace -e trace=%file cat /etc/passwd 2>&1 >/dev/null | grep ^open | grep -Po '(?<=").*(?=")'

zwp··on Why use strace in 2023? [video]
You can use "-e trace=open" to trace only open(2) calls

Alternatively "-e trace=%file" to get all file-related system calls (will catch eg failing pre-emptive checks using access(3) -> stat(2)).

zwp··on Passive SSH Key Compromise via Lattices [pdf]
> whatever "SSH-2.0-SSHD" is (the authors don't know either)

I think this is from the j2ssh/maverick SSH server, used in a bunch of enterprisey Java products.

https://jadaptive.com/en/products/java-ssh-server

https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0...

zwp··on Remote code execution in OpenSSH’s forwarded SSH-agent
Tangential question: there is one reason to use NODELETE in the dlopen(3) man page: https://man7.org/linux/man-pages/man3/dlopen.3.html

  RTLD_NODELETE (since glibc 2.2)
    Do not unload the shared object during dlclose().
    Consequently, the object's static and global variables
    are not reinitialized if the object is reloaded with
    dlopen() at a later time.
Are there any other times when it's beneficial to use NODELETE?
zwp··on Every Signature Is Broken: Insecurity of Microsoft Office’s Ooxml Signatures
The PDF ("sec23summer...") has metadata creation/modification timestamp of 20221004165319Z (October 2022). So presumably the paper was written last October and released for Usenix 2023.

(Reference [12] is from Usenix July 2022. See "Prior work" in the introduction).

zwp··on Fixing macOS Zsh Terminal History Settings
Slightly silly sketch (bash):

    sqlite-utils create-table ~/commands.db commands id integer text text --pk id
    PROMPT_COMMAND="( fc -n -l -1 | perl -p -e 's/^\s+//; chomp if eof' | sqlite-utils insert --text ~/commands.db commands - & )"
It's slow, has perl & python external deps, needs a timestamp column, call subshell to avoid job control messages, ...

A nicer single "prompt command" wrapper is certainly possible though.

zwp··on Show HN: Shale – a Ruby object mapper and serializer for JSON, YAML and XML
I think one of the motivations for splitting the stdlib into gems was for exactly for this kind of scenario: some users might not be able to update their Ruby immediately. The ruby-lang advisory explicitly recommends bumping the REXML version.
zwp··on Show HN: Shale – a Ruby object mapper and serializer for JSON, YAML and XML
Rexml has been gemified. Shale's gemspec doesn't require a specific version of rexml and rexml<3.2.5 is vulnerable to CVE-2021-28965. I just checked Ubuntu 20.04 LTS and got Ruby 2.7 with rexml 3.2.3 by default so this seems like a realistic concern and it would be safer if shale required a minimum rexml version.

See http://www.ruby-lang.org/en/news/2021/04/05/xml-round-trip-v...

zwp··on NPM Vulnerability Discussion on Twitter
This old dog is reminded of trn(1), "threaded read news".

See top right: https://upload.wikimedia.org/wikipedia/commons/d/d8/Trn_cons...

zwp··on Ruby 3.2 preview 1 with support for WASM compilation
Cute! But I get an error if I try "require 'resolv'", is this expected?

<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- socket (LoadError)

zwp··on Words known better in the US than in the UK, and vice versa
I wasn't aware of the figurative connotation, I will remember this next time I'm retreating from a climb.

"HMS carabiner" is also common amongst anglophone climbers (for the "Halbmastwurfsicherung" knot you might use as an alternative to your sticht plate).

zwp··on Nim vs Rust Benchmarks
Is that due to SPECTRE & Meltdown mitigations?
zwp··on In Praise of Idleness (1932)
Larry Wall, inventor of Perl:

"We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.", "Programming Perl", 1ed

2ed says:

"Laziness

The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don't have to answer so many questions about it. Hence, the first great virtue of a programmer. Also hence, this book."

Some discussion at https://wiki.c2.com/?LazinessImpatienceHubris

zwp··on Euro Modules
LeGrand's Mosaic range is very similar. I would also be interested to know if there is a standard (although I suspect not).

https://www.legrand.fr/catalogue/interrupteurs-et-prises/mos...

It's a cute idea but Mosaic is quite expensive. Also, you still must take into account safety regulations eg adequately separating low and high voltage wiring behind the faceplate.

zwp··on Every engineer should do a stint in consulting
A colleague used to call this "reading the manual in the bathroom".
zwp··on Inbox Zero Using Getpocket
I'm in a similar boat. I use pocket almost exclusively when I'm travelling. It works really well for that but I'd love to extend it. Eg download and store video content, or permit tagging when submitting URLs via email, automatic tagging, ...

Can anyone recommend a hackable alternative? I found https://alternativeto.net/software/pocket/?license=opensourc...

zwp··on 21st Century Baker's Tent
A long time ago I similarly tested a (non-heat-reflective) orange plastic survival bag, sleeping overnight behind some rocks on exposed moorland (something like https://www.military1st.eu/cs037-highlander-emergency-surviv...).

The poor thermal insulation and condensation were predictable. I hadn't predicted the shifting wind which chose to balloon my orange cocoon with cold air every 20 mins no matter which orientation I chose to lie in. I finished the night with a bungie cord around the sack, under my armpits. That of course left my head, shoulders and arms exposed but kept the wind out. Not recommended.

After this experience I upgraded to reflective mylar survival bags. NB "bag". These are a little harder to find than survival blankets but if a bag can be so badly affected by moderate wind, a blanket would be so much worse.

zwp··on Not a drill: VMware vuln with 9.8 severity rating is under attack
Nice find.

I'm hopefully preaching to the choir here but please beware that high-visibility flaws often attract fake PoCs. Malicious in the sense "might [also] attack the user" (you!).

Often these will surf on work done by valid PoCs to look credible. GitHub was stuffed with them for the Hafnium Exchange bug, before Microsoft brought down the ban hammer. (At the time there was lots of mewing about "Microsoft protecting their own" and "Microsoft killing free speech" but I wonder if they weren't also interested in stopping the pwnage from these fake exploits, too).

I'm not saying this repo is malicious. This github user looks legitimate and doesn't look like the obviously-created-by-a-bot profiles I've previously seen. Even so I wouldn't necessarily trust ~5000 vendored class files. Play carefully.

zwp··on America has a drinking problem
A slight tangent but Hogarth's "Beer Street and Gin Lane" (1751) documents a similar example of low grain prices resulting in massive, country-wide alcohol consumption in England. The subsequent government reaction and legislation did not go as far as American prohibition though.

https://en.wikipedia.org/wiki/Beer_Street_and_Gin_Lane

zwp··on FragAttacks: new security vulnerabilities that affect wi-fi devices
I disagree: for defenders trying to establish veracity of flaws and prioritizing defense this is useful information. "Active exploits seen in wild" is a strong signal.

Picking two potentially high impact announcements from the last month or so:

1. There is a severe flaw in the RSA cryptosystem. 2. There is a remote code exec vulnerability in Microsoft Exchange.

One of these was a sketch of an incremental improvement to an attack that remains mostly of theoretical interest. The other was being actively exploited, was tragically simple for 3rd parties to replicate post-announcement and resulted in widespread pain.

There is some (non-linear) scale here (theoretical flaw/poc/weaponized poc/public poc/public weaponized poc/exploited, but limited actors or targets/widely exploited/HAVOC). MS for example uses just "less likely to be exploited", "more likely to be exploited" "being exploited". It's coarse and somewhat subjective but there is value even so.

"This flaw is being actively exploited in the wild" is the best line I can take upstairs. I don't want that to go away just because some parties might misuse it.

zwp··on Show HN: Lovetris – Tetris which always gives you the best piece
"Tetra" isn't completely unknown in English but perhaps the link is more obvious to Russian-speakers (the original author was Russian)? Is четыре/chetyre a cognate of Greek-derived tetra?

https://translate.google.com/?sl=en&tl=ru&text=four

Page 1 of 7Next →