<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://justinsteele.net/">
  <title>Justin Steele</title>
  <id>https://justinsteele.net/</id>
  <updated>2026-10-20T00:00:00Z</updated>
  <link href="https://justinsteele.net/"></link>
  <link href="https://justinsteele.net/feed.xml" rel="self"></link>
  <author>
    <name>Justin Steele</name>
    <email>mail@justinsteele.net</email>
  </author>
  <entry>
    <title>Blog Restart</title>
    <id>https://justinsteele.net/2026-blog-migration/</id>
    <link href="https://justinsteele.net/2026-blog-migration/"></link>
    <published>2026-10-20T00:00:00Z</published>
    <updated>2026-10-20T00:00:00Z</updated>
    <summary>A quick update about migrating and restarting this blog</summary>
    <content type="html">&lt;p&gt;My original intention of using this blog as a sort of accountability system to finish projects didn&amp;rsquo;t stick. But I am now in a position where I am actively working on cybersecurity projects again and would like a place to write about and showcase them. So I&amp;rsquo;m restarting the blog, beginning with a migration. This site used to be at &lt;a href=&#34;http://justin-steele.me&#34;&gt;justin-steele.me&lt;/a&gt; but I&amp;rsquo;m now redirecting that here. Astro worked well in terms of ease of getting the blog going, but I wasn&amp;rsquo;t really happy with the experience of writing content and how it was organized. So I&amp;rsquo;m switching over to a custom SSG and to help with distribution, Cloudflare Pages.&lt;/p&gt;&#xA;</content>
  </entry>
  <entry>
    <title>Board Game Recording Setup</title>
    <id>https://justinsteele.net/board-game-recording-setup/</id>
    <link href="https://justinsteele.net/board-game-recording-setup/"></link>
    <published>2024-11-17T00:00:00Z</published>
    <updated>2024-11-17T00:00:00Z</updated>
    <summary>How to set up to record board game playthroughs</summary>
    <content type="html">&lt;p&gt;I want to walk through a couple of different ways that I have set up to record board game playthroughs for my YouTube channel, &lt;a href=&#34;https://www.youtube.com/@cardboardintherough&#34;&gt;Cardboard in the Rough&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;callout callout--note&#34; role=&#34;note&#34;&gt;&#xA;&lt;div class=&#34;callout-label&#34;&gt;Note&lt;/div&gt;&#xA;&lt;p&gt;The links on this page are not affiliate links. These are just links to the products I ended up using.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;setup-1-early-days-with-sony-a7iii-and-cell-phone&#34;&gt;Setup 1: Early days with Sony a7III and Cell Phone&lt;/h2&gt;&#xA;&lt;p&gt;At one point, I bought a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1394217-REG/sony_ilce_7m3_alpha_a7_iii_mirrorless.html&#34;&gt;Sony a7III&lt;/a&gt; body with a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1369442-REG/sony_sel24105g_fe_24_105mm_f_4_g.html&#34;&gt;Sony FE 24-105mm f/4 G OSS Lens&lt;/a&gt; to try out photography as a hobby. I realized that I could also use it to record gameplay videos, so we gave it a shot. We just recorded top-down gameplay videos to start. We did this by putting the camera on a cheap tripod that I had sitting around from probably 10 years prior, that tripod on the table, and then angling the camera down to film the table. We did that for just a couple of videos, but it worked as a proof of concept. Our next step was to add my cell phone as a second camera, which I&amp;rsquo;ll get to in a minute. We could have, and probably should have, started with this setup, but I didn&amp;rsquo;t know any better. So, don&amp;rsquo;t feel discouraged if you don&amp;rsquo;t have a lot of gear, you can still make videos! You don&amp;rsquo;t even need a &amp;ldquo;real&amp;rdquo; camera - just get started with your phone and some ways to mount it.&lt;/p&gt;&#xA;&lt;p&gt;For this first setup, we just recorded to an SD card and transferred it to my computer to edit with DaVinci Resolve. We were both completely new to video editing, but there are plenty of good free tutorials for DaVinci Resolve, including the &lt;a href=&#34;https://www.blackmagicdesign.com/products/davinciresolve/training&#34;&gt;official ones&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Then we uploaded to YouTube and were off to a start!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;I&amp;rsquo;m still not very good at editing, but if you want to hear more about my workflow for recording or editing, just drop me a line.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;setup-2-adding-a-second-camera&#34;&gt;Setup 2: Adding a second camera&lt;/h2&gt;&#xA;&lt;p&gt;The first videos were okay, but I wanted something better (this is a recurring theme in my life, not just with this project). I wanted a second camera to capture our faces while one was filming the table. We did another couple of videos by using a cell phone mounted to a cell phone tripod that I also had sitting around, but you could pick one up for pretty cheap.&lt;/p&gt;&#xA;&lt;p&gt;Similar to the first setup, we just recorded internally, then transferred to my computer for editing and uploading.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setup-3-sony-a7iv-obs-and-capture-cards&#34;&gt;Setup 3: Sony a7IV, OBS, and Capture Cards&lt;/h2&gt;&#xA;&lt;p&gt;While we were recording the first videos, I kept checking on local markets for used lenses and other gear, and eventually I found a great deal for a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1667800-REG/sony_ilce_7m4_b_alpha_a7_iv_mirrorless.html&#34;&gt;Sony a7IV&lt;/a&gt; with a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1636130-REG/sigma_303965_35mm_f_1_4_dg_dn.html&#34;&gt;Sigma 35mm f/1.4 DG DN art lens&lt;/a&gt; and a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1152351-REG/rode_videomic_pro_r_videomic_pro_with_lyre.html&#34;&gt;RODE VideoMic Pro&lt;/a&gt;. We also picked up a couple of cheap &lt;a href=&#34;https://www.amazon.com/Capture-Streaming-Broadcasting-Conference-Teaching/dp/B09FLN63B3&#34;&gt;capture cards&lt;/a&gt; to try recording straight to the computer. This is because the cameras didn&amp;rsquo;t like recording to the SD cards for long periods of time, which is something we would need to do for a playthrough of a long game. Before getting the capture cards, our recordings were interrupted by stopping periodically to stop and restart the recording, which was interrupting the flow of recording. The cheap capture card technically worked, but the quality was very poor. Even though they were advertised as 4k, they really just accepted 4k input and the output was blurry, even at the supposed 1080p output (written in the fine print on the page and not mentioned by other reviewers for that particular capture card that I saw on YouTube). After fighting with them for a while and trying out different settings to no avail, I ended up getting an &lt;a href=&#34;https://www.elgato.com/us/en/p/cam-link-4k&#34;&gt;Elgato Cam Link 4k&lt;/a&gt;. I only got one because I was worried it was the camera, the computer, or something else that would prevent it from working properly. But it worked immediately and produced a much better picture, so I got a second one.&lt;/p&gt;&#xA;&lt;p&gt;Also, since this was a camera and not a cell phone, I needed a second tripod, so I got a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1175941-REG/manfrotto_mk290xta3_3wus_290_xtra_3_way_head.html&#34;&gt;Manfrotto MK290XTA3-3WUS 290&lt;/a&gt;. This extended a lot further than my first tripod, so we were able to get a better angle on the table at the expense of a larger footprint. And, in order to record for long periods of time, we needed &lt;a href=&#34;https://www.amazon.com/dp/B07D5V8KY5&#34;&gt;dummy batteries&lt;/a&gt; for the cameras. We used the a7IV as a face cam and the a7III as the top down camera for a little while.&lt;/p&gt;&#xA;&lt;p&gt;The new capture cards led to new problems. I had been, with the cheap capture cards, running two OBS instances on my gaming PC (nothing special - i5-6600k, GTX 1070, 16GB RAM, running Windows). I was sending the input from each camera to a different OBS instance, and that worked until we got the Elgato capture cards. I was sometimes getting dropped frames and sometimes losing connection to one of the cameras. After a lot of troubleshooting, I learned they were sending a lot more data and saturating my USB channels. So I did manage to find two USB ports that weren&amp;rsquo;t on the same channel, but even that didn&amp;rsquo;t always work. And in the setup and teardown before and after recording we would sometimes forget which was which, and end up having to mess with it for a while to get it working. So I pulled in my laptop (a Razer from 2015 running Debian) and used it for the second OBS instance. Then I would transfer the files from the laptop over to my other computer, and then edit and upload. We stuck with this setup for a little while.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setup-4-c-stand&#34;&gt;Setup 4: C-Stand&lt;/h2&gt;&#xA;&lt;p&gt;Even with the new tripod, the overhead shot was annoyingly angled and it was frustrating to have to limit the board to within the legs of the tripod. So, I eventually also bought a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/850444-REG/Impact_ls_ct40mbk_Turtle_Base_C_Stand_Kit.html&#34;&gt;C-Stand&lt;/a&gt;. In order to hang and angle a camera from it properly, I used a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1490936-REG/impact_srp_110p_6_baby_pin_with.html&#34;&gt;baby pin&lt;/a&gt; that attaches to the C-Stand, then a &lt;a href=&#34;https://www.amazon.com/dp/B09NR4W846?th=1&#34;&gt;threaded adapter&lt;/a&gt; screws into the baby pin. Then a &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1606860-REG/ulanzi_2235_u_80l_arca_swiss_side.html&#34;&gt;ball head&lt;/a&gt; can attach to the threaded adapter, and the camera connects to the ball head, and the ball head allows you to angle it however you need. The C-Stand is pretty tall, and the dummy batteries reached, but the HDMI cables weren&amp;rsquo;t reaching, so I got some &lt;a href=&#34;https://www.amazon.com/dp/B0BNPX6KZX&#34;&gt;USB extenders&lt;/a&gt; instead of longer HDMI cables.&lt;/p&gt;&#xA;&lt;p&gt;Unrelated (as far as I know) to all of this, the motherboard in my computer went out, so we had to switch to using my wife&amp;rsquo;s computer for a while. It had very similar specs to mine as it was built around the same time. This setup was very nice for recording and editing, but took a long time to set up and break down. We did this because the entry to our house goes through this recording room and it also doubles as the game room when visitors come over. This friction led to us not wanting to record as often.&lt;/p&gt;&#xA;&lt;p&gt;Then we had a hiatus for a while. We had a baby on the way, so we had to take time to remodel one of our rooms into a nursery. I also redid our office with the intention of it becoming our new recording studio, but the room ended up being too small with our desks in it to also set up a table and all the recording equipment. Which has led to our current setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setup-5-current-blackmagic-video-assist&#34;&gt;Setup 5 (current): Blackmagic Video Assist&lt;/h2&gt;&#xA;&lt;p&gt;This is our most recent setup. I had a rack mount PC that I was using as a server that I built up a bit after my other computer went out. So, we couldn&amp;rsquo;t use the office (easily enough) and we couldn&amp;rsquo;t move my computer back and forth to our other recording room (easily enough) since it&amp;rsquo;s in a server rack. So I started exploring other options. I picked up a couple of &lt;a href=&#34;https://www.bhphotovideo.com/c/product/1507212-REG/blackmagic_design_hyperd_avida12_5hrd_video_assist_5_monitor.html&#34;&gt;Blackmagic Video Assists&lt;/a&gt; and &lt;a href=&#34;https://www.amazon.com/dp/B0874XN4D8&#34;&gt;Samsung External Drives&lt;/a&gt;. This isn&amp;rsquo;t the optimal solution, but it&amp;rsquo;s a good enough solution for now. We&amp;rsquo;re going to set up in the front room and leave everything set up until guests are expected.&lt;/p&gt;&#xA;&lt;p&gt;With this one, instead of streaming to the computers at all, we will use these recording monitors to record to the external drives, then transfer back to my computer and edit from there. One problem this solves that we weren&amp;rsquo;t specifcally aiming to solve is the noise from computer fans that was always in the background. I could reduce it, but never was able to eliminate it, through editing.&lt;/p&gt;&#xA;&lt;p&gt;I hope this helped you in some way. If you have any questions or just want to chat about it, &lt;a href=&#34;mailto:mail@justin-steele.me&#34;&gt;drop me a line&lt;/a&gt;!&#xA;If you&amp;rsquo;re interested in supporting this blog, you can &lt;a href=&#34;https://buymeacoffee.com/justinsteele&#34;&gt;buy me a coffee&lt;/a&gt;, and if you want to support the channel, please consider &lt;a href=&#34;https://www.youtube.com/@cardboardintherough/?sub_confirmation=1&#34;&gt;subscribing&lt;/a&gt;!&lt;/p&gt;&#xA;</content>
  </entry>
  <entry>
    <title>OverTheWire - Bandit</title>
    <id>https://justinsteele.net/overthewire-bandit-writeup/</id>
    <link href="https://justinsteele.net/overthewire-bandit-writeup/"></link>
    <published>2024-11-12T00:00:00Z</published>
    <updated>2024-11-12T00:00:00Z</updated>
    <summary>My notes from the OverTheWire - Bandit wargame.</summary>
    <content type="html">&lt;p&gt;Here is my writeup for solving the &lt;strong&gt;&lt;a href=&#34;https://overthewire.org/wargames/bandit/&#34;&gt;OverTheWire - Bandit&lt;/a&gt;&lt;/strong&gt; wargame. This wargame is aimed at beginners, so I will attempt to give an explanation for what&amp;rsquo;s going on with each level.&lt;/p&gt;&#xA;&lt;p&gt;Also a quick note on navigating this page, the levels on OverTheWire use the following convention:&lt;br&gt;&#xA;Level 0&lt;br&gt;&#xA;Level 0 -&amp;gt; Level 1&lt;br&gt;&#xA;Level 1 -&amp;gt; Level 2&lt;br&gt;&#xA;Level 2 -&amp;gt; Level 3&lt;br&gt;&#xA;&amp;hellip;&lt;/p&gt;&#xA;&lt;div class=&#34;sn&#34;&gt;&#xA;&lt;aside class=&#34;sidenote&#34;&gt;&lt;sup&gt;1&lt;/sup&gt; The header font when using &amp;ldquo;-&amp;gt;&amp;rdquo; was hideous, so in part that&amp;rsquo;s why I didn&amp;rsquo;t use that convention.&lt;/aside&gt;&#xA;&lt;p&gt;The &amp;ldquo;Level 0 -&amp;gt; Level 1&amp;rdquo; page uses the username bandit0 to log in and gives the password for bandit1. My convention is slightly different - just go to the level that you&amp;rsquo;re currently logged in as (or start at Level 0 if you&amp;rsquo;re not logged in yet). So, for example, if you&amp;rsquo;re logged in as &amp;ldquo;bandit7&amp;rdquo; looking for the password for &amp;ldquo;bandit8&amp;rdquo;, go to Level 7 in the contents.&lt;sup class=&#34;sn-ref&#34;&gt;1&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;If you have any questions or comments, feel free to reach out.&lt;/p&gt;&#xA;&lt;h2 id=&#34;getting-logged-inhttpsoverthewireorgwargamesbanditbandit0html&#34;&gt;&lt;a href=&#34;https://overthewire.org/wargames/bandit/bandit0.html&#34;&gt;Getting Logged In&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;callout callout--before&#34; role=&#34;note&#34;&gt;&#xA;&lt;div class=&#34;callout-label&#34;&gt;Note&lt;/div&gt;&#xA;&lt;p&gt;If you didn&amp;rsquo;t read above, this covers the info on the Level 0 page from OverTheWire. Since this page doesn&amp;rsquo;t actually result in getting a new password for a user, I&amp;rsquo;m using a different navigation convention that will hopefully make it a bit easier to find what you&amp;rsquo;re looking for on this post.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The goal of this level is for you to log into the game using SSH. The host to which you need to connect is &lt;strong&gt;bandit.labs.overthewire.org&lt;/strong&gt;, on port 2220. The username is &lt;strong&gt;bandit0&lt;/strong&gt; and the password is &lt;strong&gt;bandit0&lt;/strong&gt;. Once logged in, go to the Level 1 page to find out how to beat Level 1.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;p&gt;bash / PowerShell / Windows Command Prompt:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit0@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;The first time you SSH to bandit, you will probably get a warning about trusting the connection. &amp;lsquo;Yes&amp;rsquo; to continue, then you should see some ASCII text that says &amp;ldquo;bandit&amp;rdquo; and a request for bandit0&amp;rsquo;s password. As you type, character&amp;rsquo;s won&amp;rsquo;t appear, this is common for passwords on Linux systems. After you type the password (&amp;ldquo;bandit0&amp;rdquo;) and press enter, you&amp;rsquo;ll first get some info, tips, and tools. Then you should see the Command Line Interface (CLI) change from your local computer (this will be different depending on what CLI you&amp;rsquo;re using and what system you&amp;rsquo;re on) to:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;bandit0@bandit:~$&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Once you see this, you&amp;rsquo;ve completed level 0. In case you&amp;rsquo;re unfamiliar with SSH, what you&amp;rsquo;re essentially doing is creating a secure connection between your computer and the computer &amp;ldquo;bandit.labs.overthewire.org&amp;rdquo; on port 2220. The &amp;ldquo;bandit0&amp;rdquo; part before the &amp;ldquo;@&amp;rdquo; means you are attempting to log in to the remote computer with the username &amp;ldquo;bandit0&amp;rdquo;. Generally to advance from level n (user bandit&amp;lt;n&amp;gt;) to level n+1 (user bandit&amp;lt;n+1&amp;gt;), you&amp;rsquo;ll need to find the password for user bandit&amp;lt;n+1&amp;gt; and connect as that next user.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-0&#34;&gt;Level 0&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file called &lt;strong&gt;readme&lt;/strong&gt; 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 login into the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-1&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat readme&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-1&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;The &lt;code&gt;cat&lt;/code&gt; command concatenates files and prints them to standard output. In simpler terms, it displays the contents of a file.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Just to make sure I was on the right track, I used the &lt;code&gt;ls&lt;/code&gt; command to list the contents of the current directory, which did indeed contain a &lt;code&gt;readme&lt;/code&gt; file. When logging in, you generally will be in the home directory, which is where the instructions specified the &lt;code&gt;readme&lt;/code&gt; file would be, but I like to double check. Then I used the &lt;code&gt;cat&lt;/code&gt; command to display the contents of the &lt;code&gt;readme&lt;/code&gt; file, which contained the password for the next level.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit0@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat readme&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This displayed some text and provide the password for &lt;strong&gt;bandit1&lt;/strong&gt;. Per the rules, I&amp;rsquo;m not going to publish the password here. :)&lt;br&gt;&#xA;I think there should be a couple of options now to advance to the next level. Probably the simplest and preferred is to run the &lt;code&gt;exit&lt;/code&gt; command as bandit0. From here you will get a logout and be back in your regular environment. Now you can SSH to &lt;a href=&#34;mailto:bandit1@bandit.labs.overthewire.org&#34;&gt;bandit1@bandit.labs.overthewire.org&lt;/a&gt; with the new password. I recommend copying and pasting (likely this will mean highlighting and then right clicking rather than ctrl+c, then right clicking again when you need to paste instead of ctrl+v) to avoid typos. You can even save that password somewhere with the level login info to pick back up where you left off.&lt;/p&gt;&#xA;&lt;p&gt;I attempted using SSH from bandit0 to bandit1@localhost, but was denied saying it was blocked to conserve resources and that I should log out and log back in.&lt;/p&gt;&#xA;&lt;p&gt;I also attempted switching users:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit0@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;su - bandit1&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and it does ask for a password, but I wasn&amp;rsquo;t able to get this to work. I tried typing the password and copying and pasting it in, but just got authentication errors. I&amp;rsquo;m not sure if bandit0 doesn&amp;rsquo;t have permission to change users or if something else is going on. If you are able to get this to work, let me know!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-1&#34;&gt;Level 1&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file called &lt;code&gt;-&lt;/code&gt; located in the home directory&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-2&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat ./-&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-2&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;From here, if you just try &lt;code&gt;cat -&lt;/code&gt;, it won&amp;rsquo;t work. When you do that, &lt;code&gt;cat&lt;/code&gt; uses &lt;code&gt;-&lt;/code&gt; to mean standard input. So you need some workaround. You can get this by redirecting input using &lt;code&gt;&amp;lt;&lt;/code&gt;, using a command that can interpret &lt;code&gt;-&lt;/code&gt; as a file, or specifying the filename more completely.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit1@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat &amp;lt; -&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;In this case, we take the file &lt;code&gt;-&lt;/code&gt; and redirect it as input to &lt;code&gt;cat&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit1@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;more -&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This uses a different command altogether. Instead of concatenanting a file&amp;rsquo;s contents to standard output, &lt;code&gt;more&lt;/code&gt; displays the contents of a file in the terminal. This is useful if your file is long since &lt;code&gt;cat&lt;/code&gt; will just dump everything all at once and &lt;code&gt;more&lt;/code&gt; will let you page through it. More importantly for our use case here, &lt;code&gt;more&lt;/code&gt; doesn&amp;rsquo;t interpret &lt;code&gt;-&lt;/code&gt; as standard input.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit1@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat ./-&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This is my preferred method for this one, just specifying the filename more completely. The &lt;code&gt;./&lt;/code&gt; represents your current working directory, and then the file &lt;code&gt;-&lt;/code&gt; is appended.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-1&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Again, I started with &lt;code&gt;ls&lt;/code&gt; to make sure the file I was intending to read is there, and it was. Admittedly, just to make sure, I tried &lt;code&gt;cat -&lt;/code&gt;, but when it didn&amp;rsquo;t do anything, I used ctrl+c to cancel and knew I needed to find a way to escape that character.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-2&#34;&gt;Level 2&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file called --spaces in this filename-- located in the home directory&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-3&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat &lt;span class=&#34;tok-s1&#34;&gt;&#39;spaces in this filename&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-3&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;With this one we can use quotes around a file name with &lt;code&gt;cat&lt;/code&gt; to read a file that includes spaces in the name.  It works with single or double quotes.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit2@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;spaces in this filename&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Another option, which you can find using tab complete, is to escape the space characters with &lt;code&gt;\&lt;/code&gt;. If you type &amp;ldquo;cat sp&amp;rdquo; then press &amp;ldquo;tab&amp;rdquo;, it should autocomplete with the file name and the spaces escaped.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit2@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat spaces&lt;span class=&#34;tok-se&#34;&gt;\ &lt;/span&gt;in&lt;span class=&#34;tok-se&#34;&gt;\ &lt;/span&gt;this&lt;span class=&#34;tok-se&#34;&gt;\ &lt;/span&gt;filename&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h4 id=&#34;my-steps-2&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;With this one, I started by guessing that the single quote method would work, and it did.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-3&#34;&gt;Level 3&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file called &lt;strong&gt;inhere&lt;/strong&gt; located in the home directory&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-4&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat inhere/...Hiding-From-You&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-4&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;The file this time isn&amp;rsquo;t in the same directory that we are in when we log in (the home directory, which shows up as &lt;code&gt;~&lt;/code&gt;). So now we either have to change to the &lt;code&gt;inhere&lt;/code&gt; directory and look there:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit3@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd inhere&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;But when we do that, nothing shows up. Files that have names begining with a &lt;code&gt;.&lt;/code&gt; will appear hidden. So there are a few options here. You can list all of the contents with the &lt;code&gt;-a&lt;/code&gt; flag for &lt;code&gt;ls&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit3@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls -a&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;That should now list &amp;ldquo;all&amp;rdquo; the files and directories, including hidden ones. We still need to read the file, but there isn&amp;rsquo;t anything special about &lt;code&gt;cat&lt;/code&gt; with hidden files. Just be sure to include the dot (or dots) at the beginning of the filename.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit3@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat ...Hiding-From-You&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Alternatively to using &lt;code&gt;ls -a&lt;/code&gt;, you can use tab completion by typing &lt;code&gt;cat &lt;/code&gt; then pressing tab from inside the &lt;code&gt;inhere&lt;/code&gt; directory. Or even from the home directory, you can use tab completion as I showed in the tl;dr.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-3&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;The very first thing I did, again (and you can assume fairly safely that it will be most of the others too), I used &lt;code&gt;ls&lt;/code&gt; to list the contents of the home directory. I navigated to the &lt;code&gt;inhere&lt;/code&gt; directory, and knowing that the file was supposed to be hidden, used &lt;code&gt;ls -a&lt;/code&gt; to see all the contents. Then used &lt;code&gt;cat ...Hiding-From-You&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-4&#34;&gt;Level 4&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the only human-readable file in the &lt;strong&gt;inhere&lt;/strong&gt; directory. Tip: if your terminal is messed up, try the “reset” command.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-5&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; i in &lt;span class=&#34;tok-o&#34;&gt;{&lt;/span&gt;0..9&lt;span class=&#34;tok-o&#34;&gt;}&lt;/span&gt;; &lt;span class=&#34;tok-k&#34;&gt;do&lt;/span&gt; file ./inhere/-file0&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;; &lt;span class=&#34;tok-k&#34;&gt;done&lt;/span&gt;&#xA;cat ./inhere/-file07&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-5&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;We get to do something a little more fun with this one. The &lt;code&gt;file&lt;/code&gt; command tells what type of file something is. Useful when there aren&amp;rsquo;t file extensions (or if those extensions are deceiving). The more fun part is making a loop to test them all at once. This is a for loop, going from 0 to 9, substituting the number at the end of the filename. It will output all of the filetypes. All of them are data except for one, &lt;code&gt;-file07&lt;/code&gt;, which is ASCII text (i.e. should be human readable). We can then use &lt;code&gt;cat&lt;/code&gt; as we&amp;rsquo;ve been doing to read the contents.&lt;/p&gt;&#xA;&lt;h3 id=&#34;my-steps-4&#34;&gt;My Steps&lt;/h3&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t remember the syntax off the top of my head for the for loop in the tl;dr, but a Google search pointed me in the right direction. With only 10 files, you absolutely could do this manually, but I think even with 10, it&amp;rsquo;s faster to write the loop.&lt;/p&gt;&#xA;&lt;p&gt;I did try using &lt;code&gt;du&lt;/code&gt; first, seeing that it was one of the &amp;ldquo;commands you may need to solve this level&amp;rdquo; listed on the OverTheWire page, but all of the files appear to be the same size, so it wasn&amp;rsquo;t helpful.&lt;/p&gt;&#xA;&lt;p&gt;Also, I did goof at first. I put the path inside quotes &lt;code&gt;for i in {0..9}; do file &amp;quot;./inhere/-file0$i&amp;quot;; done&lt;/code&gt; and that was fine. But when I tried to change it to use &lt;code&gt;~&lt;/code&gt; it failed. It was interpreting that as a literal character because it was in quotes, so don&amp;rsquo;t do that.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-5&#34;&gt;Level 5&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file somewhere under the &lt;strong&gt;inhere&lt;/strong&gt; directory and has all of the following properties:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;human-readable&lt;/li&gt;&#xA;&lt;li&gt;1033 bytes in size&lt;/li&gt;&#xA;&lt;li&gt;not executable&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-6&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;find . -size 1033c -exec cat &lt;span class=&#34;tok-o&#34;&gt;{}&lt;/span&gt; +&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-6&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;Turns out there is only one file in the directory that is exactly that size, so &amp;ldquo;human-readable&amp;quot;and &amp;ldquo;not executable&amp;rdquo; weren&amp;rsquo;t that important to solving it.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-5&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I started by going to the &lt;code&gt;inhere&lt;/code&gt; directory and poking around. There were a lot of directories with a lot of files, so I had thoughts for two different approaches. One was to use &lt;code&gt;find&lt;/code&gt; and the other was to do a recursive use of &lt;code&gt;file&lt;/code&gt; similar to the last level. I suspected &lt;code&gt;find&lt;/code&gt; would be more efficient and successful, so I started there. I checked the man page for &lt;code&gt;find&lt;/code&gt; to see how to use the flags correctly. I started by just checking for files that were the right size and not executable, since I didn&amp;rsquo;t find anything to check for human readability with &lt;code&gt;find&lt;/code&gt;. This narrowed it down to 11 files.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit5@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find . -not -executable -size -1033c &lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So I thought at this point that I should probably run &lt;code&gt;file&lt;/code&gt; against the output of that &lt;code&gt;find&lt;/code&gt;. I tried piping it, and it didn&amp;rsquo;t work. After some quick searching, I found the way to pass the output of &lt;code&gt;find&lt;/code&gt; to &lt;code&gt;file&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit5@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find . -not -executable -size -1033c -exec file &lt;span class=&#34;tok-o&#34;&gt;{}&lt;/span&gt; +&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The &lt;code&gt;{}&lt;/code&gt; acts as a placeholder for the results of &lt;code&gt;find&lt;/code&gt; and the &lt;code&gt;+&lt;/code&gt; passes all the values at once instead of one at a time.&lt;br&gt;&#xA;Unfortunately, this didn&amp;rsquo;t narrow it down as much as I had hoped. I decided we could likely ignore the &amp;ldquo;ASCII text, with very long lines&amp;rdquo; files, but that still left six that were ASCII text, not executable, and 1033 bytes. I started looking at them with &lt;code&gt;cat&lt;/code&gt; and none of this seemed right. I also suspected they weren&amp;rsquo;t all 1033 bytes, since they were very different size chunks of text. So I double checked with &lt;code&gt;ls -la&lt;/code&gt; on some of the directories containing the files that were returned from &lt;code&gt;find&lt;/code&gt;, and sure enough, they were not the right size. I think the &lt;code&gt;-not&lt;/code&gt; flag was negating both the size and executable flags. I likely needed to and them together, but first I tried just using the size, and there&amp;rsquo;s only one file that fit.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-6&#34;&gt;Level 6&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored &lt;strong&gt;somewhere on the server&lt;/strong&gt; and has all of the following properties:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;owned by user bandit7&lt;/li&gt;&#xA;&lt;li&gt;owned by group bandit6&lt;/li&gt;&#xA;&lt;li&gt;33 bytes in size&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-7&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;find / -size 33c -group bandit6 -user bandit7 2&amp;gt;&amp;amp;&lt;span class=&#34;tok-m&#34;&gt;1&lt;/span&gt; | grep -v &lt;span class=&#34;tok-s1&#34;&gt;&#39;Permission denied&#39;&lt;/span&gt; | grep -v &lt;span class=&#34;tok-s1&#34;&gt;&#39;No such file&#39;&lt;/span&gt;&#xA;cat /var/lib/dpkg/info/bandit7.password&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-7&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;In this one, we do have to use more of the properties as well as expanding our &lt;code&gt;find&lt;/code&gt; search.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-6&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;In this case, there isn&amp;rsquo;t anything in bandit6&amp;rsquo;s home directory, so the file has to be somewhere else. I tried running find from the root and just checking size&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit6@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find / -size 33c&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;but there were a lot of files that were returned, so I had to narrow it down with the other attributes that were given.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit6@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find / -size 33c -group bandit6 -user bandit7&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This returned a lot of things that had &amp;ldquo;Permission denied&amp;rdquo;, which means that I can&amp;rsquo;t execute &lt;code&gt;find&lt;/code&gt; on those files. I tried to filter out those with &lt;code&gt;grep&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit6@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find / -size 33c -group bandit6 -user bandit7 | grep -v &lt;span class=&#34;tok-s1&#34;&gt;&#39;Permission denied&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This didn&amp;rsquo;t seem to do anything. I did a quick search, and the &amp;ldquo;Permission denied&amp;rdquo; error is sent to stderr not stdout. So, I found a way to send it to stdout so that I could filter with &lt;code&gt;grep&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit6@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;find / -size 33c -group bandit6 -user bandit7 2&amp;gt;&amp;amp;&lt;span class=&#34;tok-m&#34;&gt;1&lt;/span&gt; | grep -v &lt;span class=&#34;tok-s1&#34;&gt;&#39;Permission denied&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;You can read more about &lt;code&gt;2&amp;gt;&amp;amp;1&lt;/code&gt; &lt;a href=&#34;https://stackoverflow.com/questions/818255/what-does-21-mean&#34;&gt;here&lt;/a&gt;.&lt;br&gt;&#xA;There were still a handful of files that produced a &amp;ldquo;No such file or directory&amp;rdquo; error, but the list was small enough that I could see only one file that made sense: &lt;code&gt;/var/lib/dpkg/info/bandit7.password&lt;/code&gt;. I checked it with &lt;code&gt;cat&lt;/code&gt; and it was correct. I included an additional filter in the tl;dr to get rid of the other errors as well.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-7&#34;&gt;Level 7&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt; next to the word &lt;strong&gt;millionth&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-8&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;grep &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;millionth&amp;quot;&lt;/span&gt; data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-8&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one is pretty straightforward. Use &lt;code&gt;grep&lt;/code&gt; to search for the word &amp;ldquo;millionth&amp;rdquo; in &lt;code&gt;data.txt&lt;/code&gt;, which is in bandit7&amp;rsquo;s home directory and the password is on that line.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-8&#34;&gt;Level 8&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt; and is the only line of text that occurs only once&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-9&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sort data.txt | uniq -u&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-9&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one uses &lt;code&gt;sort&lt;/code&gt; to sort the lines of &lt;code&gt;data.txt&lt;/code&gt; and then &lt;code&gt;uniq -u&lt;/code&gt; to filter out the unique lines. &lt;code&gt;uniq&lt;/code&gt; by itself only filters out adjacent duplicate lines, so &lt;code&gt;sort&lt;/code&gt; is used first to put all of the duplicate lines next to each other.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-7&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;This one seemed slightly less straightforward than the previous one, but I suspected it probably followed a similar pattern. &lt;code&gt;grep&lt;/code&gt; is pretty powerful, so I suspected it had a way to search for unique lines. I looked at the &lt;code&gt;man&lt;/code&gt; page for &lt;code&gt;grep&lt;/code&gt; and found the &lt;code&gt;-c&lt;/code&gt; flag, but I wasn&amp;rsquo;t able to get it to count unique lines.&lt;/p&gt;&#xA;&lt;p&gt;I took another look at the OverTheWire page for a hint, and it suggested &lt;code&gt;sort&lt;/code&gt; and &lt;code&gt;uniq&lt;/code&gt;. Looking at the &lt;code&gt;man&lt;/code&gt; pages for those, I was pretty sure I could sort and then use &lt;code&gt;uniq&lt;/code&gt; to get unique lines, which did end up working.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-9&#34;&gt;Level 9&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt; in one of the few human-readable strings, preceded by several ‘=’ characters.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-10&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;grep -ao &lt;span class=&#34;tok-s1&#34;&gt;&#39;==.*&#39;&lt;/span&gt; data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-10&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level requires searching through &lt;code&gt;data.txt&lt;/code&gt; for human-readable strings preceded by several ‘=’ characters. Relatively straightforward, but requires using some different &lt;code&gt;grep&lt;/code&gt; flags than we have so far. &lt;code&gt;-a&lt;/code&gt; is used to display the text, &lt;code&gt;-o&lt;/code&gt; is used to only show the matching text, and we change the pattern to &lt;code&gt;==.*&lt;/code&gt; to match the equals signs followed by any characters, which will show us the matched text and any text after it.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-8&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Once again, we have a single file, &lt;code&gt;data.txt&lt;/code&gt;. I started by using &lt;code&gt;cat&lt;/code&gt; to look at the contents, and as the description suggests, most of it isn&amp;rsquo;t human readable. I tried using &lt;code&gt;grep&lt;/code&gt; to search for the equals signs that preceed the password.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit9@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;grep &lt;span class=&#34;tok-s1&#34;&gt;&#39;==&#39;&lt;/span&gt; data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;When I tried that I only got &amp;ldquo;binary file matches&amp;rdquo;. A quick search told me to use the &lt;code&gt;-a&lt;/code&gt; flag to display the text anyway.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit9@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;grep -a &lt;span class=&#34;tok-s1&#34;&gt;&#39;==&#39;&lt;/span&gt; data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This did give me the answer, but it required looking somewhat carefully (there are words to the right of several of the equals signs and some human readable text next to the last set). I wanted to see the answer more obviously, so I searched for a way to get &lt;code&gt;grep&lt;/code&gt; to only show the human readable text and found the &lt;code&gt;-o&lt;/code&gt; flag.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit9@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;grep -ao &lt;span class=&#34;tok-s1&#34;&gt;&#39;==.*&#39;&lt;/span&gt; data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This returned the answer in a much more obvious manner.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-10&#34;&gt;Level 10&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt;, which contains base64 encoded data&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-11&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;base64 -d data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-11&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one involves decoding some base64 encoded text. You can read more about base64 &lt;a href=&#34;https://en.wikipedia.org/wiki/Base64&#34;&gt;here&lt;/a&gt;. Something particular to note for those of you new to cybersecurity is that base64 encoding is not encryption. It is a way to encode data so that it can be transmitted as ASCII text, which might obfuscate the data, but it doesn&amp;rsquo;t require anything more than a base64 decoder to get the original data back.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-9&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Since we started again with just &lt;code&gt;data.txt&lt;/code&gt;, I used &lt;code&gt;cat&lt;/code&gt; to look at the contents. Aside from being told on the OverTheWire page that the contents were base64 encoded, the ASCII text also ended with &amp;ldquo;==&amp;rdquo;, which is a common ending for base64 encoded text. From here, I just had to decode the text.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit10@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;base64 --decode data.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;You could also plug the text into an online base64 decoder to get the same result. A fun one that I will mention here is &lt;a href=&#34;https://gchq.github.io/CyberChef/&#34;&gt;CyberChef&lt;/a&gt;, which can do a lot more than just base64 decoding.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-11&#34;&gt;Level 11&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt;, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-12&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat data.txt | tr &lt;span class=&#34;tok-s1&#34;&gt;&#39;a-zA-Z&#39;&lt;/span&gt; &lt;span class=&#34;tok-s1&#34;&gt;&#39;n-za-mN-ZA-M&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-12&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This is a fairly common cipher, in the category of substitution ciphers, the same as the famous Caesar cipher. There are a few ways to decode it. One is to use an online tool like CyberChef. Another is by shifting the letters yourself. This can be done with the &lt;code&gt;tr&lt;/code&gt; command. The &lt;code&gt;tr&lt;/code&gt; command is used to translate or delete characters. In this case, we are translating &lt;code&gt;a-z&lt;/code&gt; and &lt;code&gt;A-Z&lt;/code&gt; to &lt;code&gt;n-za-mN-ZA-M&lt;/code&gt;, which is the same as rotating them by 13 places in the alphabet.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-10&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I recognized this as &amp;ldquo;rot13&amp;rdquo;, which is a simple encoding scheme that shifts letters by 13 places. This was reinforced by the hint to look at the Wikipedia page for rot13. So I started by using &lt;code&gt;cat&lt;/code&gt; to look at the contents of &lt;code&gt;data.txt&lt;/code&gt;. The pattern of the words looked like the previous level, but with a different password. I copied the text to cyberchef and decoded it with rot13.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-12&#34;&gt;Level 12&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt;, 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. Use mkdir with a hard to guess directory name. Or better, use the command “mktemp -d”. Then copy the datafile using cp, and rename it using mv (read the manpages!)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-13&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir /tmp/tmp.YSFLL0Jky7&#xA;cp data.txt /tmp/tmp.YSFLL0Jky7&#xA;cd /tmp/tmp.YSFLL0Jky7&#xA;xxd -r data.txt data&#xA;mv data data.gz&#xA;gunzip data.gz&#xA;bunzip2 data&#xA;mv data.out data.gz&#xA;gunzip data.gz&#xA;tar -xvf data&#xA;cat data8&#xA;tar -xvf data5.bin&#xA;mv data6.bin data6.bz2&#xA;bunzip2 data6.bz2&#xA;tar -xvf data6&#xA;mv data8.bin data8.gz&#xA;gunzip data8.gz&#xA;cat data8&#xA;rm -rf /tmp/tmp.YSFLL0Jky7&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-13&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level might be somewhat tedious, but it should familiarize you with decompressing and using &lt;code&gt;file&lt;/code&gt; to check the type of a file.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-11&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Per the instructions, I created a temporary directory. In my case, I used &lt;code&gt;mktemp -d&lt;/code&gt; which gave it the name &lt;code&gt;tmp.YSFLL0Jky7&lt;/code&gt;. In the tl;dr, I hardcoded this same name. If you follow along with my steps, you&amp;rsquo;ll need to substitute the name of your temporary directory. I then copied &lt;code&gt;data.txt&lt;/code&gt; to that directory. I navigated to the directory and listed the contents to make sure &lt;code&gt;data.txt&lt;/code&gt; was there.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mktemp -d&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cp data.txt /tmp/tmp.YSFLL0Jky7&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd /tmp/tmp.YSFLL0Jky7&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Then I did a couple of quick checks on the file with &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;cat&lt;/code&gt;. It didn&amp;rsquo;t turn up anything that I wasn&amp;rsquo;t expecting, so I knew from the instructions that I needed to reverse the hexdump first. I did that with &lt;code&gt;xxd&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;xxd -r data.txt data&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I double checked that it worked the way I expected with &lt;code&gt;ls&lt;/code&gt;, then decided to see what sort of compressed file it was. I did this with &lt;code&gt;file&lt;/code&gt;. I also was curious, so I used &lt;code&gt;cat&lt;/code&gt; to look at the contents, expecting it to be garbage, but it actually crashed the graphics driver for my PowerShell window, so I had to reconnect and pick back up. But with &lt;code&gt;file&lt;/code&gt; I found it was &lt;code&gt;gzip&lt;/code&gt; compressed. I attempted to unzip it with &lt;code&gt;gunzip&lt;/code&gt;, but got an error: &amp;ldquo;gzip: data: unkown suffix &amp;ndash; ignored.&amp;rdquo; I did a quick search and found &lt;code&gt;gunzip&lt;/code&gt; and &lt;code&gt;gzip -d&lt;/code&gt; expect the file to have a &lt;code&gt;.gz&lt;/code&gt; suffix, so I added that and tried again.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;gunzip data&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mv data data.gz&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;gunzip data.gz&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Now when I checked the file type with &lt;code&gt;file&lt;/code&gt;, it was &lt;code&gt;bzip2 compressed data&lt;/code&gt;, so I went throug the same process again, this time using &lt;code&gt;bunzip2&lt;/code&gt;, without first adding the &lt;code&gt;.bz2&lt;/code&gt; suffix. When I did this, it assumed the file was called &lt;code&gt;data.out&lt;/code&gt; and renamed it to match. I checked with &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;file&lt;/code&gt;, and found the file (now renamed to &lt;code&gt;data.out&lt;/code&gt;) was &amp;ldquo;gzip compressed data&amp;rdquo;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;bunzip2 data&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data.out&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So, then I did the same song and dance with &lt;code&gt;gzip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mv data.out data.gz&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;gunzip data.gz&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This time I got a &amp;ldquo;POSIX tar archive&amp;rdquo;. I knew from the instructions that I needed to decompress it, so I used &lt;code&gt;tar&lt;/code&gt; and checked again.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;tar -xf data&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Then I had a new file called &lt;code&gt;data5.bin&lt;/code&gt;. I double checked that it was a binary file with &lt;code&gt;file&lt;/code&gt;, but it turned out to be another POSIX tar archive. So I extracted that one and checked again.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;tar -xvf data5.bin&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data6.bin&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&lt;code&gt;data6.bin&lt;/code&gt; was &amp;ldquo;bzip2 compressed data&amp;rdquo;, so I went through the same process again, this time using &lt;code&gt;bunzip2&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mv data6.bin data6.bz2&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;bunzip2 data6.bz2&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data6&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This gave another POSIX tar archive, so I extracted it and checked again.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;tar -xvf data6&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data8&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&lt;code&gt;data8&lt;/code&gt; was &amp;ldquo;gzip compressed data&amp;rdquo;, so I went through this &lt;strong&gt;again&lt;/strong&gt;, but with &lt;code&gt;gunzip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mv data8.bin data8.gz&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;gunzip data8.gz&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file data8&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Finally, I got to an ASCII file, which I checked with &lt;code&gt;cat&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit12@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat data8&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that gave me the password for the next level. I also cleaned up the temporary directory with &lt;code&gt;rm -rf /tmp/tmp.YSFLL0Jky7&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-13&#34;&gt;Level 13&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in &lt;strong&gt;/etc/bandit_pass/bandit14 and can only be read by user bandit14&lt;/strong&gt;. 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. &lt;strong&gt;Note: localhost&lt;/strong&gt; is a hostname that refers to the machine you are working on&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-14&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh -i sshkey.private bandit14@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&#xA;cat /etc/bandit_pass/bandit14&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-14&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one is a bit different from the previous ones. We know where the password is, but it&amp;rsquo;s owned by bandit14, so we can&amp;rsquo;t see it from bandit13. We need to use a given private SSH key to log in to bandit14, then we&amp;rsquo;ll be able to see the password.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-12&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I started by logging in as usual and just checking to see if anything was in the home directory. There was a file called &amp;ldquo;sshkey.private&amp;rdquo;, and double checking with &lt;code&gt;file&lt;/code&gt; confirmed that it was a private SSH key. I knew I would need to SSH from bandit13 to bandit14, but I wasn&amp;rsquo;t sure how to do that with the private key. A quick search turned up &lt;a href=&#34;https://unix.stackexchange.com/questions/23291/how-to-ssh-to-remote-server-using-a-private-key&#34;&gt;this&lt;/a&gt; page, which I tried:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit13@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i sshkey.private bandit14@localhost&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This didn&amp;rsquo;t work. I got the following error:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;Could not create directory &#39;/home/bandit13/.ssh&#39; (Permission denied).&#xA;Failed to add the host to the list of known hosts (/home/bandit13/.ssh/known_hosts).&#xA;&#xA;                      This is an OverTheWire game server.&#xA;            More information on http://www.overthewire.org/wargames&#xA;&#xA;!!! You are trying to log into this SSH server on port 22, which is not intended.&#xA;&#xA;bandit14@localhost: Permission denied (publickey).&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Given that error, I thought of a couple of different approaches to try. I could try to change the permissions on the key file, but my gut said that would be unlikely to work, since if that was the solution it might allow people to mess with some other parts of the game. It also says port 22 is not intended, so I thought I could try to SSH to a different port.&lt;/p&gt;&#xA;&lt;p&gt;I took a look at the commands and helpful reading materials from the OverTheWire page for this level, it didn&amp;rsquo;t mention anything about changing the permissions on the file, so I decided to try the different SSH port route first. I checked the &lt;code&gt;man&lt;/code&gt; page and used &lt;code&gt;nc&lt;/code&gt; to see what ports were open on the server:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit13@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;nc -z localhost 1-65535&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This returned a list of ports that were open, only port 22 showed up as &lt;code&gt;[tcp/ssh]&lt;/code&gt;. The others all showed &lt;code&gt;[tcp/*]&lt;/code&gt;. I wanted some more information about what was running on the other ports before proceeding. I tried adding the &lt;code&gt;-v&lt;/code&gt; flag to &lt;code&gt;nc&lt;/code&gt;, but all it did was return the failures in addition to the successes. So then I spent a little too long looking for an elegant way to pass the port numbers to &lt;code&gt;nmap&lt;/code&gt;, but sometimes a known working less elegant solution is better. So I just hand-jammed it.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit13@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;nmap -sV -p 22,1111,1840,2220,2221,2230,2231,2232,4091,4321,8000,30000,30001,30002,31046,31518,31691,31790,31960,50001,51790,59150,60917 localhost&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Even with the reduced port numbers, I knew this would take a little while to run. I got this list back with some unrecognized services as well:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;PORT      STATE  SERVICE             VERSION&#xA;22/tcp    open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;1111/tcp  open   time                (32 bits)&#xA;1840/tcp  open   ssl/netopia-vo2?&#xA;2220/tcp  open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;2221/tcp  open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;2230/tcp  open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;2231/tcp  open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;2232/tcp  open   ssh                 OpenSSH 9.6p1 (protocol 2.0)&#xA;4091/tcp  open   ewinstaller?&#xA;4321/tcp  open   rwhois?&#xA;8000/tcp  open   http-alt?&#xA;30000/tcp open   ndmps?&#xA;30001/tcp open   ssl/pago-services1?&#xA;30002/tcp open   pago-services2?&#xA;31046/tcp open   echo&#xA;31518/tcp open   ssl/echo&#xA;31691/tcp open   echo&#xA;31790/tcp open   ssl/unknown&#xA;31960/tcp open   echo&#xA;50001/tcp open   unknown&#xA;51790/tcp open   unknown&#xA;59150/tcp closed unknown&#xA;60917/tcp open   unknown&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So it appeared that there were some more SSH ports open, so I tried connecting like I did before, but to the other ports, starting with 2220.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit13@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i sshkey.private bandit14@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Bingo! No need to try the other ports. Then I just had to use &lt;code&gt;cat&lt;/code&gt; to display the contents of the password file, per the instructions.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit13@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit14&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-14&#34;&gt;Level 14&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level can be retrieved by submitting the password of the current level to &lt;strong&gt;port 30000 on localhost.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-15&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat /etc/bandit_pass/bandit14 | nc localhost &lt;span class=&#34;tok-m&#34;&gt;30000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-15&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;For this one, we use netcat to pass the password to localhost on port 30000. Pretty straightforward.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-13&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;For this one, I knew I needed to send the bandit14 password to localhost. That sounded like probably &lt;code&gt;telnet&lt;/code&gt; or &lt;code&gt;nc&lt;/code&gt;, so I stared with &lt;code&gt;nc&lt;/code&gt;. I first tried hand-jamming it, which worked:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit14@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;&amp;lt;BANDIT14_PASSWORD REDACTED PER THE RULES&amp;gt; | nc localhost &lt;span class=&#34;tok-m&#34;&gt;30000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Then I wanted to make sure I could give a good tl;dr without having to put a spot for the redacted password, so I double checked that I could pipe the contents of the password file from the previous level to &lt;code&gt;nc&lt;/code&gt;, which worked and is the solution in the tl;dr.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-15&#34;&gt;Level 15&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level can be retrieved by submitting the password of the current level to &lt;strong&gt;port 30001 on localhost&lt;/strong&gt; using SSL/TLS encryption.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Helpful note: Getting “DONE”, “RENEGOTIATING” or “KEYUPDATE”? Read the “CONNECTED COMMANDS” section in the manpage.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-16&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;openssl s_client -connect localhost:30001&#xA;&amp;lt;PASTE BANDIT15 PASSWORD&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-16&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level uses openssl to connect to a port securely, then we submit the current password to that port.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-14&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I wasn&amp;rsquo;t as sure reading this one, so I did a quick search and found that I likely won&amp;rsquo;t be able to use &lt;code&gt;nc&lt;/code&gt; with SSL/TLS encryption. I took a look at the OverTheWire page and found several potentially helpful commands. I started by Googling ones that looked promising to be able to securely submit the password: &lt;code&gt;socat&lt;/code&gt;, &lt;code&gt;openssl&lt;/code&gt;, &lt;code&gt;s_client&lt;/code&gt;, and &lt;code&gt;ss&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;socat&lt;/code&gt; - I was thinking the &amp;rsquo;s&amp;rsquo; at the beginning might have been &amp;ldquo;secure&amp;rdquo;, but it&amp;rsquo;s short for &amp;ldquo;SOcket CAT&amp;rdquo;, so likely not that one.&#xA;&lt;code&gt;openssl&lt;/code&gt; - This implements SSL/TLS, so I thought that might be the one. I did a little more reading on the man page and it mentioned &lt;code&gt;s_client&lt;/code&gt;, which was next on my list anyway, so I switched to reading about that. It looked like that was what I was looking for, so I tried it:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit14@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit14 | openssl s_client -connect localhost:30001&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This did connect, but it only gave me a bunch of information about the TLS tickets. I still thought this was on the right track, so I tried just connecting without the pipe.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit14@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;openssl s_client -connect localhost:30001&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This gave me a &amp;ldquo;read R BLOCK&amp;rdquo; prompt, and appeared to be waiting for input, so I submitted the password from bandit14, and it returned the next password.&lt;/p&gt;&#xA;&lt;p&gt;I realized I was still using bandit14, and the instructions specified to submit the password for the current level, which should be the password for bandit15. So I tried that too, and it gave me the same result.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit15@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;openssl s_client -connect localhost:30001&#xA;&amp;lt;BANDIT15_PASSWORD REDACTED PER THE RULES&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-16&#34;&gt;Level 16&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The credentials for the next level can be retrieved by submitting the password of the current level to &lt;strong&gt;a port on localhost in the range 31000 to 32000&lt;/strong&gt;. First find out which of these ports have a server listening on them. Then find out which of those speak SSL/TLS 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.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Helpful note: Getting “DONE”, “RENEGOTIATING” or “KEYUPDATE”? Read the “CONNECTED COMMANDS” section in the manpage.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-17&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir /tmp/soidvaw0&#xA;cat /etc/bandit_pass/bandit16 | openssl s_client -connect localhost:31790 -ign_eof &amp;gt; /tmp/soidvaw0/s_client-output.txt&#xA;awk &lt;span class=&#34;tok-s1&#34;&gt;&#39;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  {if ($0 ~ /Correct!/) found =1;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (found &amp;amp;&amp;amp; $0 ~ /-----BEGIN RSA PRIVATE KEY-----/) printing =1;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (printing) print;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (printing &amp;amp;&amp;amp; $0 ~ /-----END RSA PRIVATE KEY-----/) {printing=0; exit}&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  }&#39;&lt;/span&gt; /tmp/soidvaw0/s_client-output.txt &amp;gt; /tmp/soidvaw0/sshkey.private&#xA;chmod &lt;span class=&#34;tok-m&#34;&gt;600&lt;/span&gt; /tmp/soidvaw0/sshkey.private&#xA;ssh -i /tmp/soidvaw0/sshkey.private bandit17@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&#xA;cat /etc/bandit_pass/bandit17&#xA;exit&#xA;rm -r /tmp/soidvaw0&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;callout callout--note&#34; role=&#34;note&#34;&gt;&#xA;&lt;div class=&#34;callout-label&#34;&gt;Note&lt;/div&gt;&#xA;&lt;p&gt;You don&amp;rsquo;t have to name your directory &lt;code&gt;soidvaw0&lt;/code&gt;, I just hit some random keys on the keyboard. If you&amp;rsquo;re wanting to follow along exactly, you can use that one, or make your own and replace &lt;code&gt;soidvaw0&lt;/code&gt; with whatever your directory is.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-17&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level is sort of a combination of the solutions for &lt;a href=&#34;#level-13&#34;&gt;level 13&lt;/a&gt; and &lt;a href=&#34;#level-15&#34;&gt;level 15&lt;/a&gt;. Like in level 13, we need to port scan (or since it&amp;rsquo;s on the same machine, use the actual results of the scan on level 13), then like in level 15, we need to use &lt;code&gt;openssl s_client&lt;/code&gt; to securely connect to the port and submit the password. Then like level 13 again, we need to use the private key returned by the server to log in to the next level.&lt;/p&gt;&#xA;&lt;p&gt;The main part of this that is unique is that we need to extract the private key from the output of &lt;code&gt;openssl s_client&lt;/code&gt;, which I did using &lt;code&gt;awk&lt;/code&gt;, but could likely be done with &lt;code&gt;sed&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; or other tools.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-15&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Conveniently, we ran &lt;code&gt;nmap&lt;/code&gt; earlier (in level 13), and found that the open ports between 31000 and 32000 were the following:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;31046/tcp open   echo&#xA;31518/tcp open   ssl/echo&#xA;31691/tcp open   echo&#xA;31790/tcp open   ssl/unknown&#xA;31960/tcp open   echo&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;With those, I didn&amp;rsquo;t need to retry scanning the ports.The instructions say that most of the open ports will just send back whatever you send to them, so I started with the one that didn&amp;rsquo;t have &amp;ldquo;echo&amp;rdquo; in the service name - port 31790. Trying to avoid copying and pasting the password, I looked up a way to pass text to &lt;code&gt;openssl s_client&lt;/code&gt; and found the &lt;code&gt;-ign_eof&lt;/code&gt; flag, so I gave that a shot.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit16 | openssl s_client -connect localhost:31790 -ign_eof&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;sn&#34;&gt;&#xA;&lt;aside class=&#34;sidenote&#34;&gt;&lt;sup&gt;2&lt;/sup&gt; Edit from later in the post: turns out it did give me an RSA private key, and I wasn&amp;rsquo;t paying enough attention, so just keep reading.&lt;/aside&gt;&#xA;&lt;p&gt;All this told me was &amp;ldquo;Correct!&amp;rdquo;, so I tried just connecting via &lt;code&gt;openssl s_client&lt;/code&gt; without the pipe.&lt;sup class=&#34;sn-ref&#34;&gt;2&lt;/sup&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;openssl s_client -connect localhost:31790&#xA;&amp;lt;PASTE BANDIT16 PASSWORD&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This gave me a &amp;ldquo;read R BLOCK&amp;rdquo; prompt, so I submitted the password and it returned &amp;ldquo;KEYUPDATE&amp;rdquo;. There was a warning about this on the OverTheWire page, so I did a little more reading in the &lt;code&gt;openssl&lt;/code&gt; man page. Didn&amp;rsquo;t find what I was looking for there, so I did a Google search. I found &lt;a href=&#34;https://github.com/openssl/openssl/issues/6307&#34;&gt;this&lt;/a&gt; page, which mentioned that if you use &amp;ldquo;k&amp;rdquo; it tries to do a key update, which I didn&amp;rsquo;t want to do. This is likely because of the beginning of the password, so I tried submitting it with quotation marks around it.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;openssl s_client -connect localhost:31790&#xA;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&amp;lt;PASTE BANDIT16 PASSWORD&amp;gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This said it was incorrect, so I decided to try to revisit the man pages. Turns out I needed to read more closely, because I was on the wrong man page. Instead of &lt;code&gt;man openssl&lt;/code&gt;, or &lt;code&gt;man s_client&lt;/code&gt;, I had to look at &lt;code&gt;man openssl-s_client&lt;/code&gt;. The &lt;code&gt;s_client&lt;/code&gt; man page said as much.&#xA;Unfortunately, the man page didn&amp;rsquo;t help me figure out how to submit the password without it being sent as a key update. I was still pretty sure this was the correct port, so I went back to Google. I didn&amp;rsquo;t find anything that helped, so I just kept trying things and went back to the &lt;code&gt;openssl-s_client&lt;/code&gt; man page, which made me try &lt;code&gt;-ign_eof&lt;/code&gt; again. Seeing it, I think it may have actually worked last time, but instead of a password after &amp;ldquo;Correct!&amp;rdquo;, it gave me an RSA private key. This could be the key for the next level.&lt;/p&gt;&#xA;&lt;p&gt;Seeing this, I knew I needed to try to get the key into a file so I could use it like we did in &lt;a href=&#34;#level-13&#34;&gt;level 13&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/soidvaw0&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit16 | openssl s_client -connect localhost:31790 -ign_eof &amp;gt; /tmp/soidvaw0/sshkey.private&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;But checking this with &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;cat&lt;/code&gt;, this didn&amp;rsquo;t seem to be exactly what I was expecting. If it&amp;rsquo;s similar to level 13, the output of &lt;code&gt;file&lt;/code&gt; should be &amp;ldquo;sshkey.private: PEM RSA private key&amp;rdquo;, but instead is &amp;ldquo;ASCII text&amp;rdquo;. And the only contents of the file from &lt;code&gt;cat&lt;/code&gt; should start with &lt;code&gt;-----BEGIN RSA PRIVATE KEY-----&lt;/code&gt; and end with &lt;code&gt;-----END RSA PRIVATE KEY-----&lt;/code&gt; with the key itself between. Instead of that, I have the whole output from &lt;code&gt;s_client&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If I wanted to do something other than copying and pasting, I needed to edit what was going in that file. I had to do a bit of digging, and found a way to do it with &lt;code&gt;awk&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mv /tmp/soidvaw0/sshkey.private /tmp/soidvaw0/s_client-output.txt&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;awk &lt;span class=&#34;tok-s1&#34;&gt;&#39;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  {if ($0 ~ /Correct!/) found =1;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (found &amp;amp;&amp;amp; $0 ~ /-----BEGIN RSA PRIVATE KEY-----/) printing =1;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (printing) print;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  if (printing &amp;amp;&amp;amp; $0 ~ /-----END RSA PRIVATE KEY-----/) {printing=0; exit}&lt;/span&gt;&#xA;&lt;span class=&#34;tok-s1&#34;&gt;  }&#39;&lt;/span&gt; /tmp/soidvaw0/s_client-output.txt &amp;gt; /tmp/soidvaw0/sshkey.private&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;file /tmp/soidvaw0/sshkey.private&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /tmp/soidvaw0/sshkey.private&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This looked right with &lt;code&gt;file&lt;/code&gt; and &lt;code&gt;cat&lt;/code&gt;, so I gave it a shot.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i /tmp/soidvaw0/sshkey.private bandit17@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I got a permissions error saying that the private key was too open. I set the permissions with &lt;code&gt;chmod 600&lt;/code&gt; and tried again.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;chmod &lt;span class=&#34;tok-m&#34;&gt;600&lt;/span&gt; /tmp/soidvaw0/sshkey.private&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i /tmp/soidvaw0/sshkey.private bandit17@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit17@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit17&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that did it! I went back to clean up after myself.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit17@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;exit&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit16@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -r /tmp/soidvaw0&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-17&#34;&gt;Level 17&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There are 2 files in the homedirectory: &lt;strong&gt;passwords.old and passwords.new.&lt;/strong&gt; The password for the next level is in &lt;strong&gt;passwords.new&lt;/strong&gt; and is the only line that has been changed between &lt;strong&gt;passwords.old and passwords.new&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-18&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;diff passwords.old passwords.new | grep &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;^&amp;gt;&amp;quot;&lt;/span&gt; | awk &lt;span class=&#34;tok-s1&#34;&gt;&#39;{print $2}&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-18&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one is pretty straightforward.&lt;code&gt;diff&lt;/code&gt; compares two files and shows the differences between them. In this case, the only line that has been changed between &lt;code&gt;passwords.old&lt;/code&gt; and &lt;code&gt;passwords.new&lt;/code&gt; is the password for the next level.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-16&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I knew I needed to &lt;code&gt;diff&lt;/code&gt; the two files and get the new password.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit17@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;diff passwords.old passwords.new&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I double checked that the password on the right side was the one I was looking for, and it was. I did a little searching and experimenting to make the tl;dr only return the password.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-18&#34;&gt;Level 18&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: The password for the next level is stored in a file &lt;strong&gt;readme&lt;/strong&gt; in the homedirectory. Unfortunately, someone has modified &lt;strong&gt;.bashrc&lt;/strong&gt; to log you out when you log in with SSH.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-19&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit18@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;cat readme&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-19&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;We aren&amp;rsquo;t able to log in to &lt;code&gt;bandit18&lt;/code&gt; and read the file normally, so we have to find a way to read it before being kicked off by the &lt;code&gt;.bashrc&lt;/code&gt; file.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-17&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;When I first logged in, I was immediately kicked off. This was expected based on the instructions from the last two levels. I logged back in as &lt;code&gt;bandit17&lt;/code&gt; to try to check out the .bashrc file. I tried&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit17@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /home/bandit18/.bashrc&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and got a permission denied error. I can&amp;rsquo;t say I&amp;rsquo;m surprised, but I was hoping it would be something simple like that. My next thought was to see if I could find a way to &lt;code&gt;ssh&lt;/code&gt; into &lt;code&gt;bandit18&lt;/code&gt; without triggering the .bashrc file. I tried&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit18@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; --noprofile&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and got an error that it didn&amp;rsquo;t recognize &amp;ldquo;&amp;ndash; -&amp;rdquo;. I tried&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit18@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-nv&#34;&gt;BASH_ENV&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;/dev/null&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and got no output. I suspect I was logged in and was kicked off because of .bashrc without getting feedback.&lt;/p&gt;&#xA;&lt;p&gt;I decided it was time to try a new approach. So I looked for a way to send a command with the login.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit18@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;ls&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and that did return &amp;ldquo;readme&amp;rdquo; after entering the prompted password, so I knew I was on the right track.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh bandit18@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;cat readme&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Worked, and gave me the password.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-19&#34;&gt;Level 19&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: 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 (/etc/bandit_pass), after you have used the setuid binary.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-20&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;./bandit20-do cat /etc/bandit_pass/bandit17&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-20&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level is pretty straightforward. The setuid binary allows you to run arbitrary commands as another user, so we just need to run &lt;code&gt;cat&lt;/code&gt; on the password file for &lt;code&gt;bandit20&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-18&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I started, per the instructions, by executing the setuid binary without arguments.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit19@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./bandit20-do&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;It returned&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;Run a command as another user.&#xA;  Example: ./bandit20-do id&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So it sounded like I should be able to run arbitrary commands as another user. Given that, I wanted to run &lt;code&gt;cat&lt;/code&gt; on the password file for &lt;code&gt;bandit20&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit19@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./bandit20-do cat /etc/bandit_pass/bandit17&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that did it!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-20&#34;&gt;Level 20&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: 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).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Try connecting to your own network daemon to see if it works as you think&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-21&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;tmux&#xA;C-b %&#xA;cat /etc/bandit_pass/bandit20 | nc -l &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&#xA;C-b &amp;lt;-&#xA;./suconnect &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&#xA;C-b d&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-21&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level involves setting up a server and listening for a connection, then sending the password for the next level when the connection is made. I did this with &lt;code&gt;tmux&lt;/code&gt; to split the terminal, but it could be done with other tools.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-19&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Similar to the previous level, I started with the instructions and executing the binary without arguments. This gave me the impression that the binary sets up a listening server on a port on localhost, then when something else connects to it and sends a line of text, it will compare that to the password for &lt;code&gt;bandit20&lt;/code&gt;, and if correct it will return the password for &lt;code&gt;bandit21&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I wanted to use a port that wasn&amp;rsquo;t being used by anything else, so I started with a port that wasn&amp;rsquo;t in the list from level 13: 42000. I was expecting it to probably just sit and wait, so I got another terminal instance ready to connect to it.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./suconnect &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt; &amp;amp;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit20 | nc localhost &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This did not work as I expected. I tried a variety of commands, but couldn&amp;rsquo;t seem to get anywhere. I tried using &lt;code&gt;tmux&lt;/code&gt; to split the terminal, leave the binary running in one and connect with &lt;code&gt;nc&lt;/code&gt; on the other but that didn&amp;rsquo;t work. I checked with &lt;code&gt;nmap&lt;/code&gt; on the other, and the port 42000 was closed, so something wasn&amp;rsquo;t working as I expected.&lt;/p&gt;&#xA;&lt;p&gt;After each time I ran the binary, it would say &amp;ldquo;could not connect&amp;rdquo; and then give me what appeared to be a different CLI interface for a single command before terminating the job, but when I checked things like &lt;code&gt;pwd&lt;/code&gt; and &lt;code&gt;whoami&lt;/code&gt;, it appeared that it was likely the same bash instance, maybe just something weird about backgrounding the job. I started thinking I was on the wrong path. Maybe I was approaching this backwards?&lt;/p&gt;&#xA;&lt;p&gt;I decided to try setting up a &lt;code&gt;nc&lt;/code&gt; server on port 42000.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;tmux&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-b %&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;nc -l &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I left this running in &lt;code&gt;tmux&lt;/code&gt; and went back to the other terminal to run the binary.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit20 | ./suconnect &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This didn&amp;rsquo;t work exactly, but I thought I was close. I tried a few variations, and was able to eventually figure it out.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit — tmux left&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;nc -l &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit — tmux right&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./suconnect &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit — tmux left&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;lt;paste bandit20 password&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I also found a way to do this without pasting the password - you can pipe the password from &lt;code&gt;cat&lt;/code&gt; to the server:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit20@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit20 | nc -l &lt;span class=&#34;tok-m&#34;&gt;42000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-21&#34;&gt;Level 21&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: A program is running automatically at regular intervals from &lt;strong&gt;cron&lt;/strong&gt;, the time-based job scheduler. Look in &lt;strong&gt;/etc/cron.d/&lt;/strong&gt; for the configuration and see what command is being executed.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-22&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-22&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;The tl;dr for this level kind of bypasses the the actual steps required to solve the level. For this one, we need to look at the cronjobs that are running on the system:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit21@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls /etc/cron.d/&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/cron.d/cronjob_bandit22&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This shows us a crontab or cron table entry for &lt;code&gt;bandit22&lt;/code&gt;. It tells us that every minute (the &lt;code&gt;*&lt;/code&gt; symbol in each position), it will run a script from the &lt;code&gt;/usr/bin/cronjob_bandit22.sh&lt;/code&gt; file. So then we need to look at that script.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit21@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /usr/bin/cronjob_bandit22.sh&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This script is storing the password for &lt;code&gt;bandit22&lt;/code&gt; in a file in the &lt;code&gt;/tmp&lt;/code&gt; directory. So then all we need to do is read that file, which is what the tl;dr shows.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit21@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h4 id=&#34;my-steps-20&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I started by just following the instructions. I checked in the directory &lt;code&gt;/etc/cron.d/&lt;/code&gt;. I used &lt;code&gt;ls -la&lt;/code&gt; and found the following:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;total 44&#xA;drwxr-xr-x   2 root root  4096 Sep 19 07:10 .&#xA;drwxr-xr-x 121 root root 12288 Sep 20 18:37 ..&#xA;-rw-r--r--   1 root root   120 Sep 19 07:08 cronjob_bandit22&#xA;-rw-r--r--   1 root root   122 Sep 19 07:08 cronjob_bandit23&#xA;-rw-r--r--   1 root root   120 Sep 19 07:08 cronjob_bandit24&#xA;-rw-r--r--   1 root root   201 Apr  8  2024 e2scrub_all&#xA;-rwx------   1 root root    52 Sep 19 07:10 otw-tmp-dir&#xA;-rw-r--r--   1 root root   102 Mar 31  2024 .placeholder&#xA;-rw-r--r--   1 root root   396 Jan  9  2024 sysstat&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I was expecting to see a file for &lt;code&gt;cronjob_bandit21&lt;/code&gt;, but it wasn&amp;rsquo;t there. I took a look at the files in there anyway. The cronjobs for &lt;code&gt;bandit22&lt;/code&gt;, &lt;code&gt;bandit23&lt;/code&gt;, and &lt;code&gt;bandit24&lt;/code&gt; all had the same format; they look like every minute they run a shell script from the respective user&amp;rsquo;s bin directory. The file &lt;code&gt;otw-tmp-dir&lt;/code&gt; looked interesting, and the permissions seemed to indicate that it was a regular executable file, rather than a directory as the name might suggest. I did not have permission to read or execute it, so I decided to leave it alone for the moment.&lt;/p&gt;&#xA;&lt;p&gt;I decided to take a look at what was executing for &lt;code&gt;bandit22&lt;/code&gt;: &lt;code&gt;/usr/bin/cronjob_bandit22.sh&lt;/code&gt;, and found that it was a script that stored the password in a file in the &lt;code&gt;/tmp&lt;/code&gt; directory:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;/usr/bin/cronjob_bandit22.sh&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-cp&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;chmod &lt;span class=&#34;tok-m&#34;&gt;644&lt;/span&gt; /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv&#xA;cat /etc/bandit_pass/bandit22 &amp;gt; /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;So I took a look at that file with &lt;code&gt;cat&lt;/code&gt; and found the next password.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-22&#34;&gt;Level 22&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: A program is running automatically at regular intervals from &lt;strong&gt;cron&lt;/strong&gt;, the time-based job scheduler. Look in &lt;strong&gt;/etc/cron.d/&lt;/strong&gt; for the configuration and see what command is being executed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Looking at shell scripts written by other people is a very useful skill. The script for this level is intentionally made easy to read. If you are having problems understanding what it does, try executing it to see the debug information it prints.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-23&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-nv&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;I am user bandit23&amp;quot;&lt;/span&gt; | md5sum | cut -d &lt;span class=&#34;tok-s1&#34;&gt;&#39; &#39;&lt;/span&gt; -f 1&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;cat /tmp/&lt;span class=&#34;tok-nv&#34;&gt;$target&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-23&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level is very similar to the previous one. The script is going to store the password for &lt;code&gt;bandit23&lt;/code&gt; in the &lt;code&gt;/tmp&lt;/code&gt; directory. All we need to do is read the script and figure out how it&amp;rsquo;s generating the filename.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-21&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Picking up from the previous level, I looked at the next cronjob: &lt;code&gt;/etc/cron.d/cronjob_bandit23&lt;/code&gt; and the associated script &lt;code&gt;/usr/bin/cronjob_bandit23.sh&lt;/code&gt;. I did initially try to read the script from &lt;code&gt;bandit21&lt;/code&gt;, but got a permission denied error. I switched to &lt;code&gt;bandit22&lt;/code&gt; and was able to read the script:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;/usr/bin/cronjob_bandit23.sh&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-cp&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;&#xA;&lt;span class=&#34;tok-nv&#34;&gt;myname&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;whoami&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&lt;span class=&#34;tok-nv&#34;&gt;mytarget&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;echo I am user &lt;span class=&#34;tok-nv&#34;&gt;$myname&lt;/span&gt; | md5sum | cut -d &lt;span class=&#34;tok-s1&#34;&gt;&#39; &#39;&lt;/span&gt; -f 1&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&#xA;echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;Copying passwordfile /etc/bandit_pass/&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$myname&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt; to /tmp/&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$mytarget&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&#xA;&#xA;cat /etc/bandit_pass/&lt;span class=&#34;tok-nv&#34;&gt;$myname&lt;/span&gt; &amp;gt; /tmp/&lt;span class=&#34;tok-nv&#34;&gt;$mytarget&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This script looked like it was going to store the password for &lt;code&gt;bandit23&lt;/code&gt; in the &lt;code&gt;/tmp&lt;/code&gt; directory, with a filename based on the md5sum of the string &amp;ldquo;I am user bandit23&amp;rdquo;. I wasn&amp;rsquo;t very familiar with &lt;code&gt;cut&lt;/code&gt;. I knew I could reproduce the &amp;ldquo;mytarget&amp;rdquo; value by just running it with &amp;ldquo;myname&amp;rdquo; set to &amp;ldquo;bandit23&amp;rdquo;, but I wanted to figure out what &lt;code&gt;cut&lt;/code&gt; was doing first.&lt;/p&gt;&#xA;&lt;p&gt;A little reading the &lt;code&gt;cut&lt;/code&gt; man page said that it was using the single space as a delimiter instead of tab, and then only taking the first field. So I ran the following:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit22@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;I am user bandit23&amp;quot;&lt;/span&gt; | md5sum&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;and it looked like &lt;code&gt;cut&lt;/code&gt; was removing the space and hyphen at the end of the md5sum value. So then I was comfortable enough to just run the script and check for the password in the &lt;code&gt;/tmp&lt;/code&gt; directory.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit22@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;I am user bandit23&amp;quot;&lt;/span&gt; | md5sum | cut -d &lt;span class=&#34;tok-s1&#34;&gt;&#39; &#39;&lt;/span&gt; -f 1&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;echo &lt;span class=&#34;tok-nv&#34;&gt;$target&lt;/span&gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /tmp/&lt;span class=&#34;tok-nv&#34;&gt;$target&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that was successful!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-23&#34;&gt;Level 23&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: A program is running automatically at regular intervals from &lt;strong&gt;cron&lt;/strong&gt;, the time-based job scheduler. Look in &lt;strong&gt;/etc/cron.d/&lt;/strong&gt; for the configuration and see what command is being executed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This level requires you to create your own first shell-script. This is a very big step and you should be proud of yourself when you beat this level!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE 2:&lt;/strong&gt; Keep in mind that your shell script is removed once executed, so you may want to keep a copy around…&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-24&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;printf &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;#!/bin/bash\ncat /etc/bandit_pass/bandit24 | nc localhost 42042&amp;quot;&lt;/span&gt; &amp;gt; /var/spool/bandit24/foo/password-sender.sh&#xA;chmod &lt;span class=&#34;tok-m&#34;&gt;755&lt;/span&gt; /var/spool/bandit24/foo/password-sender.sh&#xA;nc -l &lt;span class=&#34;tok-m&#34;&gt;42042&lt;/span&gt;&#xA;&amp;lt;wait &lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;tok-m&#34;&gt;60&lt;/span&gt; seconds &lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; password to come back&amp;gt;&#xA;ctrl+c&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-24&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;Depending on how quickly you enter those and when the cron job is running, the tl;dr might not work the first time.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-22&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I started off the same was I did in the previous two level: I looked at the cronjob: &lt;code&gt;/etc/cron.d/cronjob_bandit24&lt;/code&gt; and the associated script &lt;code&gt;/usr/bin/cronjob_bandit24.sh&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;/usr/bin/cronjob_bandit24.sh&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-cp&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;&#xA;&lt;span class=&#34;tok-nv&#34;&gt;myname&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;whoami&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&#xA;cd /var/spool/&lt;span class=&#34;tok-nv&#34;&gt;$myname&lt;/span&gt;/foo&#xA;echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;Executing and deleting all scripts in /var/spool/&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$myname&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;/foo:&amp;quot;&lt;/span&gt;&#xA;&lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; i in * .*;&#xA;&lt;span class=&#34;tok-k&#34;&gt;do&lt;/span&gt;&#xA;    &lt;span class=&#34;tok-k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;tok-o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt; !&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;.&amp;quot;&lt;/span&gt; -a &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt; !&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;..&amp;quot;&lt;/span&gt; &lt;span class=&#34;tok-o&#34;&gt;]&lt;/span&gt;;&#xA;    &lt;span class=&#34;tok-k&#34;&gt;then&lt;/span&gt;&#xA;        echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;Handling &lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&#xA;        &lt;span class=&#34;tok-nv&#34;&gt;owner&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;stat --format &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;%U&amp;quot;&lt;/span&gt; ./&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&#xA;        &lt;span class=&#34;tok-k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;tok-o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;owner&lt;/span&gt;&lt;span class=&#34;tok-si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;bandit23&amp;quot;&lt;/span&gt; &lt;span class=&#34;tok-o&#34;&gt;]&lt;/span&gt;; &lt;span class=&#34;tok-k&#34;&gt;then&lt;/span&gt;&#xA;            timeout -s &lt;span class=&#34;tok-m&#34;&gt;9&lt;/span&gt; &lt;span class=&#34;tok-m&#34;&gt;60&lt;/span&gt; ./&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&#xA;        &lt;span class=&#34;tok-k&#34;&gt;fi&lt;/span&gt;&#xA;        rm -f ./&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&#xA;    &lt;span class=&#34;tok-k&#34;&gt;fi&lt;/span&gt;&#xA;&lt;span class=&#34;tok-k&#34;&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This script appeared to execute any files that are owned by &lt;code&gt;bandit23&lt;/code&gt; (&lt;code&gt;if [ &amp;quot;${owner}&amp;quot; = &amp;quot;bandit23&amp;quot; ]; then&lt;/code&gt;) in the &lt;code&gt;/var/spool/bandit24/foo&lt;/code&gt; directory as long as they aren&amp;rsquo;t named &amp;ldquo;.&amp;rdquo; or &amp;ldquo;..&amp;rdquo; (&lt;code&gt;if [ &amp;quot;$i&amp;quot; != &amp;quot;.&amp;quot; -a &amp;quot;$i&amp;quot; != &amp;quot;..&amp;quot; ]; then&lt;/code&gt;). This gives them 60 seconds to run before being killed (&lt;code&gt;timeout -s 9 60 ./$i&lt;/code&gt;). I had to look up the &amp;ldquo;9&amp;rdquo; to see what it meant, and that is the signal number for SIGKILL, which is the signal that will kill the process. The &amp;ldquo;60&amp;rdquo; is the number of seconds before the signal is sent. Then it deletes the file (&lt;code&gt;rm -f ./$i&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;This sounded (along with the instructions) like I needed to create a script. Since it would be removed (also per the instructions), I wrote it and stored it elsewhere first:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit23@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/asdlfojwainvasvawn&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;vim /tmp/asdlfojwainvasvawn/password-sender.sh&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;chmod &lt;span class=&#34;tok-m&#34;&gt;755&lt;/span&gt; /tmp/asdlfojwainvasvawn/password-sender.sh&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;password-sender.sh&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-cp&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;&#xA;cat /etc/bandit_pass/bandit24 | nc localhost &lt;span class=&#34;tok-m&#34;&gt;42042&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I was intending for this to work similar to level 20. The script should, when run by the cron job, use &lt;code&gt;netcat&lt;/code&gt; to send the password to port 42042. So before I copied this script into &lt;code&gt;/var/spool/bandit24/foo/&lt;/code&gt;, I used &lt;code&gt;tmux&lt;/code&gt; and set up a listener on that port as well.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit23@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;tmux&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-b %&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit23@bandit — tmux right&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;nc -l &lt;span class=&#34;tok-m&#34;&gt;42042&lt;/span&gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-b &amp;lt;-&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit23@bandit — tmux left&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cp /tmp/asdlfojwainvasvawn/password-sender.sh /var/spool/bandit24/foo/&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;After a few moments of bated breath, the right side of the screen popped up with the password.&lt;/p&gt;&#xA;&lt;p&gt;I cleaned up after myself and went on my merry way.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit23@bandit — tmux left&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-b -&amp;gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-c&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;C-b d&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -rf /tmp/asdlfojwainvasvawn&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-24&#34;&gt;Level 24&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: A daemon is listening on port 30002 and will give you the password for bandit25 if given the password for bandit24 and a secret numeric 4-digit pincode. There is no way to retrieve the pincode except by going through all of the 10000 combinations, called brute-forcing.&#xA;You do not need to create new connections each time&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-25&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-nv&#34;&gt;bandit24pass&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;cat /etc/bandit_pass/bandit24&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; i in &lt;span class=&#34;tok-o&#34;&gt;{&lt;/span&gt;0000..9999&lt;span class=&#34;tok-o&#34;&gt;}&lt;/span&gt;; &lt;span class=&#34;tok-k&#34;&gt;do&lt;/span&gt; echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$bandit24pass&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /tmp/asdvaweansdvoanlnionoinlk.txt; &lt;span class=&#34;tok-k&#34;&gt;done&lt;/span&gt;&#xA;cat /tmp/asdvaweansdvoanlnionoinlk.txt | nc localhost &lt;span class=&#34;tok-m&#34;&gt;30002&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-25&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level is fairly straightforward. It involves brute forcing a 4-digit pincode by sending a list of password + pincode combinations to the port and seeing which one works.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-23&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;This looked like it was going to be another level left somewhat open ended. I first started by trying to send the password for &lt;code&gt;bandit24&lt;/code&gt; to the port 30002 to check if it gave me an error for the format of how it wanted the password and pincode.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit24@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit24 | nc localhost &lt;span class=&#34;tok-m&#34;&gt;30002&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Thankfully, I did get an error, and even better, it gave me the format it wanted.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;I am the pincode checker for user bandit25. Please enter the password for user bandit24 and the secret pincode on a single line, separated by a space.&#xA;Wrong! Please enter the correct current password and pincode. Try again.&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Given the instructions, I knew I would need to brute force the pincode. The question at this point was whether that brute force needed to happen during the connection, or if I could pass in a list of password + pincode combinations to try. I decided the latter would be easier to start with, so I wrote a script to generate a list of all possible 4 digit combinations and then write them to a file:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit24@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/asdvaweansdvoanlnionoinlk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;vim /tmp/asdvaweansdvoanlnionoinlk/pincodegenerator.sh&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;pincodegenerator.sh&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-nv&#34;&gt;bandit24pass&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;tok-k&#34;&gt;$(&lt;/span&gt;cat /etc/bandit_pass/bandit24&lt;span class=&#34;tok-k&#34;&gt;)&lt;/span&gt;&#xA;&lt;span class=&#34;tok-k&#34;&gt;for&lt;/span&gt; i in &lt;span class=&#34;tok-o&#34;&gt;{&lt;/span&gt;0000..9999&lt;span class=&#34;tok-o&#34;&gt;}&lt;/span&gt;; &lt;span class=&#34;tok-k&#34;&gt;do&lt;/span&gt; echo &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$bandit24pass&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt; &lt;/span&gt;&lt;span class=&#34;tok-nv&#34;&gt;$i&lt;/span&gt;&lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; /tmp/asdvaweansdvoanlnionoinlk/pincodes.txt; &lt;span class=&#34;tok-k&#34;&gt;done&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit24@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;chmod &lt;span class=&#34;tok-m&#34;&gt;755&lt;/span&gt; /tmp/asdvaweansdvoanlnionoinlk/pincodegenerator.sh&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;/tmp/asdvaweansdvoanlnionoinlk/pincodegenerator.sh&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;less /tmp/asdvaweansdvoanlnionoinlk/pincodes.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I checked the pincodes file with &lt;code&gt;less&lt;/code&gt; and it looked like it was what I expected, so I passed that file to &lt;code&gt;nc&lt;/code&gt; to send to the port.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit24@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /tmp/asdvaweansdvoanlnionoinlk/pincodes.txt | nc localhost &lt;span class=&#34;tok-m&#34;&gt;30002&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that gave me the password for &lt;code&gt;bandit25&lt;/code&gt;. So I cleaned up and moved on.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit24@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -r /tmp/asdvaweansdvoanlnionoinlk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I did this one a little late, and realized in my sleepy state that I didn&amp;rsquo;t need to write a script and execute it - those are pretty short commands, so I could have just run those instead of scripting it.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-25&#34;&gt;Level 25&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: Logging in to bandit26 from bandit25 should be fairly easy… The shell for user bandit26 is not &lt;strong&gt;/bin/bash&lt;/strong&gt;, but something else. Find out what it is, how it works and how to break out of it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; if you’re a Windows user and typically use Powershell to ssh into bandit: Powershell is known to cause issues with the intended solution to this level. You should use command prompt instead.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-26&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;lt;Log in as bandit25 and save the private key to your machine; set permissions to &lt;span class=&#34;tok-m&#34;&gt;600&lt;/span&gt; &lt;span class=&#34;tok-k&#34;&gt;if&lt;/span&gt; applicable&amp;gt;&#xA;&amp;lt;Resize CLI window to make it fairly short/small&amp;gt;&#xA;ssh -i bandit26.sshkey bandit26@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&#xA;v&#xA;&amp;lt;Resize window to make it readable again&amp;gt;&#xA;q:&#xA;:set &lt;span class=&#34;tok-nv&#34;&gt;sh&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;/bin/bash&#xA;:!/bin/bash&#xA;cat /etc/bandit_pass/bandit26&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-26&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;When logging in with SSH to &lt;code&gt;bandit26&lt;/code&gt;, the shell is not &lt;code&gt;/bin/bash&lt;/code&gt;, but a script that essentially runs the &lt;code&gt;more&lt;/code&gt; command on the &lt;code&gt;text.txt&lt;/code&gt; file in the home directory of &lt;code&gt;bandit26&lt;/code&gt;. From there, you have to figure out how to break out of the shell and get to the password. I struggled a little with this one and had to get a hint. This solution opens the file being read by &lt;code&gt;more&lt;/code&gt; with &lt;code&gt;vi&lt;/code&gt;, from where you can then send a command to execute the bash shell and get to the password.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-24&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I wasn&amp;rsquo;t sure exactly where to start with this one, so I just logged in and started looking around. In the home directory for &lt;code&gt;bandit25&lt;/code&gt; was an RSA private key called &amp;ldquo;bandit26.sshkey&amp;rdquo;, so I decided to try logging in with that just like in levels 13 and 18.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i bandit26.sshkey bandit26@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This looked like even though I got an error, it was briefly successful. I decided to see if I could get some more information by running commands like in level 18.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh -i bandit26.sshkey bandit26@localhost -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;pwd&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Unfortuantely, this didn&amp;rsquo;t work. It just sat and waited after giving me an error about trying to log into an SSH server with a password on port 2220 from localhost. Since my issue seemed to be related to SSH with localhost, I decided to try SSHing from my machine to &lt;code&gt;bandit26&lt;/code&gt; instead of from &lt;code&gt;bandit25&lt;/code&gt; to &lt;code&gt;bandit26&lt;/code&gt; by copying out the private key.&lt;/p&gt;&#xA;&lt;div class=&#34;callout callout--note&#34; role=&#34;note&#34;&gt;&#xA;&lt;div class=&#34;callout-label&#34;&gt;Note&lt;/div&gt;&#xA;&lt;p&gt;I was using Windows Command Prompt at the time, but if you are using bash, as I later went back and did, you will need to set the permissions of the key file to 600.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;chmod &lt;span class=&#34;tok-m&#34;&gt;600&lt;/span&gt; bandit26.sshkey&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I did successfully SSH into &lt;code&gt;bandit26&lt;/code&gt; from my machine without getting any errors, but it still closed the connection immediately. I was nonethless hopeful that I could try again getting information from &lt;code&gt;bandit26&lt;/code&gt; this way.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh -i bandit26.sshkey bandit26@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;pwd&amp;quot;&lt;/span&gt;&#xA;C-c&#xA;ssh -i bandit26.sshkey bandit26@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt; &lt;span class=&#34;tok-s2&#34;&gt;&amp;quot;ls&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I got the same blinking cursor just sitting there waiting like before. So I decided to log back in as &amp;ldquo;bandit25&amp;rdquo; to see if I could find anything else interesting that might point me in the right direction.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ssh bandit25@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I checked the home directory of &lt;code&gt;bandit26&lt;/code&gt; and it had some files that looked interesting. I looked through the ones I could, but didn&amp;rsquo;t see anything I wasn&amp;rsquo;t expecting. Looking at the instructions again, I googled how to figure out what shell &lt;code&gt;bandit26&lt;/code&gt; was using. I found that it was listed in the password file, so I checked there:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/passwd | grep bandit26&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This showed me that &lt;code&gt;bandit26&lt;/code&gt; was using &lt;code&gt;/usr/bin/showtext&lt;/code&gt; as its shell. I took a look at the showtext script:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /usr/bin/showtext&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;/usr/bin/showtext&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;tok-cp&#34;&gt;#!/bin/sh&lt;/span&gt;&#xA;&#xA;export &lt;span class=&#34;tok-nv&#34;&gt;TERM&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;linux&#xA;&#xA;more ~/text.txt&#xA;exit &lt;span class=&#34;tok-m&#34;&gt;0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This looked like it was just printing the contents of the &lt;code&gt;text.txt&lt;/code&gt; file in the home directory of &lt;code&gt;bandit26&lt;/code&gt; with the &lt;code&gt;more&lt;/code&gt; command. I decided to try to cat the file:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit25@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /home/bandit26/text.txt&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;But I got a permission denied error. I kind of beat my head against a wall for a while and decided to look for a hint online. I found &lt;a href=&#34;https://mayadevbe.me/posts/overthewire/bandit/level26/&#34;&gt;this&lt;/a&gt; post that confirmed I was on the right track, but I wasn&amp;rsquo;t approaching the last part of the solution correctly. I should have paid &lt;code&gt;more&lt;/code&gt; attention (pun intended) to the commands listed on the instructions page, specifically &lt;code&gt;more&lt;/code&gt; and &lt;code&gt;vi&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Prior to this, I was unaware that if &lt;code&gt;more&lt;/code&gt; could display the entire contents of a file, then it wouldn&amp;rsquo;t prompt for the next page and that when prompting for the next page, you could pass a command to view the file with &lt;code&gt;vi&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, following the other writeup, I exited, and SSH&amp;rsquo;d in again from my machine with a resized window to force &lt;code&gt;more&lt;/code&gt; to only display part of the file, and then used &lt;code&gt;v&lt;/code&gt; to view the file with &lt;code&gt;vi&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;ssh -i bandit26.sshkey bandit26@bandit.labs.overthewire.org -p &lt;span class=&#34;tok-m&#34;&gt;2220&lt;/span&gt;&#xA;v&#xA;&amp;lt;Resize window to make it readable&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;From here, I tried not to read much more from the other writeup, but I did see that I needed to use &lt;code&gt;vi&lt;/code&gt; to send a command, so I used that as a jumping off point to do some googling. I found that I could use &lt;code&gt;:!&lt;/code&gt; to send a command to the shell. However, that didn&amp;rsquo;t work directly; I had to enter command mode first (ex mode), so I had to use &lt;code&gt;q:&lt;/code&gt; to get to ex mode and then &lt;code&gt;:!/bin/bash&lt;/code&gt; to attempt to execute the bash shell. However, this still just ran the &lt;code&gt;more&lt;/code&gt; command on the file. I had to change the shell used by ex mode to &lt;code&gt;/bin/bash&lt;/code&gt; to get a real shell. From there I could just &lt;code&gt;cat&lt;/code&gt; the password file.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit26@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;q:&#xA;:set &lt;span class=&#34;tok-nv&#34;&gt;sh&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;/bin/bash&#xA;:!/bin/bash&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat /etc/bandit_pass/bandit26&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-26&#34;&gt;Level 26&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: Good job getting a shell! Now hurry and grab the password for bandit27!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-27&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;lt;Resize CLI window to make it fairly short/small&amp;gt;&#xA;&amp;lt;log in as bandit26&amp;gt;&#xA;v&#xA;&amp;lt;Resize window to make it readable again&amp;gt;&#xA;q:&#xA;:set &lt;span class=&#34;tok-nv&#34;&gt;sh&lt;/span&gt;&lt;span class=&#34;tok-o&#34;&gt;=&lt;/span&gt;/bin/bash&#xA;:!/bin/bash&#xA;./bandit27-do cat /etc/bandit_pass/bandit27&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-27&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level combines the &lt;a href=&#34;#level-25&#34;&gt;previous level&lt;/a&gt; with &lt;a href=&#34;#level-19&#34;&gt;level 19&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-25&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;Now with the password for &lt;code&gt;bandit26&lt;/code&gt;, I could log in without using the private key. I used the password, but had to use the same method from the previous level actually get a shell before starting to look for the password for &lt;code&gt;bandit27&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Once logged in, I knew from the last level that there was an executable file in the home directory called &lt;code&gt;bandit27-do&lt;/code&gt;. I ran it, and it without any extra arguments, and it gave me the usage for the program. This was similar to &lt;a href=&#34;#level-19&#34;&gt;level 19&lt;/a&gt;, where I had to run a command as another user. Based on that, I just ran &lt;code&gt;cat&lt;/code&gt; on the password file via the executable.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit26@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./bandit27-do&#xA;Run a command as another user.&#xA;  Example: ./bandit27-do id&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;./bandit27-do cat /etc/bandit_pass/bandit27&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And that gave me the password for &lt;code&gt;bandit27&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-27&#34;&gt;Level 27&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There is a git repository at &lt;code&gt;ssh://bandit27-git@localhost/home/bandit27-git/repo&lt;/code&gt; via the port &lt;code&gt;2220&lt;/code&gt;. The password for the user &lt;code&gt;bandit27-git&lt;/code&gt; is the same as for the user &lt;code&gt;bandit27&lt;/code&gt;.&#xA;Clone the repository and find the password for the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-28&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;cd /tmp/ionviwlsmzzmffunfslk&#xA;git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;27&lt;/span&gt; PASSWORD&amp;gt;&#xA;cat README&#xA;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-28&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This one is pretty straightforward. Just clone a repository and look in it.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-26&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I was going to attempt to clone the repository into a temporary directory:&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit27@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;but this got a couple of errors. This defaulted to port 22, which wasn&amp;rsquo;t allowed, and it also said that it couldn&amp;rsquo;t create &lt;code&gt;/home/bandit27/.ssh (permission denied)&lt;/code&gt;. So I started by tackling the port issue, and it ended up solving both.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit27@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;27&lt;/span&gt; PASSWORD&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;There was a README file in the repository that contained the password.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit27@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat README&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Cleaned up and left.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit27@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-28&#34;&gt;Level 28&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There is a git repository at ssh://bandit28-git@localhost/home/bandit28-git/repo via the port 2220. The password for the user bandit28-git is the same as for the user bandit28.&#xA;Clone the repository and find the password for the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-29&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;cd /tmp/ionviwlsmzzmffunfslk&#xA;git clone ssh://bandit28-git@localhost:2220/home/bandit28-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;28&lt;/span&gt; PASSWORD&amp;gt;&#xA;cd repo&#xA;git show &lt;span class=&#34;tok-m&#34;&gt;3621&lt;/span&gt; -- README.md&#xA;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-29&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;This level requires looking for the password in a previous version of the README file using git.&lt;/p&gt;&#xA;&lt;h4 id=&#34;my-steps-27&#34;&gt;My Steps&lt;/h4&gt;&#xA;&lt;p&gt;I followed the same steps as for &lt;a href=&#34;#level-27&#34;&gt;level 27&lt;/a&gt; to begin this one.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit28@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git clone ssh://bandit28-git@localhost:2220/home/bandit28-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;28&lt;/span&gt; PASSWORD&amp;gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd repo&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat README&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;All this showed was&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;# Bandit Notes&#xA;Some notes for level29 of bandit.&#xA;&#xA;## credentials&#xA;&#xA;- username: bandit29&#xA;- password: xxxxxxxxxx&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;I suspected that the password might have been in a previous version of the README file, which should be visible via git.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit28@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git log&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;This showed the commit history, which had a message on the last revision that said &amp;ldquo;fix info leak&amp;rdquo;. So I checked out the diff on the version before that.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit28@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git show &lt;span class=&#34;tok-m&#34;&gt;3621&lt;/span&gt; -- README.md&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And this showed the password in plaintext.&lt;/p&gt;&#xA;&lt;p&gt;As always, I cleaned up after myself.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit28@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-29&#34;&gt;Level 29&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There is a git repository at ssh://bandit29-git@localhost/home/bandit29-git/repo via the port 2220. The password for the user bandit29-git is the same as for the user bandit29.&#xA;Clone the repository and find the password for the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;tldr-30&#34;&gt;TL;DR&lt;/h3&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;cd /tmp/ionviwlsmzzmffunfslk&#xA;git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;29&lt;/span&gt; PASSWORD&amp;gt;&#xA;git branch -a&#xA;git checkout dev&#xA;cat README.md&#xA;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;h3 id=&#34;more-info-30&#34;&gt;More Info&lt;/h3&gt;&#xA;&lt;p&gt;I started off by cloning the repository and checking the README file.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit29@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;mkdir /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd /tmp/ionviwlsmzzmffunfslk&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo&#xA;&amp;lt;BANDIT &lt;span class=&#34;tok-m&#34;&gt;29&lt;/span&gt; PASSWORD&amp;gt;&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cd repo&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;ls&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat README.md&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;All this showed was&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;# Bandit Notes&#xA;Some notes for bandit30 of bandit.&#xA;&#xA;## credentials&#xA;&#xA;- username: bandit30&#xA;- password: &amp;lt;no passwords in production&amp;gt;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;That made me think that I was likely on the production branch and needed to checkout a different branch.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit29@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git branch -a&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Which gave me a list of branches.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--output&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;output&lt;/span&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code&gt;* master&#xA;  remotes/origin/HEAD -&amp;gt; origin/master&#xA;  remotes/origin/dev&#xA;  remotes/origin/master&#xA;  remotes/origin/sploits-dev&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Before looking at the branches, I thought there would likely be a dev branch. But both dev and sploits-dev sounded promising. I decided to checkout sploits-dev.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit29@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git checkout sploits-dev&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat README.md&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And this was the same as before. So I tried the dev branch.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit29@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;git checkout dev&#xA;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;cat README.md&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;And this time it had the password. So I cleaned up and left.&lt;/p&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bandit29@bandit&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&lt;span class=&#34;prompt&#34;&gt;$ &lt;/span&gt;rm -rf /tmp/ionviwlsmzzmffunfslk&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-30&#34;&gt;Level 30&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There is a git repository at ssh://bandit30-git@localhost/home/bandit30-git/repo via the port 2220. The password for the user bandit30-git is the same as for the user bandit30.&#xA;Clone the repository and find the password for the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-31&#34;&gt;Level 31&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo via the port 2220. The password for the user bandit31-git is the same as for the user bandit31.&#xA;Clone the repository and find the password for the next level.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;level-32&#34;&gt;Level 32&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Description: After all this git stuff, it’s time for another escape. Good luck!&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;At the time of writing, that is the end of this wargame. If new levels come out and I don&amp;rsquo;t update this post, please reach out and let me know. I&amp;rsquo;ll be glad to update when I can.&lt;/p&gt;&#xA;</content>
  </entry>
  <entry>
    <title>Setting Up a Blog with Astro</title>
    <id>https://justinsteele.net/setting-up-blog-astro/</id>
    <link href="https://justinsteele.net/setting-up-blog-astro/"></link>
    <published>2024-10-25T00:00:00Z</published>
    <updated>2026-10-20T00:00:00Z</updated>
    <summary>Basics of how and why I set my previous blog in Astro</summary>
    <content type="html">&lt;h3 id=&#34;issues-with-hugo&#34;&gt;Issues with Hugo&lt;/h3&gt;&#xA;&lt;p&gt;I tried (very briefly) to set up a blog with Hugo. I liked some of the themes I found, but I kept running into unexpected problems. Most of the themes weren&amp;rsquo;t well documented, and the fault of my less than favorable experience seems to lie with the theme ecosystem rather than Hugo itself. The themes don&amp;rsquo;t appear to have any sort of standard, and many have additional dependencies. It felt like each theme was a new technology I needed to learn.&lt;/p&gt;&#xA;&lt;h3 id=&#34;move-to-astro&#34;&gt;Move to Astro&lt;/h3&gt;&#xA;&lt;p&gt;Since my main goal was to get a blog up and running rather than to learn Hugo (or one of the themes for Hugo), I decided to give &lt;a href=&#34;https://astro.build/&#34;&gt;Astro&lt;/a&gt; a try, and I&amp;rsquo;m very glad I did! It was pretty straightforward to get this up and running, intuitive to edit an example site to do what I wanted, and it was very well documented!&lt;/p&gt;&#xA;&lt;h3 id=&#34;steps&#34;&gt;Steps&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I started by following the &lt;a href=&#34;https://docs.astro.build/en/tutorial/0-introduction/&#34;&gt;&amp;ldquo;Tutorial: Build a Blog&amp;rdquo;&lt;/a&gt; from the Astro docs. I made it roughly halfway through, and then started skimming instead of following along. Then I started looking at themes, and found one that seemed to fit the bill: &lt;a href=&#34;https://github.com/JustGoodUI/dante-astro-theme&#34;&gt;Dante&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Since I had already set up my GitHub repo and Netlify app in the tutorial, I just deleted the directory and started a new project in the same place with the Dante theme.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;div class=&#34;code code--command&#34;&gt;&#xA;&lt;div class=&#34;code-head&#34;&gt;&lt;span&gt;bash&lt;/span&gt;&lt;button class=&#34;copy&#34; type=&#34;button&#34; hidden&gt;copy&lt;/button&gt;&lt;/div&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;npm create astro@latest -- --template JustGoodUI/dante-astro-theme&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/div&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;Then I force pushed my changes over the GitHub repo, and it worked!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This is really just a simple and short post to dip my toe in the blogging world. I intend to continue tweaking this setup and slowly adding to the blog. The structure of the blog may change significantly over the next few months as I tweak the theme and add more content. Hope to see you next time!&lt;/p&gt;&#xA;</content>
  </entry>
</feed>
