{"id":433,"date":"2021-02-28T22:43:26","date_gmt":"2021-02-28T22:43:26","guid":{"rendered":"https:\/\/cas.cybercop-training.ch\/?page_id=433"},"modified":"2021-03-10T13:18:58","modified_gmt":"2021-03-10T13:18:58","slug":"host-and-service-discovery","status":"publish","type":"page","link":"https:\/\/cas.cybercop-training.ch\/index.php\/host-and-service-discovery\/","title":{"rendered":"Host and Service Discovery"},"content":{"rendered":"<h1>Lab: Maintaining Access<\/h1>\n<h2>Step 2 &#8211; Host &amp; Service Discovery<\/h2>\n<p><strong>Teamwork &#8211; Team DaMa<\/strong><\/p>\n<h2>Description<\/h2>\n<p>We are particularly interested in which hosts are available, what services they offer and additional information we can collect about potential targets (like OS types, versions, etc.).<\/p>\n<h2>Questions to Answer<\/h2>\n<p><strong>Q1:<\/strong><br \/>\nHow many systems did you identify?  <\/p>\n<p><strong>A1: <\/strong><br \/>\nThe host discovery with the specific nmap command provides us eight active hosts.<\/p>\n<blockquote>\n<p>nmap -n -sn 10.0.1.0\/24 -oA host_discovery &#8211;min-rate=20000<\/p>\n<p>cat hosts.txt<br \/>\n10.0.1.1<br \/>\n10.0.1.10<br \/>\n10.0.1.15<br \/>\n10.0.1.100<br \/>\n10.0.1.101<br \/>\n10.0.1.102<br \/>\n10.0.1.103<br \/>\n10.0.1.254 <\/p>\n<p>cat hosts.txt | wc -l<br \/>\n8  <\/p>\n<\/blockquote>\n<p><strong>Q2: <\/strong><br \/>\nWhat seems to be the purpose of the individual hosts (as far as you can tell from the services they offer)?  <\/p>\n<p><strong>A2: <\/strong><br \/>\nBased on the Service Discovery Scan we can identify the following most interesting systems\/services (details<br \/>\nfile: script_version_scan.gnmap):  <\/p>\n<ul>\n<li>Host: 10.0.1.10 \/ Windows System \/ Microsoft Terminal Services<\/li>\n<li>Host: 10.0.1.100 \/ Windows DC (Domain: winattacklab.local0) \/ AD DC services<\/li>\n<li>Host: 10.0.1.102 \/ Windows System \/ NetBios, Microsoft Terminal Services<\/li>\n<li>Host: 10.0.1.103 \/ Windows Web Server \/ Microsoft IIS httpd 10.0<\/li>\n<\/ul>\n<p><strong>Q3:  <\/strong><br \/>\nDid the scan already reveal vulnerabilities\/weaknesses?  <\/p>\n<p><strong>A3 (updated):  <\/strong><br \/>\nThe performed nmap scans creates three output files. Unfortunately not all three files contains the same output. the XML file provide more details as the gnmap and nmap files. The XML file contains now the<br \/>\nfollowing potentional vulnerability\/weakness on the Microsoft IIS Server (10.0.1.103). Part of scan result from host 10.0.1.103:<\/p>\n<p>The system has the TRACE method enabled. The HTTP TRACE can be used for Cross Site Tracing (XST) attacks. It can also be combined with cross-domain browser vulnerabilities to read sensitive header<br \/>\ninformation from third-party domains.<\/p>\n<p>References:<br \/>\n<a href=\"https:\/\/www.arridae.com\/blogs\/trace-method.php\">https:\/\/www.arridae.com\/blogs\/trace-method.php<\/a><\/p>\n<hr>\n<p><strong>A3 &#8211; first answer provided on 08.12.20202 <\/strong> <\/p>\n<p>The scan details don&#8217;t present vulnerabilities\/weaknesses information. But based on the scan report we can<br \/>\nnow go further and look for windos vulnerabilities based on the version information (e.g. Microsoft IIS httpd<br \/>\n10.0)<\/p>\n<p><strong>Q4: <\/strong><br \/>\nExplain the nmap options that make a difference between the first and the second scan  <\/p>\n<p><strong>A4: <\/strong><br \/>\nFirst scan (host discovery):<\/p>\n<blockquote>\n<p>nmap -n -sn 10.0.1.0\/24 -oA host_discovery &#8211;min-rate=20000<\/p>\n<\/blockquote>\n<p>This scan performs a ping scan without a DNS lookup and writes the output in the three different file formats<br \/>\n(xml, nmap, gnmap).  <\/p>\n<p><strong>-n<\/strong> no DNS resolution<br \/>\n<strong>-sn<\/strong> Ping Scan &#8211; disable port scan<br \/>\n<strong>-oA<\/strong> Output in all supported formats (xml, nmap, gnmap)<br \/>\n<strong>&#8211;min-rate<\/strong> Send packets no slower than per second  <\/p>\n<p>Second scan (service discovery):<\/p>\n<blockquote>\n<p>nmap -n -sC -sV -iL hosts.txt -oA script_version_scan &#8211;min-rate=20000<\/p>\n<\/blockquote>\n<p>With this scan a service discovery scan is performed with the standard NSE scripts. Furthermore a version<br \/>\ndiscovery for the open ports are executed.<br \/>\nThe scan is only performed on the hosts which are provided with<br \/>\nthe input file.  <\/p>\n<p><strong>-n<\/strong> no DNS resolution<br \/>\n<strong>-sC<\/strong> Performs a script scan using the default set of scripts.<br \/>\nIt is equivalent to &#8211;script=default.<br \/>\n<strong>-sV<\/strong> Probe open ports to determine service\/version info<br \/>\n<strong>-iL<\/strong> Reads target specifications from input filename.<br \/>\n<strong>-oA<\/strong> Output in all supported formats (xml, nmap, gnmap)<br \/>\n<strong>&#8211;min-rate<\/strong> Send packets no slower than per second  <\/p>\n<p>PDF Report<br \/>\n<a href=\"https:\/\/cas.cybercop-training.ch\/wp-content\/uploads\/2021\/03\/Readme-Step2-v2.pdf\" class=\"mtli_attachment mtli_pdf\" title=\"Readme-Step2-v2\">Readme-Step2-v2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lab: Maintaining Access Step 2 &#8211; Host &amp; Service Discovery Teamwork &#8211; Team DaMa Description We are particularly interested in which hosts are available, what services they offer and additional information we can collect about potential targets (like OS types, versions, etc.). Questions to Answer Q1: How many systems did you identify? A1: The host [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-433","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/comments?post=433"}],"version-history":[{"count":9,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/433\/revisions"}],"predecessor-version":[{"id":612,"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/pages\/433\/revisions\/612"}],"wp:attachment":[{"href":"https:\/\/cas.cybercop-training.ch\/index.php\/wp-json\/wp\/v2\/media?parent=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}