<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wargame | RedHunter</title>
	<atom:link href="https://redhunter.tech/category/wargame/feed/" rel="self" type="application/rss+xml" />
	<link>https://redhunter.tech</link>
	<description>Blog técnico de Pentesting y Ciberseguridad Ofensiva</description>
	<lastBuildDate>Sat, 26 Jul 2025 14:03:54 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://redhunter.tech/wp-content/uploads/2025/03/cropped-logo_redhunter_rojo_blanco_sinfondo_ok-e1742074840410-32x32.png</url>
	<title>Wargame | RedHunter</title>
	<link>https://redhunter.tech</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[WARGAME] BANDIT</title>
		<link>https://redhunter.tech/wargame-bandit/</link>
		
		<dc:creator><![CDATA[Bariho]]></dc:creator>
		<pubDate>Sat, 26 Jul 2025 14:01:26 +0000</pubDate>
				<category><![CDATA[Wargame]]></category>
		<category><![CDATA[Ciberseguridad]]></category>
		<category><![CDATA[Hacking Etico]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WARGAME]]></category>
		<guid isPermaLink="false">https://redhunter.tech/?p=670</guid>

					<description><![CDATA[En Bandit, cada nivel es un reto real que se resuelve conectándote por SSH a un servidor remoto, explorando el sistema de archivos y utilizando comandos básicos de Linux para encontrar contraseñas ocultas. Nada de teorías abstractas: aprendes tocando sistema, línea por línea. ¬ Level 0 The goal of this level is for you to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">En Bandit, cada nivel es un reto real que se resuelve conectándote por SSH a un servidor remoto, explorando el sistema de archivos y utilizando comandos básicos de Linux para encontrar contraseñas ocultas. Nada de teorías abstractas: aprendes <strong>tocando sistema</strong>, línea por línea.</p>



<h2 class="wp-block-heading" id="level-0"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-0" rel="nofollow noopener" target="_blank"></a>¬ Level 0</h2>



<p class="wp-block-paragraph">The goal of this level is for you to log into the game using SSH. The host to which you need to connect is <strong>bandit.labs.overthewire.org</strong>, on port 2220. The username is <strong>bandit0</strong> and the password is <strong>bandit0</strong>. Once logged in, go to the <a href="https://overthewire.org/wargames/bandit/bandit1.html" rel="nofollow noopener" target="_blank">Level 1</a> page to find out how to beat Level 1.</p>



<h2 class="wp-block-heading" id="level-0-level-1"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-0-level-1" rel="nofollow noopener" target="_blank"></a>¬ Level 0 <strong>→ Level 1</strong></h2>



<p class="wp-block-paragraph">The password for the next level is stored in a file called <strong>readme</strong> located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.</p>



<p class="wp-block-paragraph">Lo primero que haremos será conectarnos mediante ssh con las credenciales que nos da la pagina.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit0</strong></li>



<li>PASS: <strong>bandit0</strong></li>



<li>PORT: <strong>2220</strong></li>
</ul>



<p class="wp-block-paragraph">Copiar</p>



<pre class="wp-block-code"><code>ssh bandit0@bandit.labs.overthewire.org -P 2220</code></pre>



<p class="wp-block-paragraph">Con un simple listado en el propio directorio podremos ver un archivo <strong>README, </strong>que mediante con una <strong>cat</strong> podremos ver la credencial del siguiente nivel.Copiar</p>



<pre class="wp-block-code"><code>cat readme</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeB3dise6zaD99Cbioi%252F-MeB4nB5qvJUj9p9dejQ%252FLvl0.PNG%3Falt%3Dmedia%26token%3D01b23dc8-81ad-4d3a-a1a0-4f90a582d54d&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=212b4306&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-1-level-2"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-1-level-2" rel="nofollow noopener" target="_blank"></a>¬ Level 1 → Level 2</h2>



<p class="wp-block-paragraph">The password for the next level is stored in a file called <strong>&#8211;</strong> located in the home directory.</p>



<p class="wp-block-paragraph">Ahora tenemos que modificar el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit1</strong></li>



<li>PASS: <strong>boJ9jbbUNNfktd78OOpsqOltutMc3MY1</strong></li>
</ul>



<p class="wp-block-paragraph">Con un listado en el propio directorio vemos un archivo llamado <strong>«-«, </strong>para poder ver el contenido del archivo haremos lo siguiente.Copiar</p>



<pre class="wp-block-code"><code>cat $(pwd)/-</code></pre>



<p class="wp-block-paragraph">Con esto podremos ver la credencial del siguiente nivel.</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeB3dise6zaD99Cbioi%252F-MeB6SIkHZHDXCsNT_oP%252FLvl1.PNG%3Falt%3Dmedia%26token%3D96e8f7cd-ac4d-4110-90c1-cd33e68150d7&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=591825e3&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-2-level-3"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-2-level-3" rel="nofollow noopener" target="_blank"></a>¬ Level 2 → Level 3</h2>



<p class="wp-block-paragraph">The password for the next level is stored in a file called <strong>spaces in this filename</strong> located in the home directory.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit2</strong></li>



<li>PASS: <strong>CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que en el propio directorio hay un archivo, el nombre del archivo contiene espacios, para ver ese directorio podemos hacer un cat escribir la primeras letras y tabular, y con esto veremos la credencial del siguiente nivel.Copiar</p>



<pre class="wp-block-code"><code>cat spaces\ in\ this\ filename</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeB3dise6zaD99Cbioi%252F-MeB6UQ6IIns8RoZcHOc%252Flvl2.PNG%3Falt%3Dmedia%26token%3D271b4d6a-5044-4714-8eb1-cf5191289468&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=f1375418&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-3-level-4"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-3-level-4" rel="nofollow noopener" target="_blank"></a>¬ Level 3 → Level 4</h2>



<p class="wp-block-paragraph">The password for the next level is stored in a hidden file in the <strong>inhere</strong> directory.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit3</strong></li>



<li>PASS: <strong>UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos un directorio, al ingresar en el vemos que hay un archivo oculto en el.</p>



<p class="wp-block-paragraph">Para listar el archivo oculto simplemente hacemos un cat con el nombre del archivo completo y nos dará la credencial del siguiente nivel.Copiar</p>



<pre class="wp-block-code"><code>cat .hidden</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeB6oHJjrsCetL7KHel%252F-MeB7RcAySfCU1ZNKrlX%252Flvl3.PNG%3Falt%3Dmedia%26token%3D202b6eb7-42b1-4f70-b295-c731a237dc77&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=f270d8a9&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-4-level-5"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-4-level-5" rel="nofollow noopener" target="_blank"></a>¬ Level 4 → Level 5</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the only human-readable file in the <strong>inhere</strong> directory. Tip: if your terminal is messed up, try the “reset” command.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit4</strong></li>



<li>PASS: <strong>pIwrPrtPN36QITSp3EQaw936yaFoFgAB</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que contiene un directorio y al ingresar en el vemos que hay varios archivos que comienzan con un <strong>«-«, </strong>para no ir uno por uno vamos a realizar el siguiente comando.Copiar</p>



<pre class="wp-block-code"><code>file $(pwd)/*</code></pre>



<p class="wp-block-paragraph">Con esto veremos el archivo en formato ASCII text, donde estará la credencial del siguiente nivel.Copiar</p>



<pre class="wp-block-code"><code>cat $(pwd)/-file07</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeB6oHJjrsCetL7KHel%252F-MeB8TOjDOqJ0IiLc5V8%252Flvl4.PNG%3Falt%3Dmedia%26token%3D1f61ef89-7898-402e-8190-f833205ad7a7&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=29f3a2c&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-5-level-6"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-5-level-6" rel="nofollow noopener" target="_blank"></a>¬ Level 5 → Level 6</h2>



<p class="wp-block-paragraph">The password for the next level is stored in a file somewhere under the <strong>inhere</strong> directory and has all of the following properties:</p>



<ul class="wp-block-list">
<li>human-readable</li>



<li>1033 bytes in size</li>



<li>not executable</li>
</ul>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit5</strong></li>



<li>PASS: <strong>koReBOKuIDDepwhWk7jZC0RTdopnAYKh</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos una carpeta que contiene mas carpetas con archivos, y nos dice que el archivo es leíble, pesa 1033 bytes y no es ejecutable.Copiar</p>



<pre class="wp-block-code"><code>find inthere/ -type f -readable -size 1033c ! -executable 2&gt;/dev/null | xargs cat | tr -d ' '</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeG4K9og0Sp43a-LmRw%252F-MeG6vKTQtnjtpJquNpV%252Flvl5.PNG%3Falt%3Dmedia%26token%3D099e3859-f798-4841-976f-6bd05c98778a&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=d853d1c4&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-6-level-7"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-6-level-7" rel="nofollow noopener" target="_blank"></a>¬ Level 6 → Level 7</h2>



<p class="wp-block-paragraph">The password for the next level is stored <strong>somewhere on the server</strong> and has all of the following properties:</p>



<ul class="wp-block-list">
<li>owned by user bandit7</li>



<li>owned by group bandit6</li>



<li>33 bytes in size</li>
</ul>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit6</strong></li>



<li>PASS: <strong>DXjZPULLxYr17uwoI01bNLQbtFemEgo7</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que no tenemos nada en el directorio, pero nos da los siguientes datos:</p>



<ul class="wp-block-list">
<li>Dueño: bandit7</li>



<li>Grupo: bandit6</li>



<li>Tamaño: 33 bytes</li>
</ul>



<p class="wp-block-paragraph">Copiar</p>



<pre class="wp-block-code"><code>find / -type f -user bandit7 -group bandit6 -size 33c 2&gt;/dev/null | xargs cat</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeG4K9og0Sp43a-LmRw%252F-MeG8Pfk7rLn4pg1M3rG%252Flvl6.PNG%3Falt%3Dmedia%26token%3D41001d5c-0c68-4a61-b53c-cae67b44c504&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=4157af1&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-7-level-8"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-7-level-8" rel="nofollow noopener" target="_blank"></a>¬ Level 7 → Level 8</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the file <strong>data.txt</strong> next to the word <strong>millionth..</strong></p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit7</strong></li>



<li>PASS: <strong>HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs</strong></li>
</ul>



<p class="wp-block-paragraph">Tenemos un archivo .txt y nos dice que la contraseña esta al lado de la palabra <strong>millionth.</strong>Copiar</p>



<pre class="wp-block-code"><code>grep "milionth" data.txt | awk '{print $2}'</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeG90kYmo8YOf1H91-G%252F-MeG9N6FIi0EI1mvr033%252Flvl7.PNG%3Falt%3Dmedia%26token%3D24f5e0fd-1642-41a2-af3f-acfba802dc94&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=39128dd6&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-8-level-9"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-8-level-9" rel="nofollow noopener" target="_blank"></a>¬ Level 8 → Level 9</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the file <strong>data.txt</strong> and is the only line of text that occurs only once.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit8</strong></li>



<li>PASS:<strong> cvX2JJa4CFALtqS87jk27qwqGhBM9plV</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos una archivo donde hay muchas credenciales y y nuestra credencial solo aparece una vez.Copiar</p>



<pre class="wp-block-code"><code>sort data.txt | uniq -u </code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeGAFIwu6ZHO1iDvQry%252F-MeGB8PeDy1V6IVzuxwv%252Flvl8.PNG%3Falt%3Dmedia%26token%3D92933cb7-7ccc-4f84-9ed9-b32fbc1fb653&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=46fafd41&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-9-level-10"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-9-level-10" rel="nofollow noopener" target="_blank"></a>¬ Level 9 → Level 10</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the file <strong>data.txt</strong> in one of the few human-readable strings, preceded by several ‘=’ characters.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit9</strong></li>



<li>PASS: <strong>UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos un archivo <strong>data, </strong>y nos dice que un carácter leíble es el <strong>«=»</strong>Copiar</p>



<pre class="wp-block-code"><code>strings data | grep "===" | tail -n 1 | awk '{print $2}'</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeGD3x5jIAdNqsyfyhl%252F-MeGET_q27_ZyPDdoxOF%252Flvl9.PNG%3Falt%3Dmedia%26token%3D3dc7182f-7aa7-422e-a090-0b3f32c48b5d&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=88668672&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-10-level-11"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-10-level-11" rel="nofollow noopener" target="_blank"></a>¬ Level 10 → Level 11</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the file <strong>data.txt</strong>, which contains base64 encoded data</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit10</strong></li>



<li>PASS: <strong>truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk</strong></li>
</ul>



<p class="wp-block-paragraph">Copiar</p>



<pre class="wp-block-code"><code>base64 -d data.txt | awk '{print $4}'</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeGEc0XDy8zj38_GVG2%252F-MeGFReMvDnNK08w11qN%252Flvl10.PNG%3Falt%3Dmedia%26token%3Dbcd68a2b-8e29-4625-875b-d0262b91cefe&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=3d08c9e5&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-11-level-12"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-11-level-12" rel="nofollow noopener" target="_blank"></a>¬ Level 11 → Level 12</h2>



<p class="wp-block-paragraph">The password for the next level is stored in the file <strong>data.txt</strong>, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit11</strong></li>



<li>PASS: <strong>IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que esta codificado como <strong>ROT13.</strong>Copiar</p>



<pre class="wp-block-code"><code>cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m' | awk '{print $4}'</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeGFs0byoT-Pr_oITS_%252F-MeGH_PT7VADuxIPNxCn%252Flvl11.PNG%3Falt%3Dmedia%26token%3Dacbdbea5-3e7b-4b2f-8efb-e22bf6398717&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=936194c&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-12-level-13"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-12-level-13" rel="nofollow noopener" target="_blank"></a>¬ Level 12 → Level 13</h2>



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



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit12</strong></li>



<li>PASS: <strong>5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos un archivo en <strong>hexadecimal, </strong>copiamos el archivo y lo pegamos en nuestra maquina para analizarlo.</p>



<p class="wp-block-paragraph">Con la herramienta <strong>xxd</strong> podremos ver que hay un contenido, lo guardamos en otro archivo y vemos que es un <strong>.gzip. </strong>Al descomprimirlo vemos que hay otro comprimible dentro, volvemos a descomprimirlo y hay otro.</p>



<p class="wp-block-paragraph">Vamos a scriptearlo para mayor comodidad.Copiar</p>



<pre class="wp-block-code"><code>#!/bin/bash

name_compressed=$(7z l $1 | grep "Name" -A 2 | tail -n 1 | awk 'NF{print $NF}')
7z x $1 &gt; /dev/null 2&gt;&amp;1

while true; do
	7z l $name_compressed &gt; /dev/null 2&gt;&amp;1
	
	if &#91; "$(echo $?)" == "0" ];then
		decompressed_next=$(7z l $name_compressed | grep "Name" -A 2 | tail -n 1 | awk 'NF{print $NF}')
		7z x $name_compressed &gt; /dev/null 2&gt;&amp;1 &amp;&amp; name_compressed=$decompressed_next
	else
		cat $name_compressed | awk '{print $4}'; rm data* 2&gt;/dev/null
		exit 1
	fi
done</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeQaQ7viHNzawW4mnl8%252F-MeQayqQH-YDvxyK_GtS%252Flvl12.PNG%3Falt%3Dmedia%26token%3Df2bf1844-9aed-4893-8a8c-08beb6696426&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=5ec0d0c4&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-13-level-14"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-13-level-14" rel="nofollow noopener" target="_blank"></a>¬ Level 13 → Level 14</h2>



<p class="wp-block-paragraph">The password for the next level is stored in <strong>/etc/bandit_pass/bandit14 and can only be read by user bandit14</strong>. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. <strong>Note:</strong> <strong>localhost</strong> is a hostname that refers to the machine you are working on.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit13</strong></li>



<li>PASS: <strong>8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos una <strong>id_rsa</strong>, vamos a conectarnos al usuario <strong>bandit14.</strong>Copiar</p>



<pre class="wp-block-code"><code>ssh -i sshkey.private bandit14@localhost</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeQaQ7viHNzawW4mnl8%252F-MeQb2bJh4u6bDFjF7bs%252Flvl%252013.PNG%3Falt%3Dmedia%26token%3D480423ab-6750-47b0-9ea7-50077ff57cc5&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=839eb551&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-14-level-15"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-14-level-15" rel="nofollow noopener" target="_blank"></a>¬ Level 14 → Level 15</h2>



<p class="wp-block-paragraph">The password for the next level can be retrieved by submitting the password of the current level to <strong>port 30000 on localhost</strong>.</p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit14</strong></li>



<li>PASS: <strong>4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e</strong></li>
</ul>



<p class="wp-block-paragraph">El enunciado nos dice que tenemos que enviar la contraseña al puerto 30000 en localhost.Copiar</p>



<pre class="wp-block-code"><code>nc localhost 30000 &lt;PASSWORD&gt;</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeQaQ7viHNzawW4mnl8%252F-MeQavMYgqk2nQgh-xMS%252Flvl14.PNG%3Falt%3Dmedia%26token%3D74cfd513-01b2-42ac-9bdc-60e30574fe39&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=75d42dcd&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-15-level-16"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-15-level-16" rel="nofollow noopener" target="_blank"></a>¬ Level 15 → Level 16</h2>



<p class="wp-block-paragraph">The password for the next level can be retrieved by submitting the password of the current level to <strong>port 30001 on localhost</strong> using SSL encryption.</p>



<p class="wp-block-paragraph"><strong>Helpful note: Getting “HEARTBEATING” and “Read R BLOCK”? Use -ign_eof and read the “CONNECTED COMMANDS” section in the manpage. Next to ‘R’ and ‘Q’, the ‘B’ command also works in this version of that command…</strong></p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit15</strong></li>



<li>PASS: <strong>BfMYroe26WYalil77FoDi9qh59eK5xNr</strong></li>
</ul>



<p class="wp-block-paragraph">Tenemos que mandar la contraseña usando la encriptación ssl.Copiar</p>



<pre class="wp-block-code"><code>echo &lt;PASSWORD&gt; | openssl s_client -quiet -connect localhost:30001</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeQbT6nplrIrIIi-cmk%252F-MeQesLTDbyJV5FV-d8V%252Flvl15.PNG%3Falt%3Dmedia%26token%3D4eab4172-5446-437b-9da3-088103d744c7&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=762515a0&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-16-level-17"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-16-level-17" rel="nofollow noopener" target="_blank"></a>¬ Level 16 → Level 17</h2>



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



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit16</strong></li>



<li>PASS: <strong>cluFn7wTiGryunymYOu4RcffSxQluehd</strong></li>
</ul>



<p class="wp-block-paragraph">Nos dice que tenemos que buscar un puerto abierto en un rango que nos ofrece. Vemos que tenemos nmap para escanear los puertos.Copiar</p>



<pre class="wp-block-code"><code>nmap --open -T5 -v -n localhost</code></pre>



<p class="wp-block-paragraph">Luego nos dice que tenemos que mandarle la contraseña por ssl.Copiar</p>



<pre class="wp-block-code"><code>openssl s_client -connect localhost:31790</code></pre>



<p class="wp-block-paragraph">Y nos da una <strong>id_rsa, </strong>para conectarnos al usuario <strong>bandit17 </strong>y ver la contraseña del mismo.</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MeQbT6nplrIrIIi-cmk%252F-MeQomRiw50QkQ2_BSpF%252Flvl17.PNG%3Falt%3Dmedia%26token%3D01c7b52d-f8b1-4f89-ad3b-2431abde18fc&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=e42170e8&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-17-level-18"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-17-level-18" rel="nofollow noopener" target="_blank"></a>¬ Level 17 → Level 18</h2>



<p class="wp-block-paragraph">There are 2 files in the homedirectory: <strong>passwords.old and passwords.new</strong>. The password for the next level is in <strong>passwords.new</strong> and is the only line that has been changed between <strong>passwords.old and passwords.new</strong></p>



<p class="wp-block-paragraph"><strong>NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19</strong></p>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit17</strong></li>



<li>PASS: <strong>xLYVMN9WE5zQ5vHacb0sZEVqbrp7nBTn</strong></li>
</ul>



<p class="wp-block-paragraph">Con la herramienta diff podemos ver los cambios en los dos archivos, donde podremos ver la contraseña del siguiente nivel.Copiar</p>



<pre class="wp-block-code"><code>diff passwords.new passwords.old</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MetsX-AdWeFE9sTcpRd%252F-MettXxT3CBi22KhTTES%252Flvl18.PNG%3Falt%3Dmedia%26token%3Df4a32dd0-0e5a-4d08-ac3f-1ea170700db4&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=1c1e9a8e&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-18-level-19"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-18-level-19" rel="nofollow noopener" target="_blank"></a> ¬ Level 18 → Level 19</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit18</strong></li>



<li>PASS: <strong>kfBf3eYk5BPBRzwjqutbbfE887SVc5Yd</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que nos echa de la sesión ssh, intentamos ejecutar comandos con la sesión ssh y vemos que podemos ejecutar comandos, vamos a ver la contraseña.Copiar</p>



<pre class="wp-block-code"><code>ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readme</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MetsX-AdWeFE9sTcpRd%252F-MetuqVeSmvhGV6f2tLZ%252Flvl19.PNG%3Falt%3Dmedia%26token%3D1acf9183-08b5-4376-a6e7-67c90aeb6cc9&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=2b4a92df&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-19-level-20"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-19-level-20" rel="nofollow noopener" target="_blank"></a>¬ Level 19 → Level 20</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit19</strong></li>



<li>PASS: <strong>IueksS7Ubh8G3DCwVzrTd8rAVOwq3M5x</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos un ejecutable, y al ejecutarlo nos pide un comando, vamos a ver la flag.Copiar</p>



<pre class="wp-block-code"><code>./bandit20-do cat /etc/bandit_pass/bandit20</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MetsX-AdWeFE9sTcpRd%252F-MetvkIEiTAsEtkf-HWC%252Flvl20.PNG%3Falt%3Dmedia%26token%3D3f5e8fb6-2415-498c-8d90-e1d057709448&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=12aa13c&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-20-level-21"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-20-level-21" rel="nofollow noopener" target="_blank"></a>¬ Level 20 → Level 21</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit20</strong></li>



<li>PASS: <strong>GbKksEFF4yrVs6il55v6gwY5aVje5f0j</strong></li>
</ul>



<p class="wp-block-paragraph">Abriremos dos sesiones de ssh, en una nos pondremos en escucha y en la otra ejecutaremos el ejecutable con el puerto en escucha, pasamos la contraseña en la sesión de escucha y listo</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MetyuwkRDvSESBTAwHa%252F-MetzadwaKrw-uY_5us8%252Flvl21.PNG%3Falt%3Dmedia%26token%3Dbbb13028-daa5-4cef-a131-ea312d69dad9&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=f4f8f02d&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-21-level-22"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-21-level-22" rel="nofollow noopener" target="_blank"></a>¬ Level 21 → Level 22</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit21</strong></li>



<li>PASS: <strong>gE269g2h3mw3pwgrj0Ha9Uoqen1c9DGr</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que hay una tarea cron, al ver la tarea cron vemos que la contraseña esta alojada en una carpeta /tmp.</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-Meu-0TLxfdaYqEveE8a%252F-Meu0jtuGK3qOOOV97TR%252Flvl22.PNG%3Falt%3Dmedia%26token%3D798ff07b-137d-4b0b-9f8d-59983ce967f2&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=2270a0d5&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-22-level-23"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-22-level-23" rel="nofollow noopener" target="_blank"></a>¬ Level 22 → Level 23</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit22</strong></li>



<li>PASS: <strong>Yk7owGAcWjwMVRwrTesJEwB7WVOiILLI</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos otra tarea cron, donde tendremos que pasar md5sum para poder ver la contraseña.</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-Meu2Y4reggQ3OBGV5Er%252F-Meu5W6tym80rofEaObG%252Fscript.PNG%3Falt%3Dmedia%26token%3D84d54ddf-7787-45af-9bfa-37be669f18ad&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=7d8d0c40&amp;sv=2" alt=""/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-Meu2Y4reggQ3OBGV5Er%252F-Meu5YQ43_LCAIw2sXXu%252Flvl23.PNG%3Falt%3Dmedia%26token%3D5eac8a30-388d-416a-ac3a-06c5af13d6cf&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=a8f7dd11&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-23-level-24"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-23-level-24" rel="nofollow noopener" target="_blank"></a>¬ Level 23 → Level 24</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit23</strong></li>



<li>PASS: <strong>jc1udXuA1tiHqjIsL8yaapX5XIAI6i0n</strong></li>
</ul>



<p class="wp-block-paragraph">Vemos que tenemos un archivo cron, que ejecuta el siguiente scrip.</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-Meu5_ZNYZ3yBoqXd-cE%252F-MeuhTiBXDvd3OPST6n8%252Fimage.png%3Falt%3Dmedia%26token%3D1816f192-4a12-4e08-81aa-80e4063fdf63&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=fbf70028&amp;sv=2" alt=""/></figure>



<p class="wp-block-paragraph">Creamos un script donde copiamos la contraseña y la peguemos a un directorio temporal que creamos.</p>



<p class="wp-block-paragraph">A continuación copiamos el script a la ruta /var/spool/bandti24 y toca esperar.</p>



<h2 class="wp-block-heading" id="level-24-level-25"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-24-level-25" rel="nofollow noopener" target="_blank"></a>¬ Level 24 → Level 25</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit24</strong></li>



<li>PASS: <strong>UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ</strong></li>
</ul>



<p class="wp-block-paragraph">Creamos un directorio temp, y creamos un script para generar el pin code y la contraseña</p>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MfT-HuQXGdePEcxa3Ap%252F-MfT14StWihT_LOWGeuY%252Fscript%25204.PNG%3Falt%3Dmedia%26token%3D679fb72d-2b5a-4e64-9d63-25f988a5a785&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=de6f0a92&amp;sv=2" alt=""/></figure>



<p class="wp-block-paragraph">Y luego lo mandamos por nc para que nos de la siguiente contraseña.Copiar</p>



<pre class="wp-block-code"><code>cat dictionary.txt | nc localhost 30002 | grep -v -E "Wrong|Please"</code></pre>



<figure class="wp-block-image"><img decoding="async" src="https://alerodriguezm99.gitbook.io/bariho/~gitbook/image?url=https%3A%2F%2F2982264145-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-MamKyPczuN7KvAeItev%252F-MfT-HuQXGdePEcxa3Ap%252F-MfT1LDwKhrB3O7fX1Cw%252Flvl25.PNG%3Falt%3Dmedia%26token%3Db8f61e43-0a98-44bb-90e9-3cdfc5472271&amp;width=768&amp;dpr=4&amp;quality=100&amp;sign=5b7179b9&amp;sv=2" alt=""/></figure>



<h2 class="wp-block-heading" id="level-25-level-26"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-25-level-26" rel="nofollow noopener" target="_blank"></a>¬ Level 25 → Level 26</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit25</strong></li>



<li>PASS: <strong>uNG9O58gUE7snukf3bvZ0rxhtnjzSGzG</strong></li>
</ul>



<p class="wp-block-paragraph">Nos da una id_rsa para conectarnos a bandit 26, pero nos echa de la sesion, investigando vemos que reducir la ventana de la shell para que aparezca el «more» y poder sacar una bash.</p>



<h2 class="wp-block-heading" id="level-26-level-27"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-26-level-27" rel="nofollow noopener" target="_blank"></a>¬ Level 26 → Level 27</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit26</strong></li>



<li>PASS: <strong>5czgV9L3Xx8JPOyRbXh6lQbmIOWvPT6Z</strong></li>
</ul>



<p class="wp-block-paragraph">En el directorio vemos un ejecutable de bandit27, simplemente lanzamos el script con bash -p y nos convertimos en bandit27.</p>



<h2 class="wp-block-heading" id="level-27-level-28"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-27-level-28" rel="nofollow noopener" target="_blank"></a>¬ Level 27 → Level 28</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit27</strong></li>



<li>PASS: <strong>3ba3118a22e93127a4ed485be72ef5ea</strong></li>
</ul>



<p class="wp-block-paragraph">Nos descargamos un repositorio de github, y dentro esta la contraseña del siguiente nivel.</p>



<h2 class="wp-block-heading" id="level-28-level-29"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-28-level-29" rel="nofollow noopener" target="_blank"></a>¬ Level 28 → Level 29</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit28</strong></li>



<li>PASS: <strong>0ef186ac70e04ea33b4c1853d2526fa2</strong></li>
</ul>



<p class="wp-block-paragraph">Nos descargamos un repositorio de github, y vemos en los log del git, si han habido cambios</p>



<p class="wp-block-paragraph">git log -p</p>



<h2 class="wp-block-heading" id="level-29-level-30"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-29-level-30" rel="nofollow noopener" target="_blank"></a>¬ Level 29 → Level 30</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit29</strong></li>



<li>PASS: <strong>bbc96594b4e001778eee9975372716b2</strong></li>
</ul>



<p class="wp-block-paragraph">Nos descargamos un repositorio de github, y vemos los branch.</p>



<p class="wp-block-paragraph">git branch -r</p>



<p class="wp-block-paragraph">git checkout dev</p>



<p class="wp-block-paragraph">Volvemos a ver los logs</p>



<p class="wp-block-paragraph">git log -p</p>



<p class="wp-block-paragraph">Y tenemos la contraseña</p>



<h2 class="wp-block-heading" id="level-30-level-31"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-30-level-31" rel="nofollow noopener" target="_blank"></a>¬ Level 30 → Level 31</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit30</strong></li>



<li>PASS: <strong>5b90576bedb2cc04c86a9e924ce42faf</strong></li>
</ul>



<p class="wp-block-paragraph">Nos descargamos un repositorio de github, y vemos que contiene un tag, al verlo vemos la contraseña del siguiente nivel.</p>



<p class="wp-block-paragraph">git tag</p>



<p class="wp-block-paragraph">git show secret</p>



<h2 class="wp-block-heading" id="level-31-level-32"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-31-level-32" rel="nofollow noopener" target="_blank"></a>¬ Level 31 → Level 32</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit31</strong></li>



<li>PASS: <strong>47e603bb428404d265f59c42920d81e5</strong></li>
</ul>



<p class="wp-block-paragraph">Nos descargamos un repositorio de github, y tenemos que subir un archivo al repositorio, pero antes tenemos que borrar un archivo del repo.</p>



<p class="wp-block-paragraph">git add key.txt</p>



<p class="wp-block-paragraph">git commit «ALGO»</p>



<p class="wp-block-paragraph">git push -u origin master</p>



<p class="wp-block-paragraph">Y vemos la contraseña del siguiente usuario.</p>



<h2 class="wp-block-heading" id="level-32-level-33"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-32-level-33" rel="nofollow noopener" target="_blank"></a>¬ Level 32 → Level 33</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit32</strong></li>



<li>PASS: <strong>56a9bf19c63d650ce78e6ec0354ee45e</strong></li>
</ul>



<p class="wp-block-paragraph">Para escapar de esta consola, simplemente ponemos $0 y tenemos una bash, ya podremos ver la contraseña del siguiente nivel.</p>



<h2 class="wp-block-heading" id="level-33-level-34"><a href="https://alerodriguezm99.gitbook.io/bariho/walkthrough/overthewire/bandit#level-33-level-34" rel="nofollow noopener" target="_blank"></a>¬ Level 33 → Level 34</h2>



<p class="wp-block-paragraph">Modificamos el usuario de la conexión ssh.</p>



<ul class="wp-block-list">
<li>USER: <strong>bandit33</strong></li>



<li>PASS: <strong>c9c3199ddf4121b10cf581a98d51caee</strong></li>
</ul>



<p class="wp-block-paragraph">Terminamos todos los niveles.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
