Thuta Learning
ရှာဖွေရန်
IntermediateSecurityintermediate

Common Web Vulnerabilities (OWASP Top 10 Overview)

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Common Web Vulnerabilities (OWASP Top 10 Overview) ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် authorized lab environment ထဲမှာ tool ကို run ကြည့်တတ်မယ်
  • Real assessment/report ထဲမှာ ဒီ concept ကို ချက်ချင်း အသုံးချတတ်မယ်

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

OWASP (Open Worldwide Application Security Project) က non-profit organization ပါ, Top 10 list ကို data-driven research ကနေ ၃-၄ နှစ်တစ်ခါ update လုပ်ပါတယ်။ SQL Injection က user input ကို database query ထဲ direct ထည့်ရေးလို့ attacker ကို query logic ပြောင်းခွင့်ပေးမိတဲ့ vulnerability ပါ (parameterized query ဖြင့် ကာကွယ်ရပါတယ်)။ XSS (Cross-Site Scripting) က user input ကို sanitize မလုပ်ဘဲ HTML output ထဲ ထည့်ရေးလို့, attacker ရဲ့ script code ကို victim browser ထဲ run ခွင့်ပေးမိတဲ့ vulnerability ပါ။ Broken Access Control ကတော့ authorization check ချို့ယွင်းလို့ user တစ်ယောက်က ကိုယ့်ဒေတာ မဟုတ်တဲ့ (user ID ပြောင်းရုံနဲ့ ရ) data ကို ကြည့်နိုင်တဲ့ vulnerability ပါ.

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

DVWA (lab web app) မှာ SQL Injection page ကို `' OR '1'='1` ဆိုတဲ့ input ထည့်ကြည့်ရင် — query logic ကို ပြောင်းလဲပစ်ပြီး, login authentication ကို bypass ဖြစ်စေနိုင်တာကို directly observe နိုင်ပါတယ် — defender ဘက်က parameterized query (prepared statement) ကို သုံးရင် ဒီ vulnerability ကို လုံးဝ ကာကွယ်နိုင်ပါတယ် (user input ကို query logic အဖြစ် interpret လုပ်စေမှာ မဟုတ်ဘဲ, data value တစ်ခုတည်း အဖြစ်ပဲ ဆက်ဆံလို့).

အတူတူ ကြည့်မယ်

sql
-- Vulnerable query (string concatenation)
SELECT * FROM users WHERE username = '" + userInput + "'

-- If userInput = "' OR '1'='1", the query becomes:
-- SELECT * FROM users WHERE username = '' OR '1'='1'
-- '1'='1' is always true — this bypasses the login check!

-- The fix: parameterized query (input treated as DATA, not code)
SELECT * FROM users WHERE username = ?  -- driver binds userInput safely
You should see
SQL Injection/XSS/Broken Access Control ရဲ့ root cause နှင့် defense ကို ရှင်းပြနိုင်မည်။

၅ မိနစ် စမ်းကြည့်

DVWA (lab web app) ရဲ့ SQL Injection page ကို security level 'low' နဲ့ `' OR '1'='1` input စမ်းကြည့်ပါ (ကိုယ့် lab ထဲမှာသာ) — ဘယ် code change (parameterized query) က ဒီ vulnerability ကို ကာကွယ်ပေးနိုင်လဲ ရေးကြည့်ပါ။

သတိလေးတစ်ချက်

ဒီ lesson ရဲ့ SQL Injection payload ကို DVWA (lab, intentionally vulnerable) ပေါ်မှာသာ practice လုပ်ပါ — real website (ကိုယ့်ပိုင် မဟုတ်တဲ့) ပေါ်မှာ ဒီလို payload ကို input field ထဲ ထည့်စမ်းကြည့်ခြင်းသည် authorization မရှိတဲ့ system testing ဖြစ်သွားနိုင်ပြီး ဥပဒေချိုးဖောက်မှုဖြစ်ပါတယ်.

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • OWASP Top 10 ကို 'exploit list' တစ်ခုတည်းအဖြစ် ကြည့်ခြင်း — အမှန်က developer/defender တွေအတွက် 'ဘယ် vulnerability category ကို အရင်ဦးစားပေး ကာကွယ်ရမလဲ' ဆိုတဲ့ priority guide ပါ
  • Input validation (client-side JavaScript) ကိုပဲ security control အဖြစ် အားကိုးခြင်း — client-side validation ကို attacker က bypass လုပ်နိုင်ပါတယ်, server-side validation/parameterized query ကသာ real protection ပါ

အခု ကိုယ်တိုင် စမ်းကြည့်

DVWA (lab web app) ရဲ့ SQL Injection page ကို security level 'low' နဲ့ `' OR '1'='1` input စမ်းကြည့်ပါ (ကိုယ့် lab ထဲမှာသာ) — ဘယ် code change (parameterized query) က ဒီ vulnerability ကို ကာကွယ်ပေးနိုင်လဲ ရေးကြည့်ပါ။

You'll know it worked when: SQL Injection/XSS/Broken Access Control ရဲ့ root cause နှင့် defense ကို ရှင်းပြနိုင်မည်။

Common Web Vulnerabilities (OWASP Top 10 Overview) | Thuta Learning