<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Shubham Patel</title>
    <description>The latest articles on Forem by Shubham Patel (@shubham2503).</description>
    <link>https://forem.com/shubham2503</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F370333%2F84c47e2e-fd0a-4dfb-9409-06967447602a.jpeg</url>
      <title>Forem: Shubham Patel</title>
      <link>https://forem.com/shubham2503</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shubham2503"/>
    <language>en</language>
    <item>
      <title>OverTheWire :- Bandit (Level 20–25) [CTF] </title>
      <dc:creator>Shubham Patel</dc:creator>
      <pubDate>Thu, 30 Jul 2020 15:30:09 +0000</pubDate>
      <link>https://forem.com/shubham2503/overthewire-bandit-level-20-25-ctf-19fl</link>
      <guid>https://forem.com/shubham2503/overthewire-bandit-level-20-25-ctf-19fl</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmq2gtgft7pc0gn4ef1h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmq2gtgft7pc0gn4ef1h2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Level 20 → Level 21
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;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;

&lt;p&gt;NOTE: Try connecting to your own network daemon to see if it works as you think&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit20@bandit.labs.overthewire.org"&gt;bandit20@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames" rel="noopener noreferrer"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit20@bandit.labs.overthewire.org"&gt;bandit20@bandit.labs.overthewire.org&lt;/a&gt;'s password: GbKksEFF4yrVs6il55v6gwY5aVje5f0j&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit20@bandit:~$ echo "GbKksEFF4yrVs6il55v6gwY5aVje5f0j" | nc -l localhost -p 33333 &amp;amp;
[1] 25823
bandit20@bandit:~$ ./suconnect 33333
Read: GbKksEFF4yrVs6il55v6gwY5aVje5f0j
Password matches, sending next password
gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Level 21 → Level 22
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit21@bandit.labs.overthewire.org"&gt;bandit21@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames" rel="noopener noreferrer"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit21@bandit.labs.overthewire.org"&gt;bandit21@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit21@bandit:~$ cd /etc/cron.d

bandit21@bandit:/etc/cron.d$ cat cronjob_bandit22
@reboot bandit22 /usr/bin/cronjob_bandit22.sh &amp;amp;&amp;gt; /dev/null
* * * * * bandit22 /usr/bin/cronjob_bandit22.sh &amp;amp;&amp;gt; /dev/null

bandit21@bandit:~$ cat /usr/bin/cronjob_bandit22.sh
#!/bin/bash
chmod 644 /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /etc/bandit_pass/bandit22 &amp;gt; /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv

bandit21@bandit:~$ cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
Yk7owGAcWjwMVRwrTesJEwB7WVOiILLI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Level 22 → Level 23
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;

&lt;p&gt;NOTE: 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;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit22@bandit.labs.overthewire.org"&gt;bandit22@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames" rel="noopener noreferrer"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit22@bandit.labs.overthewire.org"&gt;bandit22@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
Yk7owGAcWjwMVRwrTesJEwB7WVOiILLI&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit22@bandit:~$ cd /etc/cron.d

bandit22@bandit:/etc/cron.d$ ls -l
total 24
-rw-r--r-- 1 root root  62 May 14 13:40 cronjob_bandit15_root
-rw-r--r-- 1 root root  62 Jul 11 15:56 cronjob_bandit17_root
-rw-r--r-- 1 root root 120 May  7 20:14 cronjob_bandit22
-rw-r--r-- 1 root root 122 May  7 20:14 cronjob_bandit23
-rw-r--r-- 1 root root 120 May 14 09:41 cronjob_bandit24
-rw-r--r-- 1 root root  62 May 14 14:04 cronjob_bandit25_root

bandit22@bandit:/etc/cron.d$ cat cronjob_bandit23
@reboot bandit23 /usr/bin/cronjob_bandit23.sh  &amp;amp;&amp;gt; /dev/null
* * * * * bandit23 /usr/bin/cronjob_bandit23.sh  &amp;amp;&amp;gt; /dev/null

bandit22@bandit:/etc/cron.d$ cat /usr/bin/cronjob_bandit23.sh
#!/bin/bash

myname=$(whoami)
mytarget=$(echo I am user $myname | md5sum | cut -d ' ' -f 1)

echo "Copying passwordfile /etc/bandit_pass/$myname to /tmp/$mytarget"

cat /etc/bandit_pass/$myname &amp;gt; /tmp/$mytarget

bandit22@bandit:/etc/cron.d$ echo I am user bandit23 | md5sum | cut -d ' ' -f 1
8ca319486bfbbc3663ea0fbe81326349

bandit22@bandit:/etc/cron.d$ cat /tmp/8ca319486bfbbc3663ea0fbe81326349
jc1udXuA1tiHqjIsL8yaapX5XIAI6i0n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  Level 23 → Level 24
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;A program is running automatically at regular intervals from cron, the time-based job scheduler. Look in /etc/cron.d/ for the configuration and see what command is being executed.&lt;/p&gt;

&lt;p&gt;NOTE: 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;

&lt;p&gt;NOTE 2: Keep in mind that your shell script is removed once executed, so you may want to keep a copy around…&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit23@bandit.labs.overthewire.org"&gt;bandit23@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames" rel="noopener noreferrer"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit23@bandit.labs.overthewire.org"&gt;bandit23@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
jc1udXuA1tiHqjIsL8yaapX5XIAI6i0n&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit23@bandit:~$ cat /usr/bin/cronjob_bandit24.sh
#!/bin/bash

