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

Are you claiming that it's impossible to write secure PHP code?

1472.

Securing a PHP Application in 2016: The Pocket Guide(paragonie.com ↗)

2 points · by CiPHPerCoder · 10y ago · 2 comments

comment 10y ago · link · parent

A lot of stars cluster around the supermassive black holes in the center of every galaxy. Also, depending on the area of the spectrum they were examining, a lof X-rays are found there too.

1474.

Implementing a Secure “Remember Me” (Long-Term Authentication) Feature(paragonie.com ↗)

2 points · by CiPHPerCoder · 10y ago · 1 comment

comment 10y ago · link · parent

I've written my fair share of vulnerable code throughout the years. Two key indicators for me: Do they learn from their mistakes? Are they proactive at preventing mistakes?

comment 10y ago · link · parent

Why monthly and not daily? Or hourly?

comment 10y ago · link · parent

NaCl/libsodium solve a low-level problem that even very few talented engineers with years of software security experience can be expected to get right on their own.

Using these features should still be done under the guidance of someone who knows what they're doing. There's a larger number of developers who can use libsodium than there are developers who could replace it on their own.

In a sense, NaCl/libsodium can be viewed as a "replacement for expertise" that is so rare it's nigh-nonexistent. (To wit: these libraries were created by multiple authors.) Rather, it places the capability to build solid application-layer crypto into the hands of mere mortals.

That doesn't obviate the need for good mortals. :)

comment 10y ago · link · parent

Follow-up: Looks like I'm heading onward towards 21 months, and counting.

1479.

The PHP Security Platinum Standard: Raising the Bar with CMS Airship(paragonie.com ↗)

2 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

While that's probably good advice for someone starting out, I've spoken several times at Security B-Sides and at a few tech events in downtown Orlando.

The rejection reason I'm always offered (when I actually receive one) is a watered-down remix of the following:

  Your talk idea was excellent and highly rated! But we have
  previously obligated ourselves to representing the big name
  projects in the community, so we're instead going to give
  this spot to someone who wants to talk about a trivial
  improvement to Drupal or something only relevant to WordPress
  freelancers. Also, we already have an all-day security
  training and our judges toss cryptography in the same general
  category, so we consider it redundant.
(This is obviously editorialized.)

There's been a lot of talk about fixing a persistent cultural problem in the PHP community, where it's always the same speakers at every PHP event. And conference organizers pay lip service to wanting to do something about it. But then they turn around and invite the same people to do the same talks/training and then block off entire categories from being spoken about by anyone else.

That's the part that actually annoys me: "We're working on this problem, but not really."

As far as infosec conferences go, I've had schedule conflicts with everything except DEFCON and Black Hat, so being rejected there is probably just, "You're aiming too high. Try again in 10 years when you have real skills."

