<?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 Mark Csete on Medium]]></title>
        <description><![CDATA[Stories by Mark Csete on Medium]]></description>
        <link>https://medium.com/@csetemark96?source=rss-73df5dfef044------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ON6zmyhABAzdLnID</url>
            <title>Stories by Mark Csete on Medium</title>
            <link>https://medium.com/@csetemark96?source=rss-73df5dfef044------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:52:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@csetemark96/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[Azure SOC Honeypot Lab: Mapping Real-World RDP Brute-Force Activity with Microsoft Sentinel]]></title>
            <link>https://medium.com/@csetemark96/azure-soc-honeypot-lab-mapping-real-world-rdp-brute-force-activity-with-microsoft-sentinel-e47630726e6d?source=rss-73df5dfef044------2</link>
            <guid isPermaLink="false">https://medium.com/p/e47630726e6d</guid>
            <category><![CDATA[sentinel]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[mitre-attack]]></category>
            <dc:creator><![CDATA[Mark Csete]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 19:15:10 GMT</pubDate>
            <atom:updated>2025-12-16T19:15:10.026Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone! I’m excited to share a hands-on Azure security project where I built an intentionally exposed honeypot and analyzed real-world RDP brute-force activity using Microsoft Sentinel and KQL.</p><h3>Introduction</h3><p>In this project, I built a small <strong>Azure-based honeypot</strong> to observe how real-world attackers discover and target exposed cloud resources for 48 hours. The goal was to go beyond basic logging and practice <strong>security monitoring, log normalization, geolocation enrichment, and attack classification</strong> using Microsoft Sentinel.</p><p>To achieve this, I intentionally deployed a Windows virtual machine with its <strong>Network Security Group (NSG) left open</strong>, allowing inbound Remote Desktop Protocol (RDP) traffic from any source. This environment was deliberately insecure, isolated, and created solely for <strong>defensive security learning and portfolio purposes</strong>.</p><p>Rather than simulating attacks or injecting synthetic logs, I focused on analyzing <strong>real authentication failures generated by external traffic</strong> hitting the exposed service.</p><h3>Azure Components &amp; Technical Stack</h3><ul><li><strong>Target System:</strong> Windows Virtual Machine (intentionally exposed for 48 hours)</li><li><strong>Network Security:</strong> Azure Network Security Group (RDP allowed from Any/Any)</li><li><strong>Logging &amp; SIEM:</strong> Log Analytics Workspace and Microsoft Sentinel</li><li><strong>Data Enrichment:</strong> Azure IP Geolocation (via KQL)</li><li><strong>Query Language:</strong> Kusto Query Language (KQL)</li><li><strong>Visualization:</strong> Microsoft Sentinel Workbooks</li></ul><h3>Architecture — “Before Hardening” (Vulnerable by Design)</h3><p>In the initial phase, I intentionally created an attack surface by:</p><ul><li>Assigning a public IP to the VM</li><li>Allowing inbound RDP (TCP 3389) from all sources</li><li>Leaving default Windows authentication enabled</li><li>Forwarding security logs to Log Analytics</li></ul><p>This configuration mirrors a common cloud misconfiguration. Once deployed, the system was quickly discovered by automated scanners and began receiving repeated failed login attempts.</p><figure><img alt="NSG inbound rule allowing RDP from any source" src="https://cdn-images-1.medium.com/max/1024/1*-xdzaT8W6nnpj93BhB2Jjg.png" /><figcaption><em>NSG inbound rule allowing RDP from any source</em></figcaption></figure><h3>Advanced Data Engineering with KQL</h3><p>Instead of relying on external PowerShell scripts or custom log ingestion, I performed <strong>log normalization directly inside Microsoft Sentinel</strong>.</p><p>Windows authentication events store critical information inside structured XML blobs. To extract meaningful telemetry, I used KQL to:</p><ul><li>Parse XML event data</li><li>Extract the source IP address</li><li>Enrich IPs with geographic context</li><li>Aggregate failed authentication attempts</li></ul><h3>KQL — Failed RDP Attempts with Geolocation</h3><pre><br>Event<br>| where EventID == 4625<br>| extend EventDataXml = parse_xml(EventData)<br>| mv-expand Data = EventDataXml.DataItem.EventData.Data<br>| where tostring(Data[&quot;@Name&quot;]) == &quot;IpAddress&quot;<br>| extend IpAddress = tostring(Data[&quot;#text&quot;])<br>| where isnotempty(IpAddress) and IpAddress !in (&quot;-&quot;, &quot;::1&quot;)<br>| extend Geo = geo_info_from_ip_address(IpAddress)<br>| where isnotempty(Geo.latitude)<br>| summarize Attempts = count()<br>    by<br>    Country   = tostring(Geo.country),<br>    Latitude  = todouble(Geo.latitude),<br>    Longitude = todouble(Geo.longitude)<br>| sort by Attempts desckq</pre><p>This approach allowed me to <strong>normalize raw Windows logs into structured, actionable security data</strong> without touching the host system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14dIMWYRr9287vTpWgOl9Q.png" /><figcaption><em>KQL query results enriched with country and geolocation data</em></figcaption></figure><h3>Attack Visualization</h3><p>Using Sentinel Workbooks, I visualized the enriched data on a global map:</p><ul><li>Each bubble represents failed RDP authentication attempts</li><li>Bubble size reflects the number of attempts</li><li>Geographic clustering highlights regions with concentrated activity</li></ul><p>This provided immediate situational awareness and made the threat landscape easy to interpret at a glance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHmbWy7wVmykn6H3BXq1NQ.png" /><figcaption><em>Global distribution of failed RDP brute-force attempts</em></figcaption></figure><p>To complement the map, I added a bar chart showing attack volume by country. While the map provides context, the chart allows for quick comparison.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HuCV-9Or260A0b18FnWBQA.png" /><figcaption><em>Failed RDP brute-force attempts grouped by country</em></figcaption></figure><h3>MITRE ATT&amp;CK Mapping</h3><p>To classify the observed behavior using an industry-standard framework, I mapped the activity to <strong>MITRE ATT&amp;CK</strong>. The purpose here was not attribution, but <strong>behavioral categorization</strong>.</p><h3>Observed Techniques</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxiF5HwsmDGLaSe6mkBS8g.png" /><figcaption>MITRE ATT&amp;CK maping and category</figcaption></figure><p>Using <strong>MITRE ATT&amp;CK</strong> provides a common language for describing attacker behavior and aligns raw telemetry with how SOC teams document and reason about threats. Since my project was created around Brute Force and RDP, it was straight forward.</p><h3>Incident Response &amp; Hardening (NIST SP 800–61r2)</h3><p>I treated the observed activity as a <strong>true positive security incident</strong> and aligned my response with the <strong>NIST Computer Security Incident Handling Guide</strong>.</p><h3>Preparation</h3><ul><li>Centralized logging enabled</li><li>Sentinel configured for analysis and visualization</li></ul><h3>Detection &amp; Analysis</h3><ul><li>Failed authentication events identified</li><li>Source IPs enriched with geolocation data</li><li>Attack patterns analyzed and classified</li></ul><h3>Containment</h3><ul><li>In a real environment, NSG rules would be restricted immediately</li><li>RDP access limited to trusted IPs or removed entirely</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0Xr6WR8j7jw1I93HlxR2w.png" /><figcaption><em>NSG inbound rule denying public RDP access</em></figcaption></figure><h3>Eradication &amp; Recovery</h3><ul><li>Public exposure removed</li><li>Access controls tightened</li><li>Authentication policies strengthened</li></ul><h3>Post-Incident Activity</h3><ul><li>Root cause identified as public exposure</li><li>Effectiveness of controls validated</li><li>Lessons learned documented</li></ul><p>Once inbound access was restricted, the same queries returned <strong>no results</strong>, confirming that the activity was entirely driven by public exposure.</p><h3>Key Takeaways &amp; Lessons Learned</h3><ul><li><strong>Visibility is critical:</strong> You cannot defend what you cannot see.</li><li><strong>KQL is powerful:</strong> Native log normalization is cleaner than host-based scripting.</li><li><strong>Automation is constant:</strong> Exposed services are discovered quickly.</li><li><strong>Secure-by-design matters:</strong> Basic hardening eliminates most of this activity.</li></ul><h3>Conclusion</h3><p>By intentionally deploying an insecure Azure VM for 48 hours, I observed real-world brute-force behavior, normalized raw security logs, visualized attacker activity, and classified it using MITRE ATT&amp;CK. The absence of activity after applying security controls clearly demonstrates the effectiveness of proper cloud hardening.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e47630726e6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Zero-Touch SOC: End-to-End Automation with Wazuh, Shuffle, and TheHive]]></title>
            <link>https://medium.com/@csetemark96/%EF%B8%8Fbuilding-a-zero-touch-soc-end-to-end-automation-with-wazuh-shuffle-and-thehive-09a82483adaf?source=rss-73df5dfef044------2</link>
            <guid isPermaLink="false">https://medium.com/p/09a82483adaf</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[portfolio]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mark Csete]]></dc:creator>
            <pubDate>Mon, 08 Dec 2025 15:04:58 GMT</pubDate>
            <atom:updated>2025-12-08T15:07:00.163Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone! I’m excited to share the architecture and automation pipeline of my custom Security Operations Center (SOC) home lab.</p><h3>Project Overview</h3><p>This project uses a fully open-source stack to demonstrate powerful automation capabilities: detecting a threat, enriching the evidence with threat intelligence, and automatically generating an actionable alert for an analyst. My approach solves a key challenge for hybrid cloud/local labs by using <strong>Cloudflare Tunnel</strong> to securely connect a cloud-based SOAR platform to my local VMs.</p><p>The components used are all open source and incredibly powerful, rivaling solutions used by large enterprises.</p><h3>The Core Technologies</h3><p><strong>Wazuh:</strong></p><ul><li><strong>Role in the LAB:</strong> SIEM/XDR</li><li><strong>Details:</strong> Central log processing, custom rule detection (Mimikatz), and webhook triggering.</li></ul><p><strong>Shuffle:</strong></p><ul><li><strong>Role in the LAB:</strong> SOAR</li><li><strong>Details:</strong> The automation brain. Handles data parsing (Regex), VirusTotal enrichment, and API calls to TheHive.</li></ul><p><strong>TheHive:</strong></p><ul><li><strong>Role in the LAB:</strong> IRP (Incident Response Platform)</li><li><strong>Details:</strong> Incident and Case Management solution. Receives structured, enriched alerts.</li></ul><p><strong>VirusTotal:</strong></p><ul><li><strong>Role in the LAB:</strong> Threat Intel</li><li><strong>Details:</strong> Provides enrichment for extracted file hashes via the v3 API.</li></ul><p><strong>Cloudflare Tunnel</strong></p><ul><li><strong>Role in the LAB:</strong> Secure Connectivity</li><li><strong>Details:</strong> Crucial component to expose the local TheHive API to Shuffle Cloud without opening firewall ports.</li></ul><p><strong>Endpoints</strong></p><ul><li><strong>Role in the LAB:</strong> Telemetry Source</li><li><strong>Details:</strong> Windows 10/11 VM running Sysmon (Event ID 1 process creation logging).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qPeiCkaxQOw3MKJqJQwxjw.jpeg" /><figcaption>SOC Automation Logical Diagram</figcaption></figure><h3>My SOC LAB Architecture</h3><p>My entire lab uses <strong>VirtualBox</strong> for all VMs, creating a fully isolated, stable, and reproducible environment.</p><h3>Network Configuration</h3><p>All components are behind a VirtualBox NAT network, allowing all machines access to the internet, while their local IPs are not directly exposed.</p><p><strong>Wazuh Manager — Linux Virtual Machine</strong></p><ul><li>Virtual IP (Internal): 192.168.56.105 (Static IP)</li><li>Host Connectivity: Listens for agents on standard ports (1514/1515)</li></ul><p><strong>TheHive — Linux Virtual Machine</strong></p><ul><li>Virtual IP (Internal): 192.168.56.103 (Static IP)</li><li>Host Connectivity: API exposed securely via <strong>Cloudflare Tunnel</strong>.</li></ul><p><strong>Windows Endpoint — Windows 10 Virtual Machine</strong></p><ul><li>Virtual IP (Internal): 192.168.56.100 (Static IP)</li><li>Host Connectivity: Runs <strong>Wazuh Agent + Sysmon</strong>.</li></ul><p><strong>Analyst Machine — Windows 11</strong></p><ul><li>Virtual IP (Internal): 192.168.1.xx (DHCP) (Host)</li><li>Host Connectivity: Used for management and simulating the analyst’s workstation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_mWsrYKDubmx-9YlN97kFg.png" /><figcaption>VirtualBox Setup for All Lab Components</figcaption></figure><h3>The Cloud Bridge: Cloudflare Tunnel</h3><p>This is a critical security detail. Since <strong>Shuffle Cloud</strong> cannot reach my private network (192.168.56.103), the <strong>Cloudflare Tunnel</strong> agent was installed on TheHive VM. This agent creates an <strong>outbound encrypted tunnel</strong> to Cloudflare, making TheHive reachable by Shuffle via a public hostname (https://thehive.mydomain.com/), while keeping my firewall closed. I attempted hosting Shuffle via the virtual environment, however I quickly reached my host machine&#39;s memory limitations, therefore the tunnel solution was more reachable and logical to complete the project.</p><h3>Automation Workflow: Mimikatz Detection</h3><p>The workflow demonstrates a classic SOC automation use case, from endpoint telemetry to actionable triage data.</p><h3>Detection Scenario</h3><p>A user executes Mimikatz on the Windows Endpoint.</p><ul><li><strong>Endpoint → Wazuh:</strong> Sysmon captures Event ID 1 (Process Creation). The Wazuh Agent forwards the log to the Manager.</li><li><strong>Wazuh Alert:</strong> A custom rule (e.g., Rule ID 100002) triggers on the original file name/process command line, generating a high-severity alert.</li><li><strong>Wazuh → Shuffle:</strong> Wazuh uses its integration framework to send the full, decoded alert JSON via <strong>Webhook</strong> to Shuffle Cloud.</li></ul><figure><img alt="Wazuh Discovery Dashboard Showing Endpoint Telemetry" src="https://cdn-images-1.medium.com/max/1024/1*M_3mpuh9ExcH7qsoxedeQA.png" /><figcaption>Wazuh Discovery Dashboard Showing Endpoint Telemetry</figcaption></figure><h3>Shuffle SOAR Playbook</h3><p>The Shuffle workflow executes the following steps:</p><p><strong>Step A: Artifact Extraction</strong></p><ul><li><strong>Action:</strong> Regex Capture Group with pattern SHA256=([A-Fa-f0-9]{64})</li><li><strong>Output Data:</strong> Clean SHA256 Hash string.</li></ul><p><strong>Step B: Threat Enrichment</strong></p><ul><li><strong>Action:</strong> VirusTotal v3 API action (get_a_hash_report)</li><li><strong>Output Data:</strong> Comprehensive analysis and malicious vendor count.</li></ul><p><strong>Step C: Incident Creation</strong></p><ul><li><strong>Action:</strong> TheHive API POST (/api/v1/alert)</li><li><strong>Output Data:</strong> Alert created using dynamically populated fields ($exec.title, $exec.severity).</li></ul><p><strong>Step D: Analyst Notification</strong></p><ul><li><strong>Action:</strong> Email Action</li><li><strong>Output Data:</strong> Send a summary email with the hostname, rule ID, and initial VT score.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWKD9fcwj3BWzfssEoq5Vg.png" /><figcaption>The Final Alert in TheHive Management UI</figcaption></figure><h3>Key Solution: TheHive JSON Typing</h3><p>During development, TheHive frequently returned Invalid json or BadRequest errors. The solution was ensuring that <strong>severity</strong>, <strong>tlp</strong> (Traffic Light Protocol), and <strong>pap</strong> (Permissible Action Protocol) were passed as <strong>numeric integers</strong>, not strings, preventing common schema validation failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PwbsxtLZj4KuRigOzm3z-A.png" /><figcaption>Complete End-to-End Shuffle Workflow Graph</figcaption></figure><h3>Final Working State &amp; Potential for Active Response</h3><p>This pipeline currently executes end-to-end flawlessly: an alert triggers, is enriched, and successfully creates a valid alert in TheHive via the secure Cloudflare tunnel connection.</p><p>The real power of this architecture lies in its potential for <strong>Active Response</strong>.</p><h3>Future Enhancement: Conditional Containment</h3><p>Similar to other advanced open-source labs, I plan to add a branch to the Shuffle playbook:</p><ul><li><strong>Condition:</strong> Check the result of the VirusTotal lookup. If $virustotal.malicious is greater than 5, proceed to containment.</li><li><strong>Containment Action:</strong> Shuffle would send a response back to <strong>Wazuh’s API</strong>, triggering a pre-defined <strong>Active Response Rule</strong>.</li><li><strong>Wazuh Action:</strong> The Manager sends a command to the Wazuh Agent on the infected Windows Endpoint to execute a local script (e.g., using PowerShell or an EDR utility) to <strong>isolate the host</strong> or <strong>delete the malicious file</strong>.</li></ul><p>This transforms the lab from an alerting system into a <strong>fully automated detection and containment system</strong>, the ultimate goal of SOC automation, but this is in my future plans.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09a82483adaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Security Analysis Portfolio Project. Investigating Login Activity & Employee Machines]]></title>
            <link>https://medium.com/@csetemark96/sql-security-analysis-portfolio-project-investigating-login-activity-employee-machines-93c14efebebc?source=rss-73df5dfef044------2</link>
            <guid isPermaLink="false">https://medium.com/p/93c14efebebc</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[portfolio]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Mark Csete]]></dc:creator>
            <pubDate>Sun, 16 Nov 2025 15:24:27 GMT</pubDate>
            <atom:updated>2025-11-16T15:24:27.880Z</atom:updated>
            <content:encoded><![CDATA[<p>As part of my ongoing journey studying cybersecurity through multiple learning platforms, I am building a portfolio of practical, hands-on projects to showcase the skills I’m developing.</p><p>This project demonstrates my ability to use <strong>SQL for security analysis</strong>, including filtering datasets, investigating suspicious activity, and extracting actionable intelligence from real organizational data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3_0lI-qdBMlMCgx9rmeUA.jpeg" /><figcaption>Database knowledge is essential in Cybersecurity</figcaption></figure><h3>Project Description</h3><p>In this project, I acted as a security analyst responsible for investigating potential security issues within a large organization.</p><p>Using SQL, I analyzed data stored in the organization’s employees and log_in_attempts tables. My tasks included identifying suspicious login activity, isolating failed after-hours logins, locating employees by department or building, and filtering results using SQL operators such as AND, OR, LIKE, and NOT.</p><p>This project demonstrates my ability to apply SQL filters to extract actionable security insights from real-world datasets.</p><h3>Step 1: Retrieve After-Hours Failed Login Attempts</h3><p><strong>Goal:</strong> Identify failed login attempts that occurred after <strong>18:00</strong>, which may indicate suspicious after-hours activity.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM log_in_attempts<br>WHERE login_time &gt; &#39;18:00&#39;<br>  AND success = 0;</pre><h4>Explanation</h4><ul><li>login_time &gt; &#39;18:00&#39; filters for attempts occurring after business hours.</li><li>success = 0 identifies failed login attempts (Boolean FALSE).</li><li>AND ensures both conditions must be true.</li></ul><h4>Result</h4><p><strong>19 failed login attempts</strong> were made after hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*AGunaPYZjljaiUwhCQveDA.png" /><figcaption>Step 1: Retrieve After-Hours Failed Login Attempts</figcaption></figure><h3>Step 2: Retrieve Login Attempts on Specific Dates</h3><p><strong>Goal:</strong> Investigate activity surrounding a suspicious event on <strong>2022–05–09</strong>, including the prior day.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM log_in_attempts<br>WHERE login_date = &#39;2022-05-08&#39;<br>   OR login_date = &#39;2022-05-09&#39;;</pre><h4>Explanation</h4><ul><li>OR returns rows where either date matches.</li><li>Exact dates are enclosed in quotes because they are date data types.</li></ul><h4>Result</h4><p>There were <strong>75 login attempts</strong> across both days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*KIyhSC_2QlWmenMC8_eLtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*hYTL2QSpueCw9RHqMe_l5A.png" /><figcaption>Step 2: Retrieve Login Attempts on Specific Dates</figcaption></figure><h3>Step 3: Retrieve Login Attempts Outside of Mexico</h3><p><strong>Goal:</strong> Find login attempts that did <strong>not</strong> originate from Mexico.<br> The country field contains both &#39;MEX&#39; and &#39;MEXICO&#39;, so pattern matching is required.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM log_in_attempts<br>WHERE NOT country LIKE &#39;MEX%&#39;;</pre><h4>Explanation</h4><ul><li>LIKE &#39;MEX%&#39; matches both &quot;MEX&quot; and &quot;MEXICO&quot;</li><li>NOT returns everything except Mexico-based attempts</li><li>% wildcard matches any trailing characters</li></ul><h4>Result</h4><p>There were <strong>144 login attempts</strong> from outside Mexico.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*oaH2MuGqvotWb7R40H2-Rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*TFpwWgRcnzdti5mtmL_HwA.png" /><figcaption>Step 3: Retrieve Login Attempts Outside of Mexico</figcaption></figure><h3>Step 4: Retrieve Employees in Marketing (East Building)</h3><p><strong>Goal:</strong> Identify Marketing employees located in offices beginning with &quot;East-&quot;.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM employees<br>WHERE department = &#39;Marketing&#39;<br>  AND office LIKE &#39;East%&#39;;</pre><h4>Explanation</h4><ul><li>department = &#39;Marketing&#39; filters by department</li><li>office LIKE &#39;East%&#39; finds any office in the East building</li><li>AND ensures both conditions are true</li></ul><h4>Result</h4><p>First employee returned: <strong>elarson</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*ppd7yVNABNi5Ss1lX8ZzKA.png" /><figcaption>Step 4: Retrieve Employees in Marketing (East Building)</figcaption></figure><h3>Step 5: Retrieve Employees in Finance or Sales</h3><p><strong>Goal:</strong> Compile a list of employees in either the Finance or Sales departments so their machines can be updated.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM employees<br>WHERE department = &#39;Finance&#39;<br>   OR department = &#39;Sales&#39;;</pre><h4>Explanation</h4><ul><li>Both full conditions must be written because they reference the same column</li><li>OR returns results matching either department</li></ul><h4>Result</h4><p>First Sales employee returned: <strong>lrodriqu</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*LEg5gs207MHQ3VY7bsk0wQ.png" /><figcaption>Step 5: Retrieve Employees in Finance or Sales</figcaption></figure><h3>Step 6: Retrieve All Employees Not in IT</h3><p><strong>Goal:</strong> Identify employees who still require updates because IT employees have already been patched.</p><h4>SQL Query</h4><pre>SELECT *<br>FROM employees<br>WHERE NOT department = &#39;Information Technology&#39;;</pre><h4>Explanation</h4><ul><li>NOT excludes records where the department is &quot;Information Technology&quot;</li><li>This returns every other department that still needs updates</li></ul><h4>Result</h4><p><strong>161 employees</strong> are not in the IT department.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*_Rqvs3A0y9460oJxMsj9LQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*wI-En3qlgcXNwvdFvKMChw.png" /><figcaption>Step 6: Retrieve All Employees Not in IT</figcaption></figure><h3>📌 Key SQL Concepts Demonstrated</h3><h4>Using comparison operators</h4><ul><li>&gt;, &lt;, &gt;=, &lt;=, =, &lt;&gt;</li></ul><h4>Filtering by date and time</h4><h4>Using wildcard filtering</h4><ul><li>LIKE &#39;East%&#39;</li><li>LIKE &#39;MEX%&#39;</li><li>% and _ wildcards</li></ul><h4>Combining conditions</h4><ul><li>AND to narrow results</li><li>OR to broaden results</li><li>NOT to exclude conditions</li></ul><h4>Real security analysis context</h4><ul><li>Identifying failed logins</li><li>Investigating suspicious dates</li><li>Locating at-risk departments</li><li>Filtering based on building or location</li></ul><h3>Summary</h3><p>In this project, I used SQL to analyze real organizational data and investigate potential security issues. By applying filters with AND, OR, NOT, and LIKE, I extracted precise information related to failed login attempts, date-based events, geographic anomalies, and department-specific machine updates. These SQL skills are essential for security analysts who regularly interact with large datasets to detect threats, enforce policy compliance, and support incident response.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93c14efebebc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>