myname=$(whoami)

cd /var/spool/$myname
echo "Executing and deleting all scripts in /var/spool/$myname:"
for i in * .*;
do
    if [ "$i" != "." -a "$i" != ".." ];
    then
        echo "Handling $i"
        owner="$(stat --format "%U" ./$i)"
        if [ "${owner}" = "bandit23" ]; then
            timeout -s 9 60 ./$i
        fi
        rm -f ./$i
    fi
done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Approach
&lt;/h2&gt;

&lt;p&gt;Create a directory in the /tmp/ folder. Create a shell script to copy the /etc/bandit_pass/bandit24 to our /tmp/folder. Copy the shell script to /var/spool/bandit24/. Give the shell script and the /tmp/ folder appropriate permissions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit23@bandit:~$ mkdir /tmp/abc
bandit23@bandit:~$ cd /tmp/abc
bandit23@bandit:/tmp/abc$ cat &amp;gt; abc.sh
        #!/bin/bash
        cat /etc/bandit_pass/bandit24 &amp;gt;&amp;gt; /tmp/abc/pass24


bandit23@bandit:/tmp/abc$ chmod 777 /tmp/abc
bandit23@bandit:/tmp/abc$ chmod 777 abc.sh
bandit23@bandit:/tmp/abc$ cp abc.sh /var/spool/bandit24/

--------------after some time -------------------

bandit23@bandit:/tmp/abc$ cat pass24
UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 24 -&amp;gt; Level 25
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit24@bandit.labs.overthewire.org"&gt;bandit24@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames" rel="noopener noreferrer"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit24@bandit.labs.overthewire.org"&gt;bandit24@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit24@bandit:~$ mkdir /tmp/aaaa
bandit24@bandit:~$ cd /tmp/aaaa
bandit24@bandit:/tmp/aaaa$ cat &amp;gt; abc.sh
    #!/bin/bash
    for i in {1..10000}
    do
        echo "UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i" &amp;gt;&amp;gt; ./out
    done
    cat &amp;gt; out

bandit24@bandit:/tmp/aaaa$ chmod +x abc.sh
bandit24@bandit:/tmp/aaaa$ ./abc.sh
bandit24@bandit:/tmp/aaaa$ cat out | nc localhost 30002

-----------You will get password-----------
The password of user bandit25 is uNG9O58gUE7snukf3bvZ0rxhtnjzSGzG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;THANKS FOR READING ...!!&lt;/p&gt;

</description>
      <category>challenge</category>
      <category>linux</category>
      <category>showdev</category>
      <category>security</category>
    </item>
    <item>
      <title>OverTheWire :- Bandit (Level 15–20) [CTF] </title>
      <dc:creator>Shubham Patel</dc:creator>
      <pubDate>Sun, 28 Jun 2020 14:58:15 +0000</pubDate>
      <link>https://forem.com/shubham2503/overthewire-bandit-level-15-20-ctf-5g6e</link>
      <guid>https://forem.com/shubham2503/overthewire-bandit-level-15-20-ctf-5g6e</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--utuG6Xlx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mq2gtgft7pc0gn4ef1h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--utuG6Xlx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mq2gtgft7pc0gn4ef1h2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The wargames offered by the OverTheWire community can help you to learn and practice security concepts in the form of fun-filled games.&lt;br&gt;
You can view problem statements on &lt;a href="https://overthewire.org/wargames/bandit/"&gt;https://overthewire.org/wargames/bandit/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Level 15 → Level 16
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL encryption.&lt;/p&gt;

&lt;p&gt;Helpful note: Getting “HEARTBEATING” and “Read R BLOCK”? Use -ign_eof and read the “CONNECTED COMMANDS” section in the manpage. Next to ‘R’ and ‘Q’, the ‘B’ command also works in this version of that command…&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit15@bandit.labs.overthewire.org"&gt;bandit15@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit15@bandit.labs.overthewire.org"&gt;bandit15@bandit.labs.overthewire.org&lt;/a&gt;'s password: BfMYroe26WYalil77FoDi9qh59eK5xNr&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit15@bandit:~$ openssl s_client -connect localhost:30001 -ign_eof
CONNECTED(00000003)
depth=0 CN = localhost
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = localhost
verify return:1
---
Certificate chain
 0 s:/CN=localhost
   i:/CN=localhost
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICBjCCAW+gAwIBAgIEDU18oTANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAls
b2NhbGhvc3QwHhcNMjAwNTA3MTgxNTQzWhcNMjEwNTA3MTgxNTQzWjAUMRIwEAYD
VQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAK3CPNFR
FEypcqUa8NslmIMWl9xq53Cwhs/fvYHAvauyfE3uDVyyX79Z34Tkot6YflAoufnS
+puh2Kgq7aDaF+xhE+FPcz1JE0C2bflGfEtx4l3qy79SRpLiZ7eio8NPasvduG5e
pkuHefwI4c7GS6Y7OTz/6IpxqXBzv3c+x93TAgMBAAGjZTBjMBQGA1UdEQQNMAuC
CWxvY2FsaG9zdDBLBglghkgBhvhCAQ0EPhY8QXV0b21hdGljYWxseSBnZW5lcmF0
ZWQgYnkgTmNhdC4gU2VlIGh0dHBzOi8vbm1hcC5vcmcvbmNhdC8uMA0GCSqGSIb3
DQEBBQUAA4GBAC9uy1rF2U/OSBXbQJYuPuzT5mYwcjEEV0XwyiX1MFZbKUlyFZUw
rq+P1HfFp+BSODtk6tHM9bTz+p2OJRXuELG0ly8+Nf/hO/mYS1i5Ekzv4PL9hO8q
PfmDXTHs23Tc7ctLqPRj4/4qxw6RF4SM+uxkAuHgT/NDW1LphxkJlKGn
-----END CERTIFICATE-----
subject=/CN=localhost
issuer=/CN=localhost
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 1019 bytes and written 269 bytes
Verification error: self signed certificate
---

