নিক্টো - ওয়েব সার্ভারগুলির জন্য একটি ওয়েব অ্যাপ্লিকেশন দুর্বলতা এবং সিজিআই স্ক্যানার


যে কোনও লিনাক্স প্রশাসকের অস্ত্রাগারের জন্য সরঞ্জাম থাকা নিক্টো ওয়েব স্ক্যানার হ'ল আরেকটি ভাল। এটি জিপিএল লাইসেন্সের আওতায় প্রকাশিত একটি ওপেন সোর্স ওয়েব স্ক্যানার, যা 6500 এরও বেশি সম্ভাব্য বিপজ্জনক ফাইল/সিজিআই সহ একাধিক আইটেমগুলির জন্য ওয়েব সার্ভারগুলিতে বিস্তৃত পরীক্ষা করতে ব্যবহৃত হয়।

এটি দুর্বলতা মূল্যায়নের জন্য ক্রিস সলো এবং ডেভিড লজ লিখেছেন, এটি 1250 ওয়েব সার্ভার এবং 270 এর বেশি সংস্করণ নির্দিষ্ট সমস্যার জন্য পুরানো সংস্করণগুলি পরীক্ষা করে। এটি পুরানো ওয়েব সার্ভার সফ্টওয়্যার এবং প্লাগইনগুলির জন্যও স্ক্যান করে এবং প্রতিবেদন করে।

নিকটো ওয়েব স্ক্যানারের বৈশিষ্ট্য

  1. এসএসএলকে সমর্থন করে
  2. সম্পূর্ণ HTTP প্রক্সি সমর্থন করে
  3. li
  4. প্রতিবেদনগুলি সংরক্ষণ করতে পাঠ্য, এইচটিএমএল, এক্সএমএল এবং সিএসভি সমর্থন করে।
  5. একাধিক পোর্টের জন্য স্ক্যান করুন
  6. এনএম্যাপ আউটপুট যেমন ফাইল থেকে ইনপুট গ্রহণ করে একাধিক সার্ভারে স্ক্যান করতে পারে
  7. লিবিউইস্কার আইডি সমর্থন করুন
  8. শিরোনাম, ফাইল এবং ফেভিকনগুলির সাহায্যে ইনস্টল করা সফ্টওয়্যার সনাক্ত করতে যথেষ্ট সক্ষম
  9. মেটাস্প্লিটগুলির জন্য লগগুলি
  10. "অস্বাভাবিক" শিরোনামের প্রতিবেদন।
  11. অ্যাপাচি এবং সিজিওয়্যার্ট ব্যবহারকারীর গণনা
  12. বেসিক এবং এনটিএলএম
  13. সহ হোস্টগুলি প্রমাণীকরণ করুন
  14. স্ক্যানগুলি নির্দিষ্ট সময়ে অটো-বিরাম দেওয়া যায়

নিকটো প্রয়োজনীয়তা

বেসিক পার্ল, পার্ল মডিউলগুলি, ওপেনএসএসএল ইনস্টলেশন সমেত একটি সিস্টেম নিক্টোকে চালনার জন্য সক্ষম করে। এটি উইন্ডোজ, ম্যাক ওএসএক্স এবং বিভিন্ন ইউনিক্স/লিনাক্স বিতরণ যেমন রেড হ্যাট, ডেবিয়ান, উবুন্টু, ব্যাকট্র্যাক ইত্যাদি উপর পুরোপুরি পরীক্ষা করা হয়েছে

লিনাক্সে নিক্টো ওয়েব স্ক্যানার ইনস্টলেশন

আজকের বেশিরভাগ লিনাক্স সিস্টেমগুলি প্রাক ইনস্টলড পার্ল, পার্ল মডিউল এবং ওপেনএসএসএল প্যাকেজগুলির সাথে আসে। যদি অন্তর্ভুক্ত না করা হয় তবে আপনি এগুলিকে yum বা apt-get নামক ডিফল্ট সিস্টেম প্যাকেজ ম্যানেজার ইউটিলিটি ব্যবহার করে ইনস্টল করতে পারেন।

 yum install perl perl-Net-SSLeay openssl
 apt-get install perl openssl libnet-ssleay-perl

এরপরে, তার গিথুব সংগ্রহশালা থেকে সর্বশেষতম স্থিতিশীল নিক্টো উত্স ফাইলগুলি ক্লোন করুন, নিক্টো/প্রোগ্রামগুলি/ডিরেক্টরিতে যান এবং পার্ল ব্যবহার করে এটি চালান:

