45. 参考: PHP 7.4にてproc_openに機能追加
proc_open() function
proc_open() now accepts an array instead of a string for the command. In
this case the process will be opened directly (without going through a shell)
and PHP will take care of any necessary argument escaping.
私訳
proc_open() は、コマンドを文字列の代わりに配列として受け入れるように
なりました。この場合、プロセスは(シェルを経由せずに)直接開かれ、
PHPは必要な引数のエスケープを処理します。
45
<?php
proc_open(['php', '-r', 'echo "Hello Worldn";'],
$descriptors, $pipes);
?>
https://www.php.net/manual/en/migration74.new-features.php より引用
53. EC2にてSSRF多層防御が実装された
What’s new in IMDSv2
With IMDSv2, every request is now protected by session authentication. A session
begins and ends a series of requests that software running on an EC2 instance uses
to access the locally-stored EC2 instance metadata and credentials. The software
starts a session with a simple HTTP PUT request to IMDSv2. IMDSv2 returns a secret
token to the software running on the EC2 instance, which will use the token as a
password to make requests to IMDSv2 for metadata and credentials. Unlike
traditional passwords, you don’t need to worry about getting the token to the
software, because the software gets it for itself with the PUT request. The token is
never stored by IMDSv2 and can never be retrieved by subsequent calls, so a session
and its token are effectively destroyed when the process using the token terminates.
There’s no limit on the number of requests within a single session, and there’s no
limit on the number of IMDSv2 sessions. Sessions can last up to six hours and, for
added security, a session token can only be used directly from the EC2 instance
where that session began.
53
https://aws.amazon.com/jp/blogs/security/defense-in-depth-open-firewalls-reverse-
proxies-ssrf-vulnerabilities-ec2-instance-metadata-service/