BfMYroe26WYalil77FoDi9qh59eK5xNr
Correct!
cluFn7wTiGryunymYOu4RcffSxQluehd

closed
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;-ign_eof&lt;/p&gt;

&lt;p&gt;Inhibit shutting down the connection when end of file is reached in the input.&lt;/p&gt;

&lt;h1&gt;
  
  
  Level 16 → Level 17
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The credentials for the next level can be retrieved by submitting the password of the current level to a port on localhost in the range 31000 to 32000. First find out which of these ports have a server listening on them. Then find out which of those speak SSL and which don’t. There is only 1 server that will give the next credentials, the others will simply send back to you whatever you send to it.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit16@bandit.labs.overthewire.org"&gt;bandit16@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit16@bandit.labs.overthewire.org"&gt;bandit16@bandit.labs.overthewire.org&lt;/a&gt;'s password: cluFn7wTiGryunymYOu4RcffSxQluehd&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit16@bandit:~$ nmap -p 31000-32000 localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2020-06-28 16:44 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00028s latency).
Not shown: 996 closed ports
PORT      STATE SERVICE
31046/tcp open  unknown
31518/tcp open  unknown
31691/tcp open  unknown
31790/tcp open  unknown
31960/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds

bandit16@bandit:~$ openssl s_client -connect localhost:31790 -ign_eof
CONNECTED(00000003)
depth=0 CN = localhost
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = localhost
verify return:1
---
Certificate chain
 0 s:/CN=localhost
   i:/CN=localhost
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICBjCCAW+gAwIBAgIEUnONgjANBgkqhkiG9w0BAQUFADAUMRIwEAYDVQQDDAls
b2NhbGhvc3QwHhcNMjAwNTE0MTIwMzM4WhcNMjEwNTE0MTIwMzM4WjAUMRIwEAYD
VQQDDAlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALOw+M6/
qSBJExGueg6T0HQRqfr80ysnqbuIAeQJ3VOwXg3BB8u7HtlA6JUrvQy66TWw5szi
uLBAyCffNHMx7Y2DF6L2vdSTxoOuDTLynRj7Xrw4f39NbgezfpfPbOd7/m3qNpcG
766Y46MT8w8j144VKK6qWhkBl9CPy8E2/frdAgMBAAGjZTBjMBQGA1UdEQQNMAuC
CWxvY2FsaG9zdDBLBglghkgBhvhCAQ0EPhY8QXV0b21hdGljYWxseSBnZW5lcmF0
ZWQgYnkgTmNhdC4gU2VlIGh0dHBzOi8vbm1hcC5vcmcvbmNhdC8uMA0GCSqGSIb3
DQEBBQUAA4GBAEj2rWLwLHxQMk8uuUTFHnXrtnpXP3GDch8zdUbiln4chTISKG9O
akG/gohigTEo9V3PupKcaO/zXqAbuB6iaJxOEezuLEmoGAMThHqeXusLNEPtYl5N
nM/qYplbcQtOqvYYODdP9N5dQFa54xkNmkP7oPiQkOFFKIucVzpxwzuo
-----END CERTIFICATE-----
subject=/CN=localhost
issuer=/CN=localhost
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 1019 bytes and written 269 bytes
Verification error: self signed certificate
---
cluFn7wTiGryunymYOu4RcffSxQluehd
Correct!
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvmOkuifmMg6HL2YPIOjon6iWfbp7c3jx34YkYWqUH57SUdyJ
imZzeyGC0gtZPGujUSxiJSWI/oTqexh+cAMTSMlOJf7+BrJObArnxd9Y7YT2bRPQ
Ja6Lzb558YW3FZl87ORiO+rW4LCDCNd2lUvLE/GL2GWyuKN0K5iCd5TbtJzEkQTu
DSt2mcNn4rhAL+JFr56o4T6z8WWAW18BR6yGrMq7Q/kALHYW3OekePQAzL0VUYbW
JGTi65CxbCnzc/w4+mqQyvmzpWtMAzJTzAzQxNbkR2MBGySxDLrjg0LWN6sK7wNX
x0YVztz/zbIkPjfkU1jHS+9EbVNj+D1XFOJuaQIDAQABAoIBABagpxpM1aoLWfvD
KHcj10nqcoBc4oE11aFYQwik7xfW+24pRNuDE6SFthOar69jp5RlLwD1NhPx3iBl
J9nOM8OJ0VToum43UOS8YxF8WwhXriYGnc1sskbwpXOUDc9uX4+UESzH22P29ovd
d8WErY0gPxun8pbJLmxkAtWNhpMvfe0050vk9TL5wqbu9AlbssgTcCXkMQnPw9nC
YNN6DDP2lbcBrvgT9YCNL6C+ZKufD52yOQ9qOkwFTEQpjtF4uNtJom+asvlpmS8A
vLY9r60wYSvmZhNqBUrj7lyCtXMIu1kkd4w7F77k+DjHoAXyxcUp1DGL51sOmama
+TOWWgECgYEA8JtPxP0GRJ+IQkX262jM3dEIkza8ky5moIwUqYdsx0NxHgRRhORT
8c8hAuRBb2G82so8vUHk/fur85OEfc9TncnCY2crpoqsghifKLxrLgtT+qDpfZnx
SatLdt8GfQ85yA7hnWWJ2MxF3NaeSDm75Lsm+tBbAiyc9P2jGRNtMSkCgYEAypHd
HCctNi/FwjulhttFx/rHYKhLidZDFYeiE/v45bN4yFm8x7R/b0iE7KaszX+Exdvt
SghaTdcG0Knyw1bpJVyusavPzpaJMjdJ6tcFhVAbAjm7enCIvGCSx+X3l5SiWg0A
R57hJglezIiVjv3aGwHwvlZvtszK6zV6oXFAu0ECgYAbjo46T4hyP5tJi93V5HDi
Ttiek7xRVxUl+iU7rWkGAXFpMLFteQEsRr7PJ/lemmEY5eTDAFMLy9FL2m9oQWCg
R8VdwSk8r9FGLS+9aKcV5PI/WEKlwgXinB3OhYimtiG2Cg5JCqIZFHxD6MjEGOiu
L8ktHMPvodBwNsSBULpG0QKBgBAplTfC1HOnWiMGOU3KPwYWt0O6CdTkmJOmL8Ni
blh9elyZ9FsGxsgtRBXRsqXuz7wtsQAgLHxbdLq/ZJQ7YfzOKU4ZxEnabvXnvWkU
YOdjHdSOoKvDQNWu6ucyLRAWFuISeXw9a/9p7ftpxm0TSgyvmfLF2MIAEwyzRqaM
77pBAoGAMmjmIJdjp+Ez8duyn3ieo36yrttF5NSsJLAbxFpdlc1gvtGCWW+9Cq0b
dxviW8+TFVEBl1O4f7HVm6EpTscdDxU+bCXWkfjuRb7Dy9GOtt9JPsX8MBTakzh3
vBgsyi/sN3RqRBcGU40fOoZyfAMT8s1m/uYv52O6IgeuZ/ujbjY=
-----END RSA PRIVATE KEY-----