$ git clone https://github.com/sullo/nikto.git
$ cd nikto/programs
$ perl nikto.pl -h 
Option host requires an argument

       -config+            Use this config file
       -Display+           Turn on/off display outputs
       -dbcheck            check database and other key files for syntax errors
       -Format+            save file (-o) format
       -Help               Extended help information
       -host+              target host
       -id+                Host authentication to use, format is id:pass or id:pass:realm
       -list-plugins       List all available plugins
       -output+            Write output to this file
       -nossl              Disables using SSL
       -no404              Disables 404 checks
       -Plugins+           List of plugins to run (default: ALL)
       -port+              Port to use (default 80)
       -root+              Prepend root value to all requests, format is /directory
       -ssl                Force ssl mode on port
       -Tuning+            Scan tuning
       -timeout+           Timeout for requests (default 10 seconds)
       -update             Update databases and plugins from CIRT.net
       -Version            Print plugin and database versions
       -vhost+             Virtual host (for Host header)
   		+ requires a value

	Note: This is the short help output. Use -H for full help text.

"বিকল্প হোস্টের পক্ষে একটি যুক্তি প্রয়োজন" স্পষ্টভাবে জানিয়ে দিচ্ছে যে পরীক্ষা করার সময় আমরা প্রয়োজনীয় প্যারামিটারগুলি অন্তর্ভুক্ত করি না। সুতরাং, পরীক্ষা চালানোর জন্য আমাদের একটি প্রাথমিক প্রয়োজনীয় পরামিতি যুক্ত করতে হবে।

বেসিক স্ক্যানটির জন্য একটি হোস্টের প্রয়োজন যা আপনি লক্ষ্য করতে চান, ডিফল্টরূপে এটি পোর্ট 80 স্ক্যান করে যদি কিছু নির্দিষ্ট না থাকে। হোস্টটি হয় কোনও হোস্টের নাম বা কোনও সিস্টেমের আইপি ঠিকানা হতে পারে। আপনি “-h” বিকল্পটি ব্যবহার করে একটি হোস্ট নির্দিষ্ট করতে পারেন।

