3 ms·
I work with a group of penetration testers (who audit the security of websites, ranging from top 100 sites to smallish ones), we find a lot more issues with PHP
by orf 13y ago
I work with a group of penetration testers (who audit the security of websites, ranging from top 100 sites to smallish ones), we find a lot more issues with PHP sites than any other. .NET sites are often the most secure.
That being said, I once tested a ancient Java web app that recommended you use IE 5.5 (for the latest features). The people who made it decided it would be a good idea for the site to send the database credentials to the browser, which would then send them when requesting data. I face palmed pretty hard.
- gabordemooij 13y agoThat still does not mean the language itself is insecure. In my opinion this rather indicates the developers responsible for building those vulnerable sites lack some knowledge about proper web security.
- abjorn 13y agoI believe that was more or less the point he was making - regardless of the language or platform developers without proper understand can and will make security mistakes.
- michaelfdeberry 13y agoI agree, I think the problem is more so with developers that don't have a proper understanding and with what comes out of the box. Microsoft provides a lot of security features that are backed into asp.net that are pretty trivial to enable. From what, little, that I know about php I am not sure the same can be said. I believe that would make a bigger difference about perceived security of a platform
- rbsn 13y agoExactly! Just because you choose to drive your car into a brick wall at 100mph, it doesn't mean your car is unsafe.
- rplnt 13y agoWhat if you don't get out of a car that is doing 100mph against a brick wall? That's php if it's not clear.
- einhverfr 13y agoSending database credentials to the browser btw may or may not make sense. It really depends on context. If the db is enforcing users' security (which would be the case if you want to share security logic across apps possibly written in different languages) and it is an internal app with limited numbers of users, this makes a lot of sense. For a public internet site, however, it makes very little sense (since you likely have lots of users with essentially the same permissions). In LedgerSMB, for example, we use app login credentials as db credentials for internal users, but for customer/vendor portals, we use a single user account for the portal. There are a lot of reasons for this but PostgreSQL is flexible enough one can (relatively easily) limit most users to the LedgerSMB app if one wants (via pg_hba.conf). The goal however is to allow non-web apps with the same credentials and security enforcement and we already have some of those. So it isn't necessarily a facepalm. It really depends on context. There can be valid reasons for it but those are not in the context of a public-facing web site. I.e. if you expect users only to access the db through a single app then you don't want to use it but if you want the db to be accessed through a group of apps then using the db as a SSO technology is actually pretty smart.
- orf 13y agoIt was only a single app, and the database server was pretty much unprotected. As far as I can remember it did most/all of its access controls via JavaScript - it was truly terrible. Sure there are situations where it is OK, but as a rule of thumb it's not a terribly good idea.
- einhverfr 13y ago> As far as I can remember it did most/all of its access controls via JavaScript Hahahaha. If you are going to use db credentials, for the love of the gods, at least consider using the db to enforce access controls...... That's just common sense, IMNSHO....
- mephi5t0 13y agoJust because you tested more secure .NET site than less secure PHP sites doesn't mean that PHP is less secure. It means you tested more secure .NET sites compared to number of less secure PHP sites. If you flip a coin 10 times and you will get 10 tails it doesn't mean that the coin is broken or faulty. Random numbers are random.
- morganherlocker 13y ago> If you flip a coin 10 times and you will get 10 tails it doesn't mean that the coin is broken or faulty. It might be. At a certain point, the coin is more likely "broken" (or rigged somehow) than actually flipping tails every time. The chances of flipping a coin 10 times in a row tails are ~1/1000, so I do not think this is in the range, but at 100 flips, I would say that it is much more likely that the coin has been tampered with.
- orf 13y agoWith a sample of 10 that makes sense. We have done over 150 PHP tests over the last couple of years and the average number of issues is higher than other technologies. What would account for that bias?
- ayi 13y agoIt means the web sites are written by bad programmers.