<?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 Ravneet Singh on Medium]]></title>
        <description><![CDATA[Stories by Ravneet Singh on Medium]]></description>
        <link>https://medium.com/@ravneetsingh1337?source=rss-099c2a618e4d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Qu_2xA_uiwUZlJViGGPglA.jpeg</url>
            <title>Stories by Ravneet Singh on Medium</title>
            <link>https://medium.com/@ravneetsingh1337?source=rss-099c2a618e4d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:51:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ravneetsingh1337/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[Cracking the Code: Mastering SSL Pinning Bypass with Frida for Pentesting Android Apps]]></title>
            <link>https://medium.com/@ravneetsingh1337/cracking-the-code-mastering-ssl-pinning-bypass-with-frida-for-pentesting-android-apps-807c02fb8170?source=rss-099c2a618e4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/807c02fb8170</guid>
            <category><![CDATA[ssl-pinning-bypass]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android-pentesting]]></category>
            <dc:creator><![CDATA[Ravneet Singh]]></dc:creator>
            <pubDate>Sat, 04 Nov 2023 10:55:37 GMT</pubDate>
            <atom:updated>2023-11-16T07:45:22.519Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m9BJPJ_tYqE1Znzw.png" /></figure><p>Have you ever wondered how to break the barrier of SSL pinning on Android applications? In this in-depth guide, we’ll explore the powerful Frida framework and its capabilities in bypassing SSL pinning. Our aim is to provide a detailed, step-by-step breakdown of this complex process.</p><p><strong>Introduction to Frida and SSL Pinning</strong></p><p>The journey begins with a fundamental understanding of what Frida and SSL pinning entail. Frida is a dynamic code instrumentation toolkit, acting as the ultimate solution for SSL pinning bypass. Its versatility allows for JavaScript injection into native apps across various platforms, including Android. SSL pinning, on the other hand, is a security mechanism implemented to ensure that an application trusts a specific certificate, making it a significant challenge for penetration testers.</p><p><strong>Introduction to Frida</strong></p><p>Frida is the real star of the show when it comes to performing dynamic analysis on Android applications. This powerful tool allows you to inject custom code into running applications, providing a window into their inner workings. The magic happens as we interact with Frida using JavaScript or Python. It serves as the ultimate dynamic instrumentation framework, catering to the needs of security researchers, developers, and testers.</p><p><strong>Why You Need Frida</strong></p><p>Dynamic Analysis Frida empowers you to observe an application’s behavior as it operates, giving you invaluable insights into its interactions with the system and data processing.</p><p>Reverse Engineering In the quest to understand the inner workings of an application, Frida shines. It reveals how methods are invoked, data is processed, and components interact, making reverse engineering a breeze.</p><p>Runtime Manipulation Flexibility is one of Frida’s strengths. You can alter an app’s behavior on the fly by injecting custom code, making it an indispensable tool for bypassing security measures, disabling functions, or altering data.</p><p>Security Assessment Frida aids in identifying security vulnerabilities, ranging from insecure data handling to API misuse and weaknesses in cryptographic implementations.</p><p>Malware Analysis Frida is invaluable for analyzing potentially malicious software, such as mobile malware. It helps you keep a watchful eye on their actions and interactions.</p><p><strong>Capabilities of Frida</strong></p><p>Frida is not your average toolkit; it’s a powerhouse of capabilities:</p><ul><li>Code Injection: It allows you to inject JavaScript or your own compiled code into running processes on both Android and iOS platforms.</li><li>Method Hooking: You can hook methods or functions within the target process, giving you control over their behavior.</li><li>Intercepting Function Calls: Frida opens the door to intercepting and modifying function calls, providing a means to influence the flow of execution.</li><li>Dynamic Tracing: Real-time tracing of method calls, parameter values, and return values helps you gain a deeper understanding of how an app functions.</li><li>SSL Pinning Bypass: Frida is your ally when it comes to bypassing SSL pinning implemented by an app, allowing you to inspect encrypted traffic.</li><li>JavaScript API: It offers a JavaScript API that facilitates interaction with the app’s memory, objects, and functions.</li><li>Memory Access: Frida enables you to read, write, and manipulate memory within the target process, providing the power to change data in real-time.</li><li>API Calls and System Interaction: It lets you observe the interactions between the app and the underlying operating system.</li><li>Network Traffic Analysis: Capture and modify network traffic generated by the app to understand its communication with external servers.</li><li>App Tampering and Patching: Frida is a handy tool for modifying an app’s code or resources, which can be useful for disabling security checks, altering behavior, or patching vulnerabilities.</li><li>Exploit Development: Frida frequently plays a crucial role in exploit development by analyzing the behavior of target applications to identify potential attack vectors.</li></ul><p>Frida’s adaptability and rich feature set make it an invaluable tool for security professionals and developers working on mobile app security, vulnerability assessments, reverse engineering, and various forms of dynamic analysis. However, it’s important to use Frida responsibly and ensure proper authorization when analyzing or modifying software.</p><p><strong>Dynamic Analysis with Frida</strong></p><ol><li>Testing Error Handling: Applications need to handle unexpected situations gracefully. With Frida, you can manipulate an app’s behavior to simulate errors or unexpected inputs, assessing how well it handles such scenarios without crashing or compromising sensitive data.</li><li>Finding Security Vulnerabilities: Frida gives you the power to manipulate the values the app uses while it runs. For instance, in an app with a score-tracking feature, you can probe its behavior by setting your score to unusual values, such as exceptionally high or negative ones.</li><li>Identifying Logic Flaws: Apps are designed with specific logic in mind, but by altering inputs and observing the app’s reactions, you may uncover logic flaws that malicious attackers could exploit</li></ol><p><strong>Requirements</strong></p><p>Before we dive into the SSL pinning bypass process, let’s ensure we have all the necessary prerequisites. The initial setup may seem extensive, but once in place, it streamlines the process for future attempts. If you encounter any roadblocks, don’t worry; we’ve included a troubleshooting section at the end of this guide.</p><ul><li>Rooted Android Device/Emulator: To inject scripts into the device, a rooted device or emulator is required. We recommend Genymotion for this purpose. It’s easy to set up and use, and you can download it from <a href="https://www.genymotion.com/fun-zone/">here</a>.</li><li>Python Frida Packages Installation: You need to install several Python packages to support the Frida server. You can install these packages via the following commands:</li><li>Platform-Tools (ADB): Download the platform-tools for Windows from <a href="https://dl.google.com/android/repository/platform-tools-latest-windows.zip">this link</a>.</li><li>Download Injection Script: Download the injection script, which we’ll use to bypass SSL pinning, from <a href="https://codeshare.frida.re/@pcipolloni/universal-android-ssl-pinning-bypass-with-frida/">this link</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*tWwdW1ntcpItIXeR9QVwhQ.png" /></figure><p><strong>Setup and Installation</strong></p><p>In this section, we’ll establish a solid foundation for our SSL pinning bypass operation. This will involve the setup and installation of various components.</p><ul><li>Connect Device to ADB: Connect your Android device to ADB, allowing you to execute commands on the device. Ensure that USB debugging is enabled. To check if your device is successfully connected to ADB, run adb devices, and you should see your device&#39;s IP address and name.</li><li>Download Frida Server for Device’s Arch Version: You’ll need to download the correct version of the Frida server for your Android device’s architecture. To determine the architecture of your device, run adb shell getprop ro.product.cpu.abi. Download the correct version of the frida-server binary from here depending upon your Android Architecture: <a href="https://github.com/frida/frida/releases/"><em>https://github.com/frida/frida/releases/</em></a></li><li>Obtain the injection script: Download the injection script from the following link, which will be pushed into the device for injection into the target application. <a href="https://codeshare.frida.re/@pcipolloni/universal-android-ssl-pinning-bypass-with-frida/">Universal Android SSL Pinning Bypass Script</a>.</li><li>Install the Target Application: Ensure that the application you wish to perform SSL pinning bypass on is installed on the device. Open the application and leave it running in the background.</li></ul><p><strong>Frida Server Setup</strong></p><p>Before we can inject scripts into the application, we need to set up the Frida server on the Android device. This involves the following steps:</p><ul><li>Push Frida-Server into the Device: First, you’ll need to push the Frida server to the device. Extract and copy the frida-server-12.4.7-android-x86 binary to your ADB folder (The version will be different in your case depending upon the latest release and your Android architecture), renaming it as frida-server. Then, run the following command to push the file to the device</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*TyGcepANs-xvQSjOj1z9fA.png" /></figure><ul><li><strong>II. Give permissions to Frida-server:</strong></li></ul><pre>adb shell chmod 777 /data/local/tmp/frida-server</pre><p><strong>Setting Up Burp Suite</strong></p><p>In this section, we’ll configure BurpSuite to act as the proxy for capturing application traffic. To set up BurpSuite, you can follow this detailed guide: <a href="https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp">Configuring an Android Device to Work with Burp</a>.</p><p><strong>Pushing the Proxy’s CA Certificate</strong></p><p>For successful traffic interception, Frida needs access to BurpSuite’s CA certificate. To achieve this, we’ll push the same certificate that you downloaded during the BurpSuite setup to the device. The certificate should be saved as cert-der.crt. Use the following command to push the certificate to the device</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*Z5XMIiEUoVuO8U493pXl2A.png" /></figure><p><strong>Script Injection to Bypass SSL Pinning</strong></p><p>The core of our SSL pinning bypass operation is the injection of the fridascript.js into the target application. Here&#39;s how it&#39;s done:</p><ul><li>Push FridaScript.js into the Device: Copy the fridascript.js file into your ADB folder and run the following command to push it to the device</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*Lpwy5yItXWWX7eueGrrl0g.png" /></figure><p>Run Frida Server on the Device: Start the Frida server on the Android device using the following command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*HtfxiL9nr7au9mnN--1JJw.png" /></figure><p>This command will run the Frida server on the device. Please note that you might not see any output in the terminal for this command.</p><ul><li>Find Your Target App: To discover the ID of your target app, first, you have to see all the processes currently running on your Android device. Open a new terminal on your computer and type in the following command. frida-ps comes with the frida-tools that we downloaded in the inital steps. It allows you to list all the processes that are running currently on the Android device/emulator directly from your computer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*kKQmaqmNIX2uNdFSWql6fg.png" /></figure><ul><li>Identify Your App’s Package Name: Look for the package name of your desired app in the list of running processes. Keep in mind: Your app needs to be actively running on the Android device to appear in the list of active processes.</li><li>Hook FridaScript.js into the Target Application: In the last step, connect the fridascript.js to the native application using a command similar to this. Reminder: Make sure the path points to the location on your computer where fridascript.js is stored not the android’s fridascript.js path.</li></ul><pre>frida -U -f com.yourapp.package -l C:\adb\fridascript.js — no-paus</pre><p>Recap:</p><p>To summarize the steps involved in bypassing SSL pinning using Frida:</p><ol><li>Download and set up Genymotion for device emulation.</li><li>Install Python and the necessary Frida packages.</li><li>Download and extract ADB platform tools.</li><li>Acquire the correct Frida server version for your device’s architecture.</li><li>Install your target application on the device.</li><li>Push the Frida server to the device and grant necessary permissions.</li><li>Configure BurpSuite as a proxy and push the CA certificate to the device.</li><li>Inject the fridascript.js into the target application.</li></ol><p>Fixing Common Issues</p><p>In this section, we address common issues you might encounter during the process, providing solutions to help you overcome them.</p><p>In conclusion, this comprehensive guide has unraveled the intricacies of bypassing SSL pinning on Android applications using the versatile Frida framework. By following these detailed steps, you can not only expand your skills in mobile application penetration testing but also ensure secure data transfer. Your commitment to mastering these techniques is truly commendable!</p><p>Issue 1: SSL Pinning Bypass Set Up While setting up SSL pinning bypass, a critical step involves pushing the Burp Suite certificate cacert.der to Android on the path /data/local/tmp. Additionally, renaming the certificate to cert-der.crt in /data/local/tmp is crucial for the process to work seamlessly. Missing this step can lead to Frida failing to function properly. This important detail is outlined in the Hail Frida article in the &#39;Setting up Burp&#39; section. Remember to read articles thoroughly, line by line, to ensure you don&#39;t overlook such critical instructions. Importantly, there&#39;s no need to convert the certificate from DER to CRT; simply changing its name and extension suffices.</p><p>Issue 2: Finding the Package Name If the command to find the package name of the app isn’t functioning, don’t despair. You can explore alternative methods to discover the package name of any application. Once you have the package name, you can use it in</p><p>Issue 3: Installing Applications through RAW APKs A little note to consider is that installing applications through RAW APKs may not always work seamlessly on Genymotion emulators. It’s advisable to find an Android version where Google Apps (GApps) are installed without issues, making it possible to install apps directly from the Google Play Store.</p><p><strong>Thank You for Reading</strong></p><p>Your commitment to mastering SSL pinning bypass with Frida is commendable. With each new insight and technique, you’ve taken a step closer to becoming a formidable force in the world of mobile application security.</p><p>As we wrap up this journey, we look forward to our next meeting, where we’ll continue to explore the ever-evolving landscape of cybersecurity and dynamic analysis. Until then, keep exploring, learning, and making a difference in the realm of digital security. See you next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=807c02fb8170" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the Dark Web: A Red Teamer’s Toolkit for Enhanced Engagements and Threat Intelligence]]></title>
            <link>https://medium.com/@ravneetsingh1337/harnessing-the-dark-web-a-red-teamers-toolkit-for-enhanced-engagements-and-threat-intelligence-f64abc3ee2c2?source=rss-099c2a618e4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f64abc3ee2c2</guid>
            <category><![CDATA[darkweb]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Ravneet Singh]]></dc:creator>
            <pubDate>Sat, 28 Oct 2023 10:06:50 GMT</pubDate>
            <atom:updated>2023-10-28T10:13:17.229Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction: Unmasking the Digital Shadows</h3><p>In today’s cybersecurity landscape, the ability to operate covertly, maintain a veil of anonymity, and gather intelligence discreetly is a pivotal skill for pentesters and red teamers. This blog delves into the realm of online privacy and security, exploring the use of tools such as TOR and TAILS for clandestine operations. It emphasizes ethical considerations throughout and equips professionals with the knowledge to operate in the shadows effectively.</p><h3>Unmasking the TOR Basics</h3><p>The TOR network, known as the Onion Router, is the backbone of online anonymity. It operates on the principle of routing internet traffic through a series of volunteer-run servers, each encrypted layer peeling back like the layers of an onion. This process effectively conceals your IP address and location, making it challenging for anyone to trace your online activities back to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1EqL2zWB9qRjEYjM.jpg" /></figure><p>How TOR Works:</p><ul><li>Onion Routing: When you connect to the TOR network, your data is encrypted and then sent through a series of nodes (usually three). Each node peels back a layer of encryption, revealing the next destination but concealing the source.</li><li>Volunteer Nodes: TOR relies on a global network of volunteer-run nodes. These nodes facilitate the anonymization process, making it virtually impossible for anyone to discern the original source of the data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*57dsEkq8CEZv6Exu.png" /></figure><p>Using TOR Efficiently:</p><ul><li>The TOR Browser: The TOR Browser is a specialized web browser that’s pre-configured to work with TOR. It’s an easy and convenient way to access the TOR network.</li><li>Bridge Nodes: In regions with strict censorship, bridge nodes allow you to access the TOR network. These nodes are not publicly listed, enhancing security.</li><li>Configuration and Settings: TOR offers various settings that allow you to customize your level of privacy. Understanding these settings is essential for optimizing your experience.</li></ul><h3>Setting Up TOR Like a Pro</h3><p>While TOR is a powerful tool for online anonymity, effectively setting it up and configuring it requires an in-depth understanding of the network and its nuances.</p><p>Configuration Tips:</p><ul><li>Browser Hardening: Configure the TOR Browser to enhance security by blocking scripts, mitigating fingerprinting attempts, and limiting extensions.</li><li>Network Settings: Understand how TOR routes traffic and how to configure it for your specific needs. This knowledge is essential for avoiding common pitfalls.</li><li>Using External Applications: Learn how to use external applications like email clients or instant messengers with TOR for end-to-end encryption.</li></ul><p>Pitfalls to Avoid:</p><ul><li>Misconfigured Settings: Incorrectly configured settings can compromise your anonymity. Take the time to understand the nuances and potential risks.</li><li>Overreliance on TOR: While TOR is a valuable tool, it’s not a magic bullet. It’s essential to combine it with other privacy and security practices for comprehensive protection.</li></ul><h3>Introduction to TAILS</h3><p>TAILS, the Amnesic Incognito Live System, is a live operating system specifically designed for privacy and security. It’s a self-contained system that can be run from a USB drive or DVD, and it leaves no traces on the host computer.</p><p>Key Features of TAILS:</p><ul><li>Live Operating System: TAILS runs independently from the host system, ensuring that your actions on the system are isolated and temporary.</li><li>Data Encryption: TAILS includes encryption tools, allowing you to encrypt your files and communications for enhanced security.</li><li>Secure Browsing: The TOR Browser is integrated into TAILS, ensuring that your web activities are routed through the TOR network by default.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l5Eh07SLDgtZ-5OC.png" /></figure><h3>TAILS for Pentesters and Red Teamers</h3><p>Pentesters and red teamers can leverage TAILS for various activities where privacy and security are of utmost importance.</p><p>Secure Communications:</p><ul><li>TAILS provides a secure platform for communicating with clients or team members. Encrypted emails and messaging applications can be used with confidence.</li></ul><p>Operational Security:</p><ul><li>TAILS enables secure and anonymous investigations. By leaving no trace on the host system, it ensures that your activities are not inadvertently exposed.</li><li>During operations, especially in high-risk environments, TAILS enhances operational security (OPSEC) and helps protect your digital identity.</li></ul><h3>Navigating the Hidden Corners of the Web</h3><p>The dark web is a segment of the internet that is intentionally concealed and can only be accessed with specialized software like TOR. It comprises encrypted websites, forums, marketplaces, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q0m43qCpPYeHxnzd.jpg" /></figure><p>Accessing the Dark Web:</p><ul><li>To access the dark web, you need a secure connection through the TOR network. It’s essential to verify the legitimacy of the websites you visit to avoid potential security risks.</li></ul><p>Ethical Considerations:</p><ul><li>Operating on the dark web for legitimate threat intelligence and research purposes is crucial. It’s essential to abide by ethical guidelines and not engage in any illegal activities.</li></ul><h3>Safely Gathering Threat Intelligence</h3><p>Utilizing the dark web for threat intelligence is a delicate operation. Ensuring safety, privacy, and ethical considerations is paramount.</p><p>Safety Measures:</p><ul><li>Using a Secure Environment: When accessing the dark web, do so from a secure and isolated environment, such as TAILS, to ensure that no traces are left on your host system.</li><li>Anonymity: Maintain anonymity by avoiding the use of personal information when engaging in discussions or activities on the dark web.</li></ul><p>Ethical Considerations:</p><ul><li>Research Purpose: Make it clear that your activities on the dark web are for legitimate research and threat intelligence gathering. Never engage in any illegal activities.</li><li>Legitimate Forums: Engage with legitimate forums and communities that focus on cybersecurity, threat intelligence, and similar topics.</li></ul><h3>Securing Your Digital Identity</h3><p>Securing your digital identity is essential for maintaining privacy and security in the cybersecurity field.</p><p>Best Practices:</p><ul><li>Secure Communication Channels: Use encrypted messaging services for confidential discussions and data sharing. PGP encryption for emails adds an extra layer of security.</li><li>Data Encryption: Encrypt sensitive data both at rest and in transit. Utilize encryption tools and practices to safeguard your information.</li><li>Secure Passwords: Maintain strong and unique passwords for your accounts and use a reliable password manager to store them securely.</li></ul><h3>Operational Security (OPSEC)</h3><p>Operational Security, or OPSEC, is the cornerstone of safeguarding your identity and operations.</p><p>Strategies:</p><ul><li>Pseudonyms: Use pseudonyms and maintain separate online identities for different activities and operations.</li><li>Encrypted Messaging: Utilize encrypted messaging applications and services to protect your communications.</li><li>Virtual Private Networks (VPNs) and Proxy Servers: Employ VPNs and proxy servers to further enhance your anonymity when accessing the internet.</li></ul><h3>Conclusion: Balancing on the Tightrope</h3><p>In the ever-evolving realm of cybersecurity, the skill to operate in the shadows while adhering to ethical standards is of paramount importance. Armed with the knowledge of how to leverage TOR, TAILS, and the dark web effectively, pent</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f64abc3ee2c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>