Windows Registry မိတ္ဆက္ (၂)

Windows Registryအပိုင္းကို ျပန္ၿပီးတင္လိုက္ပါတယ္... သိျပီးသားလည္း ျဖစ္ႏိုင္ပါတယ္... သိျပီးသားသူေတြမွတ္မိသြားေအာင္နဲ႔ မသိေသးတဲ႔သူေတြလည္း သိသြားရေအာင္ပါ။ ဒါ့အျပင္ ေနာက္ထပ္တင္ေပးသြားမယ္ Windows Registry Hacking ေတြကိုလည္း အလြယ္တကူနားလည္ျပီး ကိုယ့္ရဲ႕ Computer ကို ကိုယ့္စိတ္ၾကိဳက္ျပဳျပင္ေျပာင္းလဲ ထိန္းခ်ဳပ္ႏိုင္ေအာင္ျဖစ္ပါတယ္...။ ဒီ post ကိုမဖတ္ခင္မွာ ကိုယ့္ Computer က Start menu ထဲက run မွာ regedit လို႔ရိုက္ျပီး Enter ေခါက္လိုက္ပါ... Registry Edior ေပၚလာပါလိမ့္မယ္... အဲဒါေလးကိုၾကည့္ရင္း ဖတ္ရင္ ပိုသေဘာေပါက္ပါလိမ့္မယ္။ ကဲစလိုက္ၾကစို႔.....


Registry ရဲ႕ အဓိပၸာယ္
Microsoft Computer Dictionary, 5th Edition မွာ Registry ကို အခုလို အဓိပၸာယ္သတ္မွတ္ထားပါတယ္...
"တစ္ဦး (သို႔) တစ္ဦးထက္ပိုေသာ user မ်ား၊ applicationမ်ား နဲ႔ hardware devices မ်ားအတြက္ system ကို configuration လုပ္ဖုိ႔္လိုအပ္တဲ႔ information ေတြကို သိမ္းဆည္းထားဖို႔အတြက္ Microsoft Windows 98၊ Windows CE ၊ Windows NT နဲ႔ Windows 2000 တို႔မွာ အသံုးျပဳခဲ႔တဲ႔ database ေတြကို အဆင့္ဆင့္စီစဥ္ထားေသာ ဗဟိုခ်က္တစ္ခုျဖစ္ပါတယ္။"
Registry ထဲမွာ Windows ကေန operationလုပ္ေနစဥ္အခ်ိန္အတြင္းမွာ references လုပ္ေနတဲ႔ user တစ္ဦးခ်င္းစီရဲ႕ Profiles မ်ား၊ Computer ေပၚမွာ install လုပ္ထားတဲ႔ applicationမ်ား နဲ႔ documents အသီးသီးကို ဖန္တီးႏိုင္တဲ႔ type မ်ား၊ folder မ်ားအတြက္ property sheet setting မ်ား၊ system ေပၚမွာတည္ရွိေနတဲ႔ Hardware မ်ားရဲ႕ application icon မ်ား နဲ႔ အသံုးျပဳေနေသာ port မ်ားအတြက္ information မ်ားပါ၀င္ ပါတယ္။
Registry မွာ Windows 3.x နဲ႔ MS-DOS configuration files ေတြမွာ အသံုးျပဳခဲ႔ၾကတဲ႔ Autoexec.bat နဲ႔ Config.sys ကဲ့သို႔ေသာ text-based .ini file ေတြနဲ႔ အစားထိုးလဲလွယ္ထားပါတယ္။ Registry သည္ မ်ားစြာေသာ Windows Operation Systems ေတြမွာ ပါ၀င္ေသာ္လည္းပဲ သူတို႔တစ္ခုနဲ႔ တစ္ခုအၾကားမွာ ကြဲျပားျခားနားမႈေတြေတာ့ ရွိပါတယ္။