closed
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 17 → Level 18
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;There are 2 files in the home directory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new&lt;/p&gt;

&lt;p&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;/p&gt;

&lt;h3&gt;
  
  
  To Log-in
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$touch sshkey.private
$nano sshkey.private
$cat sshkey.private
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvmOkuifmMg6HL2YPIOjon6iWfbp7c3jx34YkYWqUH57SUdyJ
imZzeyGC0gtZPGujUSxiJSWI/oTqexh+cAMTSMlOJf7+BrJObArnxd9Y7YT2bRPQ
Ja6Lzb558YW3FZl87ORiO+rW4LCDCNd2lUvLE/GL2GWyuKN0K5iCd5TbtJzEkQTu
DSt2mcNn4rhAL+JFr56o4T6z8WWAW18BR6yGrMq7Q/kALHYW3OekePQAzL0VUYbW
JGTi65CxbCnzc/w4+mqQyvmzpWtMAzJTzAzQxNbkR2MBGySxDLrjg0LWN6sK7wNX
x0YVztz/zbIkPjfkU1jHS+9EbVNj+D1XFOJuaQIDAQABAoIBABagpxpM1aoLWfvD
KHcj10nqcoBc4oE11aFYQwik7xfW+24pRNuDE6SFthOar69jp5RlLwD1NhPx3iBl
J9nOM8OJ0VToum43UOS8YxF8WwhXriYGnc1sskbwpXOUDc9uX4+UESzH22P29ovd
d8WErY0gPxun8pbJLmxkAtWNhpMvfe0050vk9TL5wqbu9AlbssgTcCXkMQnPw9nC
YNN6DDP2lbcBrvgT9YCNL6C+ZKufD52yOQ9qOkwFTEQpjtF4uNtJom+asvlpmS8A
vLY9r60wYSvmZhNqBUrj7lyCtXMIu1kkd4w7F77k+DjHoAXyxcUp1DGL51sOmama
+TOWWgECgYEA8JtPxP0GRJ+IQkX262jM3dEIkza8ky5moIwUqYdsx0NxHgRRhORT
8c8hAuRBb2G82so8vUHk/fur85OEfc9TncnCY2crpoqsghifKLxrLgtT+qDpfZnx
SatLdt8GfQ85yA7hnWWJ2MxF3NaeSDm75Lsm+tBbAiyc9P2jGRNtMSkCgYEAypHd
HCctNi/FwjulhttFx/rHYKhLidZDFYeiE/v45bN4yFm8x7R/b0iE7KaszX+Exdvt
SghaTdcG0Knyw1bpJVyusavPzpaJMjdJ6tcFhVAbAjm7enCIvGCSx+X3l5SiWg0A
R57hJglezIiVjv3aGwHwvlZvtszK6zV6oXFAu0ECgYAbjo46T4hyP5tJi93V5HDi
Ttiek7xRVxUl+iU7rWkGAXFpMLFteQEsRr7PJ/lemmEY5eTDAFMLy9FL2m9oQWCg
R8VdwSk8r9FGLS+9aKcV5PI/WEKlwgXinB3OhYimtiG2Cg5JCqIZFHxD6MjEGOiu
L8ktHMPvodBwNsSBULpG0QKBgBAplTfC1HOnWiMGOU3KPwYWt0O6CdTkmJOmL8Ni
blh9elyZ9FsGxsgtRBXRsqXuz7wtsQAgLHxbdLq/ZJQ7YfzOKU4ZxEnabvXnvWkU
YOdjHdSOoKvDQNWu6ucyLRAWFuISeXw9a/9p7ftpxm0TSgyvmfLF2MIAEwyzRqaM
77pBAoGAMmjmIJdjp+Ez8duyn3ieo36yrttF5NSsJLAbxFpdlc1gvtGCWW+9Cq0b
dxviW8+TFVEBl1O4f7HVm6EpTscdDxU+bCXWkfjuRb7Dy9GOtt9JPsX8MBTakzh3
vBgsyi/sN3RqRBcGU40fOoZyfAMT8s1m/uYv52O6IgeuZ/ujbjY=
-----END RSA PRIVATE KEY-----
$chmod 600 sshkey.private
$ssh bandit17@bandit.labs.overthewire.org -p 2220 -i sshkey.private
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit17@bandit:~$ ls
passwords.new  passwords.old
bandit17@bandit:~$ diff passwords.new passwords.old
42c42
&amp;lt; kfBf3eYk5BPBRzwjqutbbfE887SVc5Yd
---
&amp;gt; BS8bqB1kqkinKJjuxL6k072Qq9NRwQpR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 18 → Level 19
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file readme in the home directory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ssh bandit18@bandit.labs.overthewire.org -p 2220
Byebye !
➜  ~ ssh bandit18@bandit.labs.overthewire.org -p 2220 ls
readme
➜  ~ ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readme
IueksS7Ubh8G3DCwVzrTd8rAVOwq3M5x
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 19 → Level 20
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;To gain access to the next level, you should use the setuid binary in the home directory. 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;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit19@bandit.labs.overthewire.org"&gt;bandit19@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit19@bandit.labs.overthewire.org"&gt;bandit19@bandit.labs.overthewire.org&lt;/a&gt;'s password: IueksS7Ubh8G3DCwVzrTd8rAVOwq3M5x&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit19@bandit:~$ ls
bandit20-do
bandit19@bandit:~$ ./bandit20-do
Run a command as another user.
  Example: ./bandit20-do id
