Wednesday, September 21, 2016

အေျခခံ သိထားရမယ္႔ Web Server Security အေၾကာင္း



အေျခခံ သိထားရမယ္႔ Web Server Security အေၾကာင္း
Web Application တစ္ခုကုိ ေရးတဲ႔အခါ အဓိက ထည္႔သြင္းစဥ္းစားရမယ္႔ အခ်က္ကေတာ႔ ကိုယ္႔ရ ဲ႔ Web Application ၊ Web Server ေတြ ဟာ ဘယ္အတုိင္းအတာထိ လံုျခံဳမွု ရွိျပီလဲ ဆုိတဲ႔ အခ်က္ပဲ ျဖစ္ပါတယ္။
အေျခခံ အားျဖင္႔ေတာ႔ Web Security ပုိင္းနဲ႔ ပတ္သက္လုိ႔ အခ်က္ ၄ ခ်က္ ကုိ အဓိကထား စဥ္းစားရပါမယ္။
A) Password Security
B) Secure Communications
C) Web Application Security
D) Server Security
A) Password Security
Security ပုိင္းကို စေျပာျပီဆုိရင္ Password ေတြ ရ ဲ႔ လံုျခံဳေရး အပုိင္းကုိ စေျပာရပါမယ္။ လံုျခံဳေရး နဲ႔ ပတ္သက္လုိ႔ အဓိက က်ိဳးေပါက္တဲ႔ အပိုင္းကေတာ႔ Password ကေန က်ိဳးေပါက္တာ အမ်ားဆံုး ျဖစ္ပါတယ္။
အဲဒီ က်ိဳးေပါက္မွုေတြကို ကာကြယ္ဖို႔ အတြက္ Web Developer ေတြ အေနနဲ႔ ေအာက္ပါ အခ်က္အလက္ေတြကို လိုက္နာရပါမယ္။
1. အသံုးျပဳမယ္႔ Password တုိင္း ဟာ အနည္းဆံုး 8 characters ထားရွိရပါမယ္။
2. Password ေပးတဲ႔ အခါ Numbers ေတြ ၊ Symbols ေတြ ေရာယွက္ထားတဲ႔ complex passwords ေတြကုိ အသံုးျပဳရပါမယ္။
3. မတူညီတဲ႔ Accounts ေတြ၊ roles ေတြ အတြက္ သီးျခား Passwords ေတြကုိ အသံုးျပဳရပါမယ္။
4. Secure password tool ေတြကုိ အသံုးျပဳျပီး ကုိယ္႔ Passwords ဟာ ဘယ္အတုိင္းအတာထိ Strong ျဖစ္နုိင္လဲဆုိတာ စစ္ၾကည္႔ရပါမယ္။
5. Dictionary words ေတြကုိ Password အျဖစ္ အသံုးျပဳျခင္းမ်ိဳးကုိ ေရွာင္ရပါမယ္။ ဥပမာ myblackdog ဆုိတဲ႔ စကားလံုးမ်ိဳးပါ။
6. Sequences of characters ေတြ အသံုးျပဳျခင္းမ်ိဳး ေရွာင္ရပါမယ္။ ဥပမာ။ 3333, abcdabcd စတဲ႔ ေရွ ႔ေနာက္ မွန္းဆရ လြယ္ကူေစတဲ႔ Password ေပးျခင္းမ်ိဳး ေရွာင္ၾကဥ္ရပါမယ္။
7. Birthdate ကဲ႔သုိ႔ ေသာ personal information မ်ားကုိ Password အျဖစ္ အသံုးျပဳျခင္းကုိ ေရွာင္ရပါမယ္။
8. Passwords ေတြကုိ ေပ်ာက္ရွလြယ္တဲ႔ laptops, smartphones or tablets ေတြမွာ သိမ္းတတ္တဲ႔ အေလ႔အက်င္႔ေတြကုိ ေဖ်ာက္ပစ္ရပါမယ္။
9. Password manager ကုိ အသံုးျပဳျပီးေတာ႔ ကုိယ္႔ Password ရဲ ႔ Secure Track ေတြကုိ စစ္ၾကည္႔ ရပါမယ္။
10.Authentication ပုိင္းကုိ စစ္တဲ႔အခါ လုိအပ္ရင္ two-factor authentication ကုိ အသံုးျပဳနုိင္ပါတယ္။
ဥပမာ။ Bank ကေန ေငြထုတ္တဲ႔ အခါ PIN နံပါတ္ ရုိက္ထည္႔ရတာမ်ိဳးက Two-Factor Authentication ကုိ သံုးထားတာျဖစ္ပါတယ္။
ATM စက္ ကေန Card ကုိ Valid ျဖစ္မျဖစ္ စစ္တဲ႔ အျပင္ User အေနနဲ႔ လဲ PIN number ကို ရုိက္ထည္႔ခုိင္းတာမ်ိဳး ျဖစ္ပါတယ္။
ေနာက္ထပ္ ျမင္သာေစတဲ႔ ဥပမာ တစ္ခုကေတာ႔ Gmail အေကာင္႔တစ္ခု ျဖစ္ေစ၊ Viber Account တစ္ခု ျဖစ္ေစ ဖြင္႔တဲ႔အခါမွာ Code တစ္ခုကုိ အသံုးျပဳသူရ ဲ႔ Mobile ဖုန္းကုိ ပုိ႔ျပီးမွ အဲဒီ Code ကုိ ျပန္ထည္႔ခုိင္းတာမ်ိဳးကလဲ Two-Factor Authentication ရ ဲ႔ နည္းလမ္းတစ္ခု ျဖစ္ပါတယ္။
11.Password ရဲ ႔ Security အတြက္ secure password generator ဆုိတာမ်ိဳးကုိလဲ သံုးနုိင္ပါတယ္။
secure password generator စိတ္၀င္စားရင္ ေအာက္ကလင္႔ခ္ မွာ ေလ႔လာနုိင္ပါတယ္။
http://securityxploded.com/secure-password-generator.php
B) Secure Communications
Communication ပိုင္းနဲ့ ပတ္သက္လို့ကေတာ့ Third party software ေတြရဲ့ ရန္ကေန ကာကြယ္နိုင္ေစဖို့အတြက္
12. ရိုးရိုး သာမန္ FTP အစား Secure FTP ကို အသံုးျပဳ သင္႔ပါတယ္။
13. telnet အစား SSH ကို သံုးနိုင္ပါတယ္။
SSH ဟာ Data ေတြကို encrypt လုပ္ျပီးမွသာ Server ဆီ ေပးပုိ႔တဲ႔ အတြက္ ျဖစ္ပါတယ္။
14. Email ေပးပို့ရာမွာ လံုျခံုစိတ္ခ်ေစဖို့အတြက္ Email Connections ေတြျဖစ္တဲ့ (POP3S/IMAPS/SMTPS) ေတြ ထဲက တစ္မ်ိဳးမ်ိဳးကုိ အသံုးျပဳ သင္႔ပါတယ္။
15.Web administration areas ေတြ လံုျခံဳဖို့ အတြက္ အခု ေနာက္ပုိင္း ေခတ္စားလာတဲ႔ SSL ( Secure Socket Layer ) , တစ္နည္းအားျဖင့္ HTTPS ကို အသံုးျပဳနိုင္ပါတယ္။
16.Web forms ေတြ လံုျခံဳမွု အတြက္လဲ HTTPS ကို သံုးနိုင္ပါတယ္။
17.Server ကို access လုပ္ခ်င္တဲ့ အခါမ်ိဳးမွာ VPN ( Virtual private network ) ကို အသံုးျပဳျခင္းက Server ေတြရ ဲ႔ လံုျခံဳေရး အတြက္ အကာအကြယ္ တစ္ခုျဖစ္ေစပါတယ္။
18.Servers ၊ Desktops စတဲ႔ Endpoints ေတြ အားလံုးမွာ Firewalls ေတြ ခံထားသင္႔ပါတယ္။
19.အဲဒီ အတြက္ residential/office firewall/IPS systems တစ္ခုခုကို သံုးနုိင္ပါတယ္။
20.Sensitive Emails ေတြ အတြက္ Encrypt ပုိင္းကုိ အျမင္႔ဆံုး ျဖစ္ေအာင္ ျပဳလုပ္ရပါမယ္။
21.Sensitive information မ်ားကုိ Public Computer မ်ားက ရယူအသံုးျပဳမွုေတြကုိ အတတ္နုိင္ဆံုး ေရွာင္ၾကည္ရပါမယ္။
C) Web Application Security
ဒီ အပိုင္းကေတာ႔ Web Application ဆုိင္ရာ လံုျခံဳမွု အပိုင္းပါ။
22.Sign up for notices about web application updates.
23.Update your web applications promptly.
24.Web applications ေတြကုိ remote security tools မ်ားထဲက Nessus ကဲ႔သုိ႔ေသာ Tool တစ္ခုခု ရ ဲ႔ အကူအညီနဲ႔ Scan ဖတ္ ျခင္းမ်ိဳး ျပဳလုပ္ရပါမယ္။
25.Web application firewall ကုိ သံုးရပါမယ္။
26.Test file upload fields to assure code cannot be uploaded.
27.Security issues ကုိ ေစာင္႔ၾကည္႔ဖုိ႔ အတြက္ Custom Code ေတြ ေရးထားျပီးသား ျဖစ္ရပါမယ္။
28.Coding အတြက္ Security ပုိင္းဆုိင္ရာ ေကာင္းမြန္တဲ႔ Frameworks ေတြကို အသံုးျပဳရပါမယ္။
29.Do not rely solely on obscure directory/file names for security.
30.Secure web application admin areas with IP based restrictions.
31.Sanitize user input.
32.Put sensitive files outside of document root or restrict access.
33.Avoiding using shell commands within scripts.
34.Don’t trust HTTP referer fields as they are easily forged.
35.Use POST instead of GET to submit data so sensitive information is not in the URL.
36.Validate data server-side not client-side.
37.Do not rely on relative file and path names. Always set base directories.
38.Specify permissions when creating files.
39.Limit file upload, creation activities to specific directories.
40.Create safe error messages by not disclosing sensitive information in errors.
41.Be careful of what data you trust from a cookie; it can be manipulated.
42.Encrypt configuration files that contain sensitive logins.
43.Guard against application level DOS attacks by limiting field input length.
44.Disable url , open if possible.
45.Enable safe mode, include directory and open base restrictions if possible
46.Disable dangerous PHP functions if possible
47.Be careful of naming files *.bak, *.txt or *.inc within the web document root.
48.Be careful using version management tools on your doc root.
49.Set default reply-to’s for web applications and monitor the email for bounces.
50.Use version control systems.
51.Use bug tracking and change log systems
D) Server Security
52.Update your OS regularly – as in within hours of critical updates.
53.Update your control panel regularly.
54.Reduce information disclosure, e.g. changing ServerTokens in Apache.
55.Don’t install software that is not used.
56.Don’t store backups or old versions of software on the production system.
57.Restrict access to directories with proper permissions
58.Make sure logs are working properly.
59.Make sure you log all admin level accesses with date, times and usernames.
60.Make sure you use a firewall.
61.Remove default accounts in MySQL.
62.Disable direct root login in SSH.
63.Get rid of passwords with SSH keys.
64.Disable unused services.
65.Maintain backups.
66.Test backups.
67.Don't do development on production systems.
68.Stay updated with subscriptions to security notification services.
69.Monitor web traffic for unusual activity.
70.Conduct regular, remote security scans.
71.Conduct regular, local security scans.
72.Harden default service settings in Apache, SSH and other services.
73.Use root account only when required.
74.Use sudo to grant others root level access.
75.Enable SELinux if possible.
76.Internal server traffic ျဖစ္တာမ်ိဳး တြက္ Private Networks ေတြကုိ အသံုးျပဳရပါမယ္။
77.Use encryption when appropriate.
78.Conduct password audits.
79.Server အတြက္ Passwords ေတြေပးတဲ႔ အခါ strong passwords ေတြ ျဖစ္ေစဖို႔နဲ႔ လိုအပ္သလို policies ေတြ ေျပာင္းလဲဖုိ႔ အတြက္လဲ ဂရုစုိက္ရပါမယ္။
Ref: http://www.rackaid.com/blog/server-security-tips/
Image Credit : http://server-management.in/…/Server_Security_Management1-3…
#Credit :
Programming Wiki - စြယ္စံု ပ႐ိုဂရမ္းမင္း

No comments:

Post a Comment