Exploitation Note


What is Exploit

vulnerability ဖြစ်နေတဲ့ system တစ်ခုကို ထိုးဖောက်ဝင်ရောက်ဖို့အတွက် code or နည်းလမ်းတစ်ခုခုကိုသုံးစွဲပြီး ဝင်ရောက်တာကိုခေါ်ပါတယ်။ အဲ့ဒီ exploit ကလည်း penetration testing လုပ်မယ်ဆိုရင် target system ကို gaining access ရရှိဖို့လိုအပ်တယ်။အဲ့လိုမျိုး exploit လုပ်တာ အောင်မြင်သွားပြီးဆိုရင် နောက်တစ်ဆင့်ဖြစ်တဲ့ post-exploit ကို လုပ်ဆောင်ရပါတယ်။post-exploit ကလည်းအရေးပါတဲ့နေရာကပါဝင်တယ်။

Why Exploitation?

vulnerability ဖြစ်နေတဲ့ system ကိုသက်သေပြဖို့အတွက် exploit လုပ်ရတယ်။ target network တွေရဲ့အတွင်းထဲကိုဝင်ဖို့အတွက်လည်း exploit လုပ်ဆောင်ကြရပါတယ်။ post-exploitation လုပ်ချင်လို့ exploit လုပ်ပေးရတယ်။

Risks of Exploitation

  • Service crash

  • system crash

  • system stability impacted

  • system integrity violated

  • Data exposure with legal ramifications

Categories of Exploits

  • Service-side exploit

  • Client-side exploit

  • Local privilege escalation exploit

Service-side exploit

  • User ရဲ့ interaction မပါပဲ network ပေါ်ကနေ တိုက်ရိုက်လုပ်ဆောင်တာ

Client-side exploit

Client application ကနေ server application ကိုသက်ရောက်စေတာ။ဒီ client side exploits မှာကျတော့ user ရဲ့ interaction ပါတယ်။ user ရဲ့ လုပ်ဆောင်မှုတွေကမှတစ်ဆင့် attack ဖြစ်ပေါ်လာတာ။

Local privilege escalation exploit

target system ကို access ရသွားပီဆိုရင် သတ်မှတ်ထားတဲ့ user level ကနေပဲလုပ်ဆောင်လို့ရတယ်။ အဲ့မှာကျတော့ user level ထပ်မြှင့်ချင်ရင် privilege escalation ဆိုတယ့်နည်းလမ်းကိုအသုံးပြုပေးရတယ်။ အဲ့လိုအသုံးပြုမှသာ root , admin, system privilege level တွေကို ရရှိမှာပဲဖြစ်ပါတယ်။အဲ့လိုမျိုးလုပ်ဆောင်ဖို့အတွက်ကို local privilege escalation attack ကိုလုပ်ဆောင်ရတယ်။

The Exploit Database

Exploit Database ဆိုတာကတော့ website တစ်ခုဖြစ်တယ်။သူက ဘယ်လိုwebsite မျိုးလဲဆိုရင်တော့ exploit တွေကို database အနေနဲ့သိမ်းထားတဲ့ website ဖြစ်ပါတယ်။ အဲ့ website မှာဘာတွေရနိုင်လဲဆိုရင် exploit, shell code, တခြားသော အရေးကြီးတဲ့ google hacking database တို့ penetration tester တွေအသုံးဝင်တယ့် useful search တွေရနိုင်တယ်။ exploit db ကို kali linux ကနေပြီးတော့ တိုက်ရိုက်အသုံးပြုလို့ရတယ်။အသုံးပြုမယ့် command က searchsploit ဆိုပြီးအသုံးပြုပြီးတော့ ရှာချင်တဲ့ exploit ကိုရှာလို့ရတယ်။ kali linux မှာ default အနေနဲ့ exploit db ကပါဝင်မှာပဲဖြစ်ပါတယ်။နောက်တစ်ခုကတော့ rapid7 ကနေပဲထုတ်လုပ်ထားတဲ့ expliot database လဲရှိပါတယ်။သူမှာလဲတကယ်အသုံးဝင်တဲ့ exploit တွေအများကြီးရှိပါတယ်။သူကကျတော့ ဒီ exploit တွေကို metasploit framework နဲ့ တွဲပြီးအသုံးပြုလို့ရမှာဖြစ်ပါတယ်။ metasploit ကလည်း penetration testing လုပ်နေတဲ့ ကာလတစ်လျှောက်လုံးမှာ အသုံးပြုရမှာဖြစ်ပါတယ်။ နောက်ထပ် national vulnerability database မှာလည်းကြည့်လို့ရတယ်။ nvd.nist.gov နောက်တစ်ခု vuldb ဆိုတာလည်းရှိသေးတယ်။ သူကတော့ ဝယ်သုံးရတာဖြစ်တယ်။