bandit19@bandit:~$ ./bandit20-do id
uid=11019(bandit19) gid=11019(bandit19) euid=11020(bandit20) groups=11019(bandit19)
bandit19@bandit:~$ ./bandit20-do whoami
bandit20
bandit19@bandit:~$ ./bandit20-do cat /etc/bandit_pass/bandit20
GbKksEFF4yrVs6il55v6gwY5aVje5f0j
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>showdev</category>
      <category>challenge</category>
      <category>security</category>
      <category>ctf</category>
    </item>
    <item>
      <title>OverTheWire :- Bandit (Level 10–15) [CTF] </title>
      <dc:creator>Shubham Patel</dc:creator>
      <pubDate>Fri, 26 Jun 2020 04:43:43 +0000</pubDate>
      <link>https://forem.com/shubham2503/overthewire-bandit-level-10-15-ctf-33fb</link>
      <guid>https://forem.com/shubham2503/overthewire-bandit-level-10-15-ctf-33fb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q-hBiU-1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a4mmmoym23ksb1o74ilp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q-hBiU-1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a4mmmoym23ksb1o74ilp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Level 10 → Level 11
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Level Goal
&lt;/h3&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt, which contains base64 encoded data&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit10@bandit.labs.overthewire.org"&gt;bandit10@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit10@bandit.labs.overthewire.org"&gt;bandit10@bandit.labs.overthewire.org&lt;/a&gt;'s password: truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit10@melinda:~$ ls
data.txt

bandit10@melinda:~$ cat data.txt
VGhlIHBhc3N3b3JkIGlzIElGdWt3S0dzRlc4TU9xM0lSRnFyeEUxaHhUTkViVVBSCg==

bandit10@melinda:~$ cat data.txt | base64 --decode
The password is IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 11 → Level 12
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Level Goal
&lt;/h3&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit11@bandit.labs.overthewire.org"&gt;bandit11@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit11@bandit.labs.overthewire.org"&gt;bandit11@bandit.labs.overthewire.org&lt;/a&gt;'s password: IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit11@melinda:~$ ls
data.txt

bandit11@melinda:~$ cat data.txt
Gur cnffjbeq vf 5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh

bandit11@melinda:~$ cat data.txt | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
The password is 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 12 → Level 13
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Level Goal
&lt;/h3&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit12@bandit.labs.overthewire.org"&gt;bandit12@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit12@bandit.labs.overthewire.org"&gt;bandit12@bandit.labs.overthewire.org&lt;/a&gt;'s password: 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit12@bandit:~$ mkdir /tmp/xyz
bandit12@bandit:~$ cp data.txt /tmp/xyz
bandit12@bandit:~$ cd /tmp/xyz
bandit12@bandit:/tmp/xyz$ ls
data.txt
bandit12@bandit:/tmp/xyz$ xxd -r data.txt &amp;gt; data_xxd_reverse

bandit12@bandit:/tmp/xyz$ file data_xxd_reverse
data_xxd_reverse: gzip compressed data, was "data2.bin", last modified: Thu May  7 18:14:30 2020, max compression, from Unix

