Code gave code-execution powers to anyone who knew the secret password: "zerodium."
Read the whole story
Read the whole story
I guess ignoring the fact that Github also rolled their own security-related infrastructure at some point as well? Or do you think their infrastructure poofed into being from the æther preformed?Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
Personally I say æther. And definitely not because I wanted to copy/paste "æ."I guess ignoring the fact that Github also rolled their own security-related infrastructure at some point as well? Or do you think their infrastructure poofed into being from the æther preformed?Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
PHP 80 % of websites? Humanity is doomed.
That is primarily Wordpress, Joomla and other consumer CMSs.
High volume serious PHP websites use Symfony or Laravel, which is an entirely different beast.
Don't forget Yii!
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
PHP has a long history of iffy exploits and encouraging bad coding habits. Using Twisted or Express or whatever ASP.NET people use is better than a stock PHP install, which lots of people seem to use.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Good luck.
Gonna go write my next (first) website in assembly. I don't even know if that's physically possible.
Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
I don't know if that's the reason. Sometimes "rolling your own" is done out of necessity since there are hardly any alternatives at the time. GitHub is a lot newer then other source code repositories... it's certainly isn't as old as PHP itself (which started in 1994)
Python has "errors should not pass silently" as a core value. Yes, Python would be sooooo much better, it really would. ASP.NET would also be better, sure it's a pain to develop with, but I think it's pretty OK when it comes to security.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
You have a point about Node.js, though.
PHP has a long history of iffy exploits and encouraging bad coding habits. Using Twisted or Express or whatever ASP.NET people use is better than a stock PHP install, which lots of people seem to use.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Well, it was a PHP website run by the top PHP experts that got hacked, so at least for me that's a reddish flag.
You have my sincere sympathy for speaking with senior management promoting quality of code. If you haven't, find an angle that quantifies the effort in money saved. That's the language they understand.
There’s gitlab and bitbucket too.I can see why they are doing this, but it still worries me that all source code tends to end up on GitHub.
Haven't we learned that platform monoculture is bad?
(I guess not).
The article says that the server was hacked. Was it hacked via a PHP website or application running on the server?PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Well, it was a PHP website run by the top PHP experts that got hacked, so at least for me that's a reddish flag.
The fact that these commits were scrutinized so quickly, and that corrective action was taken immediately, and that within a day or so policies and procedures were updated and additional layers of security were implemented is praise worthy.
There is no perfect 100% secure solution, but the fact that the maintainers are apparently eyeballing these commits in near real time is encouraging.
PHP has a long history of iffy exploits and encouraging bad coding habits. Using Twisted or Express or whatever ASP.NET people use is better than a stock PHP install, which lots of people seem to use.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
History that's 10 years old... 5.6 was OK, but PHP 7 is solid and has been for 6 or 7 years. 7.4 is very solid.
The biggest issues with web applications are, in no particular order:
Applications in the wild using deprecated unpached versions of PHP/ASP, etc.
Applications in the wild Using unsupported unpached versions of operating systems, deprecated versions of Apache, NGINX, etc...
Shitty development - I've seen awful bug ridden code in ASP and PHP equally. To this day SQL injection is a thing even though both PHP and ASP give you all the tools you need to not write that shit - just as an example.
"Most people" don't use ASP - most people use something like PHP which is running on almost 80% of web servers. ASP is on approximately 9% overall. For the top 1000 sites it's a bit closer - 58% of the top 1000 run PHP vs 21% running ASP. The fact that the entire stack for PHP dev is FOSS probably has a lot to do with that, and also probably has a lot to do with inexperienced devs building shitty sites because the price of entry is $0.
Honestly, I'm a language agnostic developer - I just get irritated with the knee jerk PHP SUX BALLZ bullshit, and frankly, this article is an example of why that's not really true - an exploit was checked in and found within a day, and not only was it pulled, the maintainers reviewed their entire source code management and made changes and implemented additional security measures within a day or two. We can argue about having all the eggs in the GitHub basket, and that's probably an important discussion to have, but as a developer this type of thing inspires confidence IMO.
No one doing any sort of remotely serious hack of PHP would've done it like this.if (strstr(Z_STRVAL_P(enc), "zerodium")) {
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yay, I'm doing serious websites!PHP 80 % of websites? Humanity is doomed.
That is primarily Wordpress, Joomla and other consumer CMSs.
High volume serious PHP websites use Symfony or Laravel, which is an entirely different beast.
I wouldn’t assign “a group of developers” to secure and manage a server in such a critical position. Why not leave this trivial stuff to full-time pros, especially since this service can be had for peanuts these days (if not free).Git access requires SSH access, nothing else. If a group of developers can't handle such trivial demands securely, it shouldn't develop web server software to start with.Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
The move to Github was probably the lazy solution.
Most of them are just because the web host supports some flavor of PHP, specifically to enable Wordpress, which powers a buttload of web sites (including this very site).PHP 80 % of websites? Humanity is doomed.
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yeah, it's more the "I want it done yesterday and I can't sell bugfixes as a feature" mentality than PHP itself that's to blame for there being so much bad and insecure software out there, though PHP's very fast to develop in, which doesn't help. You show management the rough prototype you knocked together in a couple of hours and they want it up on a production server by the weekend once the design team have replaced all the placeholder graphics.
Git access requires SSH access, nothing else. If a group of developers can't handle such trivial demands securely, it shouldn't develop web server software to start with.Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
The move to Github was probably the lazy solution.
FWIW, I moved our projects the opposite direction recently. Away from Github, onto the company server. There we have control over what's going on and don't donate our private code to the owner of Github, Microsoft.I can see why they are doing this, but it still worries me that all source code tends to end up on GitHub.
Haven't we learned that platform monoculture is bad?
The difference that I see is that C++ doesn’t enable novice programmers to connect websites to the internet. I see PHP as somewhat uniquely problematic because it actively encourages this hazardous combination.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yeah, it's more the "I want it done yesterday and I can't sell bugfixes as a feature" mentality than PHP itself that's to blame for there being so much bad and insecure software out there, though PHP's very fast to develop in, which doesn't help. You show management the rough prototype you knocked together in a couple of hours and they want it up on a production server by the weekend once the design team have replaced all the placeholder graphics.
I feel that people have this backwards. Because you can get something functional quickly, it means there is more budget (time) to build solidly, because it means that the platform you're building on has a good set of composable primitives that get you up to speed.
If you had to bootstrap everything from scratch, you'd take longer to get a prototype, AND securing things would be that much more difficult.
Just because any novice can write php doesn't imply that expert C++ coders (this is a stereotypical placeholder for seasoned developer) are significantly better at security engineering than the average novice.
In fact, until the Snowden leaks, software developers were comically clueless about security on average. Situation is only marginally better today, but there's at least some awareness.
Insecurity doesn't follow from rapid prototyping. Causes include error, ignorance and priorities, none of which are exclusive to PHP.
Git access requires SSH access, nothing else. If a group of developers can't handle such trivial demands securely, it shouldn't develop web server software to start with.Just another example of why you shouldn't ever try to roll your own security related infrastructure unless you really really know what you are doing.
The move to Github was probably the lazy solution.
Your flippant comment betrays your naivette. Do you happen to run a server which if compromised could get an attacker access to 80% of the web?
I think I'll let the 400 billion dollar corporation handle the security, thank you very much.
I can see why they are doing this, but it still worries me that all source code tends to end up on GitHub.
Haven't we learned that platform monoculture is bad?
(I guess not).
Indeed, there are others who share the same opinion:
https://lwn.net/Articles/850992/
There is some discussion there regarding sourcehut as a FOSS drop-in for GitHub.
If all your company's knowledge is public, or if industry espionage doesn't matter, there's indeed not much reason to not use third party offerings. However, I've heard there are companies where it matters who reads emails and source code and who'd better not.Why pay a developer's salary to manage git, WordPress, Exchange security when you can pay people who support them full-time?
“Source code stored on GitHub.com will be encrypted at rest, by default.” https://github.blog/changelog/2019-05-2 ... n-at-rest/If all your company's knowledge is public, or if industry espionage doesn't matter, there's indeed not much reason to not use third party offerings. However, I've heard there are companies where it matters who reads emails and source code and who'd better not.Why pay a developer's salary to manage git, WordPress, Exchange security when you can pay people who support them full-time?
Git is unencrypted; whoever hosts the Git repository can read everything. The same is true for email, with the (rarely used) exception of end-to-end encrypted messages. Likewise for WordPress.
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yeah, it's more the "I want it done yesterday and I can't sell bugfixes as a feature" mentality than PHP itself that's to blame for there being so much bad and insecure software out there, though PHP's very fast to develop in, which doesn't help. You show management the rough prototype you knocked together in a couple of hours and they want it up on a production server by the weekend once the design team have replaced all the placeholder graphics.
C++, Java, C# and maybe even Pascal*The difference that I see is that C++ doesn’t enable novice programmers to connect websites to the internet. I see PHP as somewhat uniquely problematic because it actively encourages this hazardous combination.PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yeah, it's more the "I want it done yesterday and I can't sell bugfixes as a feature" mentality than PHP itself that's to blame for there being so much bad and insecure software out there, though PHP's very fast to develop in, which doesn't help. You show management the rough prototype you knocked together in a couple of hours and they want it up on a production server by the weekend once the design team have replaced all the placeholder graphics.
I feel that people have this backwards. Because you can get something functional quickly, it means there is more budget (time) to build solidly, because it means that the platform you're building on has a good set of composable primitives that get you up to speed.
If you had to bootstrap everything from scratch, you'd take longer to get a prototype, AND securing things would be that much more difficult.
Just because any novice can write php doesn't imply that expert C++ coders (this is a stereotypical placeholder for seasoned developer) are significantly better at security engineering than the average novice.
In fact, until the Snowden leaks, software developers were comically clueless about security on average. Situation is only marginally better today, but there's at least some awareness.
Insecurity doesn't follow from rapid prototyping. Causes include error, ignorance and priorities, none of which are exclusive to PHP.
It’s true that PHP has tools in place that allow programmers to build from solid components. But , e.g. having an idiot-proof toolset for avoiding SQLi only does so much good when insecure legacy tools and methodologies are still laying around (perhaps because they are the foundation for the “good” ones).
I don’t know that C++ extended to offer the same functionality to the same user base would fare any better. It could easily be much worse. It’s a fraught sphere. But PHP wants to be there, so I think it has to own its reputation.
perl 5.8.5
That was released 17 years ago. I'm not sure this is a sufficient reason to stick with a legacy release for that long. Even if you are only doing offline development, surely there have been important bug fixes since then?
I think I'll let the 400 billion dollar corporation handle the security, thank you very much.
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
93% of Paint Splatters are Valid Perl Programs.thou shalt speak no ill of holy perl.
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
I spent about a decade using PHP from around 1998 on, recently spent some time working with PHP 7, and could not agree less, despite missing the enthusiasm I had back then fleeing ASP and ColdFusion. PHP has two properties which are riskier than the common alternatives: error handling is off by default and it has various places which aggressively try to coerce types or execute code. There’s also a bunch of common foot-guns like the random ordering of function arguments in the standard library, which I’ve seen lead to security problems or simply background noise which masked more serious things (“we can’t lint this because it generates thousands of errors!”).
Things like register_globals are gone but that culture spread through too much of the community and it’s just too easy to find people stringing SQL queries together, using exec to parse things, loading user input into global variables, etc. because that’s just how it was done for so long. It’s true that you can write insecure or unreliable code in any language (yes, even Rust) but the community and especially the core developers have a strong influence on what people learn as normal and PHP has had a couple of decades of people racing to crank out code and ship it before thinking about the ways it could go wrong. That’s a volatile combination with a language which requires constant diligence to use correctly rather than being safe by default.
If all your company's knowledge is public, or if industry espionage doesn't matter, there's indeed not much reason to not use third party offerings. However, I've heard there are companies where it matters who reads emails and source code and who'd better not.Why pay a developer's salary to manage git, WordPress, Exchange security when you can pay people who support them full-time?
Git is unencrypted; whoever hosts the Git repository can read everything. The same is true for email, with the (rarely used) exception of end-to-end encrypted messages. Likewise for WordPress.
PHP 80 % of websites? Humanity is doomed.
Because 80% of websites running Python/ASP.NET/Node/whatever is sooooo much better?
The biggest problem with PHP and all the other languages IMO is that people grab sample code from some rando site and it works and they think they are developers and they leave this shit running on live servers hooked up to the net.
My number one task for the last month or so has been trying to explain the difference between code that functions, and production ready code to senior management...
Yeah, it's more the "I want it done yesterday and I can't sell bugfixes as a feature" mentality than PHP itself that's to blame for there being so much bad and insecure software out there, though PHP's very fast to develop in, which doesn't help. You show management the rough prototype you knocked together in a couple of hours and they want it up on a production server by the weekend once the design team have replaced all the placeholder graphics.
I feel that people have this backwards. Because you can get something functional quickly, it means there is more budget (time) to build solidly, because it means that the platform you're building on has a good set of composable primitives that get you up to speed.
the second malicious commit, which was made under Popov’s account name. It purported to revert the previous typo fix.