HNHacker News
TopNewBestAskShowJobs

zemnmez

799 karma · joined July 7, 2014

information security engineer. https://zemn.me
submissionscomments
zemnmez··on In praise of the European drying rack (2017)
all the places I grew up in england, we would have a wooden rack (just some wooden slats attached to kind of metal hangers) with a small winch above the boiler in the boiler room. When the washing was done, my mum would put the washing on this rack, either between the slats or hung from hangers. It was obviously quite effective and efficient, but I don't miss it at all with a modern dryer.

Having moved to the US recently though, I do miss integrated washer-dryers that I could set to complete by the time I woke up so I got to wake up to warm clothes for flights and meetings I was stressed about. They're totally absent in the US, and people who have used them give me weird anecdotes about how 'they don't dry clothes properly' or 'they don't let you go through as many clothes as fast' -- while the latter may be true, the washer-dryer means the entire process happens without you being there, like if you were asleep.

zemnmez··on Show HN: Login with HN (Unofficially)
it seems like if this is OAuth2, the protocol is not giving an audience specifier? That would mean that any token is as good as any other, and say, authenticating to evilsite.com, the site could use the token its granted to itself log onto another ‘login with HN’ website as the victim. Thats the usual issue with OAuth as login
zemnmez··on You don't need that CORS request
if handled correctly, sure. but it also means that implicit cookie authentication ('ambient authority') is possible and can easily happen by accident
zemnmez··on You don't need that CORS request
CORS tries to prevent CSRF issues by preventing cross-origin cookie authentication.
zemnmez··on You don't need that CORS request
Please use Access-Control-Max-Age instead. CORS has some nice security properties.
zemnmez··on Ask HN: How does my Instagram keep getting compromised?
I would look at your email forwarding filters. It's common to see compromises with this pattern where the email for your account was compromised and all the email is being forwarded to an attacker.
zemnmez··on Notes on ConstitutionDAO
It's interesting that the exchange (juicebox.money) takes a 3% cut, so they made about $5M off of this, despite its apparent failure.
zemnmez··on Tens of millions of filthy, used medical gloves imported into the US
Like vinyl gloves?
zemnmez··on JSFuck (2012)
To clarify, that's what happens once you pass it through the obfuscation and THEN closure compiler. If you click the link you will see the obfuscation is much more complex
zemnmez··on JSFuck (2012)
If I recall, the whole thing took about 6 hours
zemnmez··on JSFuck (2012)
personally, I find the code it outputs to be easier to understand often than the source because it simplifies a lot of stuff into the most abstract logic. I think it takes some getting used to for your brain to connect those pieces, though
zemnmez··on Building a Theban Lattice Stool
I think most of these artefacts come from british occupation of egypt while it was a vassal of the ottoman empire, the zeitgeist of which basically started when napoleon started studying and abducting ancient artefacts into france to support his revanchist ideals of the ancient world
zemnmez··on JSFuck (2012)
I think closure compiler's 'obfuscation' is an incidental part of its minification passes.
zemnmez··on JSFuck (2012)
JScrambler I actually did de-obfuscate to bypass some very significant bot detection a few years ago, but it took a bit more doing -- it uses ES6 features IIRC so I had to transpile it down to ES5 via babel first, but it worked OK after that.

has a pretty good crack at obfuscator.io, too: https://closure-compiler.appspot.com/home#code%3D%252F%252F%...

That's the example from the site. "console.log('Hello world')" gets deobfuscated to "console[a(482)]("Hello World!");"

