बिगत एक वर्ष देखि स्थानीय निकायमा
सूचना तथा संचार प्रबिधीको बिकाश तथा सूचना प्रबिधीको पहुँच
स्थानीयबासी सम्म पुर्याउने जमर्को गर्दा मैले बुझेको,भोगेका समस्या र अनुभव Website Hack हुनु एक रहेको पाए| हाम्रो Website हरु नचाहँदा नचाहँदै Hack हुने र महत्वपूर्ण सूचना/जानकारी/डाटा अनआवश्यक तत्वको पहुँचमा
जाने संभावना धेरै रहेको पाए, मैले बुझेको र
भोगेका अनुभवमा स्थानीय निकाएको Website Hack हुनुको कारण र Hack हुन बाट बच्न अपनाउन
पर्ने केही साधारण तर अत्यन्त आवश्यक उपायहरु
निम्न प्रकारका छन् |
१.Right access to folder:
प्राय जसो हामीले Folder Access Properties सेट गर्न भुलदछौ | कुनै folder लाई 777 access ( read-write-execute for all) सेट गर्दा सुरक्षित नहुन सक्छ र 777 access लाई जो कोहिले पनि परिवर्तन गर्न सक्छन् | त्यसैले सिमित पहुँच (limited access) को आवश्यक हुन्छ, 755 access setting ले गर्दा read – write – execute को पहुँच सिमित हुनेछ | यसको लागि attributes परिवर्तन गर्न कुनै FTP client बाट आवस्यक file/folder मा right click गरी CHMOD attributes मा क्लिक गरेर 775 मा परिवर्तन गर्न सकिन्छ |
२.Server मा .htaccess फाइल को उपस्थिति सुनिश्चित गर्ने
प्राय .htaccess file बिशेष किसिमका folder/directory हरु मा सुराक्ष प्रतिबन्धको (security restriction) को लागी प्रयोग गरिन्छ धेरै जसो Content Management System (CMS) drupal, wordpress, joomla इत्यादी installed गर्दा .htaccess files लाई edit गर्न मिल्ने हुदा .htaccessfile delete/modify हुने सम्भावना बढी रहेको ले गर्दा यस file को उपस्थिति सुनिश्चित गर्नु जरुरीहुन्छ र .htaccess फाइल को उपस्थितिले website सुरक्षित हुन्छ |
३.robots.txt file को प्रयोग
If robot wants to visit https://www.lgcdp.gov.np/index.php, Before this it checks for https://www.lgcdp.gov.np/robots.txt and finds
User-agent : *
Disallow:/
|
The “Disallow:/“ tells the all robot (esp. malwares robots that scan security vulnerabilities, and email address harvester used by spammers) that it should not visit any pages on the site.
४.SQL Injection
SQL Injection ले भइरहेको SQL
Statement लाई परिवर्तन गरि Database Table बटा data fetch गर्ने र data
संसोधन/delete गर्छ| प्राय website प्रयोगकर्ताहरुले(users) को form बाट SQL
Injection पास हुन्छ | यस्तो हुन बाट जोगिन website मा use भएको बिभिन्न webform को
field लाई validate गर्नु जरुरी हुन्छ; php’s unbuilt function (addslashes,mysql_real_escape_string)प्रयोग गरेर webform को field
लाई validate गर्न सकिन्छ |
५.XSS Attacks
XXS cross site scripting होर hackers
हरुले website प्रयोगकर्ताहरु को सूचना(Information–sessions, cookies&
other information)मा पहुँच(access) पाउना अपनाउने उपाय हो|XXS attack लाई न्यूनकारणगर्न SQL Injection जस्तै webform को field लाई
validate गर्नु पर्ने हुन्छ |
XSS Attacks को प्रभाव
- प्रयोगकर्ता को खाता अपहरण (Hijacks User Accounts)
- Web – browsers को History मा पहुँच (aacces) र clipboard contents
- टाढाबाट web– browser मा नियन्त्रण
- Internet and Intranet को उपकरण (appliances) र application मा पहुँच (access) and exploit.
XXS Attacks को रोकथाम
XSS attacks को रोकथामका लागि सबै output variable लाई encode गरि प्रयोगकर्ता(user)लाई प्रतिक्रिया respond गर्न सकिन्छ| Encoding variables ले वैकल्पिक HTML markup र entities को output दिन्छ उदाहरण:<script> gets converted to <script>.When a web browser encounters the entities,they will be converted back to HTML and printed but they will not be run.Browser displays the entitles but does not run them.If an attacker injects <script>alert("you are attacked") /script> into a variable field of a server's web page,the server will,using this strategy,return <script>alert("you are attacked")</script>.When the web browser download the encoded script,it will convert the encoded script back to <script>alert("you are attacked")</script> and display the script as part of the web page but the browser will not run the script.
प्राय जस्तो प्रयोग हुने entity name/number र common
HTML characters तल दिएको टेबल (Table)मा छन् |
Result
|
Description
|
Entity name
|
Entity number
|
Non-breaking
space
|
|
 
|
|
<
|
Less than
|
<
|
<
|
>
|
Greater
than
|
>
|
>
|
&
|
Ampersand
|
&
|
&
|
¢
|
Cent
|
¢
|
¢
|
£
|
Pound
|
£
|
£
|
¥
|
Yen
|
¥
|
¥
|
©
|
Copyright
|
©
|
©
|
®
|
Registered
trademark
|
®
|
®
|
™
|
Trademark
|
™
|
™
|
माथि उल्लेख भएको उपायहरुले हाम्रो website लाई
सुरक्षित बनाउनुको साथ – साथै महत्वपूर्ण सूचना/data लाई पनि रक्षा गर्छ | यी उपायहरु
प्रयोग गरि आजै आफ्नो website
सुरक्षित गर्ने कि ? के थाहा हामी मध्ये कोहि कार्यरत स्थनीय निकायको website hacker को अर्को निशाना हुन सक्छ !!!!
दीपक राज दवाडी
क्षेत्रीय सूचना तथा संचार प्रविधी बिज्ञ,
क्षेत्रीय समवन्य इकाई – धुलिखेल,
स्थानीय शासन
तथा सामुदायीक बिकाश कार्यक्रम – II,
सङ्घीय मामिला
तथा स्थानीय बिकाश मन्त्रालय,
नेपाल सरकार |
0 comments:
Post a Comment