HNHacker News
TopNewBestAskShowJobs

maple3142

1,632 karma · joined October 26, 2017

Personal Blog(in Chinese): https://blog.maple3142.net/
submissionscomments
maple3142··on GhostLock, a stack-UAF that has existed in all Linux distributions for 15 years
If you are given a shell with `docker run -it --rm alpine:3 sh`, can you read the /etc/shadow on the host without kernel exploit? Assuming the docker and kernel are sufficiently update-to-date (e.g. latest Docker on Debian Stable).
maple3142··on Everything in C is undefined behavior
Is this a correct understanding of UB in C? A program P has a set of inputs A that do not trigger UB, and a complementary set of inputs B that do trigger UB. A correct compiler compiles P into an executable P'. For all inputs in A, P' should behave the same as P. However, for any input in B, the is absolutely no requirements on the behavior of P'.
maple3142··on Google details new 24-hour process to sideload unverified Android apps
Will third party apps like bank apps be able to detect whether advanced mode is enabled or not, like how they currently detect if developer options is enabled?
maple3142··on AI is a business model stress test
I think the problem is simply that css is too restricted that you can style a fixed piece of html in any way you want. In practice, achieving some desired layout require changing the html structure. The missing layer would be something that can change the structure of html like js or xslt. In modern frontend development you already have data defined in some json, and html + css combined together is the presentation layer that can't really be separated.
maple3142··on Oh My Zsh adds bloat
This wouldn't work if the script is meant to be sourced (to set environment variables) isn't it?
maple3142··on Oh My Zsh adds bloat
I think `zsh -l` start a login shell, which does not load zshrc so oh-my-zsh don't get initialized. Try `zsh -ic exit` and it should load zshrc before executing exit.

That said, the time of `zsh -ic exit` isn't really meaningful metric for measuring the performance of an interactive shell. See https://github.com/romkatv/zsh-bench#how-not-to-benchmark for details.

maple3142··on Sandboxing Untrusted Python
I don't think it is generally possible to escape from a docker container in default configuration (e.g. `docker run --rm -it alpine:3 sh`) if you have a reasonably update-to-date kernel from your distro. AFAIK a lot of kernel lpe use features like unprivileged user ns and io_uring which is not available in container by default, and truly unprivileged kernel lpe seems to be sufficient rare.
maple3142··on XSLT RIP
To be honest, there are two ways to solve the problem of xkcd 2347, either putting efforts into the very small library or just stop depending on it. Both solutions are fine to me and Google apparent just choose the latter one here.
maple3142··on Incus – Next-generation system container, application container, and VM manager
If being used in a CTF counts, then running latest docker with no extra privilege and non-root user on a reasonably up-to-date kernel meets the definition of secure I think. At least for what I have seen, this kind of infrastructure is pretty common in CTF.
maple3142··on '123456' password exposed chats for 64M McDonald's job applicants
For python specifically, the uuid4 function does use the randomness from os.urandom, which is supposed to be cryptographically random on most platforms.
maple3142··on A proposal to restrict sites from accessing a users’ local network
I think the problem is that some local server are not really designed to be as secure as a public server. For example, a local server having a stupid unauthenticated endpoint like "GET /exec?cmd=rm+-rf+/*", which is obviously exploitable and same-origin does not prevent that.
maple3142··on The cryptography behind passkeys
Isn't it the same for passkeys? I can put passkeys in password managers like Bitwarden, 1password, ...
maple3142··on Trust Me, I'm Local: Chrome Extensions, MCP, and the Sandbox Escape
I think the reason is that MCP also works over a pipe (stdio), which does not need authentication.
maple3142··on I genuinely don't understand why some people are still bullish about LLMs
I think many people are just not really good at dealing with "imperfect" tools. Different tools can have different success probability, let's call that probability p here. People typically use tool that have p=100%, or at least very close to it. But LLM is a tool that is far from that, so making use of it takes different approach.

Imagine there is an probabilistic oracle that can answer any question with a yes/no with success probability p. If p=100% or p=0% then it is apparently very useful. If p=50% then it is absolutely worthless. In other cases, such oracle can be utilized in different way to get the answer we want, and it is still a useful thing.

maple3142··on Build a Container Image from Scratch
I really wonder how can use escape a container given a root shell created by `docker run --rm -it alpine:3 sh` without using a 0day? Using latest Docker and a reasonably up-to-date Linux kernel of course.

