Web アプリケーションには、内部 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.