registry တစ္ခုထဲမွာ key မ်ား၊ subkey မ်ား၊ value မ်ား ပါ၀င္တဲ႔ အုပ္စုတစ္ခု အတြဲလိုက္တည္ရွိျပီး supporting file data မ်ား ရဲ႕ backup မ်ား ပါ၀င္တဲ႔ supporting files အစုတခုရွိပါတယ္။ Windows NT 4.0 ၊ Windows 2000 ၊ Windows XP ၊ Windows Server 2003 နဲ႔ Windows Vista တို႔မွာ HKEY_CURRENT_USER ကလြဲျပီး က်န္ေသာ supporting files ေတြဟာ %SystemRoot%\System32\Config folder ထဲမွာရွိၾကပါတယ္။ HKEY_CURRENT_USER အတြက္ supporting files ေတြကေတာ့ %SystemRoot%\Profiles\Username folder ထဲမွာ ရွိပါတယ္။ အဲဒီ folder ေတြထဲမွာပါ၀င္တဲ႔ file ေတြရဲ႕ file name extenstion ေတြဟာ သူတို႔ထဲမွာပါ၀င္တဲ႔ data ရဲ႕ type ကိုညႊန္ျပပါတယ္။
ဒါ့အျပင္ တခါတရံမွာေတာ့ extension ကင္းမဲ့ေနတာေတြကိုလည္း သူတို႔ထဲမွာ ပါ၀င္တဲ႔ data type ေတြကို ညႊန္ျပႏိုင္ပါတယ္။



Registry hive
Supporting Files
HKEY_LOCAL_MACHINE\SAM
Sam, Sam.log, Sam.sav
HKEY_LOCAL_MACHINE\Security
Security, Security.log, Security.sav
HKEY_LOCAL_MACHINE\System
Software, Software.log, Software.sav
HKEY_LOCAL_MACHINE\System
System, System.alt, System.log, System.sav
HKEY_CURRENT_CONFIG
System, System.alt, System.log, System.sav, Ntuser.dat, Ntuser.dat.log
HKEY_USERS\DEFAULT
Default, Default.log, Default.sav

Windows 98 မွာ registary file မ်ားကို User.dat နဲ႔ System.dat ဆိုျပီး နာမည္ေပးထားပါတယ္။ Windows Millennium Edition မွာေတာ့ registary file ေတြကို Classes.dat ၊ User.dat နဲ႔ System.dat ဆိုျပီးအမည္ေပးထားပါတယ္။
မွတ္ခ်က္ - Windows NT, Windows 2000, Windows XP, Windows Server 2003, နဲ႔ Windows Vista တို႔ရဲ႕ Security feature တို႔မွာ administrator ကေန registry key မ်ားအား ထိန္းခ်ဳပ္မႈကို လက္ခံခြင့္ျပဳထားပါတယ္။
ေအာက္မွာ ျပထားတဲ႔ table ကေတာ့ system က အသံုးျပဳေနတဲ႔ predefined key မ်ားစာရင္းျဖစ္ပါတယ္။ key တစ္ခုရဲ႕ အၾကီးဆံုးအရြယ္အစားကေတာ့ စာလံုးေရ ၂၅၅ လံုးျဖစ္ပါတယ္။

 