With the command above it is still possible to attack network targets, but let's just ignore it here. I just wonder how is it possible to obtain code execution outside the namespace without using kernel bugs.

maple3142··on Accessibility: Don't Use Fake Bold or Italic in Social Media
Couldn't screen readers apply unicode normalization based some heuristics, like seeing the continuous presence of those special bold/italic characters? To improve accuracy, it can even check if the normalized text resembles to some English words or phrases or not.
maple3142··on Caddy – The Ultimate Server with Automatic HTTPS
It is still a problem if you want caddy to run outside of docker (e.g. for getting real remote addr).
maple3142··on Maxima in the browser using Embedded Common Lisp on WASM
Similar project: PARI/GP on WASM https://pari.math.u-bordeaux.fr/gpexpwasm.html
maple3142··on Facebook ban on discussing Linux?
From my experience, it is obviously not all the packages in Kali Repo will be in Ubuntu (or other regular distro) Repl. Lots of specific pentesting tool can be installed with just `apt install ...` in Kali, which make it a lot more convenient when you need to do pentesting.
maple3142··on Microsoft Confirms Password Deletion for 1B Users
I don't understand how can it really prevents exporting passkeys if it can be implemented by open source implementations like keepass. For example, if keepass do follow the guideline of FIDO Alliance to not implement exporting, but it would still possible to make a fork of keepass that force it to dump the credentials somewhere.
maple3142··on Upcoming Hardening in PHP
I think it is probably because a lot of things are deemed as acceptable. For example, the stream filter chain one is only exploitable if the input to some php IO functions like file_get_contents are attacker-controlled, and those things are already treated as LFR vulnerabilities in application, not the language runtime. Also some of the them (e.g. stream filter chain) are fun and useful enough (turning LFI into RCE), so I bet there definitely some people would rather those thing is not fixed. Given that a properly-secured application wouldn't be affected.
maple3142··on Node.js, Pipes, and Disappearing Bytes
I think this is what @jitl means:

  node -e "process.stdout.write('@'.repeat(128 * 1024)); process.stdout.write('',()=>process.exit(0)); " | wc -c
It writes an empty string and use its callback to detect if it has been flushed, which means previous writes are also flushed.
maple3142··on Google is preparing to let you run Linux apps on Android, just like Chrome OS
Termux can definitely run for a long time even on Android 12 I think. I tried to put a web server to a Termux running on Chromecast (Android 12), and it is still running after months.
maple3142··on GraalPy – A high-performance embeddable Python 3 runtime for Java
Isn't Python's functions are just objects with a __call__ method, and such objects has a syntax sugar allowed them to be called like a function.
maple3142··on Who uses Accept-Language header?
It is a part of browser's settings (for Chrome and Firefox at least), and it is default to system's default language I think.
maple3142··on NPM and NodeJS should do more to make ES Modules easy to use
I don't think it is a big problem given functions like fs.readFileSync already exists. It doesn't have to be a JS standard but be a server-side JS runtime specific function, which can be used when hacks are needed.
maple3142··on 'Equals' has more than one meaning in math
Hmm, there was an article about Java's BigDecimal behaves differently for equals and compareTo: https://igorstechnoclub.com/java-bigdecimal/
maple3142··on It's always TCP_NODELAY
Not sure if this is a bit off topic or not, but I recently encountered a problem where my program are continuously calling write to a socket in a loop that loops N times, with each of them sending about a few hundred bytes of data representing an application-level message. The loop can be understanded as some "batched messages" to server. After that, the program will try to receive data from server and do some processing.

The problem is that if N is above certain limit (e.g. 4), the server will resulting in some error saying that the data is truncated somehow. I want to make N larger because the round-trip latency is already high enough, so being blocked by this is pretty annoying. Eventually, I found an answer on stackoverflow saying that setting TCP_NODELAY can fix this, and it actually magically enable be to increase N to a larger number like 64 or 128 without causing issues. Still not sure why TCP_NODELAY can fix this issue and why this problem happens in the first place.

maple3142··on A 100x speedup with unsafe Python
The example given by parent does not need eval to trigger though. Just create a function and replace its code object then call it, it will easily segfault.
maple3142··on Passkey Implementation: Misconceptions, pitfalls and unknown unknowns
It sounds really really inconvenient when you have a lot of accounts on different websites. Imagine login to add new passkey andremove the old passkey for 100 websites (and my password manager already stores much more than 100 accounts).
Page 1 of 9Next →