{"id":1796,"date":"2022-04-20T13:37:47","date_gmt":"2022-04-20T11:37:47","guid":{"rendered":"https:\/\/www.dsecbypass.com\/?p=1796"},"modified":"2024-02-08T09:20:06","modified_gmt":"2024-02-08T08:20:06","slug":"pentest-stories-external","status":"publish","type":"post","link":"https:\/\/www.dsecbypass.com\/en\/pentest-stories-external\/","title":{"rendered":"Pentest stories : external"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;0px||||false|false&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_image src=&#8221;https:\/\/www.dsecbypass.com\/wp-content\/uploads\/2022\/01\/Global_network_v1.png&#8221; alt=&#8221;External audit DSecBypass Lyon&#8221; title_text=&#8221;External pentest&#8221; _builder_version=&#8221;4.17.4&#8243; _module_preset=&#8221;default&#8221; width=&#8221;50%&#8221; module_alignment=&#8221;center&#8221; height=&#8221;257px&#8221; filter_opacity=&#8221;57%&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.18.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<h2>Pentest stories<\/h2>\n<p style=\"text-align: justify;\">This series of articles makes you follow Jean, an imaginary pentester, in his missions of intrusion tests. Clients and exploit stories are just as imaginary, but correspond to reality and are based on the experiences of DSecBypass experts.<\/p>\n<p style=\"text-align: justify;\">It aims to popularize and ease the understanding of the different pentest offers.<\/p>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2 class=\"part\" data-startline=\"14\" data-endline=\"14\">External pentest<\/h2>\n<p style=\"text-align: justify;\">Jean has been carrying out <strong>external security audits<\/strong> for several years. It has improved its methods and tools to easily <strong>identify servers or services exposed on the Internet<\/strong> that stand out. This is not obvious when the client exposes hundreds of IP addresses, and even more services. Finding the &#8220;right&#8221; services in the middle of the Internet also requires experience and somewhat of a trained eye despite these tools.<\/p>\n<p style=\"text-align: justify;\">Today, he is on a mission for a French industrial group. The client is in the process of acquiring a new entity and wishes to validate the level of security of what he is going to acquire. The scope is therefore well identified:<\/p>\n<ul>\n<li>client.com<\/li>\n<li>client-outils.com<\/li>\n<li>client-outils.en<\/li>\n<li>several public IP addresses corresponding to the entity&#8217;s offices, factories and some servers hosted in the cloud<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">The scenario is a <strong>black box external pentest<\/strong>: the auditor only knows the scope information, any customer constraints, and has no account or documentation. As in the majority of this type of mission, the client authorized Jean&#8217;s IP addresses in advance in his security solutions (IPS, WAF) so that he would not find himself blocked during his tests. The effectiveness of these solutions can be tested in a second step, this time the emphasis is placed on the security of the exposed services.<\/p>\n<p style=\"text-align: justify;\"><span class=\"wHYlTd z8gr9e\">\u2705<\/span> Before starting the audit, Jean makes sure that the legal mandate has been correctly completed and signed by all the stakeholders. He sends an email to the contact at the customer and the new entity to inform of the start of the tests.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">Jean starts his <strong>passive reconnaissance phase<\/strong>: what are the domain names linked to those of the perimeter (www.client.com, support.client.com, extranet.client.com etc.)? do search engines already communicate interesting information? can employee email addresses be found in publicly leaked databases? Which open services are already known? For this, he uses tools that he himself developed in order to correlate several public data sources on the Internet and thus consolidate a collection of information collected passively: he still has not accessed any service of the client\u2019s Information System, and yet he already has <strong>a fairly precise vision of his external perimeter.<\/strong>.<\/p>\n<p class=\"navigable-headline\" id=\"gen-h1-1-00000001\" style=\"text-align: justify;\"><span class=\"code char\">\ud83c\udf0e<\/span> From this first mapping of the external Information System, Jean can build his <strong>active reconnaissance phase<\/strong>: he will try to discover as many open services as possible by actually connecting to them and validate those he has discovered during the former. If open services were not included in the scope, a meeting can be scheduled with the customer in order to validate whether or not to extend it. In this case, Jean did not discover any &#8220;out of scope&#8221; services.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">He then has a precise map of open services, their versions and the technologies used. His tools also revealed to him the services that are not up to date and are subject to vulnerabilities, the famous <a href=\"https:\/\/www.redhat.com\/fr\/topics\/security\/what-is-cve\" target=\"_blank\" rel=\"noopener\">CVEs<\/a>.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">He manually tests the CVEs that seem to him to be exploitable but today the exploit conditions are not met. Vulnerable services will still be <strong>recorded in the audit report<\/strong> so that vulnerable software version upgrades can be planned.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">He also makes an inventory of the &#8220;sensitive&#8221; services discovered: these are the services which make it possible to administer the servers (SSH, RDP, Telnet, FTP), the databases (MySQL, MSSQL, MongoDB, Elasticsearch) and generally all services that are out of the ordinary. He logs services that should not be exposed on the Internet (attack surface reduction), and uses common attack techniques on these services: password <strong>bruteforce<\/strong>, <strong>default accounts<\/strong>, anonymous authentication and other specific techniques to the services audited. He also uses the emails and passwords of employees discovered during the passive phase in order to eliminate potential <strong>password spraying<\/strong>.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">Apart from information leaks in the banners of the services, he does not discover any notable flaws.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">He therefore decides to attack the exposed websites and HTTP services. Jean spends time on the company\u2019s main and e-commerce web sites and raises some significant impact vulnerabilities: possibility of <strong>recovering a customer database on a support website<\/strong>, vulnerabilities in the code of the main web site which allow<strong>attacking visitors by redirecting them to the competitor\u2019s site<\/strong>. These are interesting feedbacks for the customer and his teams, but above all Jean seeks <strong>to break into the company&#8217;s network<\/strong>. So far the vulnerabilities discovered do not allow him to take control of a server, let alone compromise the client&#8217;s network.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">\ud83c\udfaf A few hours later, he arrives at a server that seems to have been brought online to test a ticketing solution but has been forgotten. Being exposed on a non-standard port, the ticketing website certainly escaped indexing by search engines and automated hacker scans. The software is <strong>several versions behind<\/strong> and a critical exploit has been released: an administrator user can <strong>execute system commands on the server<\/strong>. Jean tests the solution&#8217;s default administration account (admin\/admin) and manages to connect&#8230; classic!<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">The exploit allows him to take control of the server. Since the server is not in DMZ in the client&#8217;s network, Jean finds himself directly in the internal network. A phone call to the customer validates the possibility of continuing in the internal network. Using his favorite <strong>pivot technique<\/strong>, he <em>proxifies<\/em> all its tools in the internal network. Although he is at the other end of the internet, he is now in the same conditions as an internal pentest!<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">A few minutes later, <strong>Jean owns the entity&#8217;s Information System<\/strong>. A real-world attacker could then deploy a <em>ransomware<\/em>. <strong>He immediately informs the client<\/strong> and his teams of this critical vulnerability so that they can react.<\/p>\n<p style=\"text-align: justify;\">At the end of his mission, Jean calls the client one last time in order to summarize the results of the mission and give him a first vision of the remediations to be carried out.<\/p>\n<p class=\"LC20lb MBeuO DKV0Md\" style=\"text-align: justify;\">\ud83d\udcda The next day he completes his audit report and sends it to one of his colleagues for <strong>proofreading and validation<\/strong>.<\/p>\n<p style=\"text-align: justify;\">He then sends the report to the client in a <strong>secure manner<\/strong> and exchanges with the teams and management on the results of the internal pentest and the action plan thanks to the <strong>restitution by videoconference<\/strong>.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.23.2&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p style=\"text-align: justify;\"><span>\ud83d\udee1\ufe0f DSecBypass accompanies you on your <a href=\"https:\/\/www.dsecbypass.com\/en\/external-pentest\/\">external pentests<\/a>, with quality services and significant experience on this type of service. Do not hesitate to <a href=\"https:\/\/www.dsecbypass.com\/en\/contact\/\">contact <\/a>us for additional information and\/or a personalized quote \ud83d\udcdd.<\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_button button_url=&#8221;https:\/\/www.dsecbypass.com\/en\/contact\/&#8221; button_text=&#8221;CONTACT US&#8221; button_alignment=&#8221;center&#8221; _builder_version=&#8221;4.17.4&#8243; _module_preset=&#8221;default&#8221; custom_button=&#8221;on&#8221; button_text_size=&#8221;13px&#8221; button_bg_color=&#8221;#4328b7&#8243; button_border_width=&#8221;10px&#8221; button_border_color=&#8221;#4328b7&#8243; button_border_radius=&#8221;0px&#8221; button_letter_spacing=&#8221;2px&#8221; button_font=&#8221;Titillium Web|700||on|||||&#8221; background_layout=&#8221;dark&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_button][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.17.3&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pentest stories This series of articles makes you follow Jean, an imaginary pentester, in his missions of intrusion tests. Clients and exploit stories are just as imaginary, but correspond to reality and are based on the experiences of DSecBypass experts. It aims to popularize and ease the understanding of the different pentest offers. &nbsp;External pentest [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1724,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[34],"tags":[],"class_list":["post-1796","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en"],"_links":{"self":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/1796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/comments?post=1796"}],"version-history":[{"count":23,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/1796\/revisions"}],"predecessor-version":[{"id":3275,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/posts\/1796\/revisions\/3275"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/media\/1724"}],"wp:attachment":[{"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/media?parent=1796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/categories?post=1796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dsecbypass.com\/en\/wp-json\/wp\/v2\/tags?post=1796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}