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

Password Security & Hashing

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

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

  • Password Security & Hashing ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် authorized lab environment ထဲမှာ tool ကို run ကြည့်တတ်မယ်
  • Real assessment/report ထဲမှာ ဒီ concept ကို ချက်ချင်း အသုံးချတတ်မယ်

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

Hashing ဆိုတာ password ကို fixed-length, one-way (reverse လုပ်၍မရ) string အဖြစ် ပြောင်းလဲတဲ့ mathematical function ပါ — database leak ဖြစ်ရင်တောင် attacker က hash ကနေ original password ကို တိုက်ရိုက် ပြန်ရှာလို့ မရပါ (bcrypt, Argon2 ကဲ့သို့ modern algorithm ကို သုံးထားရင်)။ Salt ကတော့ password တစ်ခုချင်းစီအတွက် random value ထပ်ထည့်တာပါ — user နှစ်ယောက် password တူတောင် hash result ကွဲပြားစေပါတယ် (rainbow table attack ကို ကာကွယ်ဖို့)။ Brute-force Attack (combination အားလုံးကို စမ်း) နဲ့ Dictionary Attack (common password list ကို စမ်း) က password cracking method နှစ်မျိုးပါ — password strength/complexity က ဒါတွေကို ခက်ခဲစေပါတယ်.

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

Weak database design (MD5 hash, salt မပါ) ကို database leak scenario နဲ့ တွေးကြည့်ရင် — attacker က pre-computed rainbow table (MD5 hash → common password mapping) ကနေ password တွေကို minute အနည်းငယ်အတွင်း crack နိုင်ပါတယ်, bcrypt + salt သုံးထားရင်တော့ crack ဖို့ computationally expensive ဖြစ်သွားပါတယ် (algorithm ကိုယ်တိုင် intentionally slow ဒီဇိုင်းလုပ်ထားလို့) — developer အနေနဲ့ 'ဘယ် hashing algorithm ရွေးချယ်လဲ' ဆိုတာက user password security ကို တိုက်ရိုက် သက်ရောက်ပါတယ်.

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

text
Weak (MD5, no salt):
  password "123456" -> always the same hash
  -> attacker can precompute a lookup table (rainbow table)
  -> cracked instantly

Strong (bcrypt, with salt):
  password "123456" + random salt -> unique hash per user
  -> algorithm is intentionally slow (built-in "work factor")
  -> cracking is computationally expensive even at scale
You should see
Hashing/Salting/Brute-force ရဲ့ ဆက်စပ်ပုံကို ရှင်းပြနိုင်မည်။

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

'password123' ဆိုတဲ့ weak password ကို MD5 (no salt) နဲ့ hash လုပ်ကြည့်ပါ (`echo -n "password123" | md5sum` command) — ပြီးရင် online 'MD5 hash lookup' tool တစ်ခုနဲ့ ဒီ hash ကို reverse-search ကြည့်ပါ (educational purpose, ကိုယ့် test password အတွက်ပဲ)။

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

Real-world credential (ကိုယ့်ပိုင် account, colleague account) ကို target လုပ်ပြီး crack/brute-force practice မလုပ်ပါနှင့် — ကိုယ်ပိုင် test data (ကိုယ့်ဘာသာ create ထားတဲ့ password) ကိုသာ practice ဖို့ သုံးပါ.

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

  • MD5/SHA1 ကို password hashing algorithm အနေနဲ့ ဆက်လက် သုံးနေခြင်း — ဒါတွေက fast-computation အတွက် ဒီဇိုင်းလုပ်ထားလို့ password hashing အတွက် မသင့်တော်ပါ (bcrypt/Argon2 ကို သုံးသင့်ပါတယ်)
  • Salt ကို hardcode (application-wide တစ်ခုတည်း) သုံးခြင်း — user တစ်ယောက်ချင်းစီအတွက် random/unique salt ဖြစ်သင့်ပါတယ်

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

'password123' ဆိုတဲ့ weak password ကို MD5 (no salt) နဲ့ hash လုပ်ကြည့်ပါ (`echo -n "password123" | md5sum` command) — ပြီးရင် online 'MD5 hash lookup' tool တစ်ခုနဲ့ ဒီ hash ကို reverse-search ကြည့်ပါ (educational purpose, ကိုယ့် test password အတွက်ပဲ)။

You'll know it worked when: Hashing/Salting/Brute-force ရဲ့ ဆက်စပ်ပုံကို ရှင်းပြနိုင်မည်။

Password Security & Hashing | Thuta Learning