6,663 karma · joined Feb 25, 2016 (10y ago) · 1,775 submissions
Previously AWS Cryptography (2019 - 2023).
Unless otherwise stated, my opinions are my own and do not reflect my employer.
https://scottarc.blog/about/
1052.
Checklist-Driven Security Considered Harmful(paragonie.com ↗)
29 points · by CiPHPerCoder · 9y ago · 7 comments
comment 9y ago · link · parent
1055.
Show HN: Iaso, a Hash-DoS resistant JSON parser for PHP projects(github.com ↗)
2 points · by CiPHPerCoder · 9y ago · discuss
comment 9y ago · link · parent
Useful rule of thumb: If you are an outsider to other peoples' relationships, you probably don't get to judge the fairness of the relationship. Err on the side of respect.
comment 9y ago · link · parent
Okay?
I really don't have any interest in where this conversation seems to be going.
If you're dealing with a troll, doing what I said will disarm 99% of their tactics. If you don't like that, take it up with the trolls.
If you, rather, have a problem with diversity itself, then let's end this discussion here.
EDIT:
> You're taking part in making sure they have the "right" beliefs about business structure and hiring practices, and it's all the more insidious because you claim you're not.
Okay, this is clearly not a discussion worth having.
comment 9y ago · link · parent
Us?
I'm talking about them, in a third person sense, not a first person sense.
Them, in this case, is meant to refer to trollish individuals looking to cause trouble under the facade of caring about the plight of women, people of color, etc. but actually are just in it for their own emotions. The people who want to stir the pot, not make things better.
Rather than a script furnished in a list of demands from said subset of the populace, this is more of a suggestion to defuse conflicts in a way that doesn't let them win.
comment 9y ago · link · parent
Some people are like that, where if you respond to their snark, your response will be used against you to tarnish your reputation in the eyes of bystanders.
It is important to never let them get the moral high ground.
If someone says something like...
* "Your team is all white."
* "Your team is all male."
* "Your team is all American."
* "Your team is all able-bodied."
A better way to respond would be something like, "That's true. We're always looking for new talent and embrace diversity, just haven't had much luck yet. <hiring page URL here> if anyone's interested."
It addresses the problem, and contains an open invitation for people of diverse backgrounds to apply.
(All of this is assuming you're willing to work with people who aren't white, aren't male, aren't American, and/or aren't able-bodied, of course.)
1060.
Guide to Automatic Security Updates for PHP Developers (2016)(paragonie.com ↗)
1 points · by CiPHPerCoder · 9y ago · discuss
1061.
The Comprehensive Guide to URL Parameter Encryption in PHP (2015)(paragonie.com ↗)
1 points · by CiPHPerCoder · 9y ago · discuss
1062.
The Comprehensive Guide to URL Parameter Encryption in PHP (2015)(paragonie.com ↗)
1 points · by CiPHPerCoder · 9y ago · discuss
comment 9y ago · link · parent
I've looked at Laravel, about two years ago. http://seclists.org/fulldisclosure/2015/Apr/57
I haven't looked deeper at what it's done since then, since nobody is paying me to do so. I wasn't impressed then, and instead of waiting for them to get around to doing things right (while figuring out how to preserve backward compatibility), I started from zero.
You don't have to like that decision, but that's the decision I made.
> Again, using a framework makes your code way easier to review and a lot smaller to boot.
Sure, use a framework.
And then this happens: https://kivikakk.ee/cryptography/2016/02/20/breaking-homegro...
I designed my own because, unfortunately, most of the PHP community either doesn't prioritize security enough to be trustworthy, or is simply in over their heads.
We use third party libraries (Twig for templates, HTML Purifier for allowing some HTML but avoiding XSS vulnerabilities) because they're well-studied and trustworthy libraries.
However, I do not trust most other PHP developers to do anything security-critical correctly. And thus, I will not design something meant to be secure based on an insecure foundation.
If your only reason for Airship's status as "probably insecure" is because it's "ad-hoc" and/or "bespoke": Sorry, that's insufficient. Got a PoC handy?
Otherwise: we're talking about pure hypotheticals that are far removed from the real world and there's not much point in that. You can frame your criticism as "things to make the code easier to read/understand" and whatnot, and they stand alone. Citing them as "probably a vulnerability" is questionable, however.
> It's hard to tell, in this graph (https://github.com/paragonie/airship/graphs/contributors) is 'paragonie-security' a single person?
For the moment, I'm the only technical person at Paragon. That will change, and that account will be delegated to signing/committing the code changes made by other employees.
> As someone who works in the security industry it's just a bit tiring to see yet another homegrown PHP half-framework full of it's own intricacies and potential issues with the ever familiar problems described in all my comments above, coupled with a post saying how it was engineered to be secure from the ground up.
You've raised legitimate concerns over:
- Apparent NIH-syndrome, which in this case is justified
- Minor code quality nits, which are now fixed
- Bus factor
...but none of those are, directly, a security problem. :)comment 9y ago · link · parent
https://www.corporationwiki.com/p/2ixe71/paragon-initiative-...
That's all I will say about the matter.
comment 9y ago · link · parent
The auto-updater does nothing to make this worse. That's true of any vulnerable system. Once you're owned, you're owned.
> Because there will be security vulnerability, and people will be exploited, and even if your update system runs every 4 hours, it will take dev team some time to write up a fix and push an update.
It runs every 15 minutes, in the default configuration, and our usual turnaround time for getting a bugfix out is less than 1 hour.
> The sad part, it is not hard to fix.
It's not broken, it's a trade-off. Nothing to fix.
> You already have separate update script
That's the kicker: If your threat model prioritizes "don't let the httpd write to the web directory" higher than your usual non-power-user, then simply:
1. Set up a cronjob to run the update script, run by a more privileged user.
2. Don't chown/chmod.
The reason we do this by default is because our threat model is ensuring automatic updates work for everyone (including people who are not sophisticated enough to set up a cronjob).
> You can change your Dockerfile to use secure setup. It will take a bit of work but it is definitely possible.
I guess?
The Dockerfile was provided by the community and is maintained by the community; I don't use it nor do I touch it.
I'm not a Docker user. https://news.ycombinator.com/item?id=10269200
> Until this is done, "simply secure" is only until the first compromise.
That's literally true of anything. If you get compromised, burn the machine and recover from a backup.
comment 9y ago · link · parent
Our cryptography is certainly superior to Laravel's.
https://github.com/illuminate/encryption
https://github.com/paragonie/halite
Beyond that, nobody has paid me to look deeper and I haven't had any reason to.
> There are vulnerabilities in there, I've seen enough code like that to almost guarantee you.
If so, then anyone reading this thread who's aware of any vulnerabilities will be interested in: https://hackerone.com/paragonie
comment 9y ago · link · parent
Those are all my research findings. :P
> Is rolling your own ORM and homegrown framework secure? Says who?
Says the person who routinely finds exploitable vulnerabilities in other PHP frameworks and content management systems.
There will always be things to improve. Feel free to try to find an exploitable security hole.
> It's not really a CMS, it's a NIH syndromed framework with a CMS on top of that. That's a typical source of bugs.
It's not "NIH syndrome" it's "I don't trust any of these people to write a secure framework and I have the experience to justify this concern".
> They are both framework functions, and you wouldn't be writing them if you had written this from the ground up to be secure IMO.
Escaping-on-output still implies that escaping happens.
comment 9y ago · link · parent
- Offline editing for online publishing
- Static mirrors to resist censorship in the face of DDoS
Updates would be sent from an Airship to a static hub, using challenge-response authentication, with Ed25519 signatures.Aside from the API that receives data and triggers an update (which is intended to be set up on a different vhost), the attack surface will be minimal.
The only reason this isn't already a thing is that I've had other projects that were higher priority, including one I'll be releasing in a month or so (but probably not submitting to HN; it's an entirely commercial project).
comment 9y ago · link · parent
https://paragonie.com/blog/2016/10/guide-automatic-security-...
Security at the expense of usability, comes at the expense of security.
CMS Airship went with the "self-writing code" option because we believe the potential damage of a 1day vulnerability to be much a higher concern than theoretical "this isn't really following best practices grumble grumble".
By all means, don't chmod/chown anything, and run continuum.sh as a more privileged user if that's what you want.
Just don't disable automatic updates.
comment 9y ago · link · parent
1. Context matters: That's a CLI script used to build and sign core updates. We bundle it with the source code so anyone can fork our project and use only their own keys, easily.
2-4. This is a good point. https://github.com/paragonie/airship/issues/181
> Properly escaping SQL injection is great (and something PHP apps seem to have a continual problem with), but why did you decide to roll your own framework for doing this?
Because when Airship was started, everyone insisted on backwards compatibility for PHP 5 and I wanted to make use of strict typing. The master branch includes a static analyzer as part of continuous integration.
> Are all of the well maintained, tested and great ones already available not suitable for some reason?
Have you seen what I've done to PHP frameworks over the years?
https://scott.arciszewski.me/open-source/
https://paragonie.com/security/advisories
I wasn't in a hurry to pick up other peoples' technical debt, especially if we're paying money for vulnerabilities: https://hackerone.com/paragonie
5. That's simply a paranoia/convenience feature. If you've got a better way to automagically convert filename.txt into filename-5.txt if filename.txt, filename-2.txt, filename-3.txt, and filename-4.txt already exist, I'm all ears.
6-10. Good eye. I think that can be refactored to repeat itself less.
11. I don't see a problem with this?
12. I don't see a problem with this either.
1071.
How We Engineered CMS Airship to Be Simply Secure(paragonie.com ↗)
31 points · by CiPHPerCoder · 9y ago · 23 comments
1072.
How We Engineered CMS Airship to Be Simply Secure(paragonie.com ↗)
1 points · by CiPHPerCoder · 9y ago · discuss
1073.
How We Engineered CMS Airship to Be Simply Secure(paragonie.com ↗)
3 points · by CiPHPerCoder · 9y ago · discuss
comment 9y ago · link · parent
No, it's really not.
https://dev.acquia.com/podcast/69-php-secure-it-if-you-do-it...
Until someone produces concrete evidence that proves the statement "It is impossible to write secure PHP code", I tend to issue a challenge to these sentiments and then discard them.
Furthermore, if it is currently impossible to write secure PHP code, then that's a problem that needs to be fixed. Over 82% of the Internet runs PHP. Fixing the language would be an enormous win.
Alternatively, if it's not impossible to write PHP code, then it's not "inexcusable" to write software in PHP.
> First, "simply secure" to me means adopting a capability-security model. CMS Airship unfortunately appears to not be capability-based. On the other hand, there's little existing art for designing capability-safe CMSs, and certainly users aren't ready for capability-safe systems, so perhaps it's for the best.
> ACLs are the great antipattern of our time. I hope that capabilities will eventually end the crime of ACLs. It's fine if you disagree with this point, but please read http://srl.cs.jhu.edu/pubs/SRL2003-02.pdf and then consider whether you still disagree.
Capabilities seem more appropriate in a distributed system (Tahoe-LAFS comes to mind). ACLs are great for a centralized system (one website, many visitors).
Otherwise, you've just turned an O(n) maintenance burden into an O(n^2) maintenance burden by having an explicit and pedantic whitelist of permissions copied and pasted across every user in the system. This doesn't seem to offer any value if most (99.99%) of your users will have the same set of permissions.
I'd like to think, given the sort of software Airship is, ACLs are more appropriate. Furthermore, it's much simpler to maintain.
I'd also like to think that, given the flexibility of our ACL system (role-based or user-based, whitelist, overlapping contexts, per-site action matrix) that we reach a good balance of security and usability.
Maybe I'm failing to see it, but what is the tangible security gain of capabilities over ACLs to an open source content management system written in a scripting language behind a single webserver?
Or more to the point: What is the threat model in which capabilities are more appropriate than ACLs for such a software project?
Or is the answer something to the tune of, "It's more explicit and easier to formally verify in an academic context?" It's okay if it is, I just want to know.
> Summary: Well-engineered compared to its competitors, but falls far short of my ridiculously high expectations.
Heh, I'll take that as a compliment.
1075.
How We Engineered CMS Airship to Be Simply Secure(paragonie.com ↗)
3 points · by CiPHPerCoder · 9y ago · 2 comments
1078.
JSON Web Tokens should be avoided(paragonie.com ↗)
386 points · by CiPHPerCoder · 9y ago · 297 comments