<?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 HaxorHero on Medium]]></title>
        <description><![CDATA[Stories by HaxorHero on Medium]]></description>
        <link>https://medium.com/@haxorhero?source=rss-ab8540defe64------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ckyMsC306hMGKhhXFCLpAQ.jpeg</url>
            <title>Stories by HaxorHero on Medium</title>
            <link>https://medium.com/@haxorhero?source=rss-ab8540defe64------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:10:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haxorhero/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[Unlocking the Thrills of CTF Labs: Your Gateway to Hacking Skills]]></title>
            <link>https://haxorhero.medium.com/unlocking-the-thrills-of-ctf-labs-your-gateway-to-hacking-skills-c54e03e2d200?source=rss-ab8540defe64------2</link>
            <guid isPermaLink="false">https://medium.com/p/c54e03e2d200</guid>
            <category><![CDATA[grow-and-learn]]></category>
            <category><![CDATA[hacking-skills]]></category>
            <category><![CDATA[how-to-learn-hacking]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[ctf-challenges]]></category>
            <dc:creator><![CDATA[HaxorHero]]></dc:creator>
            <pubDate>Sun, 21 May 2023 13:14:17 GMT</pubDate>
            <atom:updated>2023-05-21T13:42:02.857Z</atom:updated>
            <content:encoded><![CDATA[<h4>Is CTF Worth Playing? Unleashing the Benefits and Value of Cybersecurity Capture The Flag</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*Oq1hnQGIf6x150uQ.png" /></figure><h3>Introduction</h3><p>In the ever-evolving field of cybersecurity, finding engaging platforms to develop hacking skills is essential. Aspiring hackers and cybersecurity enthusiasts are constantly seeking opportunities to test their abilities and explore real-world scenarios. One platform that has gained significant popularity among these enthusiasts is CTF (Capture The Flag) Labs. In this blog post, we will delve into the exciting world of CTF Labs, understand their benefits, and discuss how they can help you develop your hacking abilities.</p><h3>What is a CTF?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LnC9UB0Fth8a5CXH.jpg" /></figure><p>CTF, also known as Capture The Flag, is an exhilarating cybersecurity competition that has gained significant popularity in recent years. It provides participants with a simulated environment to showcase their hacking skills by solving a series of challenges. In these challenges, participants must locate hidden “flags,” which are typically fragments of code or specific pieces of information, within vulnerable systems.</p><p>However, CTF is much more than just a game. It serves as a dynamic platform for individuals to learn and develop their hacking abilities in a controlled and ethical manner. The challenges presented in CTF competitions mirror real-world cybersecurity scenarios, offering participants practical experience in identifying vulnerabilities, exploiting security weaknesses, and defending against potential attacks.</p><p>CTF competitions cover a wide range of topics, including web security, cryptography, network analysis, reverse engineering, and more. Each challenge requires participants to think critically, apply their technical knowledge, and employ creative problem-solving strategies. Engaging in CTF competitions enables individuals to gain a deeper understanding of hacking techniques, stay updated on the latest cybersecurity threats, and enhance their overall skill set.</p><h3>Unleashing the Potential of CTF Labs</h3><p>CTF Labs provide simulated environments that allow participants to engage in hands-on hacking challenges. These labs offer an immersive and interactive experience, creating an environment where individuals can practice and refine their hacking skills. The challenges presented in CTF Labs are designed to mimic real-world scenarios, providing participants with an opportunity to explore various hacking techniques and cybersecurity concepts.</p><h3>Benefits of CTF Labs</h3><h4><strong>Utilizing CTF Labs for learning and enhancing hacking skills offers several advantages:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*0uZr42tiw9GWGDKb" /></figure><ol><li><strong>Practical Learning Experience:</strong><em> CTF Labs provide a practical approach to learning hacking techniques and cybersecurity concepts. Instead of relying solely on theoretical knowledge, participants can actively engage with the challenges, honing their skills through practice and application. This hands-on experience accelerates the learning process and reinforces the understanding of hacking techniques.</em></li><li><strong>Diverse Learning Opportunities:</strong> <em>CTF Labs cover a wide range of hacking topics, catering to different skill levels and interests. Whether you are interested in web security, cryptography, reverse engineering, binary exploitation, network security, or other areas, CTF Labs offer diverse challenges to explore. This enables participants to gain knowledge and skills across multiple domains, expanding their understanding of the hacking landscape.</em></li><li><strong>Collaborative Environment:</strong> <em>Many CTF Labs foster a collaborative environment, encouraging participants to form teams and work together to solve challenges. Collaborating with others not only enhances problem-solving abilities but also promotes the exchange of ideas and fosters a sense of community. Engaging with fellow learners provides opportunities for knowledge sharing, networking, and mutual support.</em></li></ol><h3>Supercharging Your Hacking Journey with CTF Labs</h3><h4>CTF Labs can supercharge your hacking journey in several ways:</h4><ol><li><strong>Skill Development:</strong> <em>Active participation in CTF Labs allows individuals to develop and refine their hacking skills. The practical challenges presented within the labs require participants to think critically, solve complex problems, and devise innovative strategies. By actively engaging with these challenges, participants can enhance their problem-solving abilities, adaptability, and technical proficiency.</em></li><li><strong>Real-World Application: </strong><em>CTF Labs bridge the gap between theoretical knowledge and real-world application. The challenges presented in these labs simulate real-world hacking scenarios, allowing participants to apply their skills in a controlled and safe environment. This hands-on experience helps individuals gain a deeper understanding of the intricacies of hacking and prepares them for real-world cybersecurity challenges.</em></li><li><strong>Networking and Recognition:</strong> <em>Active participation in CTF Labs can lead to networking opportunities within the cybersecurity community. By showcasing your skills and achievements in CTF competitions, you can gain recognition and establish yourself as a proficient hacker. Networking with like-minded individuals, cybersecurity professionals, and industry experts can open doors to new opportunities, mentorship, and collaboration.</em></li></ol><h3>Exploring the Latest CTF Platforms for Beginner Hackers</h3><p><strong>The following are my best suggestion for beginners:</strong></p><ul><li><a href="https://www.hackthebox.com/">Hack The Box (HTB)</a>: A beginner-friendly CTF platform with a supportive community and a variety of challenges across different categories.</li><li><a href="https://tryhackme.com/">TryHackMe</a>: An interactive platform offering guided learning paths, virtual machines, and educational materials specifically designed for beginners.</li><li><a href="https://picoctf.org/">PicoCTF</a>: A beginner-oriented CTF competition designed to teach cybersecurity skills through hands-on challenges and puzzles.</li><li><a href="https://overthewire.org/wargames/bandit/">OverTheWire</a>: A beginner-friendly platform that offers a series of challenges focused on different aspects of cybersecurity, including networking and cryptography.</li><li><a href="https://www.vulnhub.com/">VulnHub</a>: A platform hosting a collection of vulnerable virtual machines for users to practice their hacking skills in a safe and controlled environment.</li><li><a href="https://ctflearn.com/">CTFlearn</a>: A platform that provides a wide range of CTF challenges of varying difficulty levels, suitable for beginners to advance their skills.</li><li><a href="https://www.root-me.org/?lang=en">Root-Me</a>: A platform offering practical challenges in various domains, such as web security, programming, and reverse engineering, with a dedicated section for beginners.</li></ul><p>Note: Each of these platforms provides a unique learning experience for beginners in the field of cybersecurity, so feel free to explore and find the one that suits your learning style and interests the most.</p><h3>Conclusion:</h3><p>CTF Labs offer an exciting and effective platform for learning and developing hacking skills. With their practical learning experience, diverse challenges, and collaborative environment, CTF Labs provide a valuable pathway for individuals interested in exploring the field of hacking. Embrace the thrills of CTF Labs and embark on an exciting journey to become a skilled hacker.</p><p>Remember to approach hacking ethically and responsibly, always staying within legal boundaries. Continuously challenge yourself, learn from others, and keep abreast of the latest developments in cybersecurity to stay ahead in the ever-evolving landscape.</p><p><strong>I have already published a comprehensive walkthrough of OverTheWire challenges on my Medium blog. If you’re interested, feel free to check it out and delve into the fascinating world of cybersecurity: </strong><a href="https://haxorhero.medium.com/overthewire-bandit-wargame-2023-level-1-level-23-solutions-2bacda50651"><em>https://haxorhero.medium.com/overthewire-bandit-wargame-2023-level-1-level-23-solutions-2bacda50651</em></a></p><blockquote><strong><em>Make sure to </em></strong><a href="https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fsubscribe%2Fuser%2Fab8540defe64&amp;operation=register&amp;redirect=https%3A%2F%2Fhaxorhero.medium.com%2Foverthewire-bandit-wargame-2023-level-1-level-23-solutions-2bacda50651&amp;user=HaxorHero&amp;userId=ab8540defe64&amp;source=post_page-ab8540defe64----2bacda50651---------------------post_header-----------"><strong><em>follow</em></strong></a><strong><em> if you enjoy this type of content! I will regularly share CTF walkthroughs, articles on hacking and cybersecurity tools and techniques. Don’t miss out on these valuable resources that will help you expand your knowledge and skills. Let’s embark on this learning journey together and grow as cybersecurity enthusiasts.</em></strong></blockquote><h4><strong>Thanks for reading!</strong></h4><p><strong>Wait a second.</strong> You should get my articles in your inbox.<strong> </strong><a href="https://medium.com/subscribe/@haxorhero?source=publishing_settings---user_settings----------------------------------"><strong>Subscribe here</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c54e03e2d200" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OverTheWire — Bandit Wargame (2023): Level 1 - Level 23 Solutions]]></title>
            <link>https://haxorhero.medium.com/overthewire-bandit-wargame-2023-level-1-level-23-solutions-2bacda50651?source=rss-ab8540defe64------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bacda50651</guid>
            <category><![CDATA[bandit-walkthrough]]></category>
            <category><![CDATA[bandit-wargame]]></category>
            <category><![CDATA[bandit-war-game-2023]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[overthewire]]></category>
            <dc:creator><![CDATA[HaxorHero]]></dc:creator>
            <pubDate>Tue, 02 May 2023 17:52:33 GMT</pubDate>
            <atom:updated>2023-05-02T18:20:04.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>OverTheWire — Bandit Wargame (2023): Level 1 - Level 23 Solutions</h3><p>link : <a href="https://overthewire.org/wargames/bandit/">https://overthewire.org/wargames/bandit/</a></p><p><em>This write-up will Cover the Solution of the Bandit Wargame from Level 1 to Level 23…</em></p><h3><strong>Indroduction:</strong></h3><p>Bandit Wargame is a cybersecurity training platform that offers a series of levels or challenges to help individuals improve their skills in the field of information security. The challenges are designed to be beginner-friendly and cover a range of topics such as Linux commands, cryptography, privilege escalation, and web application security.</p><p>The levels are structured in such a way that players are required to solve puzzles using their problem-solving skills and knowledge of cybersecurity concepts. As the player progresses through the levels, they gain a deeper understanding of various security concepts and techniques.</p><p>Bandit Wargame is a part of the OverTheWire platform and is an excellent resource for anyone interested in learning more about cybersecurity. It is entirely free to use, and the challenges are a fun and engaging way to learn and develop cybersecurity skills.</p><h3>Game Objective:</h3><p>In each level you need to log into the machine using SSH and find out the password file . The password you find out will be the password of next machine (level).</p><p>In each Level you will need to use your problem solving and linux skill to solve the challenge. After the end of the game you will be familar with Linux operating system and its Commands. I will try to explain all the command I am going to use while discussing each level.</p><blockquote><strong>I will put the all the passoword in a text file end of the write-up . Feel free to take the passwords if you want , I recommand to try all the lab by your own.</strong></blockquote><h3><strong>Commen Commands you are going to use in the following sections :</strong></h3><ol><li>ls — List directory contents<br>2. cd — Change the current working directory<br>3. cat — Display the contents of a file<br>4. file — Determine the type of a file<br>5. chmod — Change permissions of a file or directory<br>6. ssh — Connect to a remote machine securely<br>7. grep — Search for a specific pattern in a file<br>8. find — Search for files in a directory hierarchy<br>9. tar — Create or extract a tar archive<br>10. openssl — Encryption and decryption of files<br>11. diff — Compare two files<br>12. du — Display disk usage statistics<br>13. mkdir — Create a new directory<br>14. rmdir — Remove a directory<br>15. touch — Create a new file or update timestamp of an existing file<br>16. rm — Remove a file or directory<br>17. mv — Move or rename a file or directory<br>18. cp — Copy a file or directory<br>19. head — Display the first few lines of a file<br>20. tail — Display the last few lines of a filefind — Search for files in a directory hierarchy<br>21. sort — Sort lines of a text file<br>22. uniq — Remove duplicate lines from a text file</li></ol><blockquote><strong>if you are not familar with these Command. Its Okey, you can Learn them while we solving each Lab. After the end of the section you will be Familar with most of these command and their use case.</strong></blockquote><p>Let’s Begin………….</p><h3>Bandit Level 0</h3><h4>Level Goal:</h4><p>The goal of this level is for you to log into the game using SSH. The host to which you need to connect is <strong>bandit.labs.overthewire.org</strong>, on port 2220. The username is <strong>bandit0</strong> and the password is <strong>bandit0</strong>. Once logged in, go to the <a href="https://overthewire.org/wargames/bandit/bandit1.html">Level 1</a> page to find out how to beat Level 1.</p><h4>Solutions:</h4><p>username : bandit0</p><p>password : bandit0</p><p>Hostname : <strong>bandit.labs.overthewire.org</strong></p><p>port : 2220</p><blockquote>find — Search for files in a directory hierarchy</blockquote><blockquote>(ssh — Connect to a remote machine securely)</blockquote><blockquote><strong>ssh usage</strong> : ssh &lt;username&gt;@&lt;hostname/ipaddress&gt; -p &lt;port no&gt;</blockquote><p><strong>ssh bandit0@bandit.labs.overthewire.org -p 2220</strong></p><p>if it ask for “<strong>you want to continue connecting” ,</strong> press “<strong>yes”</strong> and press enter. Then enter the passowd (The password will not be visible).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DP31VujS0b_cq8rWgqeww.png" /></figure><p>you will be successfull connected. type “<strong>exit</strong>” to exit form the ssh</p><p>Let’s Move to next lab…..</p><h3>Bandit Level 0 → Level 1</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a file called <strong>readme</strong> located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.</p><h3>solution:</h3><p>we already completed the bandit level 0 , it is telling that the password for the <strong>level 1</strong> is on the file called <strong>readme</strong> in <strong>level 0</strong></p><p>username : bandit0</p><p>password : bandit0</p><p>Hostname : <strong>bandit.labs.overthewire.org</strong></p><p>port : 2220</p><p><strong>ssh bandit0@bandit.labs.overthewire.org -p 2220</strong></p><p>After entering the password we successfull loged in to the bandit0. The file is in home directory to see where we are standing right now use: “<strong>pwd”,</strong> we get we are in home directory.<strong> </strong>we can use “<strong>ls”</strong> command to list file, It will show a file called <strong>readme</strong>. To see what file type use: “<strong>file readme”, </strong>It will show it is a<strong> text file</strong>. To read use: “<strong>cat readme”. </strong>The password for the next level will be there.</p><blockquote>pwd — Print Working Directory</blockquote><blockquote>ls — List directory content</blockquote><blockquote>file — Determine the type of a file</blockquote><blockquote>cat — Display the contents of a file</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*scgMFg2B3Khhgo5prvcvvw.png" /></figure><h3>Bandit Level 1 → Level 2</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a file called — located in the home directory</p><h4>Solution:</h4><p>username : bandit1</p><p>password : NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit1@bandit.labs.overthewire.org</a> -p 2220</p><p>Use “<strong>pwd”</strong> to see what directory we are standing. Use “<strong>ls”</strong> to list the file, it contain a file “<strong>-</strong>”. To see the file type use “<strong>file ./-</strong>”, It show it is a <strong>text</strong> file. “<strong>cat ./-”</strong> to read the file (we use<strong> “./”</strong> because the file is “<strong>-”</strong>). It contain the password of the next level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*NgdNYWzwhi1p2g9YLR8FUg.png" /></figure><h3>Bandit Level 2 → Level 3</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a file called <strong>spaces in this filename</strong> located in the home directory</p><h4><strong>Solution:</strong></h4><p>username : bandit2</p><p>password : rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit2@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>First we find out the directory using “<strong>pwd</strong>” , then we use “<strong>ls</strong>” to list the files. The only problem it the file name contain space between them. So we cannot read the file like the previous lab. We need to put “<strong>\</strong>” between the space just like in the image below. Using that way we can read content of the file using “<strong>cat spaces\ in\ this\ filename</strong>”. We then got the Password for the next Level. we can now jump to the nex level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*WWWUCUwnuYMzUm932V8JLQ.png" /></figure><h3>Bandit Level 3 → Level 4</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a hidden file in the <strong>inhere</strong> directory.</p><h4><strong>Solution:</strong></h4><p>username : bandit3</p><p>password : aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit3@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>we use “<strong>pwd</strong>” like before to locate where we are standing now. Then we use “<strong>ls</strong>” to list the file. we got a directory called <strong>inhere</strong>. To enter in the directory we use <strong>‘cd inhere</strong>’. After we entered the directory(<strong>inhere</strong>) we use “<strong>ls</strong>” to list the file, but there was nothing, seems like a hidden file. To see any hidden file use : “<strong>ls -a</strong>” or “<strong>ls -la</strong>”, There was a file called <strong>.hidden</strong>, to see the content we use ‘<strong>cat .hidden</strong>’. we got the password for the next level.</p><blockquote>cd — Change the current working directory</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*vVyxiIDkfmvPWhWv3gYm4Q.png" /></figure><h3>Bandit Level 4 → Level 5</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the only human-readable file in the <strong>inhere</strong> directory. Tip: if your terminal is messed up, try the “reset” command.</p><h4>Solution:</h4><p>username : bandit4</p><p>password : 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit4@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>Use “<strong>ls</strong>” and find out there is directory called <strong>inhere</strong>. Use “<strong>cd inhere</strong>” to get into that directory, and use “<strong>ls</strong>” again to list the files. It seem it contain many files. I tried to read the each file using “<strong>cat file00&quot;</strong>. But i cannot because it start with a special characer. So i use “<strong>cat ./-file00”</strong> to read the file. The file was in <strong>non-readable</strong> format. We need to find out which is the readable file . We can check all file one by one or Use “<strong>file ./</strong>*” to see the type of all file in the directory. (‘<strong>*</strong>’ sign means all file). We get the <strong>-file07</strong> is a text file(human-readable), we get to understand <strong>-file07 </strong>contain the password. To see the content use “<strong>cat ./-file07</strong>”, and successfully got the password for the next level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r4VUikdqhqn94d0G0yrpwg.png" /></figure><h3>Bandit Level 5 → Level 6</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a file somewhere under the <strong>inhere</strong> directory and has all of the following properties:</p><ul><li>human-readable</li><li>1033 bytes in size</li><li>not executable</li></ul><h4>Solutions:</h4><p>username : bandit5</p><p>password : lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit5@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>Use “<strong>ls</strong>” to list file/directories, There is a directory named <strong>inhere</strong>. Go in to the directory using “<strong>cd inhere</strong>”. use “<strong>ls</strong>” to list files and folders. There are about <strong>20 folders</strong> and each folder contian about<strong> 8 files</strong> inside. So it is not possible to open and check all file to find out which contain password for the next level. The only way to find out the right file is to sort with the specification they given, <strong>that is file size 1033 bytes, not executable.</strong> To sort file with given specification we can use “<strong>find -type f -size 1033c ! -executable</strong>”(‘<strong>f</strong>’ denote file is we are looking , ‘<strong>c</strong>’ is size denote the size is in bytes , <strong>!</strong> -executable denote not executable). We get the password is in <strong>maybehere07/.file2. </strong>Use “<strong>cat maybehere07/.file2” </strong>to see the content of the file , Which may be the password for next level.</p><blockquote>find — Search for files in a directory hierarchy</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ra7Tjh8Wjh0DLimIkDN1Rg.png" /></figure><h3>Bandit Level 6 → Level 7</h3><h4>Level Goal:</h4><p>The password for the next level is stored <strong>somewhere on the server</strong> and has all of the following properties:</p><ul><li>owned by user bandit7</li><li>owned by group bandit6</li><li>33 bytes in size</li></ul><h4>Solution:</h4><p>username : bandit6</p><p>password : P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit6@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To list the file use “<strong>ls</strong>”. but no result. use “<strong>ls-a</strong>” to see any file that is hidden, There was no hidden file. So the password file is inside somewhere. To find the password we need to sort the file according to the given specification, For that we can use “<strong>find / -type f -size 33c -group bandit6 -user bandit7 2&gt; /dev/null</strong>” (The 2&gt; /dev/null is used to redirect the error message into a file. /dev/null is like a vaccum hole, every data written to that file will be deleted on the spot. you no need to understand it on the deep now). The file that contain password is in <strong>/var/lib/dpkg/info/bandit7.password.</strong></p><p>use “<strong>cat /var/lib/dpkg/info/bandit7.password</strong>” to read the content of the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*mgaCamQ-K9eOA4TSteqMGA.png" /></figure><h3>Bandit Level 7 → Level 8</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong> next to the word <strong>millionth</strong></p><h4>Solution:</h4><p>username : bandit7</p><p>password : z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit7@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To list the files use: “<strong>ls</strong>”, There is a text file called <strong>data.txt</strong>. To list the content use: “<strong>cat data.txt</strong>”, There is a lot of words is inside, We need to find out the correct password for the next level. The level specify that the<strong> password in next to the word millionth</strong>. To find the answer Use : “<strong>grep ‘millionth’ data.txt</strong>” (it will only show the l<strong>ine that contain the word ‘millionth’ in data.txt file</strong>). We got the password for the next level</p><blockquote>grep — Search for a specific pattern in a file</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*WDv5ETtGvnhumJpxZc-Uhg.png" /></figure><h3>Bandit Level 8 → Level 9</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong> and is the only line of text that occurs only once</p><h3>solution:</h3><p>username : bandit8</p><p>password : TESKZC0XvTetK0S9xNwm25STk5iWrBvP</p><p>ssh <a href="/service/mailto:bandit1@bandit.labs.overthewire.org">bandit8@bandit.labs.overthewire.org</a> -p 2220</p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To list the files use: “<strong>ls</strong>”, There is a text file called <strong>data.txt</strong>. To list the content use: “<strong>cat data.txt</strong>”, There is a lot of words is inside, We need to find out the correct password for the next level. The level specify that the<strong> line contain password occurs only once</strong>, So we need to find out which line occurs only once. For that we can use the : “<strong>sort data.txt | uniq -u</strong>” (the <strong>sort</strong> command will sort the file,<strong> uniq -u</strong> is to specify the line is a <strong>unique</strong>. <strong>| </strong>or <strong>pipe</strong> is used to give the fisrt command to the second command ). We got the unique line that occurs only once, That is the password for the next level.</p><blockquote>sort — Sort lines of a text file</blockquote><blockquote>uniq — Remove duplicate lines from a text file</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*4OGQKOgL6NyzvIzwcT0i3Q.png" /></figure><h3>Bandit Level 9 → Level 10</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong> in one of the few human-readable strings, preceded by several ‘=’ characters.</p><p>Solution:</p><p><em>username : bandit9</em></p><p><em>password : </em>EN632PlfYiZbn3PhVK3XOGSlNInNE00t</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit9@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>Use “<strong>ls</strong>” to list the files and folders, There is a file called<strong> data.txt.</strong> Use “<strong>cat data.txt</strong>” to read the content of the file. Most of the data there is <strong>not</strong> <strong>human-readable</strong>. To find the human-readable data we can use : “<strong>strings data.txt</strong>”, It will show the human readable lines only. The level specify that the <strong>password contain ‘==’ infront</strong>. So to see the password file we can use: <strong>strings data.txt | grep ‘===’ </strong>, This will output the line contain the password</p><blockquote>strings — extract printable strings of text from a binary file.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*CJXi7KK7WDFGEXh8G_E_4w.png" /></figure><h3>Bandit Level 10 → Level 11</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong>, which contains base64 encoded data</p><h4>Solution:</h4><p><em>username : bandit10</em></p><p><em>password : </em>G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit10@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>In the home directory there is a file called <strong>data.txt,</strong> which contain the password for the next level. But the content is encoded with <strong>base64</strong> (an encoding method). To decrypt the content use “<strong>base64 -d data.txt</strong>”. (-d is used for decoding). We got the pasword for the next level.</p><blockquote>base64 — one of the famous encoding method (= in the end)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*KaFGier1Iw4D93tGEh6SNg.png" /></figure><h3>Bandit Level 11 → Level 12</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong>, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions</p><h4>solution:</h4><p><em>username : bandit11</em></p><p><em>password : </em>6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit11@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>The password for the next level is inside the file called <strong>data.txt</strong> in home directory. As the level goal specifies that the content of the file is encoded with <strong>rot13</strong>, To see the file content, we need to decrypt it with <strong>rot13 decoder.</strong> I use an <strong>online decoder</strong>. We successfully got the password for the next level.</p><blockquote>rot13 — ROT13 is a simple letter substitution cipher that replaces each letter with the letter 13 positions after it in the alphabet.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bavLMtW0kbP8dbuCVXqxAw.png" /></figure><h3>Bandit Level 12 → Level 13</h3><h4>Level Goal:</h4><p>The password for the next level is stored in the file <strong>data.txt</strong>, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)</p><h4>Solution:</h4><p><em>username : bandit12</em></p><p><em>password : </em>JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit12@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>As the level goal suggested, I am goint to create a <strong>folder in tmp and copy the data.txt </strong>to find out the password. For creating a folder or directory Use : <strong>mkdir /tmp/my_work123. </strong>To copy the <strong>data.txt </strong>to the directory we created we use <strong>cp data.txt /tmp/my_work123</strong>. Then go to that directory using <strong>cd /tmp/my_work123.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*yP9wX9ABxy7mJGusid-3MA.png" /></figure><p>we can now Head over to solving the lab. I use <strong>cat data.txt</strong> and findout it is a <strong>hex dump</strong>. The hex dump <strong>can be reversed using xxd command</strong>, To do use: “<strong>xxd -r data.txt &gt; data_reversed.txt</strong>”(-r is used to reverse, &gt; is used to output the result into new file ). The hex dump is successfully reversed. Use <strong>cat</strong> to read the content of the new file. but cannot read, Seems like it is a <strong>compressed file</strong>. To understand more use: <strong>file data_reversed.txt </strong>, it show it is a <strong>gzip file.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UniwZiQw-sPVxXbEKpI-WQ.png" /></figure><p><strong>To unzip</strong> we must first convert the file into a<strong> gzip format</strong>, then only <strong>we can unzip it.</strong> For that use: “<strong>mv data_reversed.txt data_reversed.gz</strong>” (gz is the format for gzip), After that <strong>unzip</strong> it using “<strong>gzip -d data_reversed.txt</strong>”, It will unzip and create a new file. Use :“<strong>file data_reversed</strong>” to see what type of file is it now. It show it is a <strong>bzip2</strong> file. we need to do the same thing, first change the file name, for that use: “<strong>mv data_reversed data_reversed.bz2</strong>” (bz2 is the format for bzip2), then unzip it. using “<strong>bunzip2 data_reversed.bz2</strong>”, it will then unzip it and create a new file. Use “<strong>file data_reversed</strong>” to see the current file type, It is a now a gzip file. we need to do the same thing. “<strong>mv data_reversed data_reversed.gz</strong>”, then “<strong>gzip -d data_reversed.gz”</strong>. check the file type using “<strong>file data_reversed</strong>”. It is now a <strong>tar file.</strong> Its like gzip and bzip2, we must do the same thing. Convert the file into tar format using: “<strong>mv data_reversed data_reversed.tar</strong>” (tar in the extension for tar format), then unzip using : “<strong>tar -xvf data_reserved.tar</strong>”. Then it will create a file called <strong>data5.bin</strong>. I check the file type and it is a tar file. so we want to do the same thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ScRMNo5DYSnaKM7q2sQZkQ.png" /></figure><p>I am skipping the next few <strong>de-compression techniques</strong>. It will be same step as we explained above, <strong>However i will put the full steps screenshot below.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cpWhI4BWWT3FZDMe1PpEw.png" /></figure><p>After so many de-compression we got a text file back called <strong>data8. </strong>use<strong> “cat data8”</strong> and find out the password for the next level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*qC2DpvCf5_wtGyWuqXh2wA.png" /></figure><blockquote>mkdir — to create or make directory</blockquote><blockquote>cp — Copy a file</blockquote><blockquote>mv — Move or rename a file or directory</blockquote><blockquote>xxd — creates a hexdump of a given file or standard input, or converts a hexdump back into its original binary form</blockquote><blockquote>gzip — compresses a file and decompress (-d) a file that has been compressed with the gzip compression algorithm and has a “.gz” extension.</blockquote><blockquote>bunzip2 — decompress a file that has been compressed with the bzip2 compression algorithm and has a “.bz2” extension.</blockquote><blockquote>tar — Create or extract a tar archive</blockquote><h3>Bandit Level 13 → Level 14</h3><h4>Level Goal:</h4><p>The password for the next level is stored in <strong>/etc/bandit_pass/bandit14 and can only be read by user bandit14</strong>. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. <strong>Note:</strong> <strong>localhost</strong> is a hostname that refers to the machine you are working on</p><h4>Solution:</h4><p><em>username : bandit13</em></p><p><em>password : </em>wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit13@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>The home directory contain a sshkey.private file, We can use that to login to bandit14 to see the password of the next level(only bandit14 can read the file), For that use “<strong>ssh -i sshkey.private </strong><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><strong><em>bandit14@bandit.labs.overthewire.org</em></strong></a><strong><em> -p 2220</em></strong><em>”. It will login to the bandit14, After that we can see the password file using </em><strong><em>cat </em>/etc/bandit_pass/bandit14.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*6YoRNWzAgz4l2HUUVK4isg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*pLaG0kPl6YOf0gifJ1-P6A.png" /></figure><h3>Bandit Level 14 → Level 15</h3><h4>Level Goal:</h4><p>The password for the next level can be retrieved by submitting the password of the current level to <strong>port 30000 on localhost</strong>.</p><h4>Solution:</h4><p><em>username : bandit14</em></p><p><em>password : </em>fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit14@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>For getting the password for the next level we must <strong>submit the current password to port 30000 on localhost</strong>. For that we can use: “<strong>nc localhost 30000</strong>”, Then give the current password in the next line. It will show the password for the next level like the image below.</p><blockquote>nc — (short for “netcat”) is a utility in Linux that can be used for reading from and writing to network connections</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*ZjY2kZeUrxGuiuFPbpKxcA.png" /></figure><h3>Bandit Level 15 → Level 16</h3><h4>Level Goal:</h4><p>The password for the next level can be retrieved by submitting the password of the current level to <strong>port 30001 on localhost</strong> using SSL encryption.</p><p><strong>Helpful note: Getting “HEARTBEATING” and “Read R BLOCK”? Use -ign_eof and read the “CONNECTED COMMANDS” section in the manpage. Next to ‘R’ and ‘Q’, the ‘B’ command also works in this version of that command…</strong></p><h4>Solution:</h4><p><em>username : bandit15</em></p><p><em>password : </em>jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit15@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To Get password for the next level we want to submit password of the current level to <strong>port 30001 on localhost</strong> using SSL encryption.For that we can use: “<strong>openssl s_client -connect localhost:30001</strong>” . Then enter the current password to the next line as the picture given below. We got the password for the next level.</p><blockquote>openssl — provides various cryptographic functions for SSL/TLS communication, digital certificates, and encryption/decryption of data.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*66qHu7mGU8-rv3wL2bwaqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*ZgNYWOPfTtVnG1rd6EG3ZA.png" /></figure><h3>Bandit Level 16 → Level 17</h3><h4>Level Goal:</h4><p>The credentials for the next level can be retrieved by submitting the password of the current level to <strong>a port on localhost in the range 31000 to 32000</strong>. First find out which of these ports have a server listening on them. Then find out which of those speak SSL and which don’t. There is only 1 server that will give the next credentials, the others will simply send back to you whatever you send to it.</p><h4>Solution:</h4><p><em>username : bandit16</em></p><p><em>password : </em>JQttfApK4SeyHwDlI9SXGR50qclOAil1</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit16@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To find out which are the port are on, we can use: “<strong>nmap localhost -p31000–32000</strong>” (this will check the active port form 31000–32000). It show <strong>five active port.</strong> The next thing is to identify <strong>which one speak the SSL, </strong>For that we can use: “<strong>nmap localhost -p31000–32000 -sV</strong>” (-sV is used to list the sevice version of each port). It shows that port 31790 and port 31518 have SSL service(31518 is echo, There should be none their). So the port we want is <strong>31790</strong></p><blockquote>nmap — (Network mapper) used to scan open ports and identify vulnerabilities and potential security threats.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8gGfjlbG32fp6lWBr6XHA.png" /></figure><p>Like in <strong>bandit15</strong>, we want to submit the current password using <strong>SSL</strong> to <strong>port</strong> <strong>31790</strong> Using: “<strong>openssl s_client -connect localhost:31790</strong>”. After giving the current password we<strong> get a ssh key.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*73qfZs0NV0AqNImAWrxO-w.png" /></figure><p>Then make a <strong>directory</strong> in tmp called <strong>ssh_key</strong>. go to the directory. Then create a file name <strong>sshprivate17.key</strong> and copy paste the SSH RSA key using vi/nano text editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*7ul-K6s72hRPiU6mBVVOZg.png" /></figure><p>We can now log in to bandit17 using RSA key. for that use: “<strong>ssh -i sshprivate17.key </strong><a href="/service/mailto:bandit17@bandit.labs.overthewire.org"><strong>bandit17@bandit.labs.overthewire.org</strong></a><strong> -p 2220</strong>” .</p><p>It create a permission denied error because, <strong>It is required that your private key files are NOT accessible by others.</strong> To solve that we need to change the permission(the file can be access to user only) using :<strong>”chmod 700 sshprivate17.key”. </strong>nowyou can log in to bandit17.</p><p>we get the <strong>password</strong> for <strong>bandit17</strong> form<strong> /etc/bandit_pass/bandit17. cat</strong> that and you will free to move on the next level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*3ysP_Tl8oYQp7sFevY_SAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*3Jx0bUorH0clStZSnVYsrA.png" /></figure><h3>Bandit Level 17 → Level 18</h3><h4>Level Goal</h4><p>There are 2 files in the homedirectory: <strong>passwords.old and passwords.new</strong>. The password for the next level is in <strong>passwords.new</strong> and is the only line that has been changed between <strong>passwords.old and passwords.new</strong></p><p><strong>NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19</strong></p><h4>Solution:</h4><p><em>username : bandit17</em></p><p><em>password : </em>VwOSWtCA7lRKkTfbr2IDh6awj9RNZM5e</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit17@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>To find the find the password for the next level, we need to find the only changed line in password.new from password.old. For this purupose we can use :”<strong> diff password.new password.old” </strong>(this will show the changed line in both file). <strong>The first one is our answer</strong></p><blockquote>diff — Compare two files</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*fA-Yfx0POkyX_PjeugWGoQ.png" /></figure><h3>Bandit Level 18 → Level 19</h3><h4>Level Goal:</h4><p>The password for the next level is stored in a file <strong>readme</strong> in the homedirectory. Unfortunately, someone has modified <strong>.bashrc</strong> to log you out when you log in with SSH.</p><h4>Solution:</h4><p><em>username : bandit18</em></p><p><em>password : </em>hga5tuuCLF6fFzUpnagiMN8ssu9LFrdg</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit18@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>Unlike the previous level, once we log in to the machine it will automatically log you out of the machine. So we cannot read the password file in the home directory.</p><p>To solve the lab we can log in to machine using :”<strong> ssh -T </strong><a href="/service/mailto:bandit18@bandit.labs.overthewire.org"><strong>bandit18@bandit.labs.overthewire.org</strong></a><strong> -p 2220&quot; ( -T</strong> is used for<strong> </strong>Disable pseudo-terminal allocation<strong>). </strong>So it cannot log us out. we can then read the file using: <strong>cat readme</strong> as shown in the picture below. we got the password for the next level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*ZC2SfqVfKDGE6PgDF73gkA.png" /></figure><h3>Bandit Level 19 → Level 20</h3><h4>Level Goal:</h4><p>To gain access to the next level, you should use the setuid binary in the homedirectory. Execute it without arguments to find out how to use it. The password for this level can be found in the usual place (<strong>/etc/bandit_pass),</strong> after you have used the setuid binary.</p><h4>Solution:</h4><p><em>username : bandit19</em></p><p><em>password : </em>awhqfNnAbc1naukrpqDYcF95h7HoMTrC</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit19@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>The password for the next level is stored in <strong>/etc/bandit_pass/bandit20</strong>. I tried to read the file using cat, But cannot read due to <strong>lack of permission</strong>. I use <strong>: “ls -la /etc/bandit_pass/bandit20”</strong> to list the who has the <strong>allowed to read the file. </strong>Only <strong>bandit20</strong> have the right to read the file. so we want bandit20 user right to read the file.</p><p>In the home directory there is <strong>SUID</strong> bit file. which has the permission of <strong>bandit20</strong> (owner bandit20). We can use that file to read the <strong>/etc/bandit_pass/bandit20 </strong>with <strong>bandit20</strong> user permission by :</p><p><strong>“./bandit20-do cat /etc/bandit_pass/bandit20”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*RXJddnlnB7eNsRyLDhmiVw.png" /></figure><h3>Bandit Level 20 → Level 21</h3><h4>Level Goal:</h4><p>There is a setuid binary in the homedirectory that does the following: it makes a connection to localhost on the port you specify as a commandline argument. It then reads a line of text from the connection and compares it to the password in the previous level (bandit20). If the password is correct, it will transmit the password for the next level (bandit21).</p><p><strong>NOTE:</strong> Try connecting to your own network daemon to see if it works as you think</p><h4>Solution:</h4><p><em>username : bandit20</em></p><p><em>password : </em>VxCazJaVykI6W36BkBU0mJTCM8rR95XT</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit20@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>This lab will seems a little bit harder to understand. You should read the level goal thoroughly to understand it. I will try to explain as much as i can.</p><p>First we must<strong> create a network connection in bandit local host in any port </strong>and give the current level password (bandit20). For that I use :” <strong>nc -lvnp 9999</strong>&quot; (l for listen , v for verbose , p for port we specify).<strong> Then give the password of the current level under it … (</strong>as shown in the picture below<strong> termial 1)</strong></p><p>Then take a new termial (<strong>terminal 2 </strong>) and run <strong>suconnect</strong> <strong>setuid</strong> with port number we given to netcat. <strong>“./suconnect 9999</strong>”. The <strong>setuid suconnect </strong>reads the current password from netcat and give the password of the next level to it.</p><p><strong>we get the password for the next level in termial 1.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56DCE4oGqKxS_hkgqiJgKQ.png" /></figure><h3>Bandit Level 21 → Level 22</h3><h4>Level Goal:</h4><p>A program is running automatically at regular intervals from <strong>cron</strong>, the time-based job scheduler. Look in <strong>/etc/cron.d/</strong> for the configuration and see what command is being executed.</p><h4>Solution:</h4><p><em>username : bandit21</em></p><p><em>password : </em>NvEJF7oVjkddltPSrdKEFOllh9V1IBcq</p><p><em>ssh </em><a href="/service/mailto:bandit1@bandit.labs.overthewire.org"><em>bandit21@bandit.labs.overthewire.org</em></a><em> -p 2220</em></p><p>As like normal log in to the machine using ssh using the credential got from previous level.</p><p>As the level goals suggest, I go to <strong>/etc/cron.d/.</strong> There are some cronjobs. I feel like we get the <strong>password for bandit22 from cronjob_bandit22</strong>. Using cat I read the content of the cronjob. From there I get the <strong>cronjob shell script loccation ( /usr/bin/cronjob_bandit22.sh )</strong>. I just read the file using cat to see what is happening in the crontab.</p><p>By reading that, I get it to understand the password for <strong>bandit22 is getting written into a file called /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv</strong>. Just read the file and get the password of next level successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2exhTXkpQ7v5yoHvrbFOw.png" /></figure><h3>LEVEL 1 — LEVEL 23 ANSWERS:</h3><p>bandit0-bandit1 = NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL<br>bandit1-bandit2 = rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi<br>bandit2-bandit3 = aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG<br>bandit3-bandit4 = 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe<br>bandit4-bandit5 = lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR <br>bandit5-bandit6 = P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU<br>bandit6-bandit7 = z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S<br>bandit7-bandit8 = TESKZC0XvTetK0S9xNwm25STk5iWrBvP<br>bandit8-bandit9 = EN632PlfYiZbn3PhVK3XOGSlNInNE00t<br>bandit9-bandit10 = G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s<br>bandit10-bandit11 = 6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM<br>bandit11-bandit12 = JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv<br>bandit12-bandit13 = wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw<br>bandit13-bandit14 = fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq <br>bandit14-bandit15 = jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt<br>bandit15-bandit16 = JQttfApK4SeyHwDlI9SXGR50qclOAil1<br>bandit16-bandit17 = VwOSWtCA7lRKkTfbr2IDh6awj9RNZM5e<br>bandit17-bandit18 = hga5tuuCLF6fFzUpnagiMN8ssu9LFrdg<br>bandit18-bandit19 = awhqfNnAbc1naukrpqDYcF95h7HoMTrC<br>bandit19-bandit20 = VxCazJaVykI6W36BkBU0mJTCM8rR95XT<br>bandit20-bandit21 = NvEJF7oVjkddltPSrdKEFOllh9V1IBcq<br>bandit21-bandit22 = WdDozAdTM2z9DiFEQ2mGlwngMfj4EZff</p><h3>conclusion:</h3><p>The OverTheWire Bandit wargame is an excellent resource for anyone interested in learning about Linux system administration, command-line tools, and basic security concepts. By completing the various levels of the game, players can gain valuable hands-on experience and build their skills in a fun and engaging way. With the help of the command-line tools and techniques covered in this article, players can navigate the challenges presented in the game and unlock the secrets of each level. So why not give it a try and see how far you can get? Happy hacking!</p><h4>Thanks for reading! If you enjoyed this article, be sure to follow for more CTF (Capture the Flag) content and other cybersecurity topics.</h4><p>😃 😃😃</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bacda50651" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>