<?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 Nelson Sopuruchukwu on Medium]]></title>
        <description><![CDATA[Stories by Nelson Sopuruchukwu on Medium]]></description>
        <link>https://medium.com/@tecksec?source=rss-a2751ea48563------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j_hKmFp4RdmZd1RoEjVWWA.jpeg</url>
            <title>Stories by Nelson Sopuruchukwu on Medium</title>
            <link>https://medium.com/@tecksec?source=rss-a2751ea48563------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:39:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tecksec/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[Unveiling Malicious Traffic: A Practical Guide to Decrypting HTTPS with Wireshark]]></title>
            <link>https://medium.com/@tecksec/unveiling-malicious-traffic-a-practical-guide-to-decrypting-https-with-wireshark-721335c7e2ec?source=rss-a2751ea48563------2</link>
            <guid isPermaLink="false">https://medium.com/p/721335c7e2ec</guid>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[traffic]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[wireshark]]></category>
            <dc:creator><![CDATA[Nelson Sopuruchukwu]]></dc:creator>
            <pubDate>Mon, 18 Nov 2024 15:46:04 GMT</pubDate>
            <atom:updated>2024-11-18T15:52:15.974Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*gg2GfNws2bIE9LECQ7dkVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_kxGMjYqAL9_RNS7PJ-QA.png" /></figure><p>In the ever-evolving world of cybersecurity, analyzing encrypted network traffic is crucial for detecting malicious activity. This guide demonstrates using Wireshark to decrypt HTTPS traffic, identify malware, and trace infection pathways, using a real-world example involving the <strong>DryeX malware</strong>.</p><h3><strong>What is Wireshark?</strong></h3><p>Wireshark is a powerful, open-source network protocol analyzer that captures and displays data packets in real-time. It’s used by cybersecurity professionals to inspect network traffic, analyze protocols, and detect issues or security threats within networks.</p><h3>How Wireshark is Used</h3><p>Wireshark allows users to capture packets, filter data based on protocols (e.g., HTTP, TCP, TLS), and follow streams of communication between devices. Analysts can decrypt encrypted data (like HTTPS) if SSL/TLS keys are provided, enabling deeper inspection of network traffic.</p><h3>Uses and Benefits in Organizations</h3><p>For organizations, Wireshark enhances network visibility, allowing teams to troubleshoot connectivity issues, optimize network performance, and identify potential security threats. It’s invaluable for incident response, as it aids in tracking infection sources, monitoring command-and-control traffic, and examining suspicious data.</p><blockquote>Wireshark is a critical tool for network security and diagnostics, ensuring that organizations can manage and protect their infrastructure effectively.</blockquote><p>Using the steps outlined below, we can effectively analyze the sample pcap file with Wireshark to achieve our objective.</p><p><strong>Step 1: Preparing Your Environment</strong></p><ol><li><strong>Download Required Files</strong>: Obtain the pcap file and associated SSL key file <a href="https://github.com/tecksec/Wireshark-Traffic-Analysis.git">here</a> .</li><li><strong>Extract and Open in Wireshark</strong>: Unzip the files (password: <em>infected</em>) and load the pcap file.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soEkNnpvFjSYLQ7yF7AxHg.png" /><figcaption>Screenshot of Wireshark’s file loading interface</figcaption></figure><p><strong>Step 2: Setting Up Wireshark</strong></p><ul><li><strong>Add Columns</strong>: Include <strong>Source/Destination IPs</strong> and <strong>Ports</strong> for better clarity.</li><li><strong>Pane Layout</strong>: Adjust panes to display network details, packet list, and analysis windows clearly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auCyiuTMD63aNgohN7-NJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCnnaSwiXt4EYPkRhaNMeA.png" /><figcaption>Highlighted screenshot of Wireshark with added columns.</figcaption></figure><p><strong>Step 3: Decrypting HTTPS Traffic</strong></p><ol><li>Navigate to <strong>Edit &gt; Preferences &gt; Protocols &gt; TLS</strong>.</li><li>Load the key file under <strong>Pre-Master Secret Log File Name</strong>.</li><li>Use filters like “tls.handshake.type eq 1” to isolate handshake packets.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wY0nNuwrcMc32BrZuZrvDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dgATl9HiZSikRw-lRfOvw.png" /><figcaption>screenshot of loading decryption keys</figcaption></figure><p><strong>Step 4: Identifying Malicious Activity</strong></p><ul><li><strong>HTTP Requests</strong>: Locate resource downloads, such as .dll files.</li><li><strong>Follow Streams</strong>: Use <strong>Follow HTTP Stream</strong> to analyze communication between infected hosts and command-and-control servers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0zPGhRKLfpl6ky2OrQ-GA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3y-BpsQd16Dig3VMMdZIEw.png" /></figure><p><strong>Step 5: Exporting Malware for Analysis</strong></p><ul><li>Use <strong>File &gt; Export Objects &gt; HTTP</strong> to save suspicious files.</li><li>Analyze these files using tools like <a href="https://www.virustotal.com/gui/home/upload"><strong>VirusTotal</strong></a> to classify their behavior.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yf36fk5QWqOpRYc5NgmdkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQqzQS0BHhjh0zus6Q5wLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1w_9Y5udBCcB4VqwUsavtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zw_cBoSOu9zsGjMwenToDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvcYHHE-sOZEUoHeJB9LVQ.png" /><figcaption>Workflow of exporting objects and uploading them to VirusTotal</figcaption></figure><p><strong>Step 6: Tracing Infection Pathways</strong></p><ul><li>Use logic-based filters (e.g., http.request or tls.handshake.type == 1) to identify infected hosts.</li><li>Analyze the host’s actions and its interactions with external IPs.</li></ul><p><strong>Key Takeaways</strong></p><ul><li><strong>Malware Used</strong>: The DryeX malware exploits office documents with macros for infection.</li><li><strong>Decrypting TLS</strong>: With SSL keys, encrypted traffic can be effectively analyzed.</li><li><strong>Collaboration</strong>: Analysts and incident response teams must work together to mitigate threats.</li></ul><blockquote>For more guidance and a detailed walkthrough of this process, check out this video by HackerSploit. It provides valuable insights and practical demonstrations to deepen your understanding.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fa9eVf2uleaA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Da9eVf2uleaA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fa9eVf2uleaA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/98466ee1b572e0f3fa1b9089aea2fca9/href">https://medium.com/media/98466ee1b572e0f3fa1b9089aea2fca9/href</a></iframe><p><strong>Conclusion</strong></p><p>Mastering tools like Wireshark is a game-changer for cybersecurity professionals. With the ability to decrypt traffic, identify malware, and trace infection paths, you’re better equipped to tackle threats. Dive into these techniques, and stay one step ahead of attackers!</p><p><a href="https://www.youtube.com/hashtag/cybersecurity">#Cybersecurity</a> <a href="https://www.youtube.com/hashtag/blueteam">#BlueTeam</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=721335c7e2ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-site request forgery (CSRF) attack with burp suite]]></title>
            <link>https://medium.com/@tecksec/cross-site-request-forgery-csrf-attack-with-burp-suite-7a6a14b71b4a?source=rss-a2751ea48563------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a6a14b71b4a</guid>
            <category><![CDATA[csrf-protection]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[csrf-attack]]></category>
            <dc:creator><![CDATA[Nelson Sopuruchukwu]]></dc:creator>
            <pubDate>Fri, 17 Feb 2023 02:47:29 GMT</pubDate>
            <atom:updated>2023-02-18T02:21:47.554Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ARazgLQR89RT6-RmIqyMtQ.jpeg" /></figure><p>Cross-site request forgery (CSRF) is a type of attack that targets web applications by tricking a user into performing an action that they didn’t intend to perform. The attack involves sending a forged HTTP request to the targeted website from a user’s browser, where the user is already authenticated, without their knowledge or consent.</p><p>For example, suppose an attacker creates a website with a hidden form that automatically submits data to an online shopping site when a user visits the attacker’s site. If the user is already logged in to the shopping site, the attacker’s form could purchase on the user’s behalf without their knowledge.</p><p>CSRF attacks can be prevented by including a unique token in each request, known as a CSRF token. The server can verify that the token matches the expected value for the user’s session, ensuring that the request is legitimate and not a forged one. Additionally, websites can prevent automatic form submissions by requiring user interaction, such as clicking a button or entering a CAPTCHA, before allowing form submissions.</p><p>CSRF attacks exploit a web application’s trust in the user’s browser, which is based on the same-origin policy. This policy specifies that a web page can only access data from the same origin as the page itself. An origin consists of the scheme, host, and port of the URL (e.g.,<a href="http://example.com/"> http://example.com:80</a>). This policy is designed to prevent malicious scripts from accessing sensitive data across different origins.</p><p>However, when a user is logged into a web application, the application’s server assumes that any subsequent requests coming from the user’s browser are legitimate. If an attacker can trick a user into visiting a specially crafted website or clicking on a malicious link, they can send a request to the vulnerable web application using the user’s browser, with the user’s credentials, without the user’s knowledge or consent. The web application will process the request as if it came from the user and perform the corresponding action, which could be anything from changing the user’s password to making a purchase. Here’s an example of how a CSRF attack works:</p><p>The attacker crafts a malicious HTML page that contains a form and a hidden field that specifies the action to be performed on the target site, along with any necessary data. For example, the form might submit a request to change the user’s email address.</p><p>The attacker entices the user to visit their page, perhaps by sending them a link or embedding the page in an email or forum post.</p><p>When the user visits the attacker’s page, the hidden form is automatically submitted in the background, using the user’s existing session with the target site. Since the request appears to come from the user’s browser, the target site processes it as if it were a legitimate request.</p><p>The user is none the wiser, as the attack occurs without their knowledge or consent.</p><h3>What is a CSRF token and how does it work?</h3><p>A CSRF token, also known as a synchronization token or a nonce, is a security measure used to protect against Cross-Site Request Forgery (CSRF) attacks. It’s a unique token that is generated by the server and included in each form or request sent to the server. When a user acts on a web application, such as submitting a form, the CSRF token is included as a hidden field or a custom HTTP header in the request. When the server receives the request, it checks the validity of the CSRF token to ensure that the request was initiated by the user and not by an attacker.</p><p>The server generates a random CSRF token for each session or each request and includes it in the response to the user’s initial request. The token is stored on the client side, typically as a cookie, and is used in subsequent requests to the server.</p><p>Here’s how a CSRF token works to protect against attacks:</p><ol><li>The user logs in to a web application and is assigned a unique session ID.</li><li>User acts, such as submitting a form, that requires a CSRF token.</li><li>The server generates a random CSRF token, associates it with the user’s session, and includes it in the response to the user’s initial request.</li><li>The user’s browser stores the CSRF token as a cookie or in some other form of client-side storage.</li><li>When the user performs subsequent actions on the web application, such as submitting another form, the CSRF token is included as a hidden field or custom HTTP header in the request.</li><li>The server checks the validity of the CSRF token to ensure that the request was initiated by the user and not by an attacker. If the CSRF token is valid, the server processes the request.</li></ol><blockquote>If an attacker attempts to perform a CSRF attack on a web application that uses CSRF tokens, the attack will fail unless the attacker can obtain a valid CSRF token. Since the CSRF token is unique and unpredictable, it’s extremely difficult for an attacker to guess or generate a valid token, making the attack much less likely to succeed.</blockquote><p><strong>how to steal CSRF token from browser:</strong></p><p>Stealing a Cross-Site Request Forgery (CSRF) token from a user’s browser requires the attacker to have some sort of access to the user’s computer or network. This can be achieved through various means, such as by exploiting a vulnerability in the user’s browser or by gaining access to the user’s device through malware or social engineering.</p><p>Once the attacker has access to the user’s browser, they can use various techniques to steal the CSRF token, such as by using a browser extension, JavaScript code injected into the browser or capturing network traffic.</p><p>If successful, the attacker can then use the stolen CSRF token to make unauthorized requests to the web application on behalf of the user. This can result in various types of attacks, such as changing the user’s password, making unauthorized purchases, or stealing sensitive data.</p><h3><strong>Using Burp suite for csrf attack (capturing network traffic)</strong></h3><p>I need to emphasize that using Burp Suite or any other hacking tool to launch a CSRF attack on a web application without the explicit consent of the owner is illegal and unethical. It’s important to always obtain permission from the appropriate parties before performing any security testing on a web application.</p><p>That being said, Burp Suite is a powerful and widely used web application security testing tool that can be used to test for CSRF vulnerabilities.</p><p>Here’s a general overview of how to use Burp Suite for CSRF attacks:</p><ol><li>Set up Burp Suite: Download and install Burp Suite, and set up your browser to use Burp Suite as a proxy. This will allow Burp Suite to intercept and analyze the traffic between your browser and the web application.</li><li>Navigate to the target site: Use your browser to navigate to the target site and log in with valid credentials.</li><li>Intercept the request: With Burp Suite running, submit the form or perform the action on the target site that you want to test for CSRF vulnerabilities. Burp Suite will intercept the request, and you can view and modify the request in the Intercept tab.</li><li>Modify the request: In the Intercept tab, you can modify the request to add or modify parameters, headers, or other data. For example, you could add a hidden field with a value that the target site would recognize as a valid request. You could also change the action being performed, such as changing the recipient of a payment or modifying a user’s profile.</li><li>Forward the request: Once you’ve modified the request to your liking, click “Forward” to send the modified request to the server. If the server is vulnerable to CSRF attacks, it will process the request as if it came from a legitimate user.</li><li>Check for a successful attack: If the attack is successful, you should see the results of the action you requested on the target site. For example, if you added a hidden field to transfer funds to your account, you should see the funds appear in your account on the target site.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*meUYlH_mkm_EtJRkCf8M_w.png" /><figcaption>foxyProxy and our target</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uRyHqQYqyfOcU0sF8e_JMA.png" /><figcaption>Burp Suite</figcaption></figure><p><strong>Test:</strong></p><p>We are running csrf attack on an email-sending system I built with laravel, aiming to use current user csrf tokens to initiate emails to many users. Tools used: (foxyproxy extension, mailtrap, burp suite, email-list) server: <a href="http://127.0.0.1:8000/">http://127.0.0.1:8000</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQu4gtlnI7ho%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQu4gtlnI7ho&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQu4gtlnI7ho%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b128cb48205f6ca4e811c4f12f2ac7c/href">https://medium.com/media/6b128cb48205f6ca4e811c4f12f2ac7c/href</a></iframe><h3><strong>How to prevent csrf attack:</strong></h3><p>Preventing Cross-Site Request Forgery (CSRF) attacks is important to ensure the security and integrity of your web application. Here are some ways to prevent CSRF attacks:</p><ol><li>Use CSRF tokens: Use unique and unpredictable CSRF tokens for each user session or request, and include the token in all requests that modify the state on the server. This ensures that requests can only be submitted by users who have interacted with the application and have the correct token.</li><li>Synchronizer tokens: This technique involves adding a random, unguessable token to each form on the page, which is then verified by the server before processing the request. The token is generated by the server and embedded in the form as a hidden field, so it’s not visible to the user. The attacker cannot guess or generate this token, so any forged request will be rejected by the server.</li><li>Use SameSite cookies: Set the SameSite attribute on cookies to “strict” or “lax” to prevent them from being sent in cross-site requests. This makes it more difficult for an attacker to steal a user’s session ID and use it to launch a CSRF attack.</li><li>Use double-submit cookies: This is another approach to using CSRF tokens, where the token is stored in a cookie and a hidden form field. When a request is made to the server, it checks whether the token in the cookie matches the token in the form field, which can help prevent attacks that bypass token validation.</li><li>Use Captcha: Include a captcha in forms that submit sensitive data or make important changes, to prevent automated attacks from submitting the form.</li><li>Referrer header validation: The Referrer header contains the URL of the page that initiated the request. Web applications can check that the Referrer header matches the expected value, which can help prevent CSRF attacks. However, this technique is not foolproof, as some browsers and security tools can strip or modify the Referrer header.</li><li>Restrict Referer Header: Ensure that the Referer header is set to the same domain as the application, to help prevent requests from other domains from being processed.</li><li>Implement Access Controls: Implement access controls, such as user authentication and authorization, to ensure that users can only perform actions they are authorized to perform.</li><li>Keep software up-to-date: Keep all software and components of your web application up-to-date to ensure that any known vulnerabilities are patched.</li><li>Educate Users: Educate your users on the risks of CSRF attacks and encourage them to log out of the application when not in use and avoid clicking on suspicious links.</li></ol><h4><strong>Conclusion</strong></h4><p>In conclusion, Cross-Site Request Forgery (CSRF) is a type of web application vulnerability that occurs when an attacker tricks a user into unknowingly submitting a malicious request to a website. This can result in unauthorized actions being performed on behalf of the user, such as changing their password, transferring money, or stealing sensitive data.</p><p>To protect against CSRF attacks, web applications can use CSRF tokens, which are unique and unpredictable tokens generated by the server and included in each form or request sent to the server. The server checks the validity of the CSRF token to ensure that the request was initiated by the user and not by an attacker.</p><p>Other prevention techniques include using SameSite cookies, double-submit cookies, captchas, restricting the Referer header, implementing access controls, keeping software up-to-date, and educating users on the risks of CSRF attacks.</p><p>It’s important to note that implementing just one technique may not be enough to prevent all CSRF attacks, and it’s recommended to use a combination of these techniques to provide multiple layers of defense. By taking proactive measures to prevent CSRF attacks, web application developers can help protect against unauthorized access and maintain the security and integrity of their applications and data.</p><p>tags: <a href="https://www.instagram.com/explore/tags/csrfattack/">#csrfattack</a> <a href="https://www.instagram.com/explore/tags/penetration/">#penetration</a> <a href="https://www.instagram.com/explore/tags/cybersecurity/">#cybersecurity</a> <a href="https://www.instagram.com/explore/tags/hacked/">#hacked</a> <a href="https://www.instagram.com/explore/tags/ethicalhacker/">#ethicalhacker</a> <a href="https://www.instagram.com/explore/tags/learning/">#learning</a> <a href="https://www.instagram.com/explore/tags/it/">#it</a></p><p>past article: <a href="https://www.linkedin.com/pulse/things-know-firewalls-cyber-security-personnel-nelson-ojukwu/?trackingId=4jIRm3Q7SlmHpuwuPA4bTQ%3D%3D"><em>Things to know about firewalls as a cyber security personnel</em></a><em> </em><strong><em>and</em></strong><em> </em><a href="https://www.linkedin.com/pulse/apis-danger-nelson-ojukwu/"><em>API’s in Danger</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a6a14b71b4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>