Exploitation Toolkits

  • Metasploit Penetration tester တွေရဲ့ အဓိက အရေးပါတယ့် tools ဖြစ်တယ်။ metasploit ကိုအသုံးပြုရင်ဒီအဆင့်တွေလုပ်ဆောင်ရတယ်။

    • start the console

    • select an exploit

    • select a payload

    • run the exploit

Lesson 4.4 Post-Exploitation

Post-Exploitation ကကျတော့ target system ကို exploit လုပ်ပြီးအောင်မြင်သွားတယ့်အခါမှာ နောက်ထပ်တစ်ဆင့်ထပ်ပြီး လုပ်ဆောင်ရမယ့်အရာမျိုးကို post-exploitation လို့ခေါ်ပါတယ်။post-exploitation မှာဆိုရင် information gathering, privilege escalation, account တွေ service တွေနဲ့ပတ်သက်ပြီးတော့ ထပ်ပြီးတော့လုပ်ဆောင်ရတာမျိုးတွေရှိတယ်။

Common Post-Exploit Attacks

target system ရဲ့ access ကိုသတ်မှတ်ထားတဲ့ level ထပ်ပိုပြီးတဲ့လိုချင်တဲ့အခါမျိုးတွေမှာလုပ်ရသလို တခြား information တွေ ရယူဖို့အတွက်လည်းလုပ်ရပါတယ်။ ဒီလို basics နည်းလမ်းတွေကိုသိထားခြင်းဖြင့် exploit လုပ်တယ့်အခါမှာလည်းများစွာအထောက်အကူပြုမှာ ဖြစ်ပါတယ်။ password attacks တွေကတော့ ပုံစံမျိုးစုံနဲ့လုပ်ဆောင်ကြပါတယ်။ ဥပမာ - authentication system or login page attacks အဲ့လိုမျိုးဟာတွေကိုလုပ်ဆောင်လို့ရသလို credential တွေကိုရရှိအောင် capture လုပ်ပြီးတော့လဲလုပ်ဆောင်လို့ရပါတယ်။ password attack မှာဆိုရင် pwdump ဆိုတာရှိတယ်။ pwdump ဆိုတာကတော့ windows ရဲ့ password တွေကို attack လုပ်တာ ဖြစ်ပြီးတော့ သူ့ကဘယ်ကနေရယူလဲဆိုရင် Windows ရဲ့ security account manager ဖြစ်တဲ့ SAM ကနေရယူတာပဲဖြစ်ပါတယ်။ နောက်တစ်ခုကတော့ Linux or Unix system မှာဆိုရင် /etc/passwd နဲ့ /etc/shadow ထဲကနေမှတစ်ဆင့် user account နဲ့သက်ဆိုင်တဲ့ information တွေကို ရယူလို့ရပါတယ်။နောက်တစ်ခုကတော့ cachedump ဖြစ်ပြီးသူကတော့ domain နဲ့ သက်ဆိုင်တဲ့ password တွေကို cache or windows registry ကနေရရှိအောင်လို့လုပ်ဆောင်တာပဲဖြစ်ပါတယ်။SQL queries ထဲမှာဆိုရင် username နဲ့ password တွေကို store လုပ်ထားတဲ့ table တွေကနေမှ infromationတွေကိုရယူနိုင်ပါတယ်။ နောက်တစ်ခုကတော့ password ကို sniff လုပ်တဲ့နည်းလမ်းဖြစ်ပြီးတော့ သူကတော့ sniff လုပ်မယ်ဆိုရင် wire ကနေမှတစ်ဆင့် sniff လုပ်တာကပိုပြီးတော့အဆင်ပြေပါတယ်။အဲ့လိုမျိုး sniff လုပ်ခြင်းတဲ့ ကိုလိုချင်တဲ့ information တွေကို ရရှိနိုင်ပါတယ်။တစ်ခါတစ်ကျရင် credentail တွေကို plain text အနေနဲ့တောင်မှ ရရှိနိုင်ပါသေးတယ်။ Credential Brute-forcing မှာဆိုရင် automate tools တွေကို အသုံးပြုရတာက ပိုပြီးတော့အဆင်ပြေမှာပဲဖြစ်ပါတယ်။အဲ့မှာဆိုရင် username နဲ့ password ပါတစ်ခါတည်းထည့်ပေးထားတယ်။မှန်ကန်ရင်တော့ တစ်ခါတည်း successful ဖြစ်သွားမယ်။ အဲ့မှာအသုံးများတဲ့ tools တွေက THC-Hydra, John the Ripper, Brutus အစရှိတယ့် tools တွေကိုအသုံးပြုလို့ရမည်ဖြစ်ပြီး metasploit မှာပါဝင်တယ့် brute-force tools တွေကိုလည်း အသုံးပြုပြီးတော့ attack လုပ်ဆောင်နိုင်မှာဖြစ်ပါတယ်။

