<?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 Nullwhire on Medium]]></title>
        <description><![CDATA[Stories by Nullwhire on Medium]]></description>
        <link>https://medium.com/@Nullwhire?source=rss-d0dc3943ad2a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*odh9dAPcjRuefFhvcVYTJA.jpeg</url>
            <title>Stories by Nullwhire on Medium</title>
            <link>https://medium.com/@Nullwhire?source=rss-d0dc3943ad2a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:26:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Nullwhire/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[Spymax Telegram RAT — Letsdefend]]></title>
            <link>https://medium.com/@Nullwhire/spymax-telegram-rat-letsdefend-c8cc22ca194c?source=rss-d0dc3943ad2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8cc22ca194c</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[lets-defend]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Nullwhire]]></dc:creator>
            <pubDate>Mon, 26 May 2025 23:48:59 GMT</pubDate>
            <atom:updated>2025-05-27T12:14:30.748Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spymax Telegram RAT — Letsdefend</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GWtL0B1rUZGp_zNqdpQIoA.jpeg" /></figure><p>Scenario:</p><p><em>A victim attempted to download the Telegram app on their Android device but, instead of using the official Google Play Store, they accessed a suspicious website offering a “faster” download. They installed a malicious APK disguised as Telegram, leading to a potential compromise. Please investigate the APK to uncover key details about the attack.</em></p><blockquote>Questions:<br>Q1:. What is the SHA-1 hash of the malicious APK file?<br>Q2:.What type of attack did the victim fall for?<br>Q3:.What is the malicious domain associated with this attack?<br>Q4:.What is the full download URL of the malicious APK?<br>Q5:.What is the IP address and port of the Command and Control (C2) server used by the malicious app?<br>Q6:.What is the name of the function responsible for compressing data in the malicious APK?<br>Q7:.What phone number did the attacker dial?<br>Q8:.What is the decryption key that was left by the attacker?<br>Q9:.To which location or service does the dialed number belong?<br>Q10:.When was the last time the malicious APK was active?</blockquote><p>To begin this challenge, we must assemble the image using the FTK Imager to obtain the Android device’s file system, which was previously collected for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*gfWnGcHvW7ALzTJ64yHBRw.png" /><figcaption>FTK Imager</figcaption></figure><blockquote><strong>Q1:. What is the SHA-1 hash of the malicious APK file?</strong></blockquote><p>To obtain the desired hash for this question, we first need to understand where the downloaded APK file is stored.<br>First, I recommend checking out this <a href="https://app.letsdefend.io/training/lesson_detail/android-file-system">learning path </a>on the Android Forensics platform to identify the file system structure.</p><p>You can usually find the APK file in the following location:</p><pre>storage/sdcard/Download</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*hdqihmuSeah3J7bH-AfElw.png" /></figure><p><em>SHA1 — a192df3e1ee4f74d4078180a465ebc157bbd886b</em></p><blockquote>Q2:.What type of attack did the victim fall for?</blockquote><p>Using the previously found hash, we can check VirusTotal’s reputation and family labels to identify the type of attack used on this user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3jgSRtA91tDCd2DEjrdF3Q.png" /><figcaption><a href="https://www.virustotal.com/gui/file/aae2888651427afa4409ce9a7e0bb3912a59b8f73e103429a9d808fde135b27c">https://www.virustotal.com/gui/file/aae2888651427afa4409ce9a7e0bb3912a59b8f73e103429a9d808fde135b27c</a></figcaption></figure><p>Now that we know the categorization of our APK, we can use this information to identify something related to this type of RAT.<br>I found a report showing a case similar to the one we’re analyzing and identifying the phishing technique used to distribute these RATs.<br>You can view the report <a href="https://labs.k7computing.com/index.php/spymax-an-android-rat-targets-telegram-users/">here</a>!</p><pre>Phishing</pre><blockquote>Q3:.What is the malicious domain associated with this attack?</blockquote><p>Next, in the FTK Imager tool, identify the file path where the URL history is stored. To help with this and subsequent questions, I recommend reviewing the learning path on the platform.<br>Based on this knowledge, we know that the DB containing our answer is located at:</p><pre>/data/data/com.android.providers.downloads/databases/downloads.sb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVCeIbi5qsnT4Uzr1-EkUA.png" /></figure><p>The next step is to analyze this file using the DB Browser for SQLite tool after exporting the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C93PbIA91QAvlfRYqH6Stw.png" /></figure><pre>piay[.]google.com - domain </pre><blockquote>Q4:.What is the full download URL of the malicious APK?</blockquote><p>We already have the information about the URL used to download the malicious APK in the same window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIG3R_YVOMTT5PxSYi72Cw.png" /></figure><pre>defang URL -hxxp[://]www[.]piay[.]google[.]com/store/apps/details%3fid=org[.]telegram[.]messenger/Telegram[.]apk</pre><blockquote>Q5:.What is the IP address and port of the Command and Control (C2) server used by the malicious app?</blockquote><p>We previously exported the malicious APK and now need to decompile it to check its structure.<br>For this, we’ll use the Jadx-GUI tool, which decompiles Dex to Java. <a href="https://github.com/skylot/jadx">Check it out here!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4VwQUDlWN8ANR4sZYgymA.png" /><figcaption>APK Structure</figcaption></figure><p>At this stage, I used the strings.xml file to check which strings were in the APK. In this file, we found the IP address used as the C2 and the port used for communication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFrtaah0VjxSmSOGTn1x1A.png" /></figure><pre>192.168.245[.]130:7771</pre><blockquote>Q6:.What is the name of the function responsible for compressing data in the malicious APK?</blockquote><p>By checking the code and its functions, we can identify the imports used by the APK in the function GZIP import.<br>GZIP is a file format and software application used for file compression and decompression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dNV1hRgVlTtrWppAZVnlnw.png" /><figcaption>GZIPInput..//GZIPOutput</figcaption></figure><p>If you can identify this import, simply search the rest of the code for the string ‘OutputStream’.<br>This is how we identified the function that was responsible for compressing the data in the malicious APK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVec-WJHK-f2T8D62ei63w.png" /><figcaption>cZp Function</figcaption></figure><pre>cZp</pre><blockquote>Q7:.What phone number did the attacker dial?</blockquote><p>Once again, we will need to identify the part of the Android structure responsible for storing contact information and call logs.<br>Export the ‘contacts2.db’ file and reanalyse it in ‘DB Browser for SQLite’.</p><pre>Path: /data/data/com.android.providers.contacts/databases</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLKxY2oMsEwRd3Kck5v_UA.png" /></figure><p>At this stage, we can open our contacts database and go through its tables to find one called “Calls”.<br>Expanding this table reveals the ‘attacker’s’ contact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IezqulIJCTvo6w9vfV0OFw.png" /></figure><pre>09436521458754</pre><blockquote>Q8:.What is the decryption key that was left by the attacker?</blockquote><p>Our next step is to identify the decryption key sent to our affected user.<br>After conducting some research on Google and consulting the material on the platform, I managed to determine the location where Android MMS/SMS messages are stored.</p><pre>path: /data/data/com.android.providers.telephony/databases</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OrsVvv9ErM03Xsqbc-OCAg.png" /><figcaption>mmsms.db</figcaption></figure><p>If we export the file and use the answer to the previous question, we’ll be able to identify which SMS/MMS was sent.<br>We can use the SMS table to identify its contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_TttagsZosnHgbKUY-uyg.png" /><figcaption>SMS Body : “Urer vf gur qrpelcgvba xrl: mPyQd9sr0nlgXssda648Y0ZyAwbmxTCp Nccyl vg vzzrqvngryl gb npprff gur svyrf. Pbasvez bapr vg’f qbar.”</figcaption></figure><blockquote>Body to SMS:<br>Urer vf gur qrpelcgvba xrl: mPyQd9sr0nlgXssda648Y0ZyAwbmxTCpNccyl vg vzzrqvngryl gb npprff gur svyrf. Pbasvez bapr vg’f qbar.</blockquote><p><strong>This SMS was encrypted using the ROT13 method.<br>Using CyberChef to decrypt the SMS gives the final result.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PF1bLKh1Rs1I8pwavIbGsw.png" /></figure><pre>KEY:zClDq9fe0aytKffqn648L0MlNjozkGPc</pre><blockquote>Q9:.To which location or service does the dialed number belong?</blockquote><p>Simply enter the area code of our Q7 number into Google to find the result you’re looking for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*WRR3gxXuyzE1A1OwRG7mIg.png" /></figure><pre>sri lanka</pre><blockquote>Q10:.When was the last time the malicious APK was active?</blockquote><p>In the final stage of analysing this APK and concluding our investigation, we need to establish when the malicious APK was last active.<br>I had to turn to our friend ChatGPT for help with this. It identified the following path as being responsible for storing the information we want.</p><pre>PATH: /data/system/usage_status.db</pre><p>I couldn’t find an identical path, but we do have a corresponding one:<br>PATH: /data/system/usagestats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWLfNSF6PVwscq67FOd63A.png" /></figure><p>We can see that there are several folders containing activity logs.<br>After analysing each one, we identified the package we were looking for as “helloimx”, which was referenced in the source code when we approached Q6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g90LD0fxutGdqV8u5qsM8w.png" /></figure><pre>17355124949</pre><h3>Final Considerations</h3><h4>🛡️ <strong>How to protect yourself from phishing:</strong></h4><ul><li><em>Be wary of suspicious emails and messages. Check who the email is from and avoid clicking on dubious links.</em></li><li><em>Never give out personal data. Never enter passwords, social security numbers or bank details on websites accessed via unknown links.</em></li><li>️<em>Check the website address. Scammers use URLs that look legitimate (e.g. g00gle.com).</em></li><li><em>️Use two-factor authentication (2FA). This will protect your accounts even if your password is stolen.</em></li></ul><h4>🛡️<strong>How to avoid malicious APKs, such as RATs:</strong></h4><ul><li><em>Only install apps from the Play Store. Avoid downloading APKs from third-party sites.</em></li><li><em>Disable ‘unknown sources’: This will prevent you from accidentally installing apps outside of the official store.</em></li><li><em>Check app permissions. If an app requests unnecessary access (e.g. to the camera or microphone), proceed with caution.</em></li><li><em>Install antivirus and security apps to help detect suspicious behaviour.</em></li></ul><p><em>Thank you for reading my post, I hope I was able to help resolve this challenge.</em></p><p>Greetings and success</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8cc22ca194c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOC Home Lab — 30 Day SOC Analyst Challenge]]></title>
            <link>https://medium.com/@Nullwhire/soc-home-lab-30-day-soc-analyst-challenge-128d2285a4b6?source=rss-d0dc3943ad2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/128d2285a4b6</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Nullwhire]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 01:23:19 GMT</pubDate>
            <atom:updated>2024-09-30T16:51:25.614Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOC Home Lab — 30 Day SOC Analyst Challenge</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*jxr1kpL_6UsFzj-LLL8vHg.png" /></figure><p>This project is based on a challenge to set up a SOC Environment, a challenge launched by MYDFIR.</p><p>Credits:</p><p><a href="https://www.mydfir.com/">https://www.mydfir.com/</a></p><p><a href="https://www.youtube.com/@MyDFIR">MyDFIR</a></p><p>Resume:</p><p>In this Project we aim to set up a SOC (Security Operations Center) environment, in which the entire virtual environment is set up using VULTR. The objective is to analyze in detail/build a logical architecture of the configuration, exploring and understanding the function of each component within this framework.</p><p>This experience not only managed to expand my technical knowledge, but also improve my knowledge and ability to manage and protect virtual environments effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*wKPVUjzPHaCN-ykjjMnvGw.png" /><figcaption>Logical Diagram</figcaption></figure><p>Explanation of each component of the logical diagram of the SOC environment.</p><h4>VULTR environment (https://www.vultr.com/)</h4><ul><li>At the center of this diagram or structure, we have the VULTR Virtual Private Cloud (VPC) environment, the isolated network within VULTR ensures that we have a secure and controlled environment for the crucial operations of the SOC.</li></ul><p>The private network has the following configuration:</p><blockquote>IP Range: 172.31.0.0/24</blockquote><blockquote>SubNet Mask: 255.255.255.0</blockquote><h4>Elastic e Kibana (ELK) (https://www.elastic.co/pt/elastic-stack)</h4><ul><li>The tools provided by <strong>ELK </strong>will be our <strong>SIEM </strong>for centralized log management and data visualization.</li><li>The various server logs within our <strong>VULTR </strong>environment are forwarded to Elastic through agents previously installed in our infrastructure. The analysis of these logs is carried out through Kibana, which helps to detect and investigate possible security incidents.</li></ul><h4>Server Fleet (https://www.elastic.co/guide/en/fleet/current/fleet-server.html)</h4><ul><li>The Fleet server in the diagram acts as a management center for the deployment and administration of agents on different hosts. This agent’s function is to collect logs and all important data from our Windows and Ubuntu servers, which subsequently forward this information to Elastic</li><li>This management of Fleet servers simplifies the management and installation of agents, ensuring that all servers in our environment are constantly monitored and that the logs generated by them are correctly forwarded to Elastic</li></ul><h4>Server Windows (RDP Allowed)</h4><ul><li>This server with RDP, available without restrictions, makes it possible to administer and monitor remotely, and can perform various functions such as monitoring possible security threats, implementing and managing other tools for testing our SOC environment.</li></ul><h4>Server Ubuntu (SSH Allowed)</h4><ul><li>Active SSH service on this server provides secure access when finished, this same host can perform several functions, such as executing log collection scripts, hosting new security tools or even another asset for monitoring in the SOC environment.</li></ul><h4>Server osTicket (https://osticket.com/)</h4><ul><li>The osTicket system is an open-source ticket management solution. In this configuration, osticket was integrated with Elastic and Kibana to process alerts generated by the security monitoring rules created. Transforming these alerts into tickets, thus allowing the SOC analyst a more organized vision and management for incident response. The system ensures that each event generated is detected from Elastic, is formally registered, categorized and associated with the team member working on resolving it.</li></ul><h4>External Equipaments</h4><h4>Analyst Machine</h4><ul><li>Represents a workstation that is used by the analyst to perform his or her role.</li></ul><h4>Attack Machine (Kali Linux)</h4><ul><li>In this environment, this machine can be the workstation of a member of the RED team that is used to simulate attacks on our environment in VULTR, with the purpose of testing the defenses of the SOC environment, verifying possible vulnerabilities and evaluating the SOC’s ability to detect and respond. to the different scenarios present in everyday life.</li></ul><h4>Server C2 (Mythic)</h4><ul><li>Mythic is an open-source Command and control (C2) framework used in adversary simulations.</li></ul><p>The C2 server presented in the initial diagram was used to control an Endpoint that was compromised during the testing of the attacking machine (Red Team) controlling the attack chain. It allows the attacker to insert malicious payloads, execute commands and exfiltrate data from the compromised machine, thus simulating a real threat. This configuration allows the SOC team (BLUE TEAM) to improve the entire security incident investigation methodology.</p><h4>Overview</h4><ul><li>Data flow and interaction:</li><li>Fleet servers perform the administration and installation of agents on Windows and Linux hosts, forwarding logs to Elastic;</li><li>The Analyst monitors/analyzes the logs generated via the Kibana GUI, thus responding to any detected incident;</li><li>Alerts generated from Elastic Logs, all management and categorization is centered on osTicket;</li><li>The attacking machine (REDTEAM/Kali Linux) and the C2 server (Mythic) are responsible for simulating attack scenarios;</li></ul><p>This architecture provides a complete configuration of a SOC environment, bringing together several components and tools to have a solid environment for monitoring and responding to security incidents. Demonstrating a balanced strategy for managing, monitoring and protecting an IT infrastructure, while simultaneously preparing to respond to potential security threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cqtv0afglb0yMsShQ5HbMg.png" /><figcaption>RDP BruteForce Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPdBnjqyxOYeKNrBr2xUVA.png" /><figcaption>SSH BruteForce Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SqGJwQK1SXXGnik87M2c2w.png" /><figcaption>Dashboard_Suspicious_Activity</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrGNuPZ-8nKS6LNYWQj4XA.png" /><figcaption>Alerts Elastic</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wlO8XDbgWn7dWc2euAjs8w.png" /><figcaption>osTicket</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2InLUyuDZnO8Qhw6Tc5Buw.png" /><figcaption>Mythic</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*oAt3rjWNQiJdfixiO9o_cQ.png" /><figcaption>Brute Force</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X3IZmhpvHS5QYJimwdSX7A.png" /><figcaption>Attack Diagram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJejSu9d3WIljo2jNdZNwQ.png" /><figcaption>Fleet Server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZH_3Z2t_NAh935OrYbgKkQ.png" /><figcaption>EDR</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=128d2285a4b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOC140 — Phishing Mail Detected — Suspicious Task Scheduler]]></title>
            <link>https://medium.com/@Nullwhire/soc140-phishing-mail-detected-suspicious-task-scheduler-059523e716ce?source=rss-d0dc3943ad2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/059523e716ce</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[pishing]]></category>
            <category><![CDATA[letsdefendio]]></category>
            <category><![CDATA[sandbox]]></category>
            <dc:creator><![CDATA[Nullwhire]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 16:47:45 GMT</pubDate>
            <atom:updated>2024-08-25T00:42:03.597Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOC140 — Phishing Mail Detected — Suspicious Task Scheduler</h3><figure><img alt="https://app.letsdefend.io/monitoring?channel=investigation&amp;event_id=82" src="https://cdn-images-1.medium.com/max/681/0*P-Sy1YCPsT9josMw.png" /><figcaption><a href="https://app.letsdefend.io/monitoring?channel=investigation&amp;event_id=82">https://app.letsdefend.io/monitoring?channel=investigation&amp;event_id=82</a></figcaption></figure><p>In this walkthrough we will analyze an indecent that we received in our <strong>SIEM</strong>.<br>As a <strong>SOC analyst</strong>, we received an incident regarding a possible malicious phishing email or malware attached, <strong>let’s investigate!</strong><br>The <strong>first steps</strong> are to collect all the information that makes it possible to analyze the incident as accurately as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0MrY--FqaWgnyPL4_-wAg.png" /><figcaption><strong>Incident Under Analysis</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIEDusem5-cHWGohfAJh4Q.png" /><figcaption><strong>Details</strong></figcaption></figure><h4>First step DATA COLLECTION for analysis</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*uEu0jMZhIDoIthE0OFg__Q.png" /><figcaption><strong>Important info we need to analyse the incident</strong></figcaption></figure><p>We will collect the information for analysis, so we return to our alert and look for the sender/recipient or subject, on our email platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtsGiP_DysiqWkO9pM3aFg.png" /><figcaption><strong>Collected info for our questions</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pp4M_7qBIMToW3pL-YqaUg.png" /><figcaption><strong>(</strong><a href="https://app.letsdefend.io/email-security"><strong>https://app.letsdefend.io/email-security</strong></a><strong>)</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PCc5eg7xtZ9GAD-QbFTciQ.png" /><figcaption><strong>email content</strong></figcaption></figure><p>In this step we were able to obtain as much information as possible to answer our questions.</p><blockquote><strong>When was it sent?</strong><br> <strong>R:.</strong>Mar, 21, 2021, 12:26 PM<br> <strong>What is the sender address?</strong><br> <strong>R:.</strong>aaronluo@cmail[.]carleton[.]ca<br> <strong>What is the recipient address?</strong><br> <strong>R:.</strong>mark@letsdefend[.]io<br> <strong>Is the mail content suspicious?</strong><br> <strong>R:.</strong>YES <br> <strong>Are there any attachment?</strong><br> <strong>R:.</strong>YES</blockquote><h3>Analysis email and content</h3><p>When opening the email we see that it contains an attached file and the content of the email also indicates that we have to open the attachment immediately, as if it were an obligation :)<br><strong><em>[Hey, you read breaking news about Covid-19. **Open now!**]</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJvPit7vsVQDp7ORjjMaKg.png" /><figcaption>Email Content</figcaption></figure><p>Let’s consider that we have a suspicious email due to its content and the unknown sender.<br>We then need to know what we have in this attachment and confirm that the user did not open the attachment or email on their machine.</p><p>Since in the email we do not have the <strong>ACTION field</strong> without indicating whether it was opened or not, because if it had been opened and allowed, this action field had the value <strong><em>Action:Allowed</em></strong><br>In the case of an email opened by the user but its content has been blocked by the anti-spam tool, it would have the value of <strong><em>Action:Blocked</em></strong></p><p>But even so, we will analyze our logs and try to identify if there is any communication with the collected IOCs.</p><h4><strong>Analyze logs and attachment content</strong></h4><p>Let’s use a sandbox to analyze the file, in this case I use <strong>anyrun</strong>. We have other options (<strong>joesandbox</strong>, <strong>Hybrid Analysis</strong>).<br><strong>Never open these files made available for learning on your own machines, always use an online sandbox or a VM prepared and isolated from the network to carry out malware analysis.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAV7h9_d3S4QEXKNFkTSZA.png" /><figcaption><a href="https://app.any.run/tasks/72c238b4-13ab-4b6e-b370-5bb97fd9dbb7">https://app.any.run/tasks/72c238b4-13ab-4b6e-b370-5bb97fd9dbb7</a></figcaption></figure><p>When we run the file, we verify that its content is unreadable and also when clicked it will open a URL.<br>However, this URL is unavailable, in its content we see that it was closed due to possible <strong>CSAM </strong>content. (<a href="https://www.thorn.org/research/child-sexual-abuse-material-csam/">https://www.thorn.org/research/child-sexual-abuse-material-csam/</a>)</p><blockquote>Other Sandbox analysis: <a href="https://www.joesandbox.com/analysis/1498391/0/html">https://www.joesandbox.com/analysis/1498391/0/html</a></blockquote><p>By analyzing these 2 sandboxes, we were able to realize that we are facing a malicious file.</p><p>With the previous analysis, it is already possible to verify that we are facing a malicious PDF file, which may have obfuscated malicious code.<br>That we could escalate to our L2 team if the same file had been opened on the user’s machine and so the team could carry out a deeper analysis than what is in this pdf and possible machine logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfALGuk371Jc9OzJWlaaVA.png" /><figcaption>Network log</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*s27NVHm96sKrTkbNkaL0HA.png" /><figcaption>RAW</figcaption></figure><p>From the logs we only verified communication with the exchange server with the ip src (189[.]162[.]189[.]159), which, based on analysis using cisco talos, is considered malicious/suspicious.</p><blockquote><a href="https://www.talosintelligence.com/reputation_center/lookup?search=189.162.189.159">https://www.talosintelligence.com/reputation_center/lookup?search=189.162.189.159</a></blockquote><p>We therefore consider that there is no communication with the url or IP of our “attacker”, in addition to our email server</p><p>Having completed our analysis, we will proceed with closing the incident and its playbook.</p><h3>Playbook</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIEDusem5-cHWGohfAJh4Q.png" /><figcaption>Start PLaybook Now!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*jZPc9kGvhIFLrWrbNW7AHw.png" /><figcaption>Correct option is “yes”, with we have a attach file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*NNPdxIMxGiE1RFeAC2U6Cw.png" /><figcaption>Correct option is “Malicious”, with analysis mentioned above</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oIPOaEZ8EccyR-j3yk7bqw.png" /><figcaption>Not delivery because we have the Action:Action , and we only have indication of communication with the exchange server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*RAVRCiWCS3qtEYXL8APVCA.png" /><figcaption>Previously collected artifacts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*P4wlmc9voJ8wVdi8TkWx0A.png" /><figcaption>We can add a brief note of the entire analysis</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*J93g5OVg7BzaHU9BHAYSCQ.png" /><figcaption>Finish and Go close incident</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*NIFdP6nmRfLE17YQ0dHMvg.png" /></figure><p>With all our previous analysis we can conclude that despite the email not being opened, we are facing a positive case.</p><p><strong>Recommendations:<br></strong>We must educate users about this type of emails with suspicious content, in which we provide small information on how they can identify in the future whether they are facing a malicious email or a phishing attempt.</p><ol><li><strong>Explain what phishing is Definition</strong>: Phishing is a fraud technique in which cybercriminals attempt to trick people into revealing personal information, such as passwords and financial data, by posing as trusted entities.<br><strong>Common examples:</strong> Emails that appear to be from banks, email services, social networks or even co-workers.</li><li><strong>Teach how to identify signs of phishing Suspicious sender</strong>: Check the sender’s email address. Cybercriminals often use addresses that mimic real ones, but have slight variations.<br><strong>Fake urgency:</strong> Emails that demand immediate action (“Urgent!”, “Your account will be blocked!”) could be phishing attempts.<br><strong>Misleading links:</strong> Hover over links to see the real URL. If the link looks strange or doesn’t match the official website, don’t click.<br><strong>Grammatical errors:</strong> Many phishing emails contain spelling or grammar errors, which can be a warning sign.<br><strong>Unexpected attachments</strong>: Avoid opening unsolicited email attachments as they may contain malware.</li><li><strong>Simulate phishing attacks Simulation campaigns</strong>: Conduct tests with fake phishing emails to see how users react. Then, offer feedback on what went right and what could be improved.</li><li><strong>Educate on what to do if you suspect phishing Don’t click on links or open attachments</strong>: If an email looks suspicious, don’t interact with it.<br><strong>Report the email:</strong> Teach users how to report phishing emails to IT or use reporting tools built into their email provider.<br><strong>Check directly with the source</strong>: If the email appears to be from a legitimate institution, contact the institution directly to verify the authenticity of the message.</li></ol><p>Thank you for reading my post, I hope I was able to help resolve this incident.</p><p>Greetings and success</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=059523e716ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Malicious Web Traffic Analysis — Challenge]]></title>
            <link>https://medium.com/@Nullwhire/malicious-web-traffic-analysis-challenge-15b91e8e9137?source=rss-d0dc3943ad2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/15b91e8e9137</guid>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[soc]]></category>
            <dc:creator><![CDATA[Nullwhire]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 23:48:14 GMT</pubDate>
            <atom:updated>2024-08-08T23:09:42.872Z</atom:updated>
            <content:encoded><![CDATA[<h3>Malicious Web Traffic Analysis — Challenge</h3><p>In this writeup we will be analyzin a pcap file to determine if we have a malicious traffic or not and claim all details for erradicate and protect the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQY468esV05uEjP53dxlcQ.png" /><figcaption><a href="https://app.letsdefend.io/challenge/malicious-web-traffic-analysis">https://app.letsdefend.io/challenge/malicious-web-traffic-analysis</a></figcaption></figure><blockquote><strong>In this challenge we need to respond a 9 question:</strong><br><em>1 — What is the IP address of the web server?<br>2 — What is the IP address of the attacker?<br>3 — The attacker first tried to sign up on the website, however, he found a vulnerability that he could read the source code with. What is the name of the vulnerability?<br>4 — There was a note in the source code, what is it?<br>5 — After exploiting the previous vulnerability, the attacker got a hint about a possible username. What is the username that the attacker found?<br>6 — The attacker tried to brute-force the password of the possible username that he found. What is the password of that user?<br>7 — Once the attacker gained admin access, they exploited another vulnerability that led the attacker to read internal files that were located on the server. What payload did the attacker use?<br>8 — The attacker was able to view all the users on the server. What is the last user that was created on the server?<br>9 — The attacker also found an open redirect vulnerability. What is the URL the attacker tested the exploit with?</em></blockquote><p>let’s do this !!!</p><blockquote><strong>Question 1 →What is the IP address of the web server?</strong></blockquote><p>We can obtain the answer to this question in two ways, by analyzing conversations in Wireshark or using the Networkminer application</p><h4><em>Wireshark</em></h4><p>Statistics →Conversations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0cKOIGZ8AsmCULQUJMyPKQ.png" /></figure><h4><strong><em>NetworkMiner</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HOmfUR4zpg7YP2ivWiJcCg.png" /></figure><p>We were able to identify that our webserver is hosted on IP <strong>10.1.0.4</strong>, as we can see in the “Host Details” we have an indication of the Apache server hosted.</p><p>Based on these details we found the answer to our first question!!</p><blockquote><strong>Question 2 →What is the IP address of the attacker?</strong></blockquote><p>We can continue in the same <strong>wireshark </strong>window (<em>Statistics →Conversations</em>) and check which IP we had the most “volume” of communication.<br> ex:.<em>number of packets, size bytes used in the conversation.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPSWZXhmM1a7WD1jjdIflw.png" /></figure><p>In this case, the <strong>IP </strong>that has the “highest” traffic volume is <strong>197[.]32.212.121</strong>, and we already have the answer to our second question.</p><blockquote>IP reputation → <a href="https://www.talosintelligence.com/reputation_center/lookup?search=197.32.212.121">https://www.talosintelligence.com/reputation_center/lookup?search=197.32.212.121</a></blockquote><blockquote><strong>Question 3 → <em>The attacker first tried to sign up on the website, however, he found a vulnerability that he could read the source code with. What is the name of the vulnerability?</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_TVw89oWKnj3HtPCQ6A7fA.png" /></figure><p>To get the answer to this question we will need to analyze the request methods.<br><strong><em>http.request.method == “POST”</em></strong> with this filter in wireshark we were able to identify that there are web pages (<strong><em>/login.php;/register.php</em></strong>), since we are looking for the initial moment that our attacker tries to execute first, which was register.<br>The file that will interest us or the packet that we will have to analyze the conversation/stream is “<strong><em>register.php</em></strong>”.</p><p>Let’s use the filter <strong><em>[http.request.method == “POST” and the frame contains “/register.php” ]</em></strong> to filter only what we want to see and clean up the visual “garbage”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5KCC3LbTCVTMT9kyO5C6Q.png" /></figure><h4>Let’s check the content!!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rv8nwqvupUeXilOP0W8JLw.png" /><figcaption>By checking the content in the http stream we can identify that we have an attempt to inject an XML file.<br>In which we have reference “<strong>!ENTITY xxe SYSTEM</strong>”</figcaption></figure><h4>What is XML external entity injection?</h4><p>XML external entity injection (also known as XXE) is a web security vulnerability that allows an attacker to interfere with an application’s processing of XML data. It often allows an attacker to view files on the application server filesystem, and to interact with any back-end or external systems that the application itself can access.</p><p>In some situations, an attacker can escalate an XXE attack to compromise the underlying server or other back-end infrastructure, by leveraging the XXE vulnerability to perform server-side request forgery (SSRF) attacks.</p><p><a href="https://portswigger.net/web-security/xxe">https://portswigger.net/web-security/xxe</a></p><p>With these details we were able to identify our response to the exploited vulnerability</p><blockquote><strong>Question 4 →There was a note in the source code, what is it?</strong></blockquote><p>Using the same packet and the content of the http stream, we verify that there is something encoded in base64..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TcmNdQ2eESgzbhWnxZqrg.png" /><figcaption>Using the cyberchef tool to decode our code, we get the following result.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qo6b3TVdtnboJEll7w123g.png" /></figure><p>We were able to identify the response we want, which is the <strong>note </strong>displayed in the malicious request.</p><blockquote><strong><em>Question 5 → After exploiting the previous vulnerability, the attacker got a hint about a possible username. What is the username that the attacker found?</em></strong></blockquote><p>To be able to identify the username to which our attacker tried to brute force, we have the option of using the same filter as in the previous question and checking the other packets and verifying that in the content of <strong>packet n.4223</strong> the attacker receives the indication that the email “<strong>admin@gmail[.]com</strong>” is already registered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctODtZ3Rzm6DIcw-ui9wkA.png" /></figure><p>Another <strong>option </strong>to reach the user who was <strong>brute-forced</strong> is using the <strong>Networkminer tool </strong>and check the <strong>Username </strong>with the most <em>login attempts</em> with different passwords in the “Credentials” tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RR2K9tWRvHfLpWGARbWU5w.png" /></figure><blockquote><strong><em>Question 6 → The attacker tried to brute-force the password of the possible username that he found. What is the password of that user?</em></strong></blockquote><p>To be able to answer which password is valid for the user “admin”, we will use the following filter<br><strong><em>[http.request.method == “POST” and frame contain “login”]</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ImteeeFzab4dNqWSkoDdZQ.png" /></figure><p>With the indicated filter we will be able to obtain all brute force attempts, in which if <strong><em>we analyze the HTTP stream of the last packet</em></strong>, we will verify that the brute force was successful on the <strong><em>password {fernando}</em></strong>.<br>Because in the request we check the response 302 The POST method submits our details as this is a login form and hence why the credentials are details in this field. The server response code is 302 — the HTTP 302 Found redirect status response code indicates that the resource requested has been temporarily moved to the URL given by the Location header. A browser redirects to said page. This is another indicator that there is a redirect being performed by the web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MBZwwrtOw_7j9-Im3Ccq5w.png" /></figure><blockquote><strong><em>Question 7 → Once the attacker gained admin access, they exploited another vulnerability that led the attacker to read internal files that were located on the server. What payload did the attacker use?</em></strong></blockquote><p>To get the details for this question we can go back to question 3 and check what our XXE vulnerability exploits.<br>Or use a wireshark filter to try to identify something suspicious.<br>Let’s analyze both methods.</p><h4>Wireshark</h4><p>With the following filter [http.request.method == “GET” and ip.src == 197.32.212.121]<br>We will be able to obtain all the requests that the attacking IP tried to extract from our webserver using the “get” method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Idck5j81lImtGfjsydpWuA.png" /><figcaption><strong>We verified that the content of packet no.17189 is suspicious, let’s analyze the content!!</strong></figcaption></figure><p>In the packet header we see that we have a data extraction but it needs to be decoded to be able to know the correct path.<br>Using cyberchef again, we will decode our request :</p><pre>(GET /dashboard/view.php?file=..%2F..%2F..%2F..%2F..%2F..%2F..%2F . .%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fpasswd HTTP/1.1)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mh8shId5Qw_kXXsfIvgPRA.png" /><figcaption>Outpu: GET /dashboard/view.php?file=../../../../../../../../../../../../../../../etc/passwd HTTP/1.1</figcaption></figure><p>In a typical Unix-like system, user information is stored in the /etc/passwd file, but details about when users were created are not stored there. However, the /etc/shadow file contains hashed passwords and timestamps for password changes, which might indirectly provide some insights and comparing with the aim of exploiting our vulnerability, we managed to get the answer to our question</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*l89jgYA2G_f95rEJRXZ8RA.png" /><figcaption><a href="https://portswigger.net/web-security/xxe">https://portswigger.net/web-security/xxe</a></figcaption></figure><blockquote><strong><em>Question 8 → The attacker was able to view all the users on the server. What is the last user that was created on the server?</em></strong></blockquote><p>Using again the http content that we used in the previous question, at the end the content contained in the /etc/passwd file is presented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5HCHiEIQUNLVqhkjL5zfUw.png" /></figure><p>Knowing The format of each line in the <strong><em>/etc/passwd</em></strong> file is as follows:</p><pre>{username:password:UID:GID:GECOS:home_directory:shell}</pre><p>The <strong>UID</strong> (<strong><em>User ID</em></strong>) can help us determine the order of user creation since they are typically assigned incrementally. In our file, the last entry is:</p><pre>{a1l4mFTW:x:1001:1001::/home/a1l4mFTW:/bin/bash}</pre><p>This indicates that user <strong>a1l4mFTW </strong>was created last, based on <strong><em>UID of 1001,</em></strong> which is higher than the other regular user (<strong><em>web_user with UID 1000</em></strong>).<br>So the last user created on the server is <strong>a1l4mFTW</strong>.</p><blockquote><strong><em>Question 9 → The attacker also found an open redirect vulnerability. What is the URL the attacker tested the exploit with?</em></strong></blockquote><p>In this last question we can again use the evidence obtained by the previous filter, we see that there are 2 “GET” requests where we see the suspicious “redirect” content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWShjJVuIl8M974FZ39-Jw.png" /></figure><p>We checked the last packet returned by this filter, we were able to identify the URL that the attacker used to exploit this vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wSO-gGX0OgnRHh5Xtg1DJw.png" /><figcaption>GET /dashboard/redirect.php?url=<a href="https://evil[.]com/">https://evil[.]com/</a> HTTP/1.1</figcaption></figure><p>With this evidence we can detect which URL the redirect was made to.</p><h3>All answers</h3><blockquote>What is the IP address of the web server?<br><strong><em>R:.10.1[.]0.4</em></strong><br>What is the IP address of the attacker?<br><strong><em>R:.197.32.212[.]121</em></strong><br>The attacker first tried to sign up on the website, however, he found a vulnerability that he could read the source code with. What is the name of the vulnerability?<br><strong><em>R:.XXE</em></strong><br>There was a note in the source code, what is it?<br><strong><em>R:.yougotme</em></strong><br>After exploiting the previous vulnerability, the attacker got a hint about a possible username. What is the username that the attacker found?<br><em>R:.admin</em><br>The attacker tried to brute-force the password of the possible username that he found. What is the password of that user?<br><em>R:.fernando</em><br>Once the attacker gained admin access, they exploited another vulnerability that led the attacker to read internal files that were located on the server. What payload did the attacker use?<br><strong><em>R:. ../../../../../../../../../../../../../../../etc/passwd</em></strong><br>The attacker was able to view all the users on the server. What is the last user that was created on the server?<br><strong><em>R:.a1l4mFTW</em></strong><br>The attacker also found an open redirect vulnerability. What is the URL the attacker tested the exploit with?<br><strong><em>R:. https://evil[.]com/</em></strong></blockquote><h3><em>Resume</em></h3><p><strong>XXE (XML External Entity) vulnerabilities</strong> occur when an attacker exploits how an application processes XML data. This can allow the attacker to inject malicious external entities into an XML document, potentially leading to data exfiltration, remote code execution, denial of service (DoS) attacks, and other security issues.</p><p><strong>Mitigation and Protection Against XXE</strong></p><ol><li><strong>Disable External Entity Resolution</strong>:</li></ol><blockquote>Java (SAXParserFactory);<br>Python (lxml);<br>.NET (XmlReaderSettings);</blockquote><p>2. <strong>Sanitize and Validate Input</strong>:</p><blockquote>Never trust unvalidated or untrusted XML data. Always ensure that the XML adheres to the expected schema and reject any malicious or unexpected input before processing it.</blockquote><p>3. <strong>Use Secure Libraries</strong>:</p><blockquote>When possible, use libraries known to be secure against XXE. Some libraries may have XXE protections enabled by default.</blockquote><p>4. <strong>Disable DTD (Document Type Definition) Features</strong>:</p><blockquote>If your application does not need to process DTDs, disable this feature in the XML parser. This will block the ability of the XML to define external entities.</blockquote><p>5. <strong>Monitoring and Logging</strong>:</p><blockquote>Implement monitoring and logging systems to detect any abnormal behavior related to XML processing. This can help identify attempts to exploit XXE vulnerabilities.</blockquote><p>6. <strong>Education and Awareness</strong>:</p><blockquote>Educate developers and administrators about the risks of XXE and best practices for mitigating these vulnerabilities. Secure coding practices can significantly reduce the risk.</blockquote><p>7. Code Reviews and Security Testing</p><blockquote>Conduct regular code reviews and security testing, such as penetration testing and static code analysis, to identify and fix XXE vulnerabilities.</blockquote><h3>Final Considerations</h3><p>Protecting against XXE vulnerabilities requires a combination of secure development practices, proper XML parser configuration, and a security-first mindset throughout the software development lifecycle. Implementing these measures will help ensure your application is protected from XXE-related attacks.</p><p>Thank you for reading my post, I hope I was able to help resolve this challenge.</p><p>Greetings and success</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15b91e8e9137" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOC137 EventID:76 — Malicious File/Script Download Attempt — letsdefend.io]]></title>
            <link>https://medium.com/@Nullwhire/soc137-eventid-76-malicious-file-script-download-attempt-letsdefend-io-75a21b99404a?source=rss-d0dc3943ad2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/75a21b99404a</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[lets-defend]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Nullwhire]]></dc:creator>
            <pubDate>Sat, 16 Dec 2023 00:25:44 GMT</pubDate>
            <atom:updated>2023-12-16T00:25:44.541Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOC137 EventID:76 — Malicious File/Script Download Attempt — letsdefend.io</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*k2o4hA_IkY-2RvL2aKjp9Q.png" /><figcaption><a href="https://app.letsdefend.io/monitoring?channel=investigation&amp;event_id=76">https://app.letsdefend.io/monitoring?channel=investigation&amp;event_id=76</a></figcaption></figure><blockquote>Alert Informations</blockquote><blockquote>EventID :76<br> Event Time :Mar, 14, 2021, 07:15 PM<br> Rule :SOC137 - Malicious File/Script Download Attempt<br> Level :Security Analyst<br> Source Address :172.16.17.37<br> Source Hostname :NicolasPRD<br> File Name :INVOICE PACKAGE LINK TO DOWNLOAD.docm<br> File Hash :f2d0c66b801244c059f636d08a474079<br> File Size :16.66 Kb<br> Device Action :Blocked<br> Download (Password:infected) :https://files-ld.s3.us-east-2.amazonaws.com/f2d0c66b801244c059f636d08a474079.zip</blockquote><p><strong><em>Incident summary:</em></strong><br>In this incident (SOC ALERT) we saw an attempt to download a potentially malicious file (maldoc) with the name “INVOICE PACKAGE LINK TO DOWNLOAD[.]docm”.<br>A more detailed analysis is necessary to understand whether we have a malicious file or a false positive at hand, so that at the end of our analysis we can take appropriate protection measures.</p><p><strong>File Analysis:</strong><br>In a real environment we will download the file and analyze it.<br>Starting by extracting your MD5 hash using a controlled environment (sandbox), however in this alert we can use the hash already provided [f2d0c66b801244c059f636d08a474079]</p><blockquote>If you need to extract the hash directly from the file, I leave the steps below.<br>TERMINAL-&gt; type -&gt; md5sum(file name)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*Hau2HkJayMJDAXDUBObXew.png" /></figure><p>After obtaining our hash for analysis, we will check the results on virustotal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*-_G7AqCgoqXhZ_2lFoQa9Q.png" /></figure><p>As we can check, our file is considered malicious by 40 security vendors and 5 sandboxes. At this point we are sure that this file under analysis is a malicious file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*fqWZidJnp2sqrMp7iRxFOw.png" /></figure><p>We were able to understand that the .docm file contains a macro that can execute some malicious code injected into it. A very common technique in this type of malicious activity, especially in office file contexts such as word/excel and also in pdfs.</p><p>Shell commands and how the malicious macro works<br>To analyze and extract the malicious macro contained in the file, we can use the “olevba” tool.</p><blockquote><strong><em>Setup</em></strong>: [sudo -H pip install -U oletools]</blockquote><blockquote><a href="https://github.com/decalage2/oletools."><strong><em>https://github.com/decalage2/oletools.</em></strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*Ef98T89SG1MvPpIKhLeh5w.png" /></figure><p>The text starts with a reference to Microsoft Word’s executable path and a placeholder.<br>This indicates that a macro is likely being executed within a Word document. The macro is designed to download a payload using PowerShell from the specified URL: &lt;&lt;https://filetransfer[.]io[/]data-package[/]UR2whuBv[/]download &gt;&gt;</p><p>This macro appears to use a method known as “string obfuscation”, which makes the code less detectable for static analysis tools, which is the main objective of the strategy.</p><p>At this stage we are already able to know the origin of the malicious file (&lt;&lt;https://filetransfer[.]io[/]data-package[/]UR2whuBv[/]download &gt;&gt;) and can also check it in virutotal in the “Relations” tab 2 IPs identified as malicious (178[.]175[.]67[.]109 and 188[.]114[.]96/7[.]0)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*8X6B23SanhQs8XV07mgBKw.png" /></figure><p><strong>Analyze using any.run</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*Xi50yghvOY23KDyqHQHNzA.png" /><figcaption><a href="https://app.any.run/tasks/b9ce01b0-13c3-437c-81bf-cfdd67070167">https://app.any.run/tasks/b9ce01b0-13c3-437c-81bf-cfdd67070167</a></figcaption></figure><p>To conclude our analysis, despite having identified that the action was blocked by the equipment, we will still analyze the endpoint to verify that there is nothing wrong with the host.</p><p><strong>Endpoint Security:</strong></p><p>Go to Endpoint Security and type NicolasPRD in search bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y5MyhbxXHc1O-C478mqP1Q.png" /></figure><p>We didn’t find anything suspicious on the host in any analysis tab.<br>We can also check in the log management if there is any communication with the malicious IP, however we also do not see any trace of any interaction with our case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*69zOxBNPEu9HOPk8-JjJ4w.png" /></figure><p><strong>Playbook Answers</strong></p><p>1- Select Threat Indicator</p><blockquote>Answer: Other.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*E1iuBknWbUpRA1Wa93dTYQ.png" /></figure><p>2- Malware quarantined/cleaned?</p><blockquote>Answer: quarantined</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*sNnvmAf5z1TXRl-EJiXIEQ.png" /></figure><p>3- Analyse Malware</p><blockquote>Answer: The file is malicious.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*95c_hxee6TQY4F2guEMrmA.png" /></figure><p>4- Check If Someone Requested the C2</p><blockquote>Answer: We didnt find any clue that the C2 is accessed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*YwYFwaoyWCOR2d1DCRS4ag.png" /></figure><p>Artifacts for analysis:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*rEjY-hvOajQKj76LFiRaWg.png" /></figure><p>Finally we can close the case by identifying it as true positive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*zcBFZPdmvs7npZ1c6Hhbkg.png" /></figure><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75a21b99404a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>