<?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 David Kangara on Medium]]></title>
        <description><![CDATA[Stories by David Kangara on Medium]]></description>
        <link>https://medium.com/@davidkangara83?source=rss-9169d165ec71------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QiFN1ohrGnMdEP-W.</url>
            <title>Stories by David Kangara on Medium</title>
            <link>https://medium.com/@davidkangara83?source=rss-9169d165ec71------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:58:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davidkangara83/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[Getting Started with Zphisher: A Simple Installation Guide on the Zphisher Phishing Framework.]]></title>
            <link>https://medium.com/@davidkangara83/getting-started-with-zphisher-a-simple-installation-guide-on-the-zphisher-phishing-framework-8c561554094f?source=rss-9169d165ec71------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c561554094f</guid>
            <dc:creator><![CDATA[David Kangara]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 19:06:51 GMT</pubDate>
            <atom:updated>2024-04-21T19:48:50.131Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Getting Started with Zphisher: A Simple Guide to Installation and Usage<br><em>Caution: This phishing template guide is created solely for educational purposes. It is intended to demonstrate the techniques used in phishing attacks and to raise awareness about cybersecurity threats. It should never be used for illegal or malicious activities. Always obtain proper authorization before conducting any security testing or awareness campaigns. Remember to respect privacy and adhere to ethical standards in all online interactions.</em></strong></p><p>Assuming you already have your Kali linux in a Virtualbox or a Linux OS running. <br>1. <strong>Launch firefox and search for Zphisher-</strong> Open the first search suggestion. OR Open the link in your favorite browser <a href="https://github.com/htr-tech/zphisher"><em>https://github.com/htr-tech/zphisher</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*8AnP6zUc5OHCD7Zi" /></figure><p>2. Click the green button <strong>CODE and copy the code</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*61ANh83kxSco-UrO" /></figure><p><strong>3. Open your Terminal and clone the repository. <br>Command : </strong><em>git clone </em><a href="https://github.com/htr-tech/zphisher.git"><em>https://github.com/htr-tech/zphisher.git</em></a><em> </em>— this is used to create a copy of the Zphisher github repository from a remote source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/0*zffbU5HIGScFGGE_" /></figure><p>4. Linux basics: List the content of your<em> pwd</em> with <strong><em>ls ,</em></strong>Locate if Zphiser was correctly downloaded then change directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*gmjd1Hv0s5cV_69P" /></figure><p>5. Install zphisher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*1Rf2O49H1EfrIbIN" /></figure><p>6. Once the installation is Over, the application loads to this page. Showing all the installed templates -&gt; Be patient!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*PfSt9JbtLsT-JPFW" /></figure><p>7. Follow the instructions : Select an option- Input the template you want<strong> 01 f</strong>or Facebook<strong> 33</strong> for github -</p><ul><li>Try different templates .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/0*1kmqLkfHd-LP8iPL" /></figure><p>8. Choose how to host your phishing template — (try different option to see the differences).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/0*aymbjJukaNeiXhTd" /></figure><p>9. Mask url — N</p><p>10. Phishing link — Here are your phishing links to send to your victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*5XJ9mEy2Bv14ht6i" /></figure><p>To copy the url, right click on the link and choose Copy link address or CTRl+shift+C</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J-7iVSC_bQN14GPa" /></figure><p>Finally, Once the victim opens the link and inputs the logins they are sent to the attackers server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*isNl4Hb7fU3FPW-I" /></figure><p><strong>Spotting Phishing Clones: Quick Tips for Identification</strong><br>1. Compare URLs: Always check the URL of the website you’re visiting. Phishing pages often have URLs that resemble the legitimate website’s URL but may contain misspellings, extra characters, or different domain extensions. Even small variations can be indicative of a cloned phishing page.</p><p>2. Check SSL Certificates: While many phishing pages may have SSL certificates (HTTPS), they might not be issued by reputable certificate authorities. Additionally, you can inspect the SSL certificate details to see if they match the legitimate website.</p><p>3. Verify Page Content: Look closely at the content of the page. Phishing pages often contain spelling or grammar mistakes, poor formatting, or inconsistencies compared to the legitimate website.</p><p>4. Review Links and Forms: Hover over links and buttons on the page to see where they lead. If the URL looks suspicious or does not match the expected destination, it could be a sign of phishing. Similarly, be cautious about entering personal information into forms on suspicious pages.</p><p>5. Examine the Website’s Design and Layout: Phishing pages may try to replicate the design and layout of the legitimate website, but they may not be exact replicas. Look for subtle differences or anomalies in the design that could indicate a cloned page.</p><p>6. Use Phishing Detection Tools: There are various online tools and browser extensions available that can help detect phishing pages. These tools can analyze URLs and website content to determine if they are likely phishing attempts.</p><p>7. Stay Informed and Trust Your Instincts: Keep yourself updated on common phishing techniques and trends. If something feels off or too good to be true, it’s better to err on the side of caution and avoid interacting with the page.</p><p><strong><em>“With great power comes great responsibility”. MARVEL</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c561554094f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sifting Through CloudTrail: A Step-by-Step Guide to Checking Cloudtrail Events and Logs]]></title>
            <link>https://medium.com/@davidkangara83/sifting-through-cloudtrail-a-step-by-step-guide-to-checking-cloudtrail-events-and-logs-6b9c9cb997e7?source=rss-9169d165ec71------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b9c9cb997e7</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[trails]]></category>
            <category><![CDATA[cloud-configuration]]></category>
            <category><![CDATA[cloudtrail]]></category>
            <dc:creator><![CDATA[David Kangara]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 08:36:38 GMT</pubDate>
            <atom:updated>2024-02-15T08:38:09.423Z</atom:updated>
            <content:encoded><![CDATA[<p>The value of cloud trail is gained by analyzing the logs and making sense of any unusual pattern of events or finding the root cause of an event. This guide will assist users in analyzing the Cloud trail logs to get information on <strong>WHO did WHAT and WHEN.</strong></p><p><strong>Viewing CloudTrail events in the console</strong></p><ul><li><strong>Using Default Options:</strong> With the numerous events and hundreds of logs, having an idea of what you are looking for or specifying a time range can help minimize noise.</li><li><strong>Open Cloud Trail.</strong></li><li>On the left, open <strong>Event History</strong>.</li></ul><p><strong>Note: </strong><em>By default, we have Read-Only set to False on the Lookup Attributes. False filter on management API events that have write permissions into the account while true allows both write and read permissions(Very noisy).</em></p><p>ℹ️ This is a great starting point, especially when you’re auditing events within a specific time duration. Using Absolute time range we can filter events based on what we are auditing.</p><p>Start date/Start time — End date/End time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Igdqy2_nikLtutbLSyPYKQ.png" /></figure><p>2. Using Filters: With a clear idea of what you are looking for in the logs, we can use other filters, which are pieces of data that make up the JSON log structure.</p><p><em>⚠️ </em><strong><em>AWS access key:</em></strong><em> The AWS access key ID that was used to sign the request. </em><strong><em>Event ID:</em></strong><em> The CloudTrail ID of the event. Each event has a unique ID.</em></p><p><em>event name: The name of the API event. You can scroll through a list of event sources after you choose the E</em><strong><em>vent name</em></strong><em> filter.</em></p><p><em>event source:The AWS service to which the request was made, such as </em><em>iam.amazonaws.com or </em><em>s3.amazonaws.com. You can scroll through a list of event sources after you choose the </em><strong><em>Event Source</em></strong><em> filter.</em></p><p>Resource name:The name or ID of the resource referenced by the event. For example, the resource name might be “auto-scaling-test-group” for an Auto Scaling group or “i-12345678910” for an EC2 instance.</p><p>Resource Type:The type of resource referenced by the event. For example, a resource type can be Instance for EC2 or DBInstance for RDS. Resource types vary for each AWS service.</p><p><strong>Time range:</strong> The time range in which you want to filter events. You can choose either a <strong>Relative range</strong> or an <strong>Absolute range</strong>. You can filter events for the last 90 days.</p><p><strong>User name:</strong> The identity referenced by the event. For example, this can be a user, a role name, or a service role.</p><blockquote><strong>Note: For all IAM &amp; STS API requests, make sure to change the region to N.Virginia.</strong> Arguing that the services are global, the events created by Amazon CloudFront, AWS Identity and Access Management, and AWS STS are recorded in the Region in which they were created, the US East (N. Virginia) Region, us-east-1. What are global Vs region bases resources?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RLnJidsy7WQSRZ8ypgI9bA.png" /></figure><p>You can expand individual events from the resultset to reveal further information about the event in a JSON format.</p><ol><li><strong>Viewing CloudTrail events with the AWS CLI</strong></li></ol><p>aws cloud trail lookup-events --max-items 10</p><p>Narrow down to individual events using the filters aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue= CreateUser</p><p>aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=iam.amazonaws.com</p><p><strong>Understanding Cloudtrail Log Structure &amp; Use Cases</strong></p><p><strong>Scenario 1</strong>. Checking Who created an IAM user</p><p><em>While conducting a routine security audit of one of your AWS accounts, you notice an unfamiliar IAM user named “David.” This discovery raises concerns as you don’t have any record of this user being created, and no one on the team claims responsibility for its creation. You need to investigate the origin and purpose of this mysterious user “David “ to ensure the security of your AWS environment without raising concerns in the tech department- Silent investigation.</em></p><ol><li>Change your region to N. Virginia.</li><li>Open the CloudTrail console at <a href="https://console.aws.amazon.com/cloudtrail/home/">https://console.aws.amazon.com/cloudtrail/home/</a> From the account you are investigating unless you have a multi-account setup.</li><li>In the navigation pane (left), choose <strong>Event history.</strong></li><li>On the <strong>Lookup</strong> window choose <strong>Event name </strong>then select CreateUser.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8gpar2IWglEgIAiDnp3gw.png" /></figure><p>Depending on the time of creation, you can use Event time to narrow down or open individual requests. This opens in a JSON document.</p><p>Cloud trail logs are JSON-formatted compressed files</p><pre>{<br>    &quot;eventVersion&quot;: &quot;1.08&quot;,<br>    &quot;userIdentity&quot;: {<br>        &quot;type&quot;: &quot;AssumedRole&quot;,<br>        &quot;principalId&quot;: &quot;AROAEREIR8434FDFDM3ZJ5O2:david@redacted.com&quot;,<br>        &quot;arn&quot;: &quot;arn:aws:sts::834553232309:assumed-role/AWSReservedSSO_AWSAdministratorAccess_24aa6b964cdc6b5f/david@redacted.com&quot;,<br>        &quot;accountId&quot;: &quot;834553232309&quot;,<br>        &quot;accessKeyId&quot;: &quot;ASIA3EDXXCGMR6NJXLFI&quot;,<br>        &quot;sessionContext&quot;: {<br>            &quot;sessionIssuer&quot;: {<br>                &quot;type&quot;: &quot;Role&quot;,<br>                &quot;principalId&quot;: &quot;AROA3EDXXCGMY4M3ZJ5O2&quot;,<br>                &quot;arn&quot;: &quot;arn:aws:iam::834553232309:role/aws-reserved/sso.amazonaws.com/eu-west-1/AWSReservedSSO_AWSAdministratorAccess_24aa6b964cdc6b5f&quot;,<br>                &quot;accountId&quot;: &quot;834553232309&quot;,<br>                &quot;userName&quot;: &quot;AWSReservedSSO_AWSAdministratorAccess_24aa6b964cdc6b5f&quot;<br>            },<br>            &quot;webIdFederationData&quot;: {},<br>            &quot;attributes&quot;: {<br>                &quot;creationDate&quot;: &quot;2023-08-22T16:56:28Z&quot;,<br>                &quot;mfaAuthenticated&quot;: &quot;false&quot;<br>            }<br>        }<br>    },<br>    &quot;eventTime&quot;: &quot;2023-08-22T16:58:00Z&quot;,<br>    &quot;eventSource&quot;: &quot;iam.amazonaws.com&quot;,<br>    &quot;eventName&quot;: &quot;CreateUser&quot;,<br>    &quot;awsRegion&quot;: &quot;us-east-1&quot;,<br>    &quot;sourceIPAddress&quot;: &quot;196.207.176.244&quot;,<br>    &quot;userAgent&quot;: &quot;AWS Internal&quot;,<br>    &quot;requestParameters&quot;: {<br>        &quot;userName&quot;: &quot;David&quot;<br>    },<br>    &quot;responseElements&quot;: {<br>        &quot;user&quot;: {<br>            &quot;path&quot;: &quot;/&quot;,<br>            &quot;userName&quot;: &quot;David&quot;,<br>            &quot;userId&quot;: &quot;AROAEREIR8434FDFDM3Zj5O2&quot;,<br>            &quot;arn&quot;: &quot;arn:aws:iam::834553232309:user/David&quot;,<br>            &quot;createDate&quot;: &quot;Aug 22, 2023 4:58:00 PM&quot;<br>        }<br>    },<br>    &quot;requestID&quot;: &quot;269668c1-2b89-49d0-bea2-d2fddaf68776&quot;,<br>    &quot;eventID&quot;: &quot;09a3f0f0-0944-493b-86d5-d67b37c0f7b3&quot;,<br>    &quot;readOnly&quot;: false,<br>    &quot;eventType&quot;: &quot;AwsApiCall&quot;,<br>    &quot;managementEvent&quot;: true,<br>    &quot;recipientAccountId&quot;: &quot;834553232309&quot;,<br>    &quot;eventCategory&quot;: &quot;Management&quot;,<br>    &quot;sessionCredentialFromConsole&quot;: &quot;true&quot;<br>}</pre><p>This JSON document gives enough information about an This JSON document gives enough information about an &quot;eventSource&quot;: &quot;iam.amazonaws.com&quot; where we can see an IAM user(identity user/SSO user) called AROA3EDXXCGMY4M3ZJ5O2:david@redacted.com had logged in through the console, to the accountID &quot;accountId&quot;: &quot;834553232309&quot;, from an IP sourceIPAddress&quot;: &quot;192.56.123.176, and invoked this event &quot;eventName&quot;: &quot;CreateUser and a user with an IAM &quot;userName&quot;: &quot;David&quot;, was created.</p><pre>          &quot;user&quot;: { &quot;path&quot;: &quot;/&quot;,<br>            &quot;userName&quot;: &quot;David&quot;,<br>            &quot;userId&quot;: &quot;AROAEREIR8434FDFDM3Zj5O2&quot;,<br>            &quot;arn&quot;: &quot;arn:aws:iam::834553232309:user/David&quot;,<br>            &quot;createDate&quot;: &quot;Aug 22, 2023 4:58:00 PM&quot;<br>        }<br><br></pre><p><strong>Using CLI</strong></p><p>You will need to specify<strong> N. Virginia</strong> region which is <em>us-east1</em> in the CLI command.</p><blockquote>aws cloudtrail lookup-events — lookup-attributes AttributeKey=EventName,AttributeValue=CreateUser — region us-east-1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kz8GP8EPZ_vwaB0WjOpvSQ.png" /></figure><p>From the data, you can quickly get the information about the person who created the IAM user and you can proceed with the investigation.</p><p><strong>Scenario 2: </strong>Check who created or modified a security group. This is a scenario of Who, and what configuration changes were made. Cloud Trail + Cloud Config</p><p><em>While conducting a routine security assessment, Security hub detected unauthorized changes in security group configurations “sg-048df523163f9d9a5 — From Bastion” within one of your AWS accounts. These alterations include adjustments to inbound and outbound rules and an extra rule “Cloudtrailtest” with port “29320“ which is open to the public “0.0.0.0/0”, raising significant concerns about potential security vulnerabilities. You need to investigate the origin and purpose of the security groups/ rules to ensure the security of your AWS environment without raising concerns in the tech department. Silent investigation !!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*urhME7lFLgtNZl0k_3gTNg.png" /></figure><p>Cloud trail console — Event name — <em>ModifySecurityGroupRules</em> ( Try ping security group will give you a list &amp; suggestion of API request)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zRzdnB3yfrEO8ff39bKhWQ.png" /></figure><p>Part of the JSON document, We can tell the account/user who made the change- and also identify the edit that change — the port was changed from port 80 to port 29310 — this is also recorded in AWS Config.</p><pre>        &quot;principalId&quot;: &quot;AROAEREIR8434FDFDM3Zj5O2:david@redacted.com&quot;,<br><br>    &quot;eventTime&quot;: &quot;2023-08-24T14:33:13Z&quot;,<br>    &quot;eventSource&quot;: &quot;ec2.amazonaws.com&quot;,<br>    &quot;eventName&quot;: &quot;ModifySecurityGroupRules&quot;,<br>    &quot;awsRegion&quot;: &quot;eu-west-1&quot;,<br>    &quot;sourceIPAddress&quot;: &quot;196.207.176.244&quot;,<br>    &quot;userAgent&quot;: &quot;AWS Internal&quot;,<br>    &quot;requestParameters&quot;: {<br>        &quot;ModifySecurityGroupRulesRequest&quot;: {<br>            &quot;SecurityGroupRule&quot;: {<br>                &quot;SecurityGroupRuleId&quot;: &quot;sgr-0b5f6b9cd29507927&quot;,<br>                &quot;tag&quot;: 1,<br>                &quot;SecurityGroupRule&quot;: {<br>                    &quot;CidrIpv4&quot;: &quot;0.0.0.0/0&quot;,<br>                    &quot;Description&quot;: &quot;Cloudtrailtest&quot;,<br>                    &quot;FromPort&quot;: 80,<br>                    &quot;ToPort&quot;: 29310,<br>                    &quot;IpProtocol&quot;: &quot;tcp&quot;<br>                }<br>       sessionCredentialFromConsole&quot;: &quot;true&quot;<br>}</pre><p><strong>Using Cloud Trail CLI</strong></p><p><strong>Command: </strong>aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=ModifySecurityGroupRules Depending on the size of the data/logs, we can use other filters like security group names to filter out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNnhyGCqLtVvyK3DUkd5dQ.png" /></figure><p><strong>Conclusion</strong></p><p><strong>Key Takeaways</strong></p><ol><li><strong>CloudTrail provides valuable insights:</strong></li></ol><ul><li>To track user activity (who did what and when) across your AWS account.</li><li>Investigate potential security concerns like unauthorized changes.</li><li>Gain detailed information about API calls and resource modifications.</li></ul><p><strong>2. Actionable steps for investigation:</strong></p><ul><li>Leverage the console or CLI for event history exploration.</li><li>Filter events based on specific criteria like time range, username, or event type.</li><li>Analyze JSON logs to understand event details and identify responsible parties.</li><li>Integrate CloudTrail with AWS Config for comprehensive resource configuration tracking.</li><li>Be aware of potential cost implications and log retention limitations.</li></ul><p>CloudTrail serves as a powerful tool for enhancing security and compliance in your AWS environment. By leveraging its ability to track user activity and log resource modifications, you can gain valuable insights into “who did what and when.” Remember, proactive security measures are crucial, so explore best practices like enabling MFA, SSO for IAM users and integrating CloudTrail with other services like AWS Config for a comprehensive approach. By taking these steps, you can ensure the security and accountability of your AWS infrastructure.</p><p><em>Next in the series: Creating alerts for risky actions with AWS Chatbot &amp; AWS SNS</em></p><p><strong>Resources:</strong></p><ol><li><a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html">https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html</a></li><li><a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-cli.html">https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-cli.html</a></li><li><a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html</a></li><li><a href="https://www.gorillastack.com/blog/real-time-events/cloudtrail-event-names/#iam-cloudtrail">https://www.gorillastack.com/blog/real-time-events/cloudtrail-event-names/#iam-cloudtrail</a> — A list of all cloud trail event names and descriptions.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b9c9cb997e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>