Mimikatz

Mimikatz ဆိုတာကတော့ Windows မှာအသုံးပြုတယ့် post-exploitation tools ပဲဖြစ်ပါတယ်။သူကလဲ powershell tools တွေကဲ့သို့ Empire, Powersploit တို့လိုပဲ stand-alone tools တွေဖြစ်ပြီးအဲ့မှာဆို scripts တွေအများကြီးပါဝင်တယ်။ mimikatz ကို NTLM hashes တွေကို clear text အနေနဲ့ရရှိအောင်လုပ်ဆောင်လို့ရပါတယ်။အဲ့လိုလုပ်ဆောင်ပြီးတဲ့အခါကျမှ Windows ရဲ့ kerberos sessions ကနေမှတစ်ဆင့် Golden ticket attacks ကိုလုပ်ဆောင်လို့ရပါတယ်။အဲ့ဒီအပြင်ကိုတခြား windows အတွက် post-exploitation လုပ်ဆောင်တဲ့အခါမျိုးတွေမှာလည်း mimikatz ကိုအသုံးပြုလို့ရပါတယ်။

Privilege Escalation

Privilege Escalation ဆိုတာကကျတော့ user level အဆင့်မြှင့်တင်တာပဲဖြစ်ပါတယ်။ အဲ့လိုမျိုး လုပ်ဆောင်တဲ့နေ့ရာမှာ 2 မျိုးရှိပါတယ်။

  • vertical privilege escalation

  • horizontal privilege escaltion

Vertical privilege escalation

user ကနေပြီးတော့ higher privilege ကိုတန်းပြီးကူးပြောင်းသွားတာ။ဥပမာ user1 ဆိုတဲ့ user ကနေမှတစ်ဆင့် admin ဆိုတယ့် level ကိုပြောင်းလိုက်တာကို vertical privilege escalation လို့ခေါ်ပါတယ်။

Horizontal privilege escalation

သူကတော့ ဘာမှသိပ်မထူးဘူး။ဥပမာ user1 ကို access ရရှိသွားပြီဆိုရင်user1 နေမှတစ်ဆင့် user2 ဆီကိုရောက်အောင်လို့user level ကိုကူးပြောင်း တာပဲဖြစ်ပါတယ်။

Method of privilege escalation

Kernel exploits

kernel ကနေမှတစ်ဆင့် Vulner ကိုescalation လုပ်ဆောင်တာဖြစ်ပါတယ်။အဲ့ဒီ vulner ကို patch မလုပ်ရသေးတာဖြစ်ဖြစ် patch မထွက်သေးတာဖြစ်ဖြစ်အဲ့လိုအခါမျိုးမှာ kernel exploits နဲ့လုပ်ဆောင်လို့ရပါတယ်။

Application and service exploits

သူကကျတော့ target system မှာ running ဖြစ်နေတယ့် application or running services တွေကမှတစ်ဆင့် user level ကို မြှင့်တင်ပေးပါတယ်။

Database privilege escalation

database ကနေတစ်ဆင့် မြှင့်တင်တဲ့ escalation မျိုးဖြစ်ပြီး သူကတော့ Sql injection attacks ဖြစ်သွားနိုင်တဲ့အရာမျိူးတွေ or database software တွေရဲ့အားနည်းချက်တွေကမှတစ်ဆင့် user level ကိုတစ်ဆင့်မြှင့်တင်တယ်။query ထည့်ပြီးတော့ database ကနေမှတစ်ဆင့် user level ကို မြှင့်တင်လို့ရတယ်။

Design and configuration issues

ဒါကတော့ရှင်းတယ်။ Design နဲ့ configuration issues ကြောင့်မလို့ privilege escalation ကို အလွယ်တကူမြှင့်တင်လို့ရတယ်။

Last updated

Was this helpful?