Earlier quoted context omitted.
I mean no disrespect to you, but this sort of thing is exactly the sort of mess I’ve come to expect in any randomly-selected bit of PHP code found in the wild. It’s not that PHP somehow makes people write terrible code, I think it’s just the fact that it’s been out for so long and so many people have taken a crack at learning it. Plus, it seems that a lot of ingrained habits began back when PHP didn’t have many of it…
JavaScript land fares little better. IMO it’s because php and js are so easy to pick up for new programmers. They are very forgiving, and that leads to… well… the way that php and js is…
We spent $20 to achieve RCE and accidentally became the admins of .mobi
161–170 of 391 posts
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#162Obviously there are a lot of errors by a lot of people that led to this, but here's one that would've prevented this specific exploit: > As part of our research, we discovered that a few years ago the WHOIS server for the .MOBI TLD migrated from whois.dotmobiregistry.net to whois.nic.mobi – and the dotmobiregistry.net domain had been left to expire seemingly in December 2023. Never ever ever ever let a domain expire.…
Always use subdomains. Businesses only ever need a single $10 domain for their entire existence.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#163I have written PHP for a living for the last 20 years and that eval just pains me to no end eval($var . '="' . str_replace('"', '\\\\"', $itm) . '";'); Why? Dear god why. Please stop. PHP provides a built in escaper for this purpose eval($var . '=' . var_export($itm, true) . ';'); But even then you don't need eval here! ${$var} = $itm; Is all you really needed... but really just use an array(map) if you want dynamic…
I mean no disrespect to you, but this sort of thing is exactly the sort of mess I’ve come to expect in any randomly-selected bit of PHP code found in the wild. It’s not that PHP somehow makes people write terrible code, I think it’s just the fact that it’s been out for so long and so many people have taken a crack at learning it. Plus, it seems that a lot of ingrained habits began back when PHP didn’t have many of it…
Mind you this was more than ten years ago when PHP was fixing exploits left and right.
This dust up resolved itself within 24 hours though, as I came in the next morning to find he was too busy to work on something else because he was having to patch the PHP forum software he administered because it had been hacked overnight.
I did not gloat but I had trouble keeping my face entirely neutral.
Now I can’t read PHP for shit but I tried to read the patch notes that closed the hole. As near as I could tell, the exact same anti pattern appeared in several other places in the code.
I can’t touch PHP. I never could before and that cemented it.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#164Earlier quoted context omitted.
> > Our industry argues about code style (: > Our industry does not argue about code style. QED
Our industry does not argue about arguing about code style.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#165Earlier quoted context omitted.
I mean no disrespect to you, but this sort of thing is exactly the sort of mess I’ve come to expect in any randomly-selected bit of PHP code found in the wild. It’s not that PHP somehow makes people write terrible code, I think it’s just the fact that it’s been out for so long and so many people have taken a crack at learning it. Plus, it seems that a lot of ingrained habits began back when PHP didn’t have many of it…
JavaScript land fares little better. IMO it’s because php and js are so easy to pick up for new programmers. They are very forgiving, and that leads to… well… the way that php and js is…
The main use I know of goes away with workers.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#166Obviously there are a lot of errors by a lot of people that led to this, but here's one that would've prevented this specific exploit: > As part of our research, we discovered that a few years ago the WHOIS server for the .MOBI TLD migrated from whois.dotmobiregistry.net to whois.nic.mobi – and the dotmobiregistry.net domain had been left to expire seemingly in December 2023. Never ever ever ever let a domain expire.…
https://money.cnn.com/2016/01/29/technology/google-domain-pu...
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#167Earlier quoted context omitted.
JavaScript land fares little better. IMO it’s because php and js are so easy to pick up for new programmers. They are very forgiving, and that leads to… well… the way that php and js is…
I've heard it said that one of the reasons Fortran has a reputation for bad code is this combination: lots of people who haven't had any education in best practices; and it's really easy in Fortran to write bad code.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#168Great write-up - the tip of the iceberg on how fragile TLS/SSL is. Let's add a few: 1. WHOIS isn't encrypted or signed, but is somehow suitable for verification (?) 2. DNS CAA records aren't protected by DNSSEC, as absence of a DNS record isn't sign-able (correction: NSEC is an optional DNSSEC extension) 3. DNS root & TLD servers are poorly protected against BGP hijacks (adding that DNSSEC is optional for CAs to veri…
If we really wanted verification we would still be manually verifying the owners of domains. Highly effective but expensive.
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#169Earlier quoted context omitted.
This is why PHP is mostly banned at bigCo
To paraphrase: you can write PHP in any language. PHP is a negative bias for bigCo mostly because of the folkloric history of bad security practices by some PHP software developers.
I think the word you’re looking for is “epic” or “legendary”
Re: We spent $20 to achieve RCE and accidentally became the admins of .mobi
#170Earlier quoted context omitted.
Pretty sure there's plenty of PHP at Amazon and Facebook (just with slightly different names)
I can *assure* you that php is expressly prohibited for use at Amazon.