(That being said, my DEFCON Crypto & Privacy Village talk hasn't been rejected yet, so 20 months might end up being my high score.)

comment 10y ago · link · parent

I'm on a 20-consecutive-month talk rejection streak from various tech conferences in both the PHP and information security communities.

The more you face rejection, the less it stings. But this is a double-edged sword: It's still very difficult to muster up the effort to try again. Not because of pain avoidance, but because it feels like a waste of time.

Trying to game this might be a perverse way to break this cycle, but I couldn't do it. Good luck to anyone else who tries.

comment 10y ago · link · parent

> Should I just send them the results of our 3rd party PCI compliance scans?

You could ask, "We are routinely audited for PCI-DSS compliance. Would you prefer to see the results of our latest compliance audit?" This may be acceptable, and the only way to know is to ask.

If that's not satisfactory, try to negotiate with them to cover or split the cost of a comprehensive third party audit that meets their requirements.

If they require FIPS 140-2 compliance, see your doctor for blood pressure medication first.

> Is there a cheap certification we can do?

Security isn't cheap, unless you compare security to the cost of a data breach, in which case it's a hell of a bargain.

If they're Enterprise, they're probably more willing to cut a check for $X0,000 than accept the risk of losing millions in disaster recovery.

Whatever you do, don't go for the cheap options, if for no other reason than, if anyone on the client's side is security-savvy, they'll figure it out quickly and that might turn them off completely.

Whatever you do, don't pay for the audit out of pocket.

(Disclaimer: I do source code audits for Paragon Initiative Enterprises. We tend to focus on web-based and desktop software.)

comment 10y ago · link · parent

> The SpiderOak folks seem to know what they're doing.

I'm inclined to agree with that assessment.

> But if you don't trust them

Trust, but verify.

IIRC they were discussing hiring a friend of mine (whose knowledge in software security is something I respect greatly).

comment 10y ago · link · parent

I'm starting to look through the code right now. A scroll through their open source page indicates they're using libsodium, which is a good sign that they avoided most of the foot-cannons alluded to on this page: https://gist.github.com/tqbf/be58d2d39690c3b366ad

comment 10y ago · link · parent

I talk to the person behind SOS regularly. They are actually quite brilliant and very passionate about consumer security.

The premise of Decent Security (and the fact that there's no name or monetization strategy attached to it) is why they can do better. They're not trying to sell you anything. They're trying to help people take control of their own systems.

comment 10y ago · link · parent

Boycott anti-virus software. An afternoon spent on http://decentsecurity.com/introduction/ is better for Windows security than any AV product.

Keep everything up to date. Use password managers and two-factor authentication.

Most malware comes from ad networks right now, so use uBlock Origin. HTTPS Everywhere should go in every intsall of Chrome and Firefox.

https://paragonie.com/blog/2015/06/guide-securing-your-busin...

comment 10y ago · link · parent

It wasn't intentional. This was alluded to in Tavis's previous exploit.

But that being said, it's hilarious.

1488.

Show HN: CMS Airship – Secure Content Management for the Modern Web(github.com ↗)

1 points · by CiPHPerCoder · 10y ago · discuss

1489.

The PHP Security Platinum Standard: Raising the Bar with CMS Airship(paragonie.com ↗)

3 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

As a webserver: You don't. If the client is owned, that's not the server's problem.

Related: https://paragonie.com/blog/2016/03/client-authenticity-is-no...

comment 10y ago · link · parent

If I had the time, I'd do a thorough analysis of the two and publish my findings.

comment 10y ago · link · parent

> Maybe Signal is awesome. But privacy from law enforcement is not a killer feature. The US Government has substantial leverage over me in other ways.

What about the UK government? The GCHQ is one of the most aggressive and sophisticated signals intelligence agencies in the world.

What about the RU government? Or the Chinese government?

The reason most security folks speak of "nation state actors" in aggregate isn't to be euphemistic (initials: NSA), it's because "the only threat you might encounter online is your local government" isn't necessarily true.

To be clear, I don't want to turn this into a political discussion. I just wanted to point out that the scope is wider than your comment implied.

comment 10y ago · link · parent

It looks like it uses Olm, which aspired to be an early implementation of the Signal protocol (when it was called Axolotl):

https://matrix.org/git/olm/about/

I've not audited their implementation, but at least that one design choice is sane.

IIRC there were some design changes between the early Axolotl ratchet and the Signal Protocol. If you're interested in using Olm, I would make "find out what the differences are and why" my first priority.

comment 10y ago · link · parent

In that case, the Signal protocol is open source.

https://github.com/WhisperSystems/libsignal-protocol-c

https://github.com/WhisperSystems/libsignal-protocol-java

More generally (i.e. not for messaging apps), libsodium is great for application-layer cryptography:

https://download.libsodium.org/doc/bindings_for_other_langua...

comment 10y ago · link · parent

That's not an undertaking that should be taken lightly. At minimum, you should have a team wherein one of the people making the final design decisions is a cryptography expert.

And I don't mean "I learned how to do textbook RSA in college", I mean more of, "Can tease a previously undiscovered cache-timing side-channel out of a crypto library". (For example, the recent libgcrypt advisories.)

If the words "padding oracle" or acronyms like AEAD sound strange and foreign, that person is not qualified to fill that role.

I would wager most developers lack the background to make a messaging service that is actually secure. (To anyone reading this: Please don't let this fact magnify any sense of impostor syndrome you may have. You're far from alone. Even the experts won't embark on this endeavor without peer review.)

comment 10y ago · link · parent

If they hadn't hijacked my browser's scrollbar, I might have kept reading.

Can anyone compare the advantages of C14 to, say, S4 by Least Authority? I kind of like not having to trust my service providers for security when encryption does the job well enough.

1497.

Show HN: HPKP-Builder – easily add HPKP headers in your web application(github.com ↗)

4 points · by CiPHPerCoder · 10y ago · discuss

comment 10y ago · link · parent

Groovy! Thanks for the insight.

I'm not surprised to hear that custom-made business applications fared so poorly. Back when I worked for a telecommunications company, I saw some of the worst code imaginable endorsed by corporate and deployed to production with wild abandon. I reported no less than 10 vulnerabilities in my first day with a new codebase and they were all ignored. My boss took me aside and said, "There's some politics going on right now, just keep that in your back pocket in case you need to bring it up later. Now's not the time."

comment 10y ago · link · parent

Please tell me more about these PHP projects, if you have the data available to you.

* Did they support EOL'd versions of PHP?

* Are they legacy WordPress/Drupal/Joomla projects that haven't been updated in years?

* Are they in the "we (didn't use a framework|rolled our own framework) and used the mysql_* functions" league?

* Did they attempt to do something weird/crazy (i.e. store all session state in an encrypted cookie instead of server-side like normal, but forget to authenticate the ciphertext)?

Those are the kinds of things that I rarely find in modern PHP projects.

One thing I think Evert neglected to mention in his post: There's definitely an ecosystem problem. Incidentally, I've been working on cleaning it up on multiple fronts:

* Improving the quality of information developers will find via Google search or StackOverflow

* Writing blog posts that address security concerns e.g. https://paragonie.com/blog/2016/02/how-safely-store-password...

* Improving the security of the tools and frameworks developers use

* Working to improve the language itself (part of the reason why PHP 7's CSPRNG functions don't fail open is because a few of us were very vocal on how/why that would harm security)

comment 10y ago · link · parent

What Evert is referring to (the "reputation" of PHP and people's reactions) is even worse in infosec. I very frequently get accused of being a charlatan simply because I write PHP.

Some people openly question if a PHP developer who understands security exists at all: https://twitter.com/MalwareJake/status/506488937096183808

This is silly when you think about it. If so many systems run PHP, wouldn't you want your infosec people to know PHP and work with it more often? Why are we, culturally, encouraging such a blind spot by ostracizing folks who know it well? That part never made sense to me.

This conversation plays out more frequently than I like:

  Rando: Hahaha PHP security is an oxymoron.
  Me: Okay, then hack paragonie.com. It runs PHP. Logically, you should
      be able to hack it _just for running PHP_ if PHP is so insecure.
  Rando: But that website's mostly static content!
  Me: Yes, but it runs PHP. So it must be insecure, right?!
So far, despite giving people permission so the prospect of CFAA convictions don't discourage them, none of these "PHP is inherently insecure" folks have succeeded. I wonder why. :)

TL;DR - A lot of the hate against PHP is founded on ignorance and peer pressure. Be open to constructive criticism, of course, but a lot of the hate you'll hear is bullshit.

1
495051
60