bandit12@bandit:/tmp/xyz$ zcat data_xxd_reverse &amp;gt; data_zcat
bandit12@bandit:/tmp/xyz$ file data_zcat
data_zcat: bzip2 compressed data, block size = 900k

bandit12@bandit:/tmp/xyz$ bzip2 -d data_zcat
bzip2: Can't guess original name for data_zcat -- using data_zcat.out
bandit12@bandit:/tmp/xyz$ file data_zcat.out
data_zcat.out: gzip compressed data, was "data4.bin", last modified: Thu May  7 18:14:30 2020, max compression, from Unix

bandit12@bandit:/tmp/xyz$ zcat data_zcat.out &amp;gt; data_zcat_2
bandit12@bandit:/tmp/xyz$ file data_zcat_2
data_zcat_2: POSIX tar archive (GNU)

bandit12@bandit:/tmp/xyz$ tar -xvf data_zcat_2
data5.bin
bandit12@bandit:/tmp/xyz$ file data5.bin
data5.bin: POSIX tar archive (GNU)

bandit12@bandit:/tmp/xyz$ tar -xvf data5.bin
data6.bin
bandit12@bandit:/tmp/xyz$ file data6.bin
data6.bin: bzip2 compressed data, block size = 900k

bandit12@bandit:/tmp/xyz$ bzip2 -d data6.bin
bzip2: Can't guess original name for data6.bin -- using data6.bin.out
bandit12@bandit:/tmp/xyz$ file data6.bin.out
data6.bin.out: POSIX tar archive (GNU)

bandit12@bandit:/tmp/xyz$ tar -xvf data6.bin.out
data8.bin
bandit12@bandit:/tmp/xyz$ file data8.bin
data8.bin: gzip compressed data, was "data9.bin", last modified: Thu May  7 18:14:30 2020, max compression, from Unix

bandit12@bandit:/tmp/xyz$ zcat data8.bin
The password is 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;p&gt;gzip decompress&lt;br&gt;
$ zcat in_file &amp;gt; out_file&lt;br&gt;
bzip2 decompress&lt;br&gt;
$ bzip2 -d file&lt;br&gt;
tar decompress&lt;br&gt;
$ tar xvf file&lt;/p&gt;

&lt;h1&gt;
  
  
  Level 13 → Level 14
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Level Goal
&lt;/h3&gt;

&lt;p&gt;The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. 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. Note: localhost is a hostname that refers to the machine you are working on&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit13@bandit.labs.overthewire.org"&gt;bandit13@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit13@bandit.labs.overthewire.org"&gt;bandit13@bandit.labs.overthewire.org&lt;/a&gt;'s password: 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit13@melinda:~$ ls
sshkey.private
bandit13@melinda:~$ file sshkey.private
sshkey.private: PEM RSA private key

bandit13@melinda:~$ cat sshkey.private
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxkkOE83W2cOT7IWhFc9aPaaQmQDdgzuXCv+ppZHa++buSkN+
gg0tcr7Fw8NLGa5+Uzec2rEg0WmeevB13AIoYp0MZyETq46t+jk9puNwZwIt9XgB
ZufGtZEwWbFWw/vVLNwOXBe4UWStGRWzgPpEeSv5Tb1VjLZIBdGphTIK22Amz6Zb
ThMsiMnyJafEwJ/T8PQO3myS91vUHEuoOMAzoUID4kN0MEZ3+XahyK0HJVq68KsV
ObefXG1vvA3GAJ29kxJaqvRfgYnqZryWN7w3CHjNU4c/2Jkp+n8L0SnxaNA+WYA7
jiPyTF0is8uzMlYQ4l1Lzh/8/MpvhCQF8r22dwIDAQABAoIBAQC6dWBjhyEOzjeA
J3j/RWmap9M5zfJ/wb2bfidNpwbB8rsJ4sZIDZQ7XuIh4LfygoAQSS+bBw3RXvzE
pvJt3SmU8hIDuLsCjL1VnBY5pY7Bju8g8aR/3FyjyNAqx/TLfzlLYfOu7i9Jet67
xAh0tONG/u8FB5I3LAI2Vp6OviwvdWeC4nOxCthldpuPKNLA8rmMMVRTKQ+7T2VS
nXmwYckKUcUgzoVSpiNZaS0zUDypdpy2+tRH3MQa5kqN1YKjvF8RC47woOYCktsD
o3FFpGNFec9Taa3Msy+DfQQhHKZFKIL3bJDONtmrVvtYK40/yeU4aZ/HA2DQzwhe
ol1AfiEhAoGBAOnVjosBkm7sblK+n4IEwPxs8sOmhPnTDUy5WGrpSCrXOmsVIBUf
laL3ZGLx3xCIwtCnEucB9DvN2HZkupc/h6hTKUYLqXuyLD8njTrbRhLgbC9QrKrS
M1F2fSTxVqPtZDlDMwjNR04xHA/fKh8bXXyTMqOHNJTHHNhbh3McdURjAoGBANkU
1hqfnw7+aXncJ9bjysr1ZWbqOE5Nd8AFgfwaKuGTTVX2NsUQnCMWdOp+wFak40JH
PKWkJNdBG+ex0H9JNQsTK3X5PBMAS8AfX0GrKeuwKWA6erytVTqjOfLYcdp5+z9s
8DtVCxDuVsM+i4X8UqIGOlvGbtKEVokHPFXP1q/dAoGAcHg5YX7WEehCgCYTzpO+
xysX8ScM2qS6xuZ3MqUWAxUWkh7NGZvhe0sGy9iOdANzwKw7mUUFViaCMR/t54W1
GC83sOs3D7n5Mj8x3NdO8xFit7dT9a245TvaoYQ7KgmqpSg/ScKCw4c3eiLava+J
3btnJeSIU+8ZXq9XjPRpKwUCgYA7z6LiOQKxNeXH3qHXcnHok855maUj5fJNpPbY
iDkyZ8ySF8GlcFsky8Yw6fWCqfG3zDrohJ5l9JmEsBh7SadkwsZhvecQcS9t4vby
9/8X4jS0P8ibfcKS4nBP+dT81kkkg5Z5MohXBORA7VWx+ACohcDEkprsQ+w32xeD
qT1EvQKBgQDKm8ws2ByvSUVs9GjTilCajFqLJ0eVYzRPaY6f++Gv/UVfAPV4c+S0
kAWpXbv5tbkkzbS0eaLPTKgLzavXtQoTtKwrjpolHKIHUz6Wu+n4abfAIRFubOdN
/+aLoRQ0yBDRbdXMsZN/jvY44eM+xRLdRVyMmdPtP8belRi2E2aEzA==
-----END RSA PRIVATE KEY-----

