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

Privilege Escalation Concepts

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

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

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

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

Privilege Escalation ဆိုတာ attacker က initial (low-privilege) access ရပြီးတဲ့နောက်, higher privilege (admin/root) ရအောင် ကြိုးစားတဲ့ process ပါ — Vertical Escalation (low-priv user → admin/root, ဥပမာ - misconfigured sudo permission ကို exploit) နဲ့ Horizontal Escalation (user တစ်ယောက်ရဲ့ privilege ကနေ တခြား user ဆီ, privilege level တူညီပေမယ့် access ကျယ်လာ) ဆိုပြီး ၂ မျိုး ရှိပါတယ်။ Misconfiguration (weak file permission, unnecessary sudo access, outdated software) တွေက privilege escalation ရဲ့ common cause ဖြစ်ပါတယ် — defender ဘက်က least privilege principle (user ကို လိုအပ်သလောက်ပဲ permission ပေး) ကို လိုက်နာမှသာ ဒီ risk ကို လျှော့ချနိုင်ပါတယ်.

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

Lab VM ပေါ်မှာ low-privilege user account ကို login ရရှိပြီးနောက် `sudo -l` ဆိုတဲ့ command run ကြည့်ရင် — 'ဒီ user က ဘယ် command ကို root permission နဲ့ run ခွင့်ရှိလဲ' ဆိုတာ ကြည့်နိုင်ပါတယ်, misconfigured entry (ဥပမာ - text editor တစ်ခုကို root permission နဲ့ run ခွင့်ပေးထားခြင်း) ကို တွေ့ရင် ဒီ text editor ကနေတစ်ဆင့် root shell ရအောင် escalate လုပ်လို့ ရနိုင်ပါတယ် — GTFOBins (public reference site) ကို ကိုးကားပြီး ဘယ် command ကနေ escalate လုပ်နိုင်လဲ လေ့လာနိုင်ပါတယ်.

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

bash
# Check what commands your current user can run as root
# (a common early step after gaining a low-privilege shell)
sudo -l

# Example misconfiguration:
# (ALL) NOPASSWD: /usr/bin/vim
# -> vim can be used to spawn a root shell, since it can
#    execute OS commands from within the editor
You should see
User user1 may run the following commands on this host:
    (ALL) NOPASSWD: /usr/bin/vim

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

Lab VM (ကိုယ်ပိုင် lab ထဲမှာသာ) ပေါ်မှာ `sudo -l` run ကြည့်ပြီး, GTFOBins website ကို ဖွင့်ကြည့်ပါ — misconfigured command (vim, find, less စတာ) တစ်ခုက privilege escalation အတွက် ဘယ်လို အသုံးချနိုင်လဲ ဖတ်ကြည့်ပါ။

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

GTFOBins/privilege escalation technique ကို authorized lab ထဲမှာသာ practice လုပ်ပါ — ကိုယ့် production system ပေါ်မှာတောင် (system admin ဖြစ်ခဲ့ရင်တောင်) permission change မလုပ်ခင် change management process ကို လိုက်နာသင့်ပါတယ်.

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

  • Sudo permission ကို 'developer productivity' အကြောင်းပြချက်နဲ့ လိုအပ်တာထက် ပိုကျယ်ကျယ်ပြန့်ပြန့် ပေးခြင်း — least privilege principle ကို ချိုးဖောက်ပါတယ်
  • Privilege escalation ကို 'complex exploit code ရေးရမယ်' လို့ ထင်ခြင်း — real-world case များစွာက misconfiguration (weak permission) ကို ရှာတွေ့ပြီး အသုံးချရုံပါပဲ

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

Lab VM (ကိုယ်ပိုင် lab ထဲမှာသာ) ပေါ်မှာ `sudo -l` run ကြည့်ပြီး, GTFOBins website ကို ဖွင့်ကြည့်ပါ — misconfigured command (vim, find, less စတာ) တစ်ခုက privilege escalation အတွက် ဘယ်လို အသုံးချနိုင်လဲ ဖတ်ကြည့်ပါ။

You'll know it worked when: User user1 may run the following commands on this host: (ALL) NOPASSWD: /usr/bin/vim

Privilege Escalation Concepts | Thuta Learning