উদাহরণস্বরূপ, আমি টিসিপি পোর্ট 80 এ একটি আইপি 172.16.27.56 এ স্ক্যান করতে চাই।

 perl nikto.pl -h 172.16.27.56
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 00:48:12 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.
+ Server leaks inodes via ETags, header found with file /robots.txt, inode: 5956160, size: 24, mtime: 0x4d4865a054e32
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 1 entry which should be manually viewed.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Multiple index files found: index.php, index.htm, index.html
+ DEBUG HTTP verb may show server debugging information. See http://msdn.microsoft.com/en-us/library/e8z01xdh%28VS.80%29.aspx for details.
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3233: /phpinfo.php: Contains PHP configuration information
+ OSVDB-12184: /index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.
+ OSVDB-3092: /test.html: This might be interesting...
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ /connect.php?path=http://cirt.net/rfiinc.txt?: Potential PHP MySQL database connection string found.
+ OSVDB-3092: /test.php: This might be interesting...
+ 6544 items checked: 0 error(s) and 16 item(s) reported on remote host
+ End Time:           2014-01-10 00:48:23 (GMT5.5) (11 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

আপনি যদি অন্য কোনও পোর্ট নম্বরে স্ক্যান করতে চান তবে "-p" [-port] বিকল্পটি যুক্ত করুন। উদাহরণস্বরূপ, আমি আইসি 172.16.27.56 টিসিপি পোর্ট 443 এ একটি স্ক্যান করতে চাই।

 perl nikto.pl -h 172.16.27.56 -p 443
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 01:08:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Server leaks inodes via ETags, header found with file /, inode: 2817021, size: 5, mtime: 0x4d5123482b2e9
+ The anti-clickjacking X-Frame-Options header is not present.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Server is using a wildcard certificate: '*.mid-day.com'
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6544 items checked: 0 error(s) and 8 item(s) reported on remote host
+ End Time:           2014-01-10 01:11:20 (GMT5.5) (174 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

আপনি সম্পূর্ণ ইউআরএল সিন্ট্যাক্স ব্যবহার করে হোস্ট, পোর্ট এবং প্রোটোকলও নির্দিষ্ট করতে পারেন এবং এটি স্ক্যান করা হবে।

 perl nikto.pl -h http://172.16.27.56:80

আপনি যে কোনও ওয়েবসাইটও স্ক্যান করতে পারেন। উদাহরণস্বরূপ, আমি এখানে গুগল.কম এ স্ক্যান করেছি।

 perl nikto.pl -h http://www.google.com
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          173.194.38.177
+ Target Hostname:    www.google.com
+ Target Port:        80
+ Start Time:         2014-01-10 01:13:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: gws
+ Cookie PREF created without the httponly flag
+ Cookie NID created without the httponly flag
+ Uncommon header 'x-frame-options' found, with contents: SAMEORIGIN
+ Uncommon header 'x-xss-protection' found, with contents: 1; mode=block
+ Uncommon header 'alternate-protocol' found, with contents: 80:quic
+ Root page / redirects to: http://www.google.co.in/?gws_rd=cr&ei=xIrOUomsCoXBrAee34DwCQ
+ Server banner has changed from 'gws' to 'sffe' which may suggest a WAF, load balancer or proxy is in place
+ Uncommon header 'x-content-type-options' found, with contents: nosniff
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ File/dir '/groups/' in robots.txt returned a non-forbidden or redirect HTTP code (302)
….

উপরের কমান্ডটি ওয়েব সার্ভারে একাধিক http অনুরোধ (যেমন 2000 এরও বেশি পরীক্ষা) সম্পাদন করবে।

আপনি একই সেশনে একাধিক পোর্ট স্ক্যানিংও করতে পারেন। একই হোস্টে একাধিক বন্দর স্ক্যান করতে, "-p" [-port] বিকল্প যুক্ত করুন এবং পোর্টগুলির তালিকা নির্দিষ্ট করুন। পোর্টগুলি ব্যাপ্তি হিসাবে চিহ্নিত করা যেতে পারে (যেমন, 80-443), বা কমা দ্বারা পৃথক করা (যেমন, 80,443)। উদাহরণস্বরূপ, আমি হোস্টের 172.16.27.56 তে 80 এবং 443 বন্দরগুলি স্ক্যান করতে চাই।

 perl nikto.pl -h 172.16.27.56 -p 80,443
- Nikto v2.1.5
---------------------------------------------------------------------------
+ No web server found on cmsstage.mid-day.com:88
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 20:38:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.

---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 20:38:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ All CGI directories 'found', use '-C none' to test none
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
.....

আসুন আমরা বলি যে এমন একটি সিস্টেম যেখানে নিক্টো চলছে কেবলমাত্র একটি এইচটিটিপি প্রক্সির মাধ্যমে লক্ষ্য হোস্টের অ্যাক্সেস রয়েছে, এখনও দুটি ভিন্ন উপায়ে ব্যবহার করে পরীক্ষা করা যেতে পারে। এর মধ্যে একটি নিক্টো কোডফ ফাইল ব্যবহার করছে এবং অন্য উপায় হ'ল কমান্ড লাইন থেকে সরাসরি চালানো।

যে কোনও কমান্ড লাইন সম্পাদক ব্যবহার করে nikto.conf ফাইল খুলুন।

 vi nikto.conf

চলক "প্রক্সি" সন্ধান করুন এবং প্রদর্শিত হিসাবে লাইনের শুরু থেকেই ‘#’ কে অসম্পূর্ণ করুন। তারপরে প্রক্সি হোস্ট, পোর্ট, প্রক্সি ব্যবহারকারী এবং পাসওয়ার্ড যুক্ত করুন। সংরক্ষণ করুন এবং ফাইলটি বন্ধ করুন।

# Proxy settings -- still must be enabled by -useproxy
PROXYHOST=172.16.16.37
PROXYPORT=8080
PROXYUSER=pg
PROXYPASS=pg

এখন, "ইউজপ্রক্সি" বিকল্পটি ব্যবহার করে নিক্টোকে কার্যকর করুন। দয়া করে নোট করুন যে সমস্ত সংযোগ HTTP প্রক্সি মাধ্যমে রিলে করা হবে।

[email  nikto-2.1.5]# perl nikto.pl -h localhost -p 80 -useproxy
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:28:29 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080

যুক্তি হিসাবে প্রক্সি সেট করে "-Useproxy" বিকল্পটি ব্যবহার করে কমান্ড লাইন থেকে সরাসরি নিক্টোকে চালিত করতে।

[email  nikto-2.1.5]# perl nikto.pl -h localhost -useproxy http://172.16.16.37:8080/
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:34:51 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080

আপনি নিকটোকে সর্বশেষতম প্লাগইন এবং ডাটাবেসগুলিতে স্বয়ংক্রিয়ভাবে আপডেট করতে পারেন, কেবলমাত্র "আপডেট" কমান্ডটি চালান।

 perl nikto.pl -update

নতুন আপডেটগুলি উপলভ্য থাকলে আপনি ডাউনলোড হওয়া নতুন আপডেটের একটি তালিকা দেখতে পাবেন।

+ Retrieving 'nikto_report_csv.plugin'
+ Retrieving 'nikto_headers.plugin'
+ Retrieving 'nikto_cookies.plugin'
+ Retrieving 'db_tests'
+ Retrieving 'db_parked_strings'
+ Retrieving 'CHANGES.txt'
+ CIRT.net message: Please submit Nikto bugs to http://trac2.assembla.com/Nikto_2/report/2

আপনি http://cirt.net/nikto/UPDATES/ থেকে ম্যানুয়ালি নিক্টো প্লাগইন এবং ডাটাবেসগুলি ডাউনলোড এবং আপডেট করতে পারেন।

রেফারেন্স লিংক

নিকটো হোমপেজ