bandit13@melinda:~$ ssh bandit14@localhost -i sshkey.private -p 2220
bandit14@melinda:~$ cat /etc/bandit_pass/bandit14
4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Level 14 → Level 15
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Level Goal
&lt;/h3&gt;

&lt;p&gt;The password for the next level can be retrieved by submitting the password of the current level to port 30000 on localhost.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit14@bandit.labs.overthewire.org"&gt;bandit14@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="mailto:bandit14@bandit.labs.overthewire.org"&gt;bandit14@bandit.labs.overthewire.org&lt;/a&gt;'s password: 4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit14@bandit:~$ nc localhost 30000
4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e
Correct!
BfMYroe26WYalil77FoDi9qh59eK5xNr
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>challenge</category>
      <category>showdev</category>
      <category>linux</category>
      <category>security</category>
    </item>
    <item>
      <title>OverTheWire :- Bandit (Level 0–10) [CTF]</title>
      <dc:creator>Shubham Patel</dc:creator>
      <pubDate>Mon, 22 Jun 2020 03:25:10 +0000</pubDate>
      <link>https://forem.com/shubham2503/overthewire-bandit-level-0-10-ctf-4mli</link>
      <guid>https://forem.com/shubham2503/overthewire-bandit-level-0-10-ctf-4mli</guid>
      <description>&lt;p&gt;The wargames offered by the OverTheWire community can help you to learn and practice security concepts in the form of fun-filled games.&lt;/p&gt;

&lt;h1&gt;
  
  
  LEVEL 0 → LEVEL 1
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.&lt;/p&gt;

&lt;p&gt;Use ssh to login the server with the following information.&lt;/p&gt;

&lt;p&gt;Username: bandit0&lt;br&gt;
Password: bandit0&lt;br&gt;
Host: bandit.labs.overthewire.org&lt;br&gt;
Port: 2220&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit0@bandit.labs.overthewire.org"&gt;bandit0@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit0@bandit.labs.overthewire.org"&gt;bandit0@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
bandit0&lt;/p&gt;

&lt;h2&gt;
  
  
  To find Password for next level
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit0@bandit:~$ ls
readme
bandit0@bandit:~$ cat readme
boJ9jbbUNNfktd78OOpsqOltutMc3MY1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 1 → LEVEL 2
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file called — located in the home directory&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit1@bandit.labs.overthewire.org"&gt;bandit1@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit1@bandit.labs.overthewire.org"&gt;bandit1@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
boJ9jbbUNNfktd78OOpsqOltutMc3MY1&lt;/p&gt;