zemnmez··on JSFuck (2012)
makes me sad to hear that :( I will say, as a reverse engineer, that javascript minifiers like closure compiler will optimize almost all obfuscation out, and the rest you can usually translate to a form which it can understand and then it will do the rest.

The effect of obfuscation is not what you expect. It seems like it moves the whole difficulty up, but it only moves up the floor. By doing so it tends to remove all the signals that would warn non-experts of security issues. Remove the obfuscation and then you have all the catastrophic security issues that have accumulated in there like treasures in an egyptian king's tomb https://zemnmez.medium.com/how-to-hack-the-uk-tax-system-i-g...

zemnmez··on Flowers Make a Nice Gift
the flowers literally die off seasonally, the only difference here is that they die looking beautiful in the home of someone you love
zemnmez··on How to Hack Apple ID
thank you! always want to make this kind of this more accessible – especially since its so interesting.

I can only say the grey market becomes more enticing every time.

I personally feel like pure web bugs like this just generally get paid less (on the bounty market only) due to a strange kind of prejudice– people expect the big-ticket bugs to be binary or cryptography, and tend to dismiss XSS, even when the impact is extremely high, as in this bug.

zemnmez··on The Idempotency-Key HTTP header field
No, a CSRF token only introduces information that is not part of the ambient authority of the HTTP client (i.e. an attacker cannot implicitly use it) – it is not uncommon to have deterministic or relatively constant CSRF tokens (e.g. the double-send cookie method). An n-once would fulfil your criteria but is importantly not a valid CSRF token unless it is also correlated or derived from something the attacker can’t know like a session; otherwise the attacker can use their own n-once to submit a victim request.
zemnmez··on The Idempotency-Key HTTP header field
This is not related to replay. This is just a rate limiting issue. Throwing arbitrary auth mechanisms between the server and the client like that just means they need to make more requests per fulfilled request.

The client is authorised to make the request – it would only be a replay attack if the client were not authorised to make the request and that limitation was bypassed by capturing and then replaying it.

if you can replay the same captcha challenge over and over your captcha is broken.

zemnmez··on Rotations with quaternions
I'm so confused. The article you wrote says that you fix gimbal lock by using quaternion rotation, quote:

>To fix gimbal lock, we must avoid modelling this physical gimbal system.

> In 3D, instead of using 3 fixed angles that we multiply together to get the final rotation, we will:

> 1. Construct a quaternion that describes a rotation around whatever axis we want, and the angle to rotate by.

zemnmez··on JWT should not be your default for sessions
1. I think it's important to compare the security issues that JWT has had to the alternative. There, 'vanilla' cookie auth (which I assume to be session IDs) is by far the biggest offender.

2. It's not true that JWT is not stateless and therefore irrevocable. RFC7519 defines 'jti' for exactly this reason:

> The "jti" (JWT ID) claim provides a unique identifier for the JWT.

> The identifier value MUST be assigned in a manner that ensures that

> there is a negligible probability that the same value will be

> accidentally assigned to a different data object; if the application

> uses multiple issuers, collisions MUST be prevented among values

> produced by different issuers as well. The "jti" claim can be used

> to prevent the JWT from being replayed. The "jti" value is a case-

> sensitive string. Use of this claim is OPTIONAL.

I think the rise of JWT stems from the fact that unlike traditional auth tokens (see the bundle of entropy legacy OAuth tokens were) they are human readable. When I set up an OAuth API that a user hits, I can exchange a short lived OIDC id token for a long lived capability based bearer for greater security -- and when developers use my API it's easy for them to tell why their capability token doesn't work without having to fire off a bunch of requests and guess.

Edit: it occurs to me that the question of the JWT being 'stateless' might be about how session based storage often changes, but a JWT is largely immutable. Just for what it's worth, a session should not be revoked simply by removing it from the user cookie, or an attacker can persist simply by refusing to allow the cookie to be removed.

zemnmez··on Is WebAssembly magic performance pixie dust?
I benchmarked this recently and I am pretty sure this is not true. Many of these 'single page site frameworks' work via this method.
zemnmez··on OAuth 2.0 Authentication Vulnerabilities
> don't use the implicit grant, please. Use the authorization code grant with PKCE. Here's an example (from a doc I helped write, talking about how bad the implicit grant is: https://fusionauth.io/learn/expert-advice/oauth/modern-guide...

This is a bit of a strange security model. The implicit grant vulnerability mentioned is essentially a supply chain attack where an untrusted library is loaded. True, it can compromise the implicit grant token, but, in a mode where the implicit grant token is hidden, it's still talking as the website, and can do ~most~ anything, more or less that the token can do by making a request with the cookie, or whatever.

zemnmez··on Clio: A functional, distributed programming language that compiles to JavaScript
How do you make a parallel language that transpiles to a reentrant one?
zemnmez··on Efficient blockchain architecture based on FIDO keys
the fundamental assumption of the system as stated in the article is that the device manufacturer will simply never attempt to forge keys
zemnmez··on Efficient blockchain architecture based on FIDO keys
this article describes a centralised system with the fido2 key manufacturer as the source of truth
zemnmez··on Nyan Cat on the Blockchain
No. The original art either has to be gated by a central source of truth (not decentralised), or entirely made public by uploading it in full to the blockchain. There is also not much of a concept of ‘lending’ the data, as owning the token and not owning the token are effectively the same thing, and there’s no ‘proof of deletion’. Opinion, but NFTs are a bubble. As soon as someone publishes a site that makes it easy to download them without paying the market will crash.
zemnmez··on Steam's login method is kinda interesting
I never made the argument that no application should ever encrypt anything at the application level. Password managers are very niche uses.

"secret servers" or key-management systems are just fine using TLS imo. I helped draw up the design for what is now the aws secrets manager. At the point you're reasoning about TLS being broken you might as well be focusing on detection, monitoring and key rotation because the whole internet is coming down with you.

> I attended a talk at QCon SF 2019 where the speaker advocated use of application-level encryption (even in web apps) by default as a form of defense-in-depth. I was skeptical, especially since client code itself has to be delivered using TLS only (and thus a successful TLS attack renders further defenses worthless).

defense-in-depth is a weasel word. security isnt a bunch of layers that can be reinforced as such; often things that are referred to as 'defense-in-depth' cover specific characteristics of one protocol over another.

For example, in password managers as you mention you end up with application level encryption. But this is because TLS doesn't provide the guarantees they want of server blindness, and some resistance to bad TLS certs installed at the OS level (a dubious security boundary, but regardless...).

> But it does seem that application-level crypto allows a lot of networked devices (besides the application servers themselves) to be rendered zero-knowledge concerning most application and user data. This allows us to trust those devices less.

This may well be true in niche cases. In reality, there's not a lot of businesses out there who will overengineer their systems to know less about their users. zero-knowledge applications are unbelievably subtle to make really work, and it's very easy to fool even experts in adjacent security fields that an application is zero-knowledge in some respect when it isn't.

I'm digressing. Application-level encryption in 2021 is very rarely what's wanted, and the existence of niche security cases in entirely security-focussed products doesn't discount that.

zemnmez··on Steam's login method is kinda interesting
This is a knock on application-level crypto.
zemnmez··on Steam's login method is kinda interesting
this approach tends to be a self-own. Bug bounty and responsible disclosure folks don’t usually have expertise in it, so you’re just making the real attack surface less visible until someone with the expertise comes a long and owns you deeper than you could have imagined. This, ironically was also the case for steam: https://steamdb.info/blog/breaking-steam-client-cryptography... (I helped make this bug)

There is a misconception that the responsible disclosure system reflects real security threats, but it unfortunately doesn’t. The areas of expertise in the real world are different, and sticking a bunch of crypto in like that tends to be a case of making your eventual problems more complex, bigger, and harder to find.

← PreviousPage 2 of 6Next →