1. 始めに
こんにちは、morioka12 です。
本稿では、バグバウンティで実際に報告されている危険度が Critical (致命的)な Web アプリケーションの脆弱性について事例をもとに紹介します。
- 1. 始めに
- 2. Critical な脆弱性報告の事例
- XSS (Cross-site Scripting)
- SQL Injection
- Command Injection
- SSRF (Server Side Request Forgery)
- Path Traversal
- Code Injection
- XXE (XML External Entitie)
- Insecure Deserialization
- Improper Access Control
- IDOR (Insecure Direct Object Reference)
- Improper Authentication
- Privilege Escalation
- Information Disclosure
- Information Exposure
- Authentication Bypass
- HTTP Request Smuggling
- Race Condition
- Business Logic Errors
- Misconfiguration
- 3. まとめ
- 4. その他
- 5. 終わりに
免責事項
本稿の内容は、セキュリティに関する知見を広く共有する目的で執筆されており、悪用行為を推奨するものではありません。
想定読者
Critical な脆弱性
バグバウンティにおいて報告した脆弱性は、脆弱性の深刻度を示す重大度(Severity)が付けられて、基本的に CVSS (Common Vulnerability Scoring System, 共通脆弱性評価システム)によって判断します。
今回紹介する Critical な脆弱性は、CVSS のスコアが「9.0 ~ 10.0」な脆弱性を指します。
Severity | Score |
---|---|
Critical | 9.0 ~ 10.0 |
High | 7.0 ~ 8.9 |
Medium | 4.0 ~ 6.9 |
Low | 0.1 ~ 3.9 |
None | 0.0 |
CVSS
CVSS は、主に以下のような観点で判断されます。
基本評価基準 (Base Metrics)
- 攻撃の難易度を評価する項目
- 攻撃元区分 (AV:Attack Vector)
- 攻撃条件の複雑さ (AC:Attack Complexity)
- 必要な特権レベル (PR:Privileges Required)
- ユーザ関与レベル (UI:User Interaction)
- 攻撃の影響度を評価する項目
- 機密性への影響/情報漏えいの可能性 (C:Confidentiality Impact)
- 完全性への影響/情報改ざんの可能性 (I:Integrity Impact)
- 可用性への影響/業務停止の可能性 (A:Availability Impact)
- 影響範囲の拡大の有無を評価する項目
- スコープ (S:Scope)
また、CVSS のスコアが「9.0 ~ 10.0」になる脆弱性は、特に以下の観点が可能かで判定されたりします。
- 特定の条件を必要とせずに、常に対象の Web アプリケーションに脆弱性攻撃が可能であるか
- 評価が下がる例)
- 特定のユーザーにのみ, 特定の設定の場合のみ
- 特定の操作を他人にしてもらう必要がある場合
- 事前に特定の情報収集がいくつか必要な場合
- 評価が下がる例)
- 対象の Web アプリケーションで機密情報を取得することが可能であるか
- 機密情報の例)
- 他人のアカウントの個人情報
- Web アプリケーションで使われている有効な API Keyやクレデンシャル
- Web アプリケーションやシステムに関する情報
- 機密情報の例)
- 対象の Web アプリケーションで重要な情報を改ざんすることが可能であるか
- 重要な情報の例)
- 他人のアカウント情報
- Web アプリケーションやシステムに関する情報
- 重要な情報の例)
2. Critical な脆弱性報告の事例
今回は、HackerOne の Hacktivity で報告されている Critical なレポートや、X (Twitter)で見かけられる事例をいくつか選んで紹介します。
基本的には、報酬金(Bounty)の獲得まで至っている報告事例を選んでいます。
XSS (Cross-site Scripting)
XSS は、主にアカウントの乗っ取り(Account Takeover)や他のユーザーの重要な情報の改ざんなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Blind XSS on image upload
- Bounty: $1,000
- Multiple XSS on account settings that can hijack any users in the company.
- Bounty: $700
- XSS in steam react chat client
- Bounty: $7,500
- Web Cache Poisoning leading to 0 click ATO via Stored XSS
Always check X-Cache header in response headers if it was HIT you can chain your RXSS to SXSS#bugbountytips #bugbounty #infosec pic.twitter.com/VkJ9OggCec
— Youssef (s3c) (@s3c_krd) June 23, 2023
- Blind XSS Leads To Employee User Details Leaked And Potential Account Takeover
Jai Shri Ram 🙏🏻🚩
— Rhythm (Ryh04x) (@ryh04x) July 12, 2023
Second P1 VDP ⚡️#BugBounty pic.twitter.com/rfOJAZ4uIF
SQL Injection
SQL Injection は、主にデータベースから機密情報の取得・改ざんなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- SQL injection on contactws.contact-sys.com in TScenObject action ScenObjects leads to remote code execution
- SQLi lead to dump full database on ~
- Bounty: $2,500
One program & only P1 severity & $12,500 rewards on @Bugcrowd 🤠☘️#infosec #BugBounty pic.twitter.com/Y2HiJpTsSH
— M7arm4n (@M7arm4n) July 8, 2023
- SQL Injection On ~ Parameter [offset]
For first time i found a SQL Injection On **sitemap.xml** endpoint 😎😎#bugbountytips #bugbountytip
— Godfather Orwa 🇯🇴 (@GodfatherOrwa) April 16, 2023
target[.]com/sitemap.xml?offset=1;SELECT IF((8303>8302),SLEEP(9),2356)#
sleep payload
[1;SELECT IF((8303>8302),SLEEP(9),2356)#] = 9s
Happy Hunting #BugBounty pic.twitter.com/o19YxTCdLv
- Easy Password for admin account: ~ Time Based SQL Injection
First step: email enumeration from forgotpassword page.
— Gotcha1G (@Gotcha1G) August 19, 2023
1: Bruteforced the password using my wordlist. Login success but couldn’t find a admin-panel or admin endpoints 🥲 but since the registration is not public and limited 😇I tested all available features then i got SQL 🥰 pic.twitter.com/eFYnVzBmy0
- Error Based SQL-Injection with manual WAF bypass
Me & @c0nqr0r
— 🇪🇬Mahmoud samaha🇵🇸 🔻 🪂 (@0x__4m) October 6, 2022
Just scored Critical Error Based SQL-Injection with manual WAF bypass at main domain of old Bug Bounty Program at HackerOne
Writeup link : https://t.co/QZ3xYg7IJQ#bugbounty #bugbountytips #security #hackerone #sqlinjection #bugbountytip
Command Injection
Command Injection は、主に任意コードの実行(RCE)などがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Remote code execution on Basecamp.com
- Bounty: $5,000
- Local files could be overwritten in GitLab, leading to remote command execution
- Bounty: $12,000
- SSTI leading to RCE
Yay, I was awarded my first bounty ($$$$) on @Hacker0x01
— Moulchi (@oualilweb) July 25, 2023
SSTI leading to RCE#TogetherWeHitHarder pic.twitter.com/DdfYKDJtdG
SSRF (Server Side Request Forgery)
SSRF は、主に内部サーバーから機密情報の取得やクラウドのインスタンスメタデータの取得などがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Server Side Request Forgery (SSRF) via Analytics Reports
- SSRF via Office file thumbnails
- Bounty: $4,000
- Full read SSRF via Lark Docs
import as docs
feature- Bounty: $5,000
- Stored XSS & SSRF in Lark Docs
- Bounty: $3,000
Crafting your own wordlists and not just using what everyone else is using (raft, ...) yields solid results ;) pic.twitter.com/YOKaK7TAMV
— Damian Strobel (@damian_89_) November 21, 2023
Path Traversal
Path Traversal は、主に機密情報を含むファイルの取得がインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Arbitrary file read via the bulk imports UploadsPipeline
- Bounty: $29,000
- Arbitrary file read during project import
- Bounty: $16,000
Code Injection
Code Injection は、主に任意コードの実行(RCE)などがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- RCE when removing metadata with ExifTool
- Bounty: $20,000
- RCE due to ImageTragick v2
- Bounty: $2,000
- RCE via npm misconfig -- installing internal libraries from the public registry
- Bounty: $30,000
- Git flag injection - local file overwrite to remote code execution
- Bounty: $12,000
- Git flag injection leading to file overwrite and potential remote code execution
- Bounty: $3,500
- Remote Code Execution (RCE) Vulnerability with File Upload
- Bounty: $1,500
Yay, I was awarded a $1,500 bounty on @Hacker0x01!
— Amirabbas (@ImAyrix) August 9, 2023
To discover RCE (Remote Code Execution), you don't always require a powerful Wide Recon. Sometimes, a robust web application Recon can help you! 😄
#TogetherWeHitHarder #BugBounty #RCE pic.twitter.com/mVbcTrTy3E
XXE (XML External Entitie)
XXE は、主に SSRF や任意コードの実行(RCE)などがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- LFI and SSRF via XXE in emblem editor
- Bounty: $1,500
Insecure Deserialization
- Remote code execution on rubygems.org
- Bounty: $1,500
Improper Access Control
Improper Access Control は、主に機密情報の取得・改ざんやアカウントの乗っ取りなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- One-click account hijack for anyone using Apple sign-in with Reddit, due to response-type switch + leaking href to XSS on www.redditmedia.com
- Bounty: $10,000
- Getting all the CD keys of any game
- Bounty: $20,000
IDOR (Insecure Direct Object Reference)
IDOR は、主に機密情報の取得・改ざんやアカウントの乗っ取りなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Steal private objects of other projects via project import
- Bounty: $20,000
- Private objects exposed through project import
- Bounty: $20,000
- Email change or personal data change on the account.
- Bounty: $3,000
- IDOR leads to read all users PII Informations and card details in
- Bounty: $1,500
I earned $2,500 for my submissions on @Bugcrowd
— Rahmat Qurishi (@RahmatQurishi) November 23, 2023
Reading and monitoring js files is the key.#bugbounty #ItTakesACrowd pic.twitter.com/oVqB2e3Eon
- IDOR due to flawed signature verification of JWT can lead to various vulnerabilites
- Bounty: $6,000
Yay, I was awarded a $6,000 bounty on HackerOne #TogetherWeHitHarder
— Nishant Bhagat (@Nishantbhagat57) August 27, 2023
The bug I discovered was an IDOR (Insecure Direct Object Reference) vulnerability due to flawed signature verification of JWT (JSON Web Token).
Reference: https://t.co/McTDGYeSr0 pic.twitter.com/v9RHlVYuQT
- ~IDOR Allows Read/Write Access ~
- Bounty: $10,000
Yay, I was awarded a $10,000 bounty on @Hacker0x01! For a Critical Severity IDOR.
— Moblig (@Moblig_) March 15, 2023
Tip:
1) In-depth knowledge of the program, lots of manual testing
2) Learning to master the 'Autorize' extension for Burp
Automated & manual testing🤝#bugbountytip #hackerone pic.twitter.com/fdWul2cSko
Improper Authentication
Improper Authentication は、主に機密情報の取得・改ざんやアカウントの乗っ取りなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Incorrect authorization to the intelbot service leading to ticket information
- Bounty: $15,000
- Critical full compromise of jarvis-new.urbanclap.com via weak session signing
- Bounty: $1,500
- H1514 [*.(my)shopify.com] - Viewing Password Protected Content
- Bounty: $3,000
- User able to access company details in yrityspalvelu without proper permissions
- Bounty: $2,000
- Shopify admin authentication bypass using partners.shopify.com
- Bounty: $20,000
- ~ Administrator portal access allows for ~ security setting manipulation and a large PII leak consisting of ~
Longest report title to date!😎
— ℤ𝔼ℝ𝟘 (@_Zer0Sec_) July 1, 2023
1. Verbose admin portal login errors led to seeing which account was valid based on error response
2. Identified “AdminTest”
3. Authenticated with password “Test123”
3. Access to tons of PII
4. P1 > Payment within 24hrs#bugbountytips #bugbounty pic.twitter.com/MDsINzyyZl
- ~ web console Default login credentials
Another P1 at a VDP vulnerabilities web console Default login credentials 🎯⚔️
— Abdalhy khaled🦅 (@cysky0x1) May 24, 2023
tips :
1.Always enjoy manual checking after which you will find some great catch🥳
2. credentials:
test : test #BugBounty #bugbountytips #infosec #bughunting #defaultlogin pic.twitter.com/q4vqoM1hSd
Privilege Escalation
- Remote Code Execution in coming Kibana 7.7.0
- Bounty: $5,000
- Remote Code Execution on Cloud via latest Kibana 7.6.2
- Bounty: $10,000
- Project Template functionality can be used to copy private project data, such as repository, confidential issues, snippets, and merge requests
- Bounty: $12,000
- Worker container escape lead to arbitrary file reading in host machine [again]
- Bounty: $2,000
- Worker container escape lead to arbitrary file reading in host machine
- Bounty: $2,000
Information Disclosure
Information Disclosure は、主に機密情報の取得・改ざんなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- JSON serialization of any Project model results in all Runner tokens being exposed through Quick Actions
- Bounty: $12,000
- API Key leakage leads to Pll ~
- Bounty: $3,000
I earned $3,000 for my submission on @bugcrowd #ItTakesACrowd pic.twitter.com/AuVKT82gkg
— AminDD (@_AminDD) June 9, 2023
- IDOR
- Bounty: $1,500
Yay, I was awarded a $1,500 bounty on @Hacker0x01! https://t.co/uWCJApkszK #TogetherWeHitHarder #bugbountytips #BugBounty #cybersecurity
— Divyansh Sharma (@divyansh2401) August 9, 2023
Vulnerability: IDOR
Use JSpector by @adrien_jeanneau to find new endpoints from Javascript files.
Extension Link: https://t.co/uZBic0uleC pic.twitter.com/qkMtvSNip0
Information Exposure
Information Exposure は、主に機密情報の取得がインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Full Data Sensitive Data Exposure Leak!
- Bounty: €2,500
If you encounter a web app configured on "ARGO"
— 𐰚𐰼𐰇𐱅 (@ynsmroztas) December 10, 2023
don't forget to add 'https://t.co/k3530e5ZI3' to your wordlist as well.
Sample Trick : subfinder -d domain.example | httpx --status-code -path /WEB-INF/classes/argo.properties 👍🐺#BugBounty #bugbountytips #Java pic.twitter.com/lroxfGoDJ6
Authentication Bypass
Improper Authentication は、主に認証機能の回避やアカウントの乗っ取りなどがインパクトとして実際に可能であれば、Critical な報告になる可能性があります。
- Mass Account Takeover at
https://app.taxjar.com/
- No user Interaction- Bounty: $11,500
HTTP Request Smuggling
- HTTP Request Smuggling via HTTP/2
- Bounty: $7,500
- HTTP request smuggling on Basecamp 2 allows web cache poisoning
- Bounty: $1,700
- Unauthenticated request smuggling on launchpad.37signals.com
- Bounty: $1,737
Race Condition
- Ability to bypass partner email confirmation to take over any store given an employee email
- Bounty: $15,250
Business Logic Errors
- Modify in-flight data to payment provider Smart2Pay
- Bounty: $7,500
- Double Payout via PayPal
- Bounty: $10,000
Misconfiguration
- ~
- Bounty: $10,000
Yay, I was awarded a $10,000 bounty on @Hacker0x01! https://t.co/024WpSThHr #TogetherWeHitHarder #WorldCup2023 #AWC2023 pic.twitter.com/G9FznC69EA
— Dhakal Bibek (@dhakal__bibek) August 30, 2023
3. まとめ
以上に報告事例から、脆弱性攻撃により主に以下のようなことが実際に可能な場合に Critical な脆弱性と認定される可能性があります。
- アカウントの乗っ取り
- XSS, Improper Authentication, Privilege Escalation, Authentication Bypass
- 個人情報の取得・改ざん
- 機密情報の取得(露出)・改ざん
- Path Traversal, Improper Access Control, Improper Authentication
- 任意コードの実行
- SQL Injection, Command Injection, SSRF, Code Injection, XXE, Insecure Deserialization, Privilege Escalation
また、初心者が初めて Critical な脆弱性を発見したい場合は、例として主に以下のような点を確認すると良いと思います。
- XSS
- SQL Injection
- SQLi でデータベースにアクセスして、実際に機密情報が取得できるか
- SSRF
- Path Traversal
- PathTrav で実際にシステムファイルやハードコードされた設定ファイルなどの機密情報となるファイルが取得できるか
- Improper Access Control, IDOR, Improper Authentication
- アクセス制御の不備系で、実際に個人情報などの機密情報が取得できるか・改ざんできるか・アカウントの乗っ取りまでできるか
- Information Disclosure, Information Exposure
- 情報の開示で、実際に有効な API Key や設定ファイル、個人情報などの機密情報が取得できるか
ちなみに、こういった Critical な脆弱性の検証をする際は、対象は本番環境がほとんどのため、慎重に検証する必要があります。
参考までに、以下の注意点を確認してみてください。
https://scgajge12.hatenablog.com/entry/bugbounty_beginner#%E6%B3%A8%E6%84%8F%E7%82%B9
4. その他
HackerOne Hacktivity
HackerOne では、報告された脆弱性のレポートが公開されたら、以下の Hacktivity で公開されます。
Today we’re publicly launching the new @Hacker0x01 Hacktivity! It comes with many new filtering capabilities, a more intuitive UI, powerful search, and better performance. Check it out at https://t.co/SVXgC50hTz and let us know what you think! pic.twitter.com/hT9XiaxrW1
— Jobert Abma (@jobertabma) October 30, 2023
バグバウンティ入門(始め方)
バグバウンティの始め方については、以下のブログで紹介しているため、こちらもぜひご覧ください。
5. 終わりに
本稿では、バグバウンティで実際に報告されている危険度が Critical (致命的)な Web アプリケーションの脆弱性について事例をもとに紹介しました。
バグバウンティにおいて、先人のバグハンターがどういった点を脆弱性として報告されているかの事例を知ることは、観点としてとても大切です。
ぜひ、過去の報告書を拝見して、指摘事項や観点、考え方などを参考にしてみてください。
ここまでお読みいただきありがとうございました。