Better HN
topnewbestaskshowjobs
Log inSign up

CiPHPerCoder

6,663 karma · joined Feb 25, 2016 (10y ago) · 1,775 submissions

My name is Scott. I do a lot of open source security research, and cryptography.

Previously AWS Cryptography (2019 - 2023).

Unless otherwise stated, my opinions are my own and do not reflect my employer.

https://scottarc.blog/about/

Submissions

comment 10y ago · link · parent

While that can be true, greedy idiots are going to use the hype machine to increase their revenue.

I have a vuln I was considering naming, but after BadLock I'm strongly reconsidering it.

comment 10y ago · link · parent

Let this be the death knell of the "named vulnerability" sensation. Please.

comment 10y ago · link · parent

If anyone read this and thought, "I should add a Content-Security-Policy to my website," I've written and published an open source tool for building CSP headers programmatically and/or from a JSON configuration file.

https://github.com/paragonie/csp-builder

comment 10y ago · link · parent

Here's a simple idea that would render these "bathroom bills" null and void. Neuter them, if you will.

Stop building multi-occupant public restrooms with a gender designation, and instead build several single-occupant public restrooms with no gender designation.

Added bonus: Not only do we disarm these attempts to discriminate against transgendered people, we also avoid all the social awkwardness that comes from multi-occupant restrooms. Like the loud person talking on their cell phone. Or the smells of other people doing their thing.