Floder/predefined key
ေဖာ္ျပခ်က္
HKEY_CURRENT_USER
ယခုလက္ရွိသံုးေနတဲ႔ User အတြက္ configuration information အရင္းအျမစ္မ်ားပါ၀င္ပါတယ္။ user ရဲ႕ folderမ်ား၊ screen color မ်ား နဲ႔ Control Panel setting မ်ားကို ဒီေနရာမွာ သိမ္းဆည္းပါတယ္။ ဒီ information ေတြဟာ user ရဲ႕ profile နဲ႔ ဆက္စပ္လ်က္ရွိပါတယ္။ ဒီ key ကို တခါတရံမွာ "HKCU" ဆိုတဲ႔ပံုစံမ်ိဳးလို အတိုခ်ံဳးထားတတ္ပါတယ္။
HKEY_USERS
Computer မွာရွိတဲ႔ activeျဖစ္ေနတဲ႔ loaded user profiles မ်ားအားလံုးပါ၀င္ပါတယ္။ HKEY_CURRENT_USER ဆိုတာ HKEY_USERS ရဲ႕ subkey တစ္ခုျဖစ္ပါတယ္။ HKEY_USERS ကို တစ္ခါတရံမွာ "HKU" ဆိုျပီးအတိုခ်ံဳ႕ထားတတ္ပါတယ္။
HKEY_LOCAL_MACHINE
Computer(userတိုင္း အတြက္) အတြက္သီးသန္႔ Configuration information မ်ား ပါ၀င္ပါတယ္။ ဒီ key ကိုလည္း တခါတရံမွာ "HKLM" ဆိုျပီးအတိုခ်ံဳ႕ထားပါတယ္။
HKEY_CLASSES_ROOT
HKEY_LOCAL_MACHINE\Software ရဲ႕ subkey တစ္ခုျဖစ္ပါတယ္။ user က Windows Explorer ကို သံုးျပီး fileတစ္ခုကို ဖြင့္လိုက္တဲ႔အခါ မွန္ကန္ေသာ program ပြင့္လာဖို႔အတြက္ ေသခ်ာေစရန္ informationေတြကို သိမ္းဆည္းေပးထားပါတယ္။ ဒီ key ကိုလည္း တစ္ခုတစ္ရံမွာ "HKCR" ဆိုျပီးအတိုခ်ံဳးထားတတ္ပါတယ္။ Windows 2000 နဲ႔ Start လုပ္လိုက္မယ္ဆိုရင္ ဒီinformation ေတြကို HKEY_LOCAL_MACHINE နဲ႔ HKEY_CURRENT_USER key နွစ္ခုလံုးရဲ႕ ေအာက္မွာ သိမ္းဆည္းလိုက္ပါတယ္။ HKEY_LOCAL_MACHINE\Software\Classes key မွာေတာ့ local computer ေပၚမွာရွိတဲ႔ users အားလံုးအတြက္ အေထာက္အပံ့ေပးႏိုင္တဲ႔ default settingေတြပါ၀င္ပါတယ္။ HKEY_CURRENT_USER\Software\Classes key မွာေတာ့ ကိုယ္တိုင္ ထိန္းခ်ဳပ္ကိုင္တြယ္ရတဲ႔ default setting မ်ားပါ၀င္ျပီး ဆက္သြယ္လာတဲ႔ user ကိုသာလွ်င္ apply လုပ္ပါတယ္။ HKEY_CLASSES_ROOT key ကေတာ့ အဲဒီ key ႏွစ္ခုလံုးရဲ႕ information ေတြကို ေပါင္းစပ္ျပီး Registry ရဲ႕ view တစ္ခုျဖစ္ေအာင္ စီစဥ္ေပးပါတယ္။ ဒါ့အျပင္ HKEY_CLASSES_ROOT က ယခင္Windows ရဲ႕ Versions မ်ားကို ဒီဇိုင္းျပဳလုပ္ေပးတဲ႔ programs မ်ားအတြက္ ခုနကေပါင္းစပ္ထားတဲ႔ view ကိုထပ္စီစဥ္ေပးျပန္ပါတယ္။ ဆက္သြယ္လာတဲ႔ user အတြက္ setting မ်ား ေျပာင္းလဲျခင္းကို HKEY_CLASSES_ROOT ေအာက္မွာအစား HKEY_CURRENT_USER\Software\Classes ေအာက္မွာ ျပဳလုပ္ရပါတယ္။ default settingမ်ားကိုေျပာင္းလဲျခင္းအတြက္လည္း HKEY_LOCAL_MACHINE\Software\Classes ရဲ႕ေအာက္မွာပဲ ျပဳလုပ္ရမွာျဖစ္ပါတယ္။အကယ္၍မ်ား သင္က keys မ်ားကို HKEY_CLASSES_ROOT ရဲ႕ေအာက္မွာသြားေရးခဲ႔မိရင္ system က information မ်ားကို HKEY_LOCAL_MACHINE\Software\Classes ရဲ႕ေအာက္မွာ သြားသိမ္းလိုက္ပါတယ္။ အကယ္၍ သင္က values မ်ားကို HKEY_CLASSES_ROOT ရဲ႕ေအာက္က key တစ္ခုမွာ ေရးမိလွ်င္ေတာ့ system က HKEY_LOCAL_MACHINE\Sofware\Classes ရဲ႕ ေအာက္မွာသိမ္းမယ့္အစား HKEY_CURRENT_USER\Software\Classes ေအာက္မွာပဲ တည္ရွိျပီးသားျဖစ္ေနတာကိုေတြ႔ရပါလိမ့္မယ္။
HKEY_CURRENT_CONFIG
system startup မွ Local computer ကအသံုးျပဳေနတဲ႔ Hardware profile မ်ားအေၾကာင္း informationမ်ားပါ၀င္ပါတယ္။

မွတ္ခ်က္ - Windows XP, Windows Server2003 နဲ႔ Windows Vista တို႔ရဲ႕ 64-bit version မ်ားမွာရွိတဲ႔ Registry ကို 32-bit နဲ႔ 64-bit key မ်ားဆိုျပီး ခြဲျခားထားပါတယ္။ 32-bit key အမ်ားစုဟာဲ႔ သူတို႔ရဲ႕ 64-bit counterpart မ်ားနဲ႔ vice versa မွာလုိပဲ တူညီတဲ႔နာမည္ေတြရွိၾကပါတယ္။ Windows XP, Windows Server 2003 နဲ႔ Windows Vista တို႔မွာပါ၀င္တဲ႔ Registry Editor ရဲ႕ default 64-bit version မွာ 32-bit key မ်ားကို ေအာက္ပါ node ထဲမွာေဖာ္ျပထားပါတယ္။
HKEY_LOCAL_MACHINE\Software\WOW6432Node


