ウェブアプリケーションには、内部URLからコンテンツを取得し、ログ内のCSRF攻撃を特定する機能があります。セキュリティアナリストは、正しい形式のリクエストを除外する正規表現を作成しています。 ターゲット URL は https://10.1.2.3/api で、受信側の API は GET リクエストのみを受け付け、「id」という名前の単一の整数引数を使用します。アナリストは目的を達成するために、次のうちどの正規表現を使用すべきでしょうか?
正解:B
The correct regular expression to match a GET request to this API endpoint is " https://10\.1\.2\.3/api\?id=\d+ " . This pattern checks for the specific URL with an id parameter that accepts integer values. The syntax \d+ matches one or more digits, which aligns with the requirement for a single integer argument. Other options either use incorrect syntax or do not accurately capture the expected URL format. Regular expressions are vital in filtering and identifying patterns in logs, as recommended by CompTIA Cybersecurity Analyst (CySA+) practices for threat hunting and log analysis.