(Retrofitting would be expensive, but don't make that part mandatory.)

comment 10y ago · link · parent

https://github.com/leo-stone/hack-petya/blob/master/main.go#...

Looks like it used a [1-9a-xA-X]{8} key. Even with a CSPRNG that's only 46 bits of entropy. You can brute force that in 2-3 hours with adequate hardware.

1656.

Company stopped responding last year, so I open sourced my job application(github.com ↗)

3 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

I'm currently dealing with my own nightmare with the three credit bureaus. After a month of no response, I got an "updated" credit report where literally nothing was changed.

comment 10y ago · link · parent

You have 10^15 possible values from a 16-digit CC number (due to Luhn's algorithm). The first 6 are for the issuer/bank; if you know that, you have 10^9 or about 30 bits of possible values.

comment 10y ago · link · parent

Also: Don't implement chacha20-poly1305 or AES-GCM yourself, unless you're a crypto expert.

You'll more than likely make a mistake.

Libsodium offers both (but AES-256-GCM is only available if you have hardware support for constant-time implementations).

    crypto_aead_chacha20poly1305_encrypt()
    crypto_aead_chacha20poly1305_decrypt()
    crypto_aead_aes256gcm_encrypt()
    crypto_aead_aes256gcm_decrypt()
https://github.com/jedisct1/libsodium

comment 10y ago · link · parent

I think they were referencing, "Most crypto is bypassed rather than broken."

comment 10y ago · link · parent

The problem isn't IGE. It's that they're using SHA1 (not HMAC-SHA1) in a "MAC and Encrypt" construction.

comment 10y ago · link · parent

It's worth mentioning: This isn't just causing people to flee. It's actively repelling people from moving there.

(Personally, I've turned down job offers for ~2x what I make now just so I don't have to endure today's rent prices, which I anticipate are only going to increase.)

If you're in SF and you want better access to talent, consider a distributed team instead of expecting everyone to move to SF.

comment 10y ago · link · parent

No, they still use MTProto and not an AEAD construction.

comment 10y ago · link · parent

Oh, excellent.

(Last I checked it was still AES-128 and SHA-1, but that was before the name change and I wasn't sure if it had changed. Glad to hear it has.)

comment 10y ago · link · parent

From what I can tell, the main difference between this and what Signal was using as of December is:

- WhatsApp uses AES-256 instead of AES-128 (both are CBC mode)

- WhatsApp uses HMAC-SHA-256 instead of HMAC-SHA-1

I think everything else is the same. (I need to re-read the Signal Protocol specification later today to make sure.)

comment 10y ago · link · parent

No, that's Tor's job.

comment 10y ago · link · parent

By that, it means that it uses libsodium.

(I did some of the code audits.)

comment 10y ago · link · parent

Thanks. Not sure how I feel about CFB but that did answer one of the two big questions the other page didn't. :)

comment 10y ago · link · parent

Yeah, I know. Both services offer that.

Bytejail uses X25519 + Xsalsa20Poly1305.

SpiderOak uses RSA-2048 + AES-256. (Is it AES-256-CTR + HMAC-SHA2 or is it AES-256-GCM? That page doesn't specify.)

Bytejail uses scrypt. SpiderOak uses PBKDF2-SHA256 with 16384 iterations.

My earlier comment was saying: Bytejail uses TahoeLAFS on the backend after receiving encrypted blobs. SpiderOak uses ________?

Again, to clarify: This isn't a crticism of SpiderOak. I just literally don't know what they are doing from the pages people have linked to in this thread.

comment 10y ago · link · parent

At a glance:

SpiderOak offers encrypted backups. This is a good thing. It doesn't specify how it's stored on their end (presumably because it doesn't matter to the end user). So that's an unknown.

Bytejail offers encrypted anonymous backups (via Tor Hidden Service) and uses a TahoeLAFS backend. My understanding of TahoeLAFS is that it's excellent. So if you're security-conscious, Bytejail would seem like a better choice.

(I'm not familiar enough with SpiderOak to comment on their offering in detail; I can only really go off the page you linked.)

comment 10y ago · link · parent

It's near the top of the page's source:

    <noscript><meta http-equiv="refresh" content="0; URL=/noscript"/></noscript>
(The <noscript> tag has been around since at least as long as I've had Internet access. It's not new.)

comment 10y ago · link · parent

It might be encouraging to know that, while the website does require Javascript, there are no third-party trackers: https://i.imgur.com/4fYPJ5P.png

comment 10y ago · link · parent

This is actually incorrect.

It's using Phpass by Solar Designer, which is not the same thing as merely "using MD5". Typically, I reserve that choice of words for constructions like this:

    $hash = md5($password);
    $hash = md5($password . $salt);
    // etc
This MD5 code is still bad. They really should migrate to just using password_hash() and password_verify(), but they won't. They're committed to supporting PHP 5.2.x forever (or at least until every shared host in existence stops supporting 5.2, which is effectively forever).

https://github.com/WordPress/WordPress/blob/6edbcc88ff5ba0ac...

Note that, on newer versions of PHP, bcrypt will be used instead of the method linked by this HN submission.

comment 10y ago · link · parent

I like how, after a long list of sev:hi and sev:crit vulnerabilities, they have a "Misc" which references TWENTY-EIGHT more CVEs from Samba over the course of 9 years. Holy shit.

Don't buy Quanta.

comment 10y ago · link · parent

I've taken a different approach to explaining the basics of application security.

These are the things that are most likely to cause your application to be secure:

    1. Data being treated as code.
    2. Invalid (or missing) logic.
    3. Insecure operating environment. (e.g. outdated packages)
    4. Cryptography failures.
Data being treated as code covers the obvious things like SQL Injection and Cross-Site Scripting, and makes it easier to conceptualize the solution: Never mix the two. That's what prepared statements accomplish.

Invalid/missing logic is the realm of "missing access controls" and "confused deputy" problems. (This is also where I'd place CSRF vulnerabilities.)

Insecure operating environment: A secure application on an insecure server is not secure. Patch your systems. Use HTTPS. WordPress can't save you from CVE-2012-1823. Apache can't save you from Shellshock.

Cryptography failures are their own category, where the phrase "padding oracle" is routinely uttered with a straight face, a single mistake can cripple your application, and comparing strings the normal way programmers compare strings is considered dangerous. The solution here for people who aren't interested in becoming an expert is to hire one. Or a team of them.

These descriptions are an attempt to address the fundamental problems with how insecure code is written, rather than to arm the reader with a checklist of specific instances of vulnerabilities they can check off.

I generally dislike checklists (OWASP 10, SANS 25).

How many people are well-armed against SQL Injection, but pass user data to PHP's unserialize() function with reckless abandon? This is a data-as-code issue.

How many people use str_shuffle() for password reset token generation? This is a cryptographic failure.

I wrote about this at length here: https://paragonie.com/blog/2015/08/gentle-introduction-appli...

If anyone's interested, I also curate this reading list on Github: https://github.com/paragonie/awesome-appsec

comment 10y ago · link · parent

"We this is so important"

comment 10y ago · link · parent

It's simple: Dox is short for "docs". Shortening a 4-letter word to a 3-letter word is sensible (albeit lazy). Shortening a 4-letter word to a 4-letter word ("doxx") is stupid.

I don't know why people spell it with two. Maybe they think it looks cooler? But really it's hacker slang for "I accessed and published sensitive information about an individual" and is in most cases horrible.

comment 10y ago · link · parent

Why should they be nervous about doing their job?

Also, one X, not two: https://stallman.org/doxing.html

1
555657
60