{"id":1175,"date":"2018-10-30T14:12:06","date_gmt":"2018-10-30T14:12:06","guid":{"rendered":"https:\/\/mchmelar.cz\/?p=1175"},"modified":"2024-12-04T05:24:56","modified_gmt":"2024-12-04T05:24:56","slug":"information-gathering-reconnaissance","status":"publish","type":"post","link":"https:\/\/kb.mchmelar.cz\/?p=1175","title":{"rendered":"Information gathering &amp; reconnaissance"},"content":{"rendered":"\n<p>Passive (DNS? Social Media accounts),<br \/>Active<\/p>\n\n\n<p>Vulnerabilities identification<br \/>advanced hackers use tools that produce less traffic<\/p>\n\n\n<p>Exploitation&nbsp;<br \/>-exploit: piece of software which takes advantage of vulnerabilities<br \/>&#8211;<\/p>\n\n\n<p>Web archives: https:\/\/archive.org\/<br \/>Whois<br \/>Search engines<br \/>Shodan<br \/>Metadata of documents<br \/>IP and port <g class=\"gr_ gr_93 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace\" id=\"93\" data-gr-id=\"93\">scann<\/g>ing<\/p>\n\n\n<p>traceroute : 3 different packets send to the next IP. that idicates reachability<\/p>\n\n\n<p>traceroute: request timed out in the middle of <g class=\"gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep\" id=\"8\" data-gr-id=\"8\">path<\/g>: this host is <g class=\"gr_ gr_7 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace\" id=\"7\" data-gr-id=\"7\">unreacahble<\/g> but <g class=\"gr_ gr_9 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace\" id=\"9\" data-gr-id=\"9\">other<\/g> route exists,&nbsp;<br \/><br \/><strong>Port scanning:<\/strong><\/p>\n\n\n<p>An alternative approach is to send application-specific UDP packets, hoping to generate an application layer response. For example, sending a DNS query to port 53 will result in a response, if a DNS server is present. This method is much more reliable at identifying open ports. However, it is limited to scanning ports for which an application specific probe packet is available. Some tools (e.g.,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Nmap\">nmap<\/a>) generally have probes for less than 20 UDP services, while some commercial tools (e.g.,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Nessus_(software)\">nessus<\/a>) have as many as 70. In some cases, a service may be listening on the port, but configured not to respond to the particular probe packet.<\/p>\n\n\n<p>UDP scanning is also possible, although there are technical challenges.&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/User_Datagram_Protocol\">UDP<\/a>&nbsp;is a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Connectionless\">connectionless<\/a>&nbsp;protocol so there is no equivalent to a TCP SYN packet. However, if a UDP packet is sent to a port that is not open, the system will respond with an&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_Control_Message_Protocol\">ICMP<\/a>&nbsp;port unreachable message. Most UDP port scanners use this scanning method, and use the absence of a response to infer that a port is open. However, if a port is blocked by a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Firewall_(computing)\">firewall<\/a>, this method will falsely report that the port is open. If the port unreachable message is blocked, all ports will appear open. This method is also affected by ICMP&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Rate_limiting\">rate limiting<\/a>.<sup><a href=\"https:\/\/en.wikipedia.org\/wiki\/Port_scanner#cite_note-profmesser1-4\">[4]<\/a><\/sup><\/p>\n\n\n<p><strong>How can an intrusion detection system detect port scanning?<\/strong> Checking if the more ports from the same IP are being checked. Such as 5 different ports from 1 address within 1 minute. &#8211;<g class=\"gr_ gr_87 gr-alert gr_tiny gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep\" id=\"87\" data-gr-id=\"87\">&gt;<\/g> hacker will make this slower. such as 4 ports per minute and even slower if <g class=\"gr_ gr_280 gr-alert sel gr_spell gr_replaced gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"280\" data-gr-id=\"280\">necessary<\/g>.&nbsp;<\/p>\n\n\n<p>Vertical scanning: single IP for multiple ports<br \/>Horizontal: targeting specific services in a network, a group of ip for specific port<\/p>\n\n\n<p>OS fingerprinteing:&nbsp;<\/p>\n\n\n<p><strong><g class=\"gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"9\" data-gr-id=\"9\">Large scale<\/g> IP and port scans:<\/strong><br \/>cover the full IP range<br \/>Avoid being blacklisted (honeypots)<br \/>-slow<br \/>-randomize the target IP<\/p>\n\n\n<p><strong>Vulnerability scanning<br \/><\/strong>port scanner<br \/>network vulnerability&nbsp;scanners<\/p>\n\n\n<p><br \/>Web app scanner<br \/>Database scanner<br \/><span style=\"text-decoration: underline;\">Types<\/span><br \/>remote with no privileges<br \/>remote with acces&nbsp;privileges<br \/>Agent<br \/><br \/>Nessus = random network scanner, possible to install an agent to target<br \/>portscan&#8230;&nbsp;<br \/>NATIONNAL&nbsp;VULNERABILiTY DATABASE: <a href=\"https:\/\/nvd.nist.gov\/home\">nvd.nist.gov\/home.cfm<\/a><br \/><\/p>\n\n\n<p><strong><g class=\"gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"9\" data-gr-id=\"9\">Vulerability<\/g>&nbsp;scanning \/ <g class=\"gr_ gr_19 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"19\" data-gr-id=\"19\">pentesting<\/g><br \/><\/strong><\/p>\n\n\n<p><strong>Payload\/exploit<br \/><\/strong>payload <g class=\"gr_ gr_4 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"4\" data-gr-id=\"4\">misile<\/g>, exploit = warhead<br \/>university network might block scanning<br \/>https:\/\/highon.coffee\/blog\/nmap-cheat-sheet\/<br \/><\/p>\n\n\n<p>VMWARE-suggestet connection to internale network only<\/p>\n\n\n<p><span style=\"text-decoration: underline;\"><strong>nmap<\/strong><\/span><br \/>Didn&#8217;t&nbsp;work at first, solution:&nbsp;<a href=\"https:\/\/networkengineering.stackexchange.com\/questions\/20265\/nmap-failed-to-open-device-eth1\">https:\/\/networkengineering.stackexchange.com\/questions\/20265\/nmap-failed-to-open-device-eth1<\/a><br \/>used &#8211;scan-delay 300ms for slowing down<br \/>&#8211;<g class=\"gr_ gr_183 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace\" id=\"183\" data-gr-id=\"183\">sU<\/g>&nbsp;=&gt; UDP<br \/>-sS =&gt; TCP SYN<\/p>\n\n\n<p><g class=\"gr_ gr_114 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace\" id=\"114\" data-gr-id=\"114\"><\/g><span style=\"text-decoration: underline;\"><strong><g class=\"gr_ gr_114 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace\" id=\"114\" data-gr-id=\"114\">Nessus<\/g> on KALI\/PARROT<\/strong><\/span><br \/><g class=\"gr_ gr_115 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling\" id=\"115\" data-gr-id=\"115\">sudo<\/g> \/etc\/init.d\/<g class=\"gr_ gr_116 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling\" id=\"116\" data-gr-id=\"116\">nessusd<\/g> start<br \/>Open localhost:8834<\/p>\n\n\n<p><span style=\"text-decoration: underline;\"><strong>VirtualBox network with host<\/strong><br \/><a href=\"https:\/\/www.tecmint.com\/network-between-guest-vm-and-host-virtualbox\/\">https:\/\/www.tecmint.com\/network-between-guest-vm-and-host-virtualbox\/<\/a><\/span><\/p>\n\n\n<p><\/p>\n\n\n<p><a href=\"https:\/\/www.submarinecablemap.com\">https:\/\/www.submarinecablemap.com<\/a><span style=\"text-decoration: underline;\"><br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Passive (DNS? Social Media accounts),Active Vulnerabilities identificationadvanced hackers use tools that produce less traffic Exploitation&nbsp;-exploit: piece of software which takes advantage of vulnerabilities&#8211; Web archives: https:\/\/archive.org\/WhoisSearch enginesShodanMetadata of documentsIP and port scanning traceroute : 3 different packets send to the next IP. that idicates reachability traceroute: request timed out in the middle of path: this host is unreacahble but other&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[55],"_links":{"self":[{"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/posts\/1175"}],"collection":[{"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1175"}],"version-history":[{"count":1,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/posts\/1175\/revisions"}],"predecessor-version":[{"id":5822,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=\/wp\/v2\/posts\/1175\/revisions\/5822"}],"wp:attachment":[{"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.mchmelar.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}