ေအာက္မွာျပထားတဲ႔ ဇယားကေတာ့ Windows မွာ အသံုးျပဳေနတဲ႔ ယခုလက္ရွိ သတ္မွတ္ထားတဲ႔ data types ျဖစ္ပါတယ္။ value name တစ္ခုရဲ႕ အၾကီးဆံုးအရြယ္အစားကေတာ့ ေအာက္မွာေဖာ္ျပထားတဲ႔ အတိုင္းျဖစ္ပါတယ္....
• Window Sever 2003, Windows XP နဲ႔ Windows Vista : 16,383 characters
• Windows 2000 : 260 ANSI characters (သို႔) 16,383 Unicode characters
• Windows Millennium Edition/Windows 98/Windows 95 : 255 characters

Long values ( ၂,၀၄၈ bytes ထက္ပိုေသာ ) မ်ားကို registery ထဲမွာ file names မ်ားနဲ႔အတူ file ကဲ႔သို႔ သိမ္းဆည္းရပါတယ္...။ အဲဒီ ဖိုင္ေတြက registry ရဲ႕ ေဆာင္ရြက္ခ်က္ေတြကို အခ်ိန္တုိတိုနဲ႔ အက်ိဳးရွိေအာင္ ကူညီပါတယ္။ value တစ္ခုရဲ႕ အၾကီးဆံုးအရြယ္အစားကေတာ့ ေအာက္ပါအတိုင္းပါ.....
• Windows NT 4.0/Windows 2000/Windows XP/Windows Sever 2003/Windows Vista: Avilable memory
• Windows Milliennium Edition/Windows 98/Windows 95: 16,300 bytes

မွတ္ခ်က္ - key တစ္ခု ရဲ႕ value မ်ားအားလံုးရဲ႕ စုစုေပါင္းအရြယ္အစား ရဲ႕ ကန္႔သတ္ခ်က္ကေတာ့ 64K ျဖစ္ပါတယ္။

 

Name
Data type
ေဖာ္ျပခ်က္
Binary Value
REG_BINARY
Raw binary data ။ hard ware componet အမ်ားစုဟာ binary data ကဲ႔သို႔ သိမ္းဆည္းၾကျပီး hexadecimal format နဲ႔ Registry Editor ထဲမွာေဖာ္ျပပါတယ္။
DWORD Value
REG_DWORD
Data ဟာ 4 bytes long ( 32- bit ကိန္းျပည့္တစ္ခု) ျဖစ္တဲ႔ number တစ္ခုအားျဖင့္ကိုယ္စားျပဳပါတယ္။ device driver မ်ားနဲ႔ service မ်ားအတြက္ parameter မ်ားကလည္း ဒီအမ်ိဳးအစားေတြပဲျဖစ္ျပီး binary, hexadecimal (သို႔) decimal foamt ထဲမွ Registry Editor ထဲမွာေဖာ္ျပၾကပါတယ္။ဆက္စပ္ေနတဲ႔ value မ်ားကေတာ့ DWORD_LITTLE_ENDIAN( အနိမ့္ဆံုး address မွ least significant byte ) နဲ႔ REG_DWORD_BIG_ENDIAN( အျမင့္ဆံုး address မွာ least significant byte) တို႔ျဖစ္ၾကပါတယ္။
Expandable String Value
REG_EXPAND_SZ
variable-length data string တစ္ခုျဖစ္ပါတယ္။ဒီ data type ထဲမွာေတာ့ variable မ်ားပါ၀င္ျပီး ၄င္းတို႔က service (သို႔) program တစ္ခုက data ကိုအသံုးျပဳေသာအခါ ေျပလည္ေစပါတယ္။
Multi-String Value
REG_MULTI_SZ
multiple string တစ္ခုျဖစ္ပါတယ္။ list မ်ား (သို႔) ဒီ typeမွာ လူေတြဖတ္ရႈႏိုင္တဲ႔ ပံုစံတစ္ခုထဲမွ multiple value မ်ားပါ၀င္ပါတယ္။Entry မ်ားဟာ space မ်ား၊ comma မ်ား ( သို႔ ) အျခားအမွတ္အသားမ်ားျဖင့္ ခြဲျခားထားပါတယ္။
String Value
REG_SZ
fixed-length text string တစ္ခုျဖစ္ပါတယ္။
Binary Value
REG_RESOURCE_LIST
data element မ်ားကို အစီအစဥ္တက် အစုလိုက္ထပ္ထားတဲ႔ series တစ္ခုျဖစ္ျပီး hardware device driver တစ္ခုကအသံုးျပဳတဲ႔ resource စာရင္းတစ္ခုကို သိမ္းဆည္းဖို႔ (သို႔) ၄င္းကေန ထိမ္းခ်ဳပ္ႏိုင္တဲ႔ physical devicesမ်ားရဲ႕ resource တစ္ခုကို သိမ္းဆည္းဖို႔ ဒီဇိုင္းျပဳလုပ္ထားပါတယ္။ ဒီdata ေတြကို ရွာေဖြ႔ေတြ႔ရွိျပီး System အားျဖင့္ ResourceMap tree ထဲမွာေရးၾကပါတယ္။ Binary Value တစ္ခုကဲ႔သို႔ hexadecimal format ထဲမွ Registry Editor ထဲမွာ ေဖာ္ျပပါတယ္။
Binary Value
REG_RESOURCE_REQUIREMENTS_LIST
data element မ်ားကို အစီအစဥ္တက် အစုလိုက္ထပ္ထားတဲ႔ series တစ္ခုျဖစ္ျပီး ျဖစ္ႏိုင္ေျခရွိတဲ႔ hardware resources driver မ်ား ရဲ႕ device driver စာရင္းကို သိမ္းဆည္းဖို႔ (သို႔) ၄င္းကေန ထိမ္းခ်ဳပ္အသံုးျပဳႏိုင္တဲ႔ physical devicesမ်ားရဲ႕ device driver တစ္ခုကို သိမ္းဆည္းဖို႔ ဒီဇိုင္းျပဳလုပ္ထားပါတယ္။ System ဟာ ResourceMap tree ထဲမွရွိတဲ႔ ဒီlist ထဲက subset ထဲမွာေရးၾကပါတယ္။ System က ဒီ data ေတြကို ရွာေဖြေတြ႔ရွိျပီး Binary Value တစ္ခုကဲ႔သို႔ hexadecimal format ထဲမွ Registry Editor ထဲမွာ ေဖာ္ျပပါတယ္။
Binary Value
REG_FULL_RESOURCE_DESCRIPTOR
data element မ်ားကို အစီအစဥ္တက် အစုလိုက္ထပ္ထားတဲ႔ series တစ္ခုျဖစ္ျပီး physical hardware device တစ္ခုကအသံုးျပဳတဲ႔ resource စာရင္းတစ္ခုကို သိမ္းဆည္းဖို႔ ဒီဇိုင္းျပဳလုပ္ထားပါတယ္။ ဒီdata ေတြကို ရွာေဖြ႔ေတြ႔ရွိျပီး System အားျဖင့္ Hardware Description tree ထဲမွာေရးၾကပါတယ္။ Binary Value တစ္ခုကဲ႔သို႔ hexadecimal format ထဲမွ Registry Editor ထဲမွာ ေဖာ္ျပပါတယ္။
None
REG_NONE
သီးျခားဘယ္ type မွမရွိတဲ႔ Data ျဖစ္ပါတယ္။ ဒီdata ကို system (သို႔) applicationမ်ားအားျဖင့္ registry ထဲမွာေရးျပီး Binary Value တစ္ခုကဲ႔သို႔ hexadecimal format ထဲမွာ Registry Edistor ထဲမွာ ေဖာ္ျပပါတယ္။
Link
REG_LINK
symbolic link တစ္ခုကိုနာမည္ေပးထားတဲ႔ Unicode string တစ္ခုျဖစ္ပါတယ္။
QWORD Value
QWORD Value
Data ဟာ 64-bit integer တစ္ခုျဖစ္တဲ႔ number တစ္ခုအားျဖင့္ ကိုယ္စားျပဳပါတယ္။ ဒီ data ဟာ Binary Value တစ္ခုကဲ႔သို႔ Registry Editor ထဲမွာ ေဖာ္ျပပါတယ္။

 

ဆက္လက္ေဖာ္ျပပါမည္....

No comments:

Post a Comment