<?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 Tarun N on Medium]]></title>
        <description><![CDATA[Stories by Tarun N on Medium]]></description>
        <link>https://medium.com/@Tarun.N?source=rss-d939df9d9b77------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hn8SuX97aMGp1enz.jpg</url>
            <title>Stories by Tarun N on Medium</title>
            <link>https://medium.com/@Tarun.N?source=rss-d939df9d9b77------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 07:43:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Tarun.N/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[KubCon Security 101: Basics — Part 00]]></title>
            <link>https://medium.com/@Tarun.N/kubcon-security-101-basics-part-00-818d438ba9ee?source=rss-d939df9d9b77------2</link>
            <guid isPermaLink="false">https://medium.com/p/818d438ba9ee</guid>
            <category><![CDATA[container-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[containerization]]></category>
            <dc:creator><![CDATA[Tarun N]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 20:43:09 GMT</pubDate>
            <atom:updated>2024-11-28T20:43:09.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>KubCon Security 101: Basics — Part 00</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jtcmL-HPtXnf-flizlRRwg.jpeg" /></figure><h3>What Are Containers? And Why Kubernetes? 🤔</h3><p>Have you ever wondered what <strong>containers</strong> are or what <strong>Kubernetes</strong> is all about? Let’s break it down in a way that’s easy to grasp.</p><p>By now, many of you might already be familiar with concepts like <strong>virtual machines (VMs)</strong> or <strong>cloud instances</strong>. But if those terms sound new to you, don’t worry — I’ve got you covered.</p><p>Think of a <strong>virtual machine</strong> as a separate computer system within your existing computer. It’s like having a mini-computer inside your main one, with its own allocated resources, such as:</p><ul><li><strong>Processors</strong>: A slice of your CPU power.</li><li><strong>Storage</strong>: A dedicated space for its own files and data.</li><li><strong>Memory (RAM)</strong>: Its own working memory, independent of other systems.</li><li><strong>Network Interfaces</strong>: Virtual access to communicate over networks.</li></ul><p>All of this runs on the same physical hardware that you’re currently using, but each VM operates independently as if it’s a standalone machine.</p><p><strong>Cloud Instances: The Same Concept, Anywhere in the World.</strong> <br>The same idea applies to <strong>cloud instances</strong>, but these run on remote servers managed by a <strong>cloud service provider</strong>, such as <a href="https://aws.amazon.com/"><strong>AWS (Amazon Web Services)</strong></a>, <a href="https://azure.microsoft.com/"><strong>Microsoft Azure</strong></a>, <a href="https://cloud.google.com/"><strong>Google Cloud</strong></a>, or <a href="https://www.ibm.com/cloud"><strong>IBM Cloud</strong></a>.</p><p>Think of it as <strong>renting a piece of someone else’s powerful computer</strong>, but you get to choose the exact size and configuration you need. Whether it’s a small virtual environment for a lightweight application or a robust system for handling enterprise-scale workloads, you’re in control of how much computing power and storage you use — all without having to maintain the physical hardware yourself.</p><p>Now that you have an understanding of <strong>virtualization</strong>, let’s dive into the world of <strong>containers</strong> and <strong>Kubernetes</strong>.</p><p>We all use applications daily — like <strong>Medium</strong>, <strong>LinkedIn</strong>, and <strong>Facebook</strong> — that are hosted on servers. These servers are carefully configured and optimized to ensure that the applications run smoothly and efficiently, delivering a <strong>seamless user experience</strong>.</p><p>But have you ever considered what happens when the demand for an application fluctuates significantly? For example:</p><ul><li>On some days, an application might experience <strong>heavy traffic</strong>, requiring additional resources to handle the load. A perfect example is <strong>e-commerce websites during Black Friday sales</strong>. During these events, millions of users flood platforms simultaneously — browsing, adding items to their carts, and completing purchases in real-time. Without the right infrastructure, these platforms could face <strong>slow loading times</strong>, <strong>errors</strong>, or even <strong>crashes</strong>, leading to frustrated users and potential loss of revenue.</li><li>On other days, the same application might face <strong>minimal traffic</strong>, making those extra resources unnecessary and underutilized.</li></ul><h4>The Cost of Scaling with Traditional Servers</h4><p>To handle traffic spikes, companies often deploy additional servers — say, <strong>10 extra servers</strong> — to ensure smooth performance during peak usage. While this approach works, it comes with <strong>significant downsides</strong>:</p><ol><li><strong>High Costs</strong>: Purchasing and maintaining extra hardware adds a considerable financial burden, especially when those resources remain idle during off-peak periods.</li><li><strong>Ongoing Maintenance</strong>: Servers require regular <strong>security updates</strong>, <strong>application/OS updates</strong>, and other upkeep tasks. These not only increase operational expenses but also consume valuable <strong>time and effort</strong> from IT teams.</li></ol><p>This inefficiency brings us to a critical question:</p><p><strong>Is there a better way to scale applications dynamically, without over-investing in hardware and operational overhead?</strong></p><p>The solution to this scalability challenge lies in <strong>containers</strong>. Think of containers as a <strong>lightweight form of virtual machines</strong>, designed to streamline application deployment and scaling.</p><p>A <strong>container</strong> packages everything an application needs to run into a single, isolated unit. This includes:</p><ul><li><strong>Application code</strong>: The core of what makes the application function.</li><li><strong>Dependencies</strong>: Essential components like libraries, binaries, and configuration files.</li></ul><p>By bundling these together, containers ensure that applications run <strong>consistently across different computing environments</strong>. Whether the application is deployed on a developer’s laptop, a testing environment, or a production server, it will behave the same. This consistency is achieved because the container includes everything necessary to execute the application, regardless of the <strong>underlying host system</strong>. As a result, containers not only address <strong>scalability challenges</strong> but also solve <strong>portability issues</strong>, making it easier to move applications across environments seamlessly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*fvBhhBflBxXUC0BqTeq8DQ.png" /><figcaption>VM vs Container</figcaption></figure><p>One of the major differences between <strong>Virtual Machines (VMs)</strong> and <strong>containers</strong> lies in their <strong>structure</strong> and <strong>resource usage</strong>.</p><p><strong>Virtual Machines</strong></p><ul><li>Each VM includes a <strong>complete operating system</strong> along with the application and its dependencies.</li><li>This makes VMs <strong>heavier</strong> and more <strong>resource-intensive</strong>, as each VM requires substantial system resources to run its OS and applications independently.</li><li>VMs are ideal for scenarios where full isolation and the ability to run different operating systems are necessary.</li></ul><p><strong>Containers</strong></p><ul><li>Containers, on the other hand, do <strong>not package an entire operating system</strong>.</li><li>Instead, they include only the <strong>essential components</strong> of the OS required for the application to function, along with the application’s binaries, libraries, and other dependencies.</li><li>For example, a containerized application doesn’t need unnecessary components like a <strong>GUI</strong>, <strong>audio drivers</strong>, or <strong>printer drivers</strong>, unless explicitly required. These unneeded components are omitted, keeping the container <strong>lightweight</strong>.</li><li>Containers leverage the <strong>host system’s OS kernel</strong>, sharing resources more efficiently and reducing the overall footprint.</li></ul><p>This structural difference makes containers significantly <strong>lighter</strong> and more <strong>resource-friendly</strong> compared to VMs. They offer:</p><ul><li><strong>Faster startup times</strong>: Containers can start in seconds due to their smaller size.</li><li><strong>Reduced resource consumption</strong>: More containers can run on the same infrastructure compared to VMs.</li><li><strong>Higher density</strong>: Containers maximize resource utilization, allowing multiple applications to coexist on the same hardware without conflict.</li></ul><p>Imagine an application as being composed of several interconnected parts, such as:</p><ul><li><strong>Front-End</strong>: The visible interface that users interact with (e.g., a website or mobile app).</li><li><strong>Back-End</strong>: The behind-the-scenes processes that handle user operations, such as logic, calculations, and API integrations.</li><li><strong>Database</strong>: The storage system where all user data and application-specific information are saved and managed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*I9M2jUekiDTs-_AHS8DZsg.jpeg" /><figcaption>Application Architecture</figcaption></figure><p>Let’s dive deeper into how <strong>Kubernetes</strong> revolutionizes application management by optimizing resource usage without compromising the user experience.</p><p>Imagine this scenario:<br>A website has <strong>1,000 users</strong> accessing it at a given moment. Out of these, only <strong>50 users</strong> are performing operations like <strong>online shopping</strong>, while the rest are simply browsing publicly available information. To serve all users <strong>seamlessly</strong> and keep resource usage <strong>minimal</strong>, the application is divided into three components i.e., <strong>front-end</strong>, <strong>back-end</strong> and <strong>database</strong>. Each of these components is deployed in <strong>its own set of containers</strong>.</p><p>Let’s assume a single container can handle up to <strong>50 users</strong>. Based on the demand:</p><ul><li>To serve the <strong>1,000 browsing users</strong>, the system deploys <strong>20 front-end containers</strong> to handle their requests.</li><li>Since only <strong>50 users</strong> are actively performing operations, just <strong>1 back-end container</strong> and <strong>1 database container</strong> are required.</li></ul><p>As user behavior changes, so does the number of containers:</p><ul><li>If more users start shopping, Kubernetes dynamically deploys additional <strong>back-end</strong> and <strong>database</strong> containers to handle the increased load.</li><li>When user activity decreases and containers exceed an idle threshold, Kubernetes <strong>deletes unnecessary containers</strong>, ensuring optimal resource usage.</li></ul><p>This dynamic scaling ensures that resources are <strong>utilized efficiently</strong> while maintaining a <strong>seamless user experience</strong>.</p><p>Now that we understand how applications are divided into components and scaled based on demand, let’s focus on Kubernetes itself.</p><p><strong>Kubernetes</strong> is an <strong>open-source container orchestration platform</strong> designed to automate the <strong>deployment</strong>, <strong>scaling</strong>, and <strong>management</strong> of containerized applications. It simplifies handling large-scale, complex applications by:</p><ul><li>Dynamically <strong>scaling containers</strong> to meet demand.</li><li>Managing communication between containers for seamless interaction.</li><li>Automatically <strong>scheduling and deploying</strong> containers across available infrastructure.</li></ul><p>Kubernetes is widely recognized for its <strong>robustness</strong> and <strong>scalability</strong>, making it the go-to solution for managing modern containerized applications efficiently.</p><p><strong>PS:</strong> By now, you might be wondering — what happens to the data in the <strong>database container</strong> if it gets deleted when demand falls below the threshold?</p><p>Don’t worry! In this blog series, we’ll unravel the inner workings of <strong>Kubernetes</strong>, explore how it handles dynamic scenarios seamlessly, and take a deep dive into its <strong>security aspects</strong>. <strong>Stay tuned for the next one!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=818d438ba9ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cyber Security for Beginners]]></title>
            <link>https://medium.com/@Tarun.N/cyber-security-for-beginners-5936020f91d6?source=rss-d939df9d9b77------2</link>
            <guid isPermaLink="false">https://medium.com/p/5936020f91d6</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Tarun N]]></dc:creator>
            <pubDate>Wed, 06 Mar 2019 18:21:42 GMT</pubDate>
            <atom:updated>2019-03-06T18:21:42.962Z</atom:updated>
            <content:encoded><![CDATA[<p>In recent years cybersecurity is the buzz word that we hear every other day through some or the other means. There is a drastic increase in the opportunities as well as the people interested in this field. But the problem that many of them face is that they do not have a complete picture of what “CYBERSECURITY” actually is and how they could be the right fit. There are always people asking or googling around regarding cybersecurity like what is it, what programming languages are required, what tools are used, etc. <br>So in this blog, I would try to explain what actually cybersecurity is in the broader sense and how would you actually fit in if you are willing to change or take up cybersecurity as your career.</p><p>No more boring stuff. Let’s jump into for what you are here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*0TPR6zCTDQCtqjy_mJZ3dQ.gif" /></figure><p>“Cyber” “Security”. As it tells, securing or providing security to the cyber world. This includes everything, right from the smartphone from your hand, the laptop that you use, the Wi-Fi router that you’re connected to, the website you’re browsing, all your online shopping, etc.<br>There’s a huge gap between the advancements in this virtual world and the security that is in place currently. I hope most of you already know the figures for the impact it had in past and what it would cost if the gap is not filled in time.</p><p>This is a very vast domain which includes multiple subdomains which existed since years and a few new ones added to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6QU2RD5Ukrn_klbXU-4YHw.jpeg" /><figcaption>Cyber Security Domains</figcaption></figure><p><em>Image Credits: </em><a href="https://www.linkedin.com/pulse/map-cybersecurity-domains-version-20-henry-jiang-ciso-cissp"><em>https://www.linkedin.com/pulse/map-cybersecurity-domains-version-20-henry-jiang-ciso-cissp</em></a></p><p>I will be explaining the major subdomains briefly so that it would not be too geeky and at the same time it would convey you the overall picture of each of them.</p><blockquote>Security Engineering</blockquote><p>Let’s begin with Security Engineering. This mostly consists of geeky stuff for developing robust and secure systems which include network designing, security architecture design and review, cloud security, secure application development, and access controls.</p><p>Network designing comprises of designing of network such as placing of routers, switches and firewalls efficiently. It also includes proper configuration of security controls in different network devices so as to keep a check on the data traffic that flows to and fro. Networking is the backbone of any organization which involves IT. Thus, this is the first step where security should be implemented properly and efficiently to cut down the outsider’s threat. Anyone who has expertise in networking, network device configurations would fit in. If you are interested in this field but do not have any knowledge then I would recommend you to take CCNA Routing &amp; Switching training.</p><p>Security architecture is something each and every organization would have irrespective of what level of and how IT is used. This is the bird view of the whole security that is implemented in an organization. It includes what all and where the controls are needed to be implemented and how they correlate to the overall system architecture. This job is mostly done by the security professionals who got a good amount of experience in this field and probably a CISO(<em>Chief Information Security Officer</em>). To reach this level you need to have at least 10–15 years of experience and some relevant certifications such as CISSP.</p><p>Cloud security is something which has come into the picture recently with the rise in organizations moving to the cloud. Security on the cloud can be handled from two different aspects. One is the cloud provider and another is the customer hosting his/her resources on the cloud.<br>As a cloud provider, they make sure the infrastructure is configured properly such that each of their customers is isolated completely from each other so that attack on one customer may not give nightmare to the other customers and at the same time maintaining availability as per SLA. To be part of this you need to have a thorough knowledge of cloud architecture and it’s working. There are several vendor related training and certification programs that you can take up such AWS by Amazon.<br>As a customer, they have to make sure that their resources are properly configured and developed. Here secure application development comes into picture which is another major subdomain of security engineering. This involves secure coding and implementation of Secure Development Lifecycle. This job is done mostly by developers who are trained with knowledge in recent developments in security such as new vulnerabilities and how they can be fixed.</p><p>Access controls are allowing/disallowing of various rights to different people in the organization. Like employees may only have the access to enter their own company and a particular employee of a company may not have access to various blocks in the building where he has no work as the hub room, etc. It not only involves restriction of physical access but also while accessing systems. It restricts a user certain functionalities in his/her assigned desktop/laptop at workplace according to his job role such as the installation of any software, inserting flash drives, connecting to private networks, etc. It also allows/disallows the information that you can view, the websites you can view, etc. To be part of this you need to have knowledge of different security controls and their implementation. Knowledge of tools such as SailPoint is a big plus.</p><blockquote>Security Operations</blockquote><p>This is the actual part where all the action takes place. There are SOC’s (<em>Security Operations Center</em>) in every organization monitoring each and every event to prevent any cyber attack. It is the heart of security in any organization for preventing and defending against any advanced cyber attack. SOCs and SIEMs are responsible to notify and manage responsible teams in event of any security incident.</p><p>This domain mainly includes all the operations right from the prevention of cyber attack to dealing with as well as eradicating it. It also includes forensics to study how, why and what lead the cyber attack to be successful as well as identify who has done it, why and what did they gain from it. It also includes what all resources are affected.</p><p>Vulnerability management is done for prevention of cyber attack. It ensures that all the products or resources being used are patched to avoid exploitation of all known vulnerabilities.</p><p>To be a part of Security Operations you need to have immense knowledge about vulnerabilities, incident response, detection, and prevention. CCNA CyberOps training will be of great use if you wish to take up a career in this domain.</p><blockquote>Threat Intelligence</blockquote><p>Before I explain what threat intelligence is, let me explain the two common threats to any organization. They are <strong><em>insiders</em></strong> and <strong><em>outsiders</em></strong> threat. While outsiders threat is mainly the threat over the internet. This threat could be reduced by restricting the inflow of traffic and isolation of internet facing resources from critical resources. Insiders threat is mostly the insiders&#39; job like the frustrated employees. They may be doing it consciously or can also be completely unaware. In either case, the effect is exorbitant.</p><p>To keep a check to these threats, threat intelligence comes into the picture. It is the analysis of data gathered from various existing threats(inside &amp; outside) to prevent any attack from happening. The people working in this domain are cyber threat analysts and to be one you need to have immense knowledge of information security as well as knowledge in networking administration.</p><blockquote>Risk Assessment</blockquote><p>This is the part the whole world actually thinks cybersecurity is limited to. Risk assessment is where all the blue teaming, red teaming takes place. Let me explain what actually these blue and red teaming actually mean.</p><p>Consider there is some random website say <a href="http://www.myzon.com./">www.myzon.com</a> which happens to be a famous e-commerce website. So there’s always a group of people who are always interested in breaking things, say “<em>Breakers</em>”. On one fine day, MyZon has hosted a big online shopping event on its website featuring all types of attractive deals. Due to its heavy advertising, it caught the attention of <em>Breakers </em>and they decided to bring it down by some or the other means. And they leave no stone unturned to launch a massive successful attack on this website. At the same time, there is another group of people from the MyZon company’s end called “<em>Fixers</em>”. These people see that the website is suffering from some type of attack and they try their best to keep it up such that it doesn’t affect any of their end users.</p><p><em>Here </em><strong><em>breakers </em></strong><em>are none but the </em><strong><em>red team</em></strong><em> and </em><strong><em>fixers </em></strong><em>are the </em><strong><em>blue team.</em></strong></p><p>In an organization itself, there are red teams and blue teams which carry out assessments regularly so that their resources are not affected by any means. Red team plays the role of real hackers and the blue team mostly comprising of developers with expertise in secure application development try to improve and make their resources more secure.</p><p>Apart from red and blue teaming, various other vulnerability assessments are done such as black box, white box, grey box, etc.,</p><p>In this domain, various risks are assessed and fixed according to their criticality.</p><p>To be a part of this domain you need to be either a good breaker or fixer. Good fixers are the ones with good coding skills. Breakers are the ones who can place themselves in the shoes of hackers. For this lateral thinking is the most important quality required. To be a breaker you need to have coding skills(at least should be able to interpret the flow of the application, not necessarily be able to code) and keep yourself updated with recent vulnerabilities uncovered and also how existing vulnerabilities can be exploited in various other ways.</p><p><em>Governance</em></p><p>This is the domain that doesn’t get your hands dirty with geek stuff. It’s basically like the government which sets and controls laws, administration, auditing, etc. However, few of these subdomains do require prior experience in information security and some minimum knowledge in this domain. This is the place where people with no prior IT experience can also enter. For example, cyber law is the need of the hour in which the lawyers can take an extra step to learn about cybersecurity and cybercrime.</p><p>Governance mainly comprises of auditing, laws, policies and procedures, compliances, etc. All the standards and checklists stuff come under this. The people working in this are responsible to check if their organization and its employees are following and maintaining all the industry standards set by well-known organizations such as ISO, OWASP, etc.</p><p>This is just a drop from the huge ocean of cybersecurity. Every domain is like a vast ocean in itself and has a lot to offer. <br>Happy learning :)</p><p>Keep hacking ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*6Kaa7nN-dwK4F70EYuBInA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5936020f91d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(HTB) Snake Challenge Walk-through for NOOBS]]></title>
            <link>https://medium.com/@Tarun.N/htb-snake-challenge-walk-through-for-noobs-2475ea7a38ab?source=rss-d939df9d9b77------2</link>
            <guid isPermaLink="false">https://medium.com/p/2475ea7a38ab</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Tarun N]]></dc:creator>
            <pubDate>Sun, 24 Feb 2019 08:29:45 GMT</pubDate>
            <atom:updated>2019-02-24T08:29:45.162Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi all!</p><p><em>Caution: <br>This post is the walk through of Snake Reversing challenge in HackTheBox. Read only if you are about to give up trying.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*IbM2xTgLeVQQlQ-c4IijLw.png" /></figure><p>This challenge is one of the most easiest challenges of all in Reversing. <br>Let’s begin..</p><p>Download the zip from the website and extract it’s contents with the password mentioned in the website itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*VbaWHwZT9AY32QBgydNdYg.png" /><figcaption><strong>Extracting the contents</strong></figcaption></figure><p>We see that the file extension is <em>.py </em>which tells us that it’s written in Python. Now hit the terminal and execute it as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*XkYB0Nzn1QPJ3pLCsUwVUA.png" /></figure><p>We see that it is generating some number and says <em>“Authentication required”. </em>And it asks to enter <em>username</em> as well. I tried <em>snake </em>turns out to be wrong :P</p><p>Now lets have a look at the code. To open the file I have used vi editor. You can use any of the editors which you’re comfortable with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*GFDBc6ImO_P0vbXPoZw-NA.png" /></figure><p>While going through the code the below part caught my eye. It says:<br>It reads the user given username to variable named <em>user_input</em> and then the <em>user_input </em>is compared with another variable named <em>slither</em>. I eagerly wanted to know what data is stored in <em>slither </em>so I added a piece of code highlighted below. :P</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*I-o1OgGMQ2ajJ1oTRDs1Cg.png" /></figure><p>Save the code and run it in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*NtT6DpI12w3vew6vohHYrg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*iRv_lskj6moy4u1vyPqGHg.png" /></figure><p>There you go. The username is <em>anaconda</em>.<br>Now the next part is, it asks for password and I tried a random one which again turns out to be wrong. :D</p><p>Let’s go back to the code and see what we can do there.</p><p>There’s a part of code which reads the password from the user to <em>pass_input </em>variable. Now there’s a loop in which <em>pass_input </em>is taken <br>i.e., <strong><em>for passes in pass_input:</em></strong></p><p>There’s another loop inside this which says to take each element in every index.<br>i.e., <strong><em>for char in chars:</em></strong></p><p><em>The first for loop i.e., for passes in pass_input will take each character from the password given as input and the second for loop will take each element from the chars array.<br>Each element from chars array supposedly ASCII codes are converted to respective characters:<br></em><strong><em>str(chr(char))</em></strong></p><p>Each of these characters are compared with each of the character of the password given as input. And we observe properly there’s a break statement that breaks the loop and will print <em>“Good Job”</em> even if a single character matches user given input.</p><p><em>Now how do we get the password?????????????</em></p><p>One way is to enter all the possible characters and wait until one of them is a hit. :D This is just naive and brute force, is never fun.</p><p>Let’s play with the code. We see that each element from chars array supposedly ASCII codes are converted to respective characters. What if we are able to print those characters beforehand. ;)</p><p>So I just added a piece of code highlighted in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*28YDhttfit7k70L4Grk2xg.png" /></figure><p>Now let’s run it one more time and see what happens.</p><p>There you go. All the possible passwords are printed. And I tried entering <em>‘u’</em> as the password and it say <em>“Good Job”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*aE1ElUiB3d9yF8Hbav3Kng.png" /></figure><p>Now whaaattt??</p><p>We cracked the username and password but then we need a flag which is the ultimate goal of this challenge.</p><p>So let’s open the code and explore what more we can find. <br>This time I was going through the upper part of the code which I supposedly ignored until now because of so many conversions and stuff with many variables like <em>lock, keys, auth, passwords, chains, lock_pick, etc.</em></p><p>And while going through the whole boring stuff I found 2–3 variables which are reused. They are <em>keys</em>, <em>chains</em> and <em>chars. <br></em>I also found 2 <em>for loops</em> in all the elements of keys and chains are manipulated with some operations (boring stuff) and appended into <em>chars </em>array.</p><p>Now I seriously wanted to know what is getting stored in the char array as this is the same array that is used for password check. So I just decided to print its contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*c1z-0W9idE4EvEXfAgP9Hw.png" /></figure><p>Save and run it.</p><p>We can see a array of some numbers are printed which are the ASCII codes of the characters used for password check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*OTFTyjZkK_Vhq9v3MLYgYQ.png" /></figure><p>This is of no use to consider it as a flag.</p><p>The variable <em>“keys” </em>had been intriguing me. So I thought of knowing what’s in there. Possibly a key.</p><p>We already know that it has some ASCII values so I just converted them to characters and displayed them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*SUaj7CmhEzMR7zA9e2cP6Q.png" /></figure><p>The characters in <em>keys </em>are as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*rKZ6oGgdSK5eFfoqUB543Q.png" /></figure><p>Now this makes some sense. It could be the piece of the puzzle we are looking for.</p><p>The flag would be of the following format HTB{username:key}.<br>Username is the username we got earlier at the beginning and the key is the possible key that we printed in the above snap.</p><p><em>PS: This is my first write-up. Suggestions are most welcomed. Many more blogs to come soon :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2475ea7a38ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>