&lt;h2&gt;
  
  
  Password
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit1@bandit:~$ ls
-
bandit1@bandit:~$ cat &amp;lt; -
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 2 → LEVEL 3
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file called spaces in this filename located in the home directory&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit2@bandit.labs.overthewire.org"&gt;bandit2@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit2@bandit.labs.overthewire.org"&gt;bandit2@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit2@bandit:~$ ls
spaces in this filename
bandit2@bandit:~$ cat spaces\ in\ this\ filename
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LELVEL 3→ LEVEL 4
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a hidden file in the inhere directory.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit3@bandit.labs.overthewire.org"&gt;bandit3@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit3@bandit.labs.overthewire.org"&gt;bandit3@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit3@bandit:~$ ls
inhere
bandit3@bandit:~$ cd inhere
bandit3@bandit:~/inhere$ ls -al
total 12
drwxr-xr-x 2 root    root    4096 May  7 20:14 .
drwxr-xr-x 3 root    root    4096 May  7 20:14 ..
-rw-r----- 1 bandit4 bandit3   33 May  7 20:14 .hidden
bandit3@bandit:~/inhere$ cat .hidden
pIwrPrtPN36QITSp3EQaw936yaFoFgAB
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 4 →LEVEL 5
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit4@bandit.labs.overthewire.org"&gt;bandit4@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit4@bandit.labs.overthewire.org"&gt;bandit4@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
pIwrPrtPN36QITSp3EQaw936yaFoFgAB&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit4@bandit:~$ ls
inhere
bandit4@bandit:~$ cd inhere
bandit4@bandit:~/inhere$ ls
-file00  -file02  -file04  -file06  -file08
-file01  -file03  -file05  -file07  -file09bandit4@bandit:~/inhere$ file ./-file*
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: databandit4@bandit:~/inhere$ cat ./-file07
koReBOKuIDDepwhWk7jZC0RTdopnAYKh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 5 → LEVEL 6
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;human-readable&lt;/li&gt;
&lt;li&gt;1033 bytes in size&lt;/li&gt;
&lt;li&gt;not executable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit5@bandit.labs.overthewire.org"&gt;bandit5@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit5@bandit.labs.overthewire.org"&gt;bandit5@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
koReBOKuIDDepwhWk7jZC0RTdopnAYKh&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit5@bandit:~$ ls
inhere
bandit5@bandit:~$ ls inhere
maybehere00  maybehere04  maybehere08  maybehere12  maybehere16
maybehere01  maybehere05  maybehere09  maybehere13  maybehere17
maybehere02  maybehere06  maybehere10  maybehere14  maybehere18
maybehere03  maybehere07  maybehere11  maybehere15  maybehere19bandit5@bandit:~$ find -type f -size 1033c
./inhere/maybehere07/.file2bandit5@bandit:~$ cat ./inhere/maybehere07/.file2
DXjZPULLxYr17uwoI01bNLQbtFemEgo7
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 6 → LEVEL 7
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored somewhere on the server and has all of the following properties:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;owned by user bandit7&lt;/li&gt;
&lt;li&gt;owned by group bandit6&lt;/li&gt;
&lt;li&gt;33 bytes in size&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit6@bandit.labs.overthewire.org"&gt;bandit6@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit6@bandit.labs.overthewire.org"&gt;bandit6@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
DXjZPULLxYr17uwoI01bNLQbtFemEgo7&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit6@bandit:~$ ls -al
total 20
drwxr-xr-x  2 root root 4096 May  7 20:14 .
drwxr-xr-x 41 root root 4096 May  7 20:14 ..
-rw-r--r--  1 root root  220 May 15  2017 .bash_logout
-rw-r--r--  1 root root 3526 May 15  2017 .bashrc
-rw-r--r--  1 root root  675 May 15  2017 .profilebandit6@bandit:~$ find / -user bandit7 -group bandit6 -size 33c -type f 2&amp;gt;/dev/null
/var/lib/dpkg/info/bandit7.passwordbandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 7 → LEVEL 8
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt next to the word millionth.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit7@bandit.labs.overthewire.org"&gt;bandit7@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit7@bandit.labs.overthewire.org"&gt;bandit7@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit7@bandit:~$ ls
data.txt
bandit7@bandit:~$ cat data.txt | grep millionth
millionth       cvX2JJa4CFALtqS87jk27qwqGhBM9plV
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 8 → LEVEL 9
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt and is the only line of text that occurs only once&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit8@bandit.labs.overthewire.org"&gt;bandit8@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit8@bandit.labs.overthewire.org"&gt;bandit8@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
cvX2JJa4CFALtqS87jk27qwqGhBM9plV&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit8@bandit:~$ ls
data.txtbandit8@bandit:~$ cat data.txt | sort | uniq -u
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  LEVEL 9→ LEVEL 10
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.&lt;/p&gt;

&lt;p&gt;$ ssh &lt;a href="mailto:bandit9@bandit.labs.overthewire.org"&gt;bandit9@bandit.labs.overthewire.org&lt;/a&gt; -p 2220&lt;br&gt;
This is a OverTheWire game server. More information on &lt;a href="http://www.overthewire.org/wargames"&gt;http://www.overthewire.org/wargames&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:bandit9@bandit.labs.overthewire.org"&gt;bandit9@bandit.labs.overthewire.org&lt;/a&gt;'s password:&lt;br&gt;
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit9@bandit:~$ ls
data.txtbandit9@bandit:~$ strings data.txt | grep "="
========== the*2i"4
=:G e
========== password
&amp;lt;I=zsGi
Z)========== is
A=|t&amp;amp;E
Zdb=
c^ LAh=3G
*SF=s
&amp;amp;========== truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk
S=A.H&amp;amp;^
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Thank You For Reading.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>showdev</category>
      <category>devops</category>
      <category>c</category>
    </item>
    <item>
      <title>Matrix Simulation Using JAVASCRIPT</title>
      <dc:creator>Shubham Patel</dc:creator>
      <pubDate>Wed, 22 Apr 2020 03:36:48 +0000</pubDate>
      <link>https://forem.com/shubham2503/matrix-simulation-2aam</link>
      <guid>https://forem.com/shubham2503/matrix-simulation-2aam</guid>
      <description>&lt;p&gt;Made a Matrix Simulation using P5.js inspired by great Youtuber "THE CODING TRAIN(Danial Shiffman)".&lt;/p&gt;

&lt;p&gt;Link to the code is: &lt;a href="https://github.com/Shubham2503/Matrix-Simulation"&gt;https://github.com/Shubham2503/Matrix-Simulation&lt;/a&gt;&lt;br&gt;
Link to Live  page: &lt;a href="https://shubham2503.github.io/Matrix-Simulation/"&gt;https://shubham2503.github.io/Matrix-Simulation/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UCANVXI1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://drive.google.com/uc%3Fexport%3Dview%26id%3D1NwBHGiQ-O6jKxQvbJb96pIjO5VrASgWc" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UCANVXI1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://drive.google.com/uc%3Fexport%3Dview%26id%3D1NwBHGiQ-O6jKxQvbJb96pIjO5VrASgWc" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
