<?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 Jon Klothe on Medium]]></title>
        <description><![CDATA[Stories by Jon Klothe on Medium]]></description>
        <link>https://medium.com/@jklothe?source=rss-ce1bf4358cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*K-dLFd9SqZg8iXkHeVO41A.png</url>
            <title>Stories by Jon Klothe on Medium</title>
            <link>https://medium.com/@jklothe?source=rss-ce1bf4358cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 21:24:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jklothe/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[Initial Access Brokers + AWS S3 = Lazy S3 Ransomware Event]]></title>
            <link>https://medium.com/@jklothe/initial-access-brokers-aws-s3-lazy-s3-ransomware-event-e6b0ac3a6e41?source=rss-ce1bf4358cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6b0ac3a6e41</guid>
            <dc:creator><![CDATA[Jon Klothe]]></dc:creator>
            <pubDate>Wed, 13 Jul 2022 19:22:45 GMT</pubDate>
            <atom:updated>2022-07-18T23:08:15.617Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Initial Access Brokers + AWS S3 = Lazy S3 Ransomware Event</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*CwibYAlhyMEMXbpI6XV9NA.jpeg" /></figure><p>Cloud security has become the focus of my studies and the direction I want to pursue as a security practitioner. The wide scale migration to the Cloud has forced security professionals to rapidly implement best practices across their company’s provisioned resources and gain the necessary skills to secure more complex environments. Leaning on the advice of Ed Amoroso, former CISO for AT&amp;T, “<strong>if you want to get into something then look at the meat of it</strong>, learn development, learn engineering, learn networking, learn to build database, learn to build cloud systems. There’s the construction of work functionality to support business objectives. That’s what you want to be good at!” This lead me to the<strong> AWS Certified Solutions Architect — Associate Certification</strong>. The ability to be able to design and implement cloud native solutions to meet modern workloads is a foundational skillset.</p><p><strong>Part 1: Project Overview</strong></p><p>The origin of this project came from a presentation by <a href="https://twitter.com/35Foss/">Greg Foss</a>, Principal Cloud Security Researcher for Lacework. He demonstrated how a compromised valid AWS account could lead to a potential ransomware incident through the encryption of S3 buckets. I wanted to expand on this idea by building out a monitoring solution and determine any artifacts that can be gathered from the logs.</p><p>The AWS environment that was created to observe the engagement contains the following services: S3, CloudTrail, CloudWatch, and Amazon OpenSearch. <a href="https://aws.amazon.com/cloudtrail/">CloudTrail</a> monitors account activity across your AWS infrastructure. I configured CloudTrail to record API calls relating to data events concerning S3 buckets. This trail of events in the form of logs was forwarded to a S3 bucket and CloudWatch. <a href="https://aws.amazon.com/cloudwatch/">CloudWatch</a> provides system-level visibility by collecting metrics from all AWS resources and generating digestible dashboards. In this particular case, I was more interested in creating a subscription filter to forward the logs one last time to Amazon OpenSearch. <a href="https://aws.amazon.com/opensearch-service/">OpenSearch</a> is a scalable search engine that allows for easy parsing and visualization. It was originally built off of Elasticsearch and Kibana.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zAxtqFs0I7IIdwhDeWtMg.png" /><figcaption>Project Architecture</figcaption></figure><p><strong>Part 2: Vader Attacks!</strong></p><p>The engagement was conducted as a red team vs blue team exercise. Blue team was represented by the Rebel Alliance and their AWS IAM user name was “rebel-admin”. The Red team was represented by Lord Vader and he will be foiling the Rebel’s effort to bring down the Empire.</p><p>Rebel-admin had provisioned a S3 bucket, <strong>rebels-secret-bucket</strong>, to store the recently acquired Death Star architectural plans. The files, death_star_plans.txt and part2-deathstar.txt are considered classified information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7G43I8c-ok3xyAZteb73A.png" /><figcaption>S3 Upload to Private Bucket</figcaption></figure><p>To confirm the files successfully uploaded, I switched to my OpenSearch Kibana to find the recorded API calls. The source IP address listed in the image below is considered normal traffic from the Rebel’s base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBSIFWFlnEmZNXqv4qFkrA.png" /><figcaption>Log Entries of File Upload</figcaption></figure><p>Switching to the attacker’s box, aka Vader, the first step should always be to conceal your IP from your victim. I decided to keep the IP within the US due to many organizations denying any logins from IPs outside of the US. Since any sophisticated attacker will change their IP location, I find the harping of foreign IP addresses antiquated (sorry for bringing work into the post 🙃).</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*xlFmfWZ1gdKm7nyeYQijfQ.png" /><figcaption>Invisibility Cloak Activated!</figcaption></figure><p>Vader was able to access the Rebel’s AWS account relatively painlessly. Since Vader is a very busy person, he sought out an <a href="https://blog.google/threat-analysis-group/exposing-initial-access-broker-ties-conti/">initial access broker</a> who had phished the valid credentials for the account. If you are an attacker seeking to act on an objective, why not save yourself the time and money to achieve initial access. As a result, access to valid accounts (<a href="https://attack.mitre.org/techniques/T1078/">MITRE T-1078</a>) has never been easier for an attacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nVfuQkKCu2yU2bxXBWVBwQ.png" /><figcaption>Frequency of Valid Accounts within MITRE’s Cloud Matrix</figcaption></figure><p>An attacker’s attempt to gain initial access are always assisted by weak password policies. The need to <a href="https://docs.microsoft.com/en-us/microsoft-365/admin/misc/password-policy-recommendations?view=o365-worldwide">enforce stronger standards</a> will force an attacker to spend more time and resources on a particular target. This is typically not the standard operating procedure due to how many available targets exist. Lastly, a strong standard is only effective if it’s combine with user education regarding current phishing techniques like <a href="https://apwg.org/trendsreports/">impersonation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*URgdqJGjT7kHYMUu435lqw.png" /><figcaption>Effectiveness of Weak Password…PSYCH!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*1iJmpcCdrn7-6xbxSMWUXg.png" /><figcaption>Vader Logon</figcaption></figure><p>Now with access accomplished, Vader downloaded the files from rebels-secret-bucket to his host. Which can be seen in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*DO_capkGVloGKw6wcFBpew.png" /><figcaption>Confirming Files on VM</figcaption></figure><p>Through Kibana, we can associate these downloads with Vader’s IP address. As a SOC analyst for a MSSP, the IP address of the admin accounts are usually static for the customers I’m responsible for. So this would prompt me to reach out to the customer and ask if this is expected behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bshnIMlnDWIAGLjbB0r5Gg.png" /><figcaption>Vader Never Requests, He Only Gets</figcaption></figure><p>Vader then proceeded to concatenate the files to <strong>alderannwho.txt </strong>and encrypted the file with his private key. Thus preventing any other user from accessing this data without the proper passphrase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*g60bG79DjIS06YLlxY7oMg.png" /><figcaption>Encrypting Concatenated Files</figcaption></figure><p>Since Vader is a Sith Lord, he likes to inflict pain upon his victims. Therefore, he chose to re-upload the newly encrypted file to rebels-secret-bucket. This can be observed in the screenshot below with the PutObject API call. Vader’s last action was deleting the original unencrypted files to seal the Rebel’s fate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_XYsMIN7xZ_omc-SwD8p9A.png" /><figcaption>Vader only gets, never requests</figcaption></figure><p>The Rebel Admin attempted to access and download the newly created alderaanwho.txt.gpg, seen in the screenshot above. At this moment, Rebel Admin has no idea their account was accessed legitimately by Vader.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*7ACYtj8_U7HHM6FYil6YpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*SIpHeFfrnNGpEbLjC8fEPA.png" /><figcaption>Rebel Admin Attempting to Decrypt</figcaption></figure><p>Sadly, the failed decryption messages bring forth the realization of a ransomware event. The Rebels hoped to learn who might be behind this attack using the two artifacts revealed from the logs: the IP address and the user agent. Checking the location through <a href="https://www.shodan.io/">Shodan</a> only revealed Datacamp Limited as the ISP. Datacamp Limited is known for anonymizing VPN and poses a high risk of being fraudulent. The user agent only refers to a Linux box using a Mozilla browser. Additional security controls will need to be implemented to gain insights into future events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*uW2--miDq4gFhVUCuA-mrQ.png" /><figcaption>Checking for Vader’s Location</figcaption></figure><p><strong>Part 3: Conclusion</strong></p><p>Several security controls were not implemented: restricting resource access through an acceptable external IP range, alerting on suspicious account activity, enforcing strong password policies, and providing user education on current phishing trends.</p><p>Within AWS there are <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">6 types of policies</a>: identity-based policies, permission boundaries, organizations service control policies (SCPs), access control lists (ACLs), session policies, and resource-based policies. Attaching a resource-based policy to a S3 bucket helps define the specific actions that can performed or under what conditions. A type of condition that would have been viable in this example is specifying an <a href="https://attack.mitre.org/mitigations/M1037/">acceptable range of external IPs</a>. Since the Rebel Admin would be logging in from a workstation at their base, the IP would remain within a predictable range. So any IPs outside that range can be explicitly denied.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*ApoCw6ONP17ZsPLtWNADNw.png" /><figcaption>Example Resource Policy for Whitelisting IPs</figcaption></figure><p>Configuring services to monitor for suspicious account behavior can limit account compromises. <a href="https://aws.amazon.com/guardduty/">AWS GuardDuty</a> is a paid monitoring service that analyzes CloudTrail events, VPC logs, DNS logs, EKS audit logs to protect against unauthorized behavior within your AWS resources. Once it is enabled, GuardDuty will start tracking all API activity by users in your account and notify you of suspicious behavior. The report generated by GuardDuty can provide context to questions like “when was activity from the remote IP address first observed” or “what users and roles have accessed my AWS resources from this IP address”, and “what API calls have they invoked”? These anomalous findings can help serve as a foundation to an incident response.</p><p>Important side note: following the guidance of least privilege, admin privileges are required to enable GuardDuty. So creating a <strong>separate user, role, or group</strong> to manage GuardDuty specifically is best practice.</p><p><a href="https://attack.mitre.org/mitigations/M1017/">Multi-factor authentication (MFA)</a> for all accounts is a must-do layer of defense against account compromises. The accessibility of virtual MFA devices like Google Authenticator, LastPass Authenticator, or Duo Mobile make this security control less of an obstacle for implementation.<a href="https://www.microsoft.com/security/blog/2020/03/05/it-executives-prioritize-multi-factor-authentication-2020/#:~:text=MFA%2C%20which%20requires%20that%20users,identities%20is%20vital%20to%20cybersecurity."> “MFA, which requires that users authenticate with at least two factors, can reduce the risk of identity compromise by as much as 99.9 percent over passwords alone.”</a></p><p>Lastly, all the technical security controls in the world will not prevent a well placed phishing attack. So educating your users on emerging and relative phishing techniques is vital to prevent breaches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*er763jDGyOscMandQh2Epg.jpeg" /></figure><p>If you made it this far, thanks for reading and stay tuned for more security content!</p><p>Resources:</p><ul><li>Stream AWS CloudWatch to OpenSearch: <a href="https://www.youtube.com/watch?v=trFW03zP7Uw">https://www.youtube.com/watch?v=trFW03zP7Uw</a></li><li>CloudTrail Events to Kibana: <a href="https://aws.amazon.com/blogs/mt/visualizing-aws-cloudtrail-events-using-kibana/">https://aws.amazon.com/blogs/mt/visualizing-aws-cloudtrail-events-using-kibana/</a></li><li>AWS Access Control Alerts with CloudWatch and CloudTrail from A Cloud Guru.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6b0ac3a6e41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confidently Walk Into Your CompTIA Security+ Exam]]></title>
            <link>https://medium.com/@jklothe/confidently-walk-into-your-comptia-security-exam-e18a346da086?source=rss-ce1bf4358cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e18a346da086</guid>
            <category><![CDATA[improvement]]></category>
            <category><![CDATA[comptia]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[career-change]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Jon Klothe]]></dc:creator>
            <pubDate>Mon, 09 May 2022 19:20:06 GMT</pubDate>
            <atom:updated>2022-05-09T19:20:06.903Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*UohxGtmlC2_W_p0Aa8Yh1Q.jpeg" /></figure><p>I want to lay out my experiences that prepared me for the <a href="https://www.comptia.org/certifications/security">CompTIA Security+</a> exam. I will go over my mindset, the sources, and approach I took to be ready for material I wasn’t familiar with 15 months prior.</p><p><em>(scroll down to tl;dr for abbreviated version)</em></p><p>As a little background before getting into the specifics, I recently completed a career shift that began at the end of 2020. I have B.S. in Mechanical Engineering, but my professional work experience revolved around <a href="https://www.thelocal.de/20140617/trapped-german-siemens-workers-air-rescued-in-iraq/">high-risk evacuation and recoveries</a> from conflict regions in North Africa and the Middle East. So in order to pivot into cybersecurity, I was going to have to study a plethora of new technical concepts. Early on I thought I would be capable of learning all the domains through self-study. However, the required motivation to create an effective and efficient curriculum became too much of a bear. I turned my attention to seeking a bootcamp to simplify the process.</p><p><strong>How Not to Study</strong></p><p>Upon completing my bootcamp, I thought I was conceptually well positioned to answer questions on most of the exam objectives. <strong>Completing a bootcamp does not equate to passing a certification without putting in the time for studying. </strong>The initial approach I took revolved around learning from practice questions and studying from the questions I answered incorrectly. Without realizing, I was training myself to answer specific questions versus conceptually understanding the topic being asked in the question. Understanding the topic being asked in the question drove my successful approach to studying.</p><p><strong>Reassessment and Progress</strong></p><p>So upon realizing my error, I sought out materials that would help fill in the gaps. I am a tactile learner who needs to hold what I’m reading. The study guide I ended up buying was <a href="https://www.amazon.com/CompTIA-Security-Certification-Kit-SY0-601/dp/1119794005/ref=pd_lpo_1?pd_rd_i=1119794005&amp;psc=1">Sybex’s Study Guide Paperback by Mike Chapple.</a> I read this book cover to cover while taking additional notes to maintain an <strong>active reading mindset</strong>. Each chapter ends with a set of review questions that provide a great opportunity to simulate a testing atmosphere. I answered review questions in the style of the exam: closed book and on a sheet of paper. I would encourage practicing answering questions without notes to create a similar pressure to that of the actual exam.</p><p><a href="https://www.udemy.com/course/securityplus/">Jason Dion’s Security+ Complete course</a> was the last piece to my conceptual foundation. Pairing the study guide with the visual aid of an instructor allowed me to fully grasp the numerous topics. <strong>If comprehending a topic becomes difficult seek an additional resource.</strong> The course is broken down into small digestible sessions that can be consumed almost anywhere. I didn’t watch every video for the sake of efficiency; I mainly focused on the topics I struggled reading through. In addition, the videos are downloadable on the Udemy app and before commuting I would be sure to have a few available. No off days.</p><p>Memorization is a major part of this exam and creating flashcards with <a href="https://quizlet.com/">Quizlet</a> allowed me to get my reps in. Quizlet lets you create sets of mobile flashcards that again allowed me to study anywhere. <strong>I noticed a major improvement in my test scores after acknowledging there is no shortcut around memorization.</strong> Example sets are port memorization, regulatory frameworks, data storage types like RAID, or types of backups like incremental vs differential.</p><p><strong>Time to Perform</strong></p><p>The act of taking an exam is a performance event; therefore, there is typically an emotional reaction associated with the event. Taking practice exams not only measures your knowledge but also allows you an <strong>opportunity to temper your emotional response</strong>. This tempering only comes to fruition after you have acknowledged your response and practice limiting it. I’m a person who needs multiple attempts at an event before I know how to control my emotions, so don’t get downtrodden if your first few attempts don’t go as planned.</p><p>Jason Dion’s Complete course includes 1 practice exam and knowing my needs I sought out additional practice exams. I first started with <a href="https://www.udemy.com/course/security-601-exams/">Jason Dion’s Practice Exams</a> that are also on Udemy. This is separate from the course, and I believe it was worth the additional cost. These exams are very reminiscent of the types of questions asked in the course, but every question is unique. Due to CompTIA passing score being 750 out of 900, I considered 85% to be my passing benchmark. Initially, I wasn’t scoring high enough. I identified in which subjects I was underperforming and created more flashcards and re-read those chapters. After completing my review, I would move on to the next available exam. I would never repeat the same exam I just took as a rule of thumb.</p><p>To increase the number of example problems I encountered, I utilized the Sybex’s supplementary “Practice Exams” book. You will receive this book if you purchase the Sybex bundle. The book is broken down into the 5 sections of the exam with roughly 150 additional questions for each section. I used this tool primarily to supplement my exposure to sections I was underperforming on. For instance, if I was underperforming consistently on questions relating to Incident Response,<em> </em>I would focus on this section. It is a great augment to see more questions without burning through practice exams. However, my only complaint was some of the questions are kind of irrelevant to the point of frustration. This was the only resource I debated how useful it was.</p><p>Lastly, I used <a href="https://www.professormesser.com/sy0-601-success-bundle/">Professor Messer’s</a> practice exams to be the final benchmark for studying. <strong>Diversifying the authors of testing material will help baseline your knowledge. </strong>If I was to compare Messer’s with Dion’s practice exams, I would say Messer’s were more difficult. I again held the standard of a passing grade being 85% and after revising my study habits, I was able to pass all three exams first time. The time spent building flashcards in Quizlet helped a ton on Messer’s exams.</p><p><strong>Why</strong></p><p>My parting food for thought. <strong>Before questing out on an endeavor, one needs to think honestly about why they have chosen to commit to this quest.</strong> The hardships that will be encountered along the way will defeat a weak enough “why”. A person’s “why” should reflect their situation and truly be theirs. Rarely this is an easy task, especially for myself; however, I know once I put the due diligence into answering this question I able to endure through all the trials.</p><h3><strong>tl;dr</strong></h3><p>Here is the short and sweet version of my approach to preparing for this exam.</p><p>Comprehension of the exam objectives:</p><ol><li>Read a study guide cover to cover. I used <a href="https://www.amazon.com/CompTIA-Security-Certification-Kit-SY0-601/dp/1119794005/ref=pd_lpo_1?pd_rd_i=1119794005&amp;psc=1">Sybex Sec+ Study Guide Paperback &amp; Practice Exams</a>. The end of chapter reviews should be taken as if it was a real testing environment. No distractions, no looking back at what you just read, and no outside resources. You should record your answers on a separate piece of paper so you are able to repeat if necessary.</li><li>Watch <a href="https://www.udemy.com/course/securityplus/">Jason Dion’s Complete Course &amp; Practice Exam</a> videos on Udemy. Two different mediums allowed me to grasp the content more thoroughly by answering questions that would arise from one with the other. The videos are accessible on the Udemy app too; eliminates any excuses.</li><li>Create <a href="https://quizlet.com/">Quizlet flashcards</a> to help with the questions that require memorization; port numbers, acronyms, threat actors, data storage, etc. This resource is also available on the go. Can’t stress how helpful this was!</li></ol><p>Practice Exams:</p><ol><li>Acquire Jason Dion’s 6 additional <a href="https://www.udemy.com/course/security-601-exams/">practice exams</a> from Udemy. I started feeling confident after averaging above 85% across all 6.</li><li>For a more challenging test, grab <a href="https://www.professormesser.com/sy0-601-success-bundle/">Professor Messer’s practice exams</a> as well. They are consistently more difficult than Dion’s so again, try to average above 85% to be prepared.</li></ol><p>Once I was scoring above 85% after a handful of practice exams, I felt confident to confirm my test date. Lastly, as a good benchmark, be able to have conversation about each of the exam objectives to confirm your base knowledge.</p><p>Good luck studying and remember it’s a process.</p><p><strong>Resources</strong></p><ul><li><a href="https://www.udemy.com/course/securityplus/">Jason Dion’s Complete Course &amp; Practice Exam</a></li><li><a href="https://www.udemy.com/course/security-601-exams/">Jason Dion’s Additional Practice Exams</a></li><li><a href="https://www.professormesser.com/sy0-601-success-bundle/">Professor Messer’s Practice Exams</a></li><li><a href="https://www.amazon.com/CompTIA-Security-Certification-Kit-SY0-601/dp/1119794005/ref=pd_lpo_1?pd_rd_i=1119794005&amp;psc=1">Sybex Sec+ Study Guide Paperback &amp; Practice Exams</a></li><li><a href="https://quizlet.com/">Quizlet flashcards</a></li></ul><p>*I am not affiliated with any of the resources mentioned in this article.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e18a346da086" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Suspicious Mshta.exe Behavior — letsdefend.io Walkthrough]]></title>
            <link>https://medium.com/@jklothe/suspicious-mshta-exe-behavior-letsdefend-io-walkthrough-83099c946b08?source=rss-ce1bf4358cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/83099c946b08</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Jon Klothe]]></dc:creator>
            <pubDate>Wed, 30 Mar 2022 03:41:17 GMT</pubDate>
            <atom:updated>2022-03-30T03:41:17.888Z</atom:updated>
            <content:encoded><![CDATA[<h4>Suspicious Mshta.exe Behavior — letsdefend.io Walkthrough</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1pEpIUDqhaKfXZNuyR-1Sg.png" /></figure><p>As SOC analysts, the alerts that populate the dashboard’s of our SIEM are our responsibility and determining if they are legitimate or false positive is our mission. This effort to determine the legitimacy of alerts can be difficult, however, tools now exist that allow you to hone your skills at your pace. This walkthrough is based on a simulated alert from<a href="https://letsdefend.io/"> <strong>letsdefend.io</strong></a><strong>. </strong>So grab some coffee and spin up Notepad/Notes or, as I prefer, break out the Moleskine and let’s begin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHAcB2rI6L88uvZRd1Bbig.png" /><figcaption>SOC164 — Suspicious Mshta Behavior</figcaption></figure><p>Upon receiving and opening alert SOC164, a great deal of context can be gathered from the provided fields. This context will serve as our navigation as we begin investigating. Before diving too deep, let’s familiarize ourselves with what the alert is telling me. In this particular example a suspicious <strong>Mshta </strong>binary was executed on a user’s desktop. Understanding the relationship of this binary and the suspected malicious file will help us determine what the appropriate next steps will be.</p><p><strong>Part 1: Binary Research</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7FTgeoqKvNrkOPBVgxGAvg.png" /><figcaption>Related Binary and Path</figcaption></figure><p>In the figure above, the related binary and its path can be seen and are the first pieces of information I make note of. If I don’t know a particular binary or file I’ll refer to a tested <a href="https://www.file.net/process/mshta.exe.html"><strong>source</strong></a>. Personally, as a new SOC analyst, remembering and associating all the possible vulnerabilities that exist is a daunting prospect, but with more practice I believe those connections will become more second natured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ZJph34LjpdIqVsIA-j5ptw.gif" /></figure><p>The Mshta.exe is genuine software from Microsoft for Internet Explorer. It is part of the Microsoft HTML application host program and helps support the execution of .hta files. Though Mshta.exe is not malware, it can be used to execute malicious HTA code. Benign binaries can be used by attackers to serve as camouflage for malicious payloads. This is known as <strong>living off the land </strong>and is an effective technique to evade defensive measures.</p><p>Armed with this knowledge, knowing the types of techniques often used by attackers is next. An excellent resource for living off the land binaries, scripts and libraries is <a href="https://lolbas-project.github.io/">https://lolbas-project.github.io/</a>. After reading it becomes clear that <a href="https://lolbas-project.github.io/lolbas/Binaries/Mshta/">Mshta.exe</a> is a known example of a <strong>signed binary proxy execution</strong>.</p><p>Lastly, to round out the overview of this binary, always check the MITRE ATT&amp;CK database. The use of mshta.exe to execute HTA code is also known as <a href="https://attack.mitre.org/techniques/T1218/005/">T.1218.005</a> under the tactic of Defensive Evasion. This defense evasion comes not only from the proxy execution but from executing outside of the browser bypassing security settings.</p><p>&lt;summarize findings in thesis sentence&gt; To gain the necessary understanding of the subject, its pivotal to refer to several resources in order to gain an unbiased perspective.</p><p><strong>Part 2: Malicious File Analysis</strong></p><p>The next important piece of information to analyze is the name and hash of the potentially malicious file. We can thank the security engineers for properly configurating the security policies in order to view the attacker’s command line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFq1lf8K8aYJEngqk1scuA.jpeg" /></figure><p>From the figure above we can see the name of the file, <strong>Ps1.hta. </strong>In addition, we have its hash that can be compared against other known signatures found in OSINT resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKTXLOalcvMzGvM4Hg4PZg.jpeg" /><figcaption>VirusTotal Results</figcaption></figure><p>As the figure from <a href="https://www.virustotal.com/gui/file/886095c7861a068d1ee603c71cb161f256941e802e743fe2161f30013947a2f1/detection">VirusTotal</a> illustrates, this file is considered malicious by 22 of 57 different security entities. Combining the information from our binary research (Part 1) and VirusTotal (Part 2) leads me to suspect <strong>this file is malicious</strong>.</p><p><strong>Part 3. Examining File Behavior</strong></p><p>Learning the behavior of an executed malicious file can help provide clues before investigating the potentially infected endpoint. The best way to safely observe a file’s behavior is in a sandbox environment where the suspicious file won’t be able to infect any other systems. This type of analysis is known as a dynamic analysis.</p><p>In order to run a dynamic analysis we will need a sample to upload to an interactive malware analysis tool. So taking the hash from our alert, we can upload it into the “<a href="https://bazaar.abuse.ch/sample/886095c7861a068d1ee603c71cb161f256941e802e743fe2161f30013947a2f1/">MalwareBazaar Database</a>” to obtain a sample.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGrV2E3uxWFDRNL54g9ZJg.jpeg" /><figcaption>Downloaded Sample</figcaption></figure><p>Now with the sample of Ps1.hta we can upload it to “<a href="https://app.any.run/tasks/729ba27c-16b6-4075-81f7-4e9058fda29b/">any.run.app</a>”, our malware analysis tool. This fully interactive, free sandbox will not only allow the file to run but also capture all the processes too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*RSxzjYJgvln7NSE3FyRXIw.jpeg" /><figcaption>Related processes from Ps1.hta</figcaption></figure><p>The figure above displays the processes that occurred in our sandbox post executing ps1.hta. Most concerning is the child process of powershell.exe. When an attacker is able to execute their malicious payloads through Powershell, this is known as <strong>fileless malware</strong>. A feature of fileless malware is its ability to bypass many of the safeguards installed on an endpoint due to being memory-based and not file-based.</p><p>The powershell.exe also sent a HTTP request to 193.142.58.23 and that can be seen below. This request could signify a beaconing effort back to a command and control server but the server couldn’t be found based on the 404 error code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wfZHg7ADMyi_0ape9G_vJA.jpeg" /><figcaption>HTTP Connection</figcaption></figure><p>The results from the dynamic analysis will guide us as we now need to check our endpoint’s logs to determine if this process occurred.</p><p><strong>Part 4: Log Analysis</strong></p><p>We shall return to our <strong>letsdefend.io </strong>dashboard and navigate to the Endpoint Management in order to search for user Roberto. The details regarding command execution and a list of processes will be the most valuable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*wOZJLGWLFH7y79xQVVlhEg.jpeg" /><figcaption>Command History</figcaption></figure><p>The command history shows the execution of Ps1.hta and following that a powershell.exe. This sequence seems to mimic the findings from our dynamic analysis. We can confirm this by reviewing the process list to see the parent process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*iSLkwvRlu_MewWlatOJ8Uw.jpeg" /><figcaption>Process List</figcaption></figure><p>As the process list shows, mshta.exe’s parent process was explorer.exe and powershell.exe’s parent process was mshta.exe.</p><p>Finally, we need to access the Log Management to determine if the IP address from “any.scan.url” also appeared in this network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dAOXZNhx9uwMCSKE5KwVkA.jpeg" /></figure><p>As seen in the figure above, the timestamp correlates to the execution of the command and the GET request sent to the flagged IP address.</p><p>We can conclude the MITRE technique of a signed binary proxy execution was performed using the Mshta binary to allow the execution of the malicious Ps1.hta file on Roberto’s host. SOC164 is confirmed as a <strong>true positive</strong> and <strong>containment</strong> is needed.</p><p><strong>Conclusion</strong></p><p>The findings from our binary research in combination with our malware analysis allowed our investigation to have structure and a foundation to compare against our logs. That comparison revealed that our alert flagged a legitimate threat to our network and containment of the host was necessary.</p><p>Parting note, my mindset is to start from an assumption that the alert is a false positive and have the evidence change my opinion to true positive. This keeps me focused on learning all there is about a situation before committing my SOC team’s resource.</p><p>Keep studying and happy hunting.</p><p><strong>Glossary</strong></p><ul><li>SIEM (Security Information and Event Management): software to support security threat management and visibility through the collection and aggregation of log data from multiple sources.</li><li>Binary (binary execution): a file in a machine language for a specific processor and is formatted a head of time in order to be ready-to-run.</li><li>HTML (HyperText Markup Languague): the standard markup language for design that will be displayed in web browsers.</li><li>OSINT (Open Source Intelligence): the collection of information from free tools and resources, i.e. Google search.</li><li>Sandbox: it is an isolate environment that allows for testing of programs or opening files without the concern of affecting the application or system.</li><li>Powershell: a command-line shell created by Microsoft for task automation and configuration .</li></ul><p><strong>Disclaimer</strong>: I am not paid by any of the tools or resources mentioned